diff options
author | Ken VanDine <ken.vandine@canonical.com> | 2011-06-24 14:15:33 -0400 |
---|---|---|
committer | Ken VanDine <ken.vandine@canonical.com> | 2011-06-24 14:15:33 -0400 |
commit | 9a8c84b879e78aa8e0a9c1759fc5b73a29efd116 (patch) | |
tree | 8471f1da76c5592c05fffb462337726c43b81db5 /libdbusmenu-glib/menuitem.c | |
parent | 565603d992afa03da6a8f485fcdbe8b71677f7db (diff) | |
parent | b08640dfaa65d54ac758e14f103e92bdc20990e0 (diff) | |
download | libdbusmenu-9a8c84b879e78aa8e0a9c1759fc5b73a29efd116.tar.gz libdbusmenu-9a8c84b879e78aa8e0a9c1759fc5b73a29efd116.tar.bz2 libdbusmenu-9a8c84b879e78aa8e0a9c1759fc5b73a29efd116.zip |
* debian/control, debian/*: Renaming packages for library version
bump from 3 to 4.
* 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
* debian/rules: Making GTK2 the special build
* New upstream release.
- Fix a typo in the signal name to make it match the XML
files (LP: #641209)
- Ref'ing the server for the entire time we're getting the
bus (LP: #738568)
- Watch additions/removals from submenus that get added
- Activate new toplevel menu items as they get added
- Make sure we don't activate toplevel children that aren't
menu items or don't have submenus (LP: #761112)
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); } /** |