aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib
diff options
context:
space:
mode:
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r--libdbusmenu-glib/client.c17
-rw-r--r--libdbusmenu-glib/menuitem.c5
2 files changed, 10 insertions, 12 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c
index 64fc7d3..5d7b5b1 100644
--- a/libdbusmenu-glib/client.c
+++ b/libdbusmenu-glib/client.c
@@ -430,11 +430,9 @@ proxy_destroyed (GObject * gobj_proxy, gpointer userdata)
DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(userdata);
if (priv->root != NULL) {
- g_debug("Root ref count: %d", ((GObject *)priv->root)->ref_count);
g_object_unref(G_OBJECT(priv->root));
- g_debug(" ref count: %d", ((GObject *)priv->root)->ref_count);
priv->root = NULL;
- #if 1
+ #ifdef MASSIVEDEBUGGING
g_debug("Proxies destroyed, signaling a root change and a layout update.");
#endif
g_signal_emit(G_OBJECT(userdata), signals[ROOT_CHANGED], 0, NULL, TRUE);
@@ -776,12 +774,15 @@ parse_layout (DbusmenuClient * client, const gchar * layout)
g_debug("Client signaling root changed.");
#endif
- g_signal_emit(G_OBJECT(client), signals[ROOT_CHANGED], 0, priv->root, TRUE);
- }
+ /* If they are different, and there was an old root we must
+ clean up that old root */
+ if (oldroot != NULL) {
+ dbusmenu_menuitem_set_root(oldroot, FALSE);
+ g_object_unref(oldroot);
+ }
- if (oldroot != NULL) {
- dbusmenu_menuitem_set_root(oldroot, FALSE);
- g_object_unref(oldroot);
+ /* If the root changed we can signal that */
+ g_signal_emit(G_OBJECT(client), signals[ROOT_CHANGED], 0, priv->root, TRUE);
}
return 1;
diff --git a/libdbusmenu-glib/menuitem.c b/libdbusmenu-glib/menuitem.c
index f5bd18d..a2d2682 100644
--- a/libdbusmenu-glib/menuitem.c
+++ b/libdbusmenu-glib/menuitem.c
@@ -270,7 +270,6 @@ _g_value_free (gpointer data)
static void
dbusmenu_menuitem_init (DbusmenuMenuitem *self)
{
- g_debug("Menuitem init: %X", (guint)self);
DbusmenuMenuitemPrivate * priv = DBUSMENU_MENUITEM_GET_PRIVATE(self);
priv->id = -1;
@@ -286,12 +285,10 @@ dbusmenu_menuitem_init (DbusmenuMenuitem *self)
static void
dbusmenu_menuitem_dispose (GObject *object)
{
- g_debug("Menuitem dele: %X", (guint)object);
DbusmenuMenuitemPrivate * priv = DBUSMENU_MENUITEM_GET_PRIVATE(object);
GList * child = NULL;
for (child = priv->children; child != NULL; child = g_list_next(child)) {
- g_debug("Unreffing %X", (guint)child->data);
g_object_unref(G_OBJECT(child->data));
}
g_list_free(priv->children);
@@ -304,7 +301,7 @@ dbusmenu_menuitem_dispose (GObject *object)
static void
dbusmenu_menuitem_finalize (GObject *object)
{
- g_debug("Menuitem dying");
+ /* g_debug("Menuitem dying"); */
DbusmenuMenuitemPrivate * priv = DBUSMENU_MENUITEM_GET_PRIVATE(object);
if (priv->properties != NULL) {