[gnome-builder/wip/chergert/debugger: 93/106] egg-signal-group: add support for interfaces
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/debugger: 93/106] egg-signal-group: add support for interfaces
- Date: Sat, 8 Apr 2017 02:33:54 +0000 (UTC)
commit 70dd298de9a71a3dcdd8514f5d15055de257e466
Author: Christian Hergert <chergert redhat com>
Date: Sun Mar 26 17:44:55 2017 -0700
egg-signal-group: add support for interfaces
We need to pre-load the type if it is an interface, just like we do for
classes.
contrib/egg/egg-signal-group.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/contrib/egg/egg-signal-group.c b/contrib/egg/egg-signal-group.c
index 550bcc4..ff3fc9b 100644
--- a/contrib/egg/egg-signal-group.c
+++ b/contrib/egg/egg-signal-group.c
@@ -109,8 +109,16 @@ egg_signal_group_set_target_type (EggSignalGroup *self,
/* The class must be created at least once for the signals
* to be registered, otherwise g_signal_parse_name() will fail
*/
- if (g_type_class_peek (target_type) == NULL)
- g_type_class_unref (g_type_class_ref (target_type));
+ if (G_TYPE_IS_INTERFACE (target_type))
+ {
+ if (g_type_default_interface_peek (target_type) == NULL)
+ g_type_default_interface_unref (g_type_default_interface_ref (target_type));
+ }
+ else
+ {
+ if (g_type_class_peek (target_type) == NULL)
+ g_type_class_unref (g_type_class_ref (target_type));
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]