Skip to content

Commit 865f49a

Browse files
authored
Merge pull request #1551 from felinira/wip/interface-bounds
gio: Add interface bounds to ApplicationImpl
2 parents 260d747 + bdb6de1 commit 865f49a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

gio/src/subclass/application.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::{ffi::OsString, fmt, ops::Deref, ptr};
55
use glib::{prelude::*, subclass::prelude::*, translate::*, ExitCode, VariantDict};
66
use libc::{c_char, c_int, c_void};
77

8-
use crate::{ffi, Application};
8+
use crate::{ffi, ActionGroup, ActionMap, Application};
99

1010
pub struct ArgumentList {
1111
pub(crate) ptr: *mut *mut *mut c_char,
@@ -64,7 +64,9 @@ impl From<ArgumentList> for Vec<OsString> {
6464
}
6565
}
6666

67-
pub trait ApplicationImpl: ObjectImpl + ObjectSubclass<Type: IsA<Application>> {
67+
pub trait ApplicationImpl:
68+
ObjectImpl + ObjectSubclass<Type: IsA<Application> + IsA<ActionGroup> + IsA<ActionMap>>
69+
{
6870
fn activate(&self) {
6971
self.parent_activate()
7072
}
@@ -449,7 +451,7 @@ mod tests {
449451

450452
glib::wrapper! {
451453
pub struct SimpleApplication(ObjectSubclass<imp::SimpleApplication>)
452-
@implements crate::Application;
454+
@implements Application, ActionMap, ActionGroup;
453455
}
454456

455457
#[test]

0 commit comments

Comments
 (0)