From 7acdb5187d4a99fe01f53c8bd6fffcf7e61fd8bc Mon Sep 17 00:00:00 2001 From: Ken VanDine Date: Fri, 30 Sep 2011 10:21:15 -0400 Subject: id of 0 in dbusmenu_client_send_about_to_show is valid, and used in appindicators like nm-applet (LP: #862989) --- libdbusmenu-glib/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index a7f4da5..9129db5 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -1610,7 +1610,7 @@ void dbusmenu_client_send_about_to_show(DbusmenuClient * client, gint id, void (*cb)(gpointer data), gpointer cb_data) { g_return_if_fail(DBUSMENU_CLIENT(client)); - g_return_if_fail(id > 0); + g_return_if_fail(id >= 0); DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(client); g_return_if_fail(priv != NULL); -- cgit v1.2.3 From a7c13792e9e339480c763a42808baed77e13314b Mon Sep 17 00:00:00 2001 From: Michael Terry Date: Tue, 4 Oct 2011 16:15:58 -0400 Subject: remove last ref from GtkMenuItems that we create --- libdbusmenu-gtk/client.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index 1051f20..38b6a75 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -823,14 +823,22 @@ item_activate (DbusmenuClient * client, DbusmenuMenuitem * mi, guint timestamp, return; } -#ifdef MASSIVEDEBUGGING static void -destroy_gmi (GtkMenuItem * gmi, DbusmenuMenuitem * mi) +destroy_gmi (GtkMenuItem * gmi) { - g_debug("Destorying GTK Menuitem for %d", dbusmenu_menuitem_get_id(mi)); +#ifdef MASSIVEDEBUGGING + g_debug("Destroying GTK Menuitem %d", gmi); +#endif + + /* Call gtk_widget_destroy to remove from any containers and cleanup */ + gtk_widget_destroy(GTK_WIDGET(gmi)); + + /* Now remove last ref that we are holding (due to g_object_ref_sink in + dbusmenu_gtkclient_newitem_base). This should finalize the object */ + g_object_unref(G_OBJECT(gmi)); + return; } -#endif /** * dbusmenu_gtkclient_newitem_base: @@ -857,7 +865,7 @@ dbusmenu_gtkclient_newitem_base (DbusmenuGtkClient * client, DbusmenuMenuitem * /* Attach these two */ g_object_ref_sink(G_OBJECT(gmi)); - g_object_set_data_full(G_OBJECT(item), data_menuitem, gmi, (GDestroyNotify)gtk_widget_destroy); + g_object_set_data_full(G_OBJECT(item), data_menuitem, gmi, (GDestroyNotify)destroy_gmi); /* DbusmenuMenuitem signals */ g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(menu_prop_change_cb), client); -- cgit v1.2.3 From fcd8e4126dea4e2fbde3a17fe842f2cd10750220 Mon Sep 17 00:00:00 2001 From: Michael Terry Date: Wed, 5 Oct 2011 14:59:21 -0400 Subject: when resetting an image widget and it's the only child of the menuitem, make sure we don't try to use free'd memory --- libdbusmenu-gtk/genericmenuitem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libdbusmenu-gtk/genericmenuitem.c b/libdbusmenu-gtk/genericmenuitem.c index 5488f93..ef77a2e 100644 --- a/libdbusmenu-gtk/genericmenuitem.c +++ b/libdbusmenu-gtk/genericmenuitem.c @@ -449,6 +449,7 @@ genericmenuitem_set_image (Genericmenuitem * menu_item, GtkWidget * image) if (GTK_IS_IMAGE(child)) { /* We've got a label, let's update it. */ imagew = GTK_IMAGE(child); + child = NULL; } else if (GTK_IS_BOX(child)) { /* Look for the label in the box */ gtk_container_foreach(GTK_CONTAINER(child), set_image_helper, &imagew); -- cgit v1.2.3 From da6a2dfa870a1925ebb98fb10286bcde62d2db11 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 13 Oct 2011 11:12:03 -0500 Subject: 0.5.1 --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index f195f47..ba5cd4b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ -AC_INIT(libdbusmenu, 0.5.0, ted@canonical.com) +AC_INIT(libdbusmenu, 0.5.1, ted@canonical.com) AC_COPYRIGHT([Copyright 2009,2010 Canonical]) AC_PREREQ(2.62) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libdbusmenu, 0.5.0, [-Wno-portability]) +AM_INIT_AUTOMAKE(libdbusmenu, 0.5.1, [-Wno-portability]) AM_MAINTAINER_MODE @@ -172,7 +172,7 @@ AC_PATH_PROG([XSLT_PROC], [xsltproc]) ########################### LIBDBUSMENU_CURRENT=4 -LIBDBUSMENU_REVISION=5 +LIBDBUSMENU_REVISION=6 LIBDBUSMENU_AGE=0 AC_SUBST(LIBDBUSMENU_CURRENT) -- cgit v1.2.3 From 4f6868d416c479a29afe1b1b3168f3d96fbdcc64 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 13 Oct 2011 11:31:19 -0500 Subject: releasing version 0.5.1-0ubuntu1~ppa1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9b639ca..a274ee3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -libdbusmenu (0.5.1-0ubuntu1~ppa1) UNRELEASED; urgency=low +libdbusmenu (0.5.1-0ubuntu1~ppa1) oneiric; urgency=low * New upstream release. * Allow for an ID of 0 in about_to_show for indicators (LP: #862989) @@ -6,7 +6,7 @@ libdbusmenu (0.5.1-0ubuntu1~ppa1) UNRELEASED; urgency=low * Ensure we drop all references to the GTK widget when a menuitem gets destroyed (LP: #835646) - -- Ted Gould Thu, 13 Oct 2011 11:23:14 -0500 + -- Ted Gould Thu, 13 Oct 2011 11:31:15 -0500 libdbusmenu (0.5.0-0ubuntu2) oneiric; urgency=low -- cgit v1.2.3