diff options
author | Ken VanDine <ken.vandine@canonical.com> | 2011-02-24 23:00:42 -0500 |
---|---|---|
committer | Ken VanDine <ken.vandine@canonical.com> | 2011-02-24 23:00:42 -0500 |
commit | d831bc59e28568ba53ff57e76737002a9e2bc866 (patch) | |
tree | 654c2243ce07c351bd59ff27bc47729095c3dd51 | |
parent | f40abc3f546c829edb4d059b2a4c1cfe1aa9eb81 (diff) | |
parent | 86bd1a4d6b7f9eb47357dae9569d150e5be4b338 (diff) | |
download | libdbusmenu-d831bc59e28568ba53ff57e76737002a9e2bc866.tar.gz libdbusmenu-d831bc59e28568ba53ff57e76737002a9e2bc866.tar.bz2 libdbusmenu-d831bc59e28568ba53ff57e76737002a9e2bc866.zip |
releasing version 0.3.99-0ubuntu1
-rw-r--r-- | debian/changelog | 9 | ||||
-rw-r--r-- | libdbusmenu-glib/menuitem.c | 13 |
2 files changed, 19 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog index f4eaf8c..132e39d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ -libdbusmenu (0.3.99-0ubuntu1) UNRELEASED; urgency=low +libdbusmenu (0.3.99-0ubuntu1) natty; urgency=low + [ Ted Gould ] * New upstream release. * Add a signal on the menuitem for generic event support * Handle the case of a single NULL entry as well. @@ -18,7 +19,11 @@ libdbusmenu (0.3.99-0ubuntu1) UNRELEASED; urgency=low * Resolving property changes by looking at the properties directly. - -- Ted Gould <ted@ubuntu.com> Thu, 24 Feb 2011 15:16:43 -0600 + [ Ken VanDine ] + * libdbusmenu-glib/menuitem.c + - Making sure to grab the variant and dispose of it in handle_event. + + -- Ken VanDine <ken.vandine@canonical.com> Thu, 24 Feb 2011 22:54:54 -0500 libdbusmenu (0.3.98-0ubuntu4) natty; urgency=low diff --git a/libdbusmenu-glib/menuitem.c b/libdbusmenu-glib/menuitem.c index 5202aa1..34147a3 100644 --- a/libdbusmenu-glib/menuitem.c +++ b/libdbusmenu-glib/menuitem.c @@ -1670,11 +1670,22 @@ 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; g_signal_emit(G_OBJECT(mi), signals[EVENT], g_quark_from_string(name), name, variant, timestamp, &handled); if (!handled && class->handle_event != NULL) { - return class->handle_event(mi, name, variant, timestamp); + class->handle_event(mi, name, variant, timestamp); + } + + if (variant != NULL) { + g_variant_unref(variant); } return; |