aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-05-25 23:09:19 +0200
committerTed Gould <ted@canonical.com>2009-05-25 23:09:19 +0200
commit9ce6eb561b1a9e188330fe73952bbc1a3d2e256f (patch)
tree2a67ce07021949f3a81cf373ff6f7b6b0ea46de0
parent0b46d2d1e1acbe32b5468565731a6e5a08c9282b (diff)
downloadlibdbusmenu-9ce6eb561b1a9e188330fe73952bbc1a3d2e256f.tar.gz
libdbusmenu-9ce6eb561b1a9e188330fe73952bbc1a3d2e256f.tar.bz2
libdbusmenu-9ce6eb561b1a9e188330fe73952bbc1a3d2e256f.zip
Playing with debug stuff
-rw-r--r--libdbusmenu-glib/client.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c
index c6833cc..f21f721 100644
--- a/libdbusmenu-glib/client.c
+++ b/libdbusmenu-glib/client.c
@@ -387,6 +387,7 @@ parse_layout_xml(xmlNodePtr node, DbusmenuMenuitem * item, DbusmenuMenuitem * pa
dbusmenu_menuitem_child_delete(parent, item);
}
g_object_unref(G_OBJECT(item));
+ item = NULL;
}
if (id == 0) {
@@ -403,6 +404,7 @@ parse_layout_xml(xmlNodePtr node, DbusmenuMenuitem * item, DbusmenuMenuitem * pa
xmlNodePtr children;
guint position;
GList * oldchildren = dbusmenu_menuitem_take_children(item);
+ /* g_debug("Starting old children: %d", g_list_length(oldchildren)); */
for (children = node->children, position = 0; children != NULL; children = children->next, position++) {
/* g_debug("Looking at child: %d", position); */
@@ -423,9 +425,11 @@ parse_layout_xml(xmlNodePtr node, DbusmenuMenuitem * item, DbusmenuMenuitem * pa
dbusmenu_menuitem_child_add_position(item, childmi, position);
}
+ /* g_debug("Stopping old children: %d", g_list_length(oldchildren)); */
GList * oldchildleft = NULL;
for (oldchildleft = oldchildren; oldchildleft != NULL; oldchildleft = g_list_next(oldchildleft)) {
DbusmenuMenuitem * oldmi = DBUSMENU_MENUITEM(oldchildleft->data);
+ g_debug("Unref'ing menu item with layout update. ID: %d", dbusmenu_menuitem_get_id(oldmi));
g_object_unref(G_OBJECT(oldmi));
}
g_list_free(oldchildren);