diff options
author | Ted Gould <ted@gould.cx> | 2011-06-20 16:43:41 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-06-20 16:43:41 -0500 |
commit | 0b1b3745b5a082c94e0b0b0548a9d068ba8645e5 (patch) | |
tree | 8c0da3872a68080a5ab5f8274e8961e26098123a /libdbusmenu-glib/menuitem.c | |
parent | 5e1cdbb204626572c4624420266bae4d85c4e027 (diff) | |
parent | 2f1adbf33420ba6c79a99938af18f9d7c4ec3484 (diff) | |
download | libdbusmenu-0b1b3745b5a082c94e0b0b0548a9d068ba8645e5.tar.gz libdbusmenu-0b1b3745b5a082c94e0b0b0548a9d068ba8645e5.tar.bz2 libdbusmenu-0b1b3745b5a082c94e0b0b0548a9d068ba8645e5.zip |
* New upstream release.
* Fixing visibility for Eclipse (LP: #770263 and LP: #618587)
* Unseting a GValue properly (LP: #785828)
* Memory leaks for GVariant usage (LP: #784890)
* Making GTK 3 default build
* Removing the SerializableMenuitem object
Diffstat (limited to 'libdbusmenu-glib/menuitem.c')
-rw-r--r-- | libdbusmenu-glib/menuitem.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/libdbusmenu-glib/menuitem.c b/libdbusmenu-glib/menuitem.c index bdaf49f..4e037ee 100644 --- a/libdbusmenu-glib/menuitem.c +++ b/libdbusmenu-glib/menuitem.c @@ -575,7 +575,7 @@ dbusmenu_menuitem_set_realized (DbusmenuMenuitem * mi) * has. The list is valid until another child related function * is called, where it might be changed. * - * Return value: (transfer none): A #GList of pointers to #DbusmenuMenuitem objects. + * Return value: (transfer none) (element-type Dbusmenu.Menuitem): A #GList of pointers to #DbusmenuMenuitem objects. */ GList * dbusmenu_menuitem_get_children (DbusmenuMenuitem * mi) @@ -1694,25 +1694,20 @@ dbusmenu_menuitem_handle_event (DbusmenuMenuitem * mi, const gchar * name, GVari #endif DbusmenuMenuitemClass * class = DBUSMENU_MENUITEM_GET_CLASS(mi); - /* We need to keep a ref to the variant because the signal - handler will drop the floating ref and then we'll be up - a creek if we don't have our own later. */ - if (variant != NULL) { - g_variant_ref_sink(variant); + gboolean handled = FALSE; + if (variant == NULL) { + variant = g_variant_new_int32(0); } - gboolean handled = FALSE; + g_variant_ref_sink(variant); + g_signal_emit(G_OBJECT(mi), signals[EVENT], g_quark_from_string(name), name, variant, timestamp, &handled); if (!handled && class->handle_event != NULL) { class->handle_event(mi, name, variant, timestamp); } - if (variant != NULL) { - g_variant_unref(variant); - } - - return; + g_variant_unref(variant); } /** |