From bdb6de1fc5d503fc90ade3f2e2fac28d34ebddaa Mon Sep 17 00:00:00 2001 From: Fina Wilke Date: Tue, 22 Oct 2024 21:46:16 +0200 Subject: [PATCH] gio: Add interface bounds to ApplicationImpl --- gio/src/subclass/application.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gio/src/subclass/application.rs b/gio/src/subclass/application.rs index 12800875764c..de0b44be2918 100644 --- a/gio/src/subclass/application.rs +++ b/gio/src/subclass/application.rs @@ -5,7 +5,7 @@ use std::{ffi::OsString, fmt, ops::Deref, ptr}; use glib::{prelude::*, subclass::prelude::*, translate::*, ExitCode, VariantDict}; use libc::{c_char, c_int, c_void}; -use crate::{ffi, Application}; +use crate::{ffi, ActionGroup, ActionMap, Application}; pub struct ArgumentList { pub(crate) ptr: *mut *mut *mut c_char, @@ -64,7 +64,9 @@ impl From for Vec { } } -pub trait ApplicationImpl: ObjectImpl + ObjectSubclass> { +pub trait ApplicationImpl: + ObjectImpl + ObjectSubclass + IsA + IsA> +{ fn activate(&self) { self.parent_activate() } @@ -449,7 +451,7 @@ mod tests { glib::wrapper! { pub struct SimpleApplication(ObjectSubclass) - @implements crate::Application; + @implements Application, ActionMap, ActionGroup; } #[test]