From 466fa0fc57ab1bec842a158f549387e141464221 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 12 Aug 2010 16:25:40 -0500 Subject: Increasing timer for ARM to get a build. --- tests/test-glib-properties-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-glib-properties-client.c b/tests/test-glib-properties-client.c index 434465a..ae7b80b 100644 --- a/tests/test-glib-properties-client.c +++ b/tests/test-glib-properties-client.c @@ -121,7 +121,7 @@ static void layout_updated (DbusmenuClient * client, gpointer data) { g_debug("Layout Updated"); - g_timeout_add (250, layout_verify_timer, client); + g_timeout_add (500, layout_verify_timer, client); return; } -- cgit v1.2.3 From dc103227e86bf67c8c9118010887f8ba7c924e35 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 16 Aug 2010 10:58:16 -0500 Subject: Handling comment nodes better. --- libdbusmenu-glib/client.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index 7c73b7b..98049d5 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -1126,6 +1126,9 @@ parse_layout_xml(DbusmenuClient * client, xmlNodePtr node, DbusmenuMenuitem * it /* g_debug("Looking at child: %d", position); */ gint childid = parse_node_get_id(children); if (childid < 0) { + /* Don't increment the position when there isn't a valid + node in the XML tree. It's probably a comment. */ + position--; continue; } DbusmenuMenuitem * childmi = NULL; @@ -1143,11 +1146,13 @@ parse_layout_xml(DbusmenuClient * client, xmlNodePtr node, DbusmenuMenuitem * it } if (childmi == NULL) { + g_debug("Building new menu item %d at position %d", childid, position); /* If we can't recycle, then we build a new one */ childmi = parse_layout_new_child(childid, client, item); dbusmenu_menuitem_child_add_position(item, childmi, position); g_object_unref(childmi); } else { + g_debug("Recycling menu item %d at position %d", childid, position); /* If we can recycle, make sure it's in the right place */ dbusmenu_menuitem_child_reorder(item, childmi, position); parse_layout_update(childmi, client); @@ -1175,6 +1180,19 @@ parse_layout_xml(DbusmenuClient * client, xmlNodePtr node, DbusmenuMenuitem * it children = node->children; GList * childmis = dbusmenu_menuitem_get_children(item); while (children != NULL && childmis != NULL) { + gint xmlid = parse_node_get_id(children); + /* If this isn't a valid menu item we need to move on + until we have one. This avoids things like comments. */ + if (xmlid < 0) { + children = children->next; + continue; + } + + #if 1 + gint miid = dbusmenu_menuitem_get_id(DBUSMENU_MENUITEM(childmis->data)); + g_debug("Recursing parse_layout_xml. XML ID: %d MI ID: %d", xmlid, miid); + #endif + parse_layout_xml(client, children, DBUSMENU_MENUITEM(childmis->data), item, proxy); children = children->next; -- cgit v1.2.3 From d2bd004b2cbb7a383d1b75200fe857091f6fe89c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 16 Aug 2010 10:59:53 -0500 Subject: Putting the debugging messages under MASSIVEDEBUGGING --- libdbusmenu-glib/client.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index 98049d5..73a7aac 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -1146,13 +1146,17 @@ parse_layout_xml(DbusmenuClient * client, xmlNodePtr node, DbusmenuMenuitem * it } if (childmi == NULL) { + #ifdef MASSIVEDEBUGGING g_debug("Building new menu item %d at position %d", childid, position); + #endif /* If we can't recycle, then we build a new one */ childmi = parse_layout_new_child(childid, client, item); dbusmenu_menuitem_child_add_position(item, childmi, position); g_object_unref(childmi); } else { + #ifdef MASSIVEDEBUGGING g_debug("Recycling menu item %d at position %d", childid, position); + #endif /* If we can recycle, make sure it's in the right place */ dbusmenu_menuitem_child_reorder(item, childmi, position); parse_layout_update(childmi, client); @@ -1188,7 +1192,7 @@ parse_layout_xml(DbusmenuClient * client, xmlNodePtr node, DbusmenuMenuitem * it continue; } - #if 1 + #ifdef MASSIVEDEBUGGING gint miid = dbusmenu_menuitem_get_id(DBUSMENU_MENUITEM(childmis->data)); g_debug("Recursing parse_layout_xml. XML ID: %d MI ID: %d", xmlid, miid); #endif -- cgit v1.2.3 From 82edd0f8c1c742adea170d76ea382b5d1aa8db94 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 19 Aug 2010 13:39:44 -0500 Subject: 0.3.11 --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 5419c4c..a5c8248 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ -AC_INIT(libdbusmenu, 0.3.10, ted@canonical.com) +AC_INIT(libdbusmenu, 0.3.11, ted@canonical.com) AC_COPYRIGHT([Copyright 2009,2010 Canonical]) AC_PREREQ(2.62) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libdbusmenu, 0.3.10, [-Wno-portability]) +AM_INIT_AUTOMAKE(libdbusmenu, 0.3.11, [-Wno-portability]) AM_MAINTAINER_MODE @@ -99,7 +99,7 @@ AC_PATH_PROG([VALA_API_GEN], [vapigen]) ########################### LIBDBUSMENU_CURRENT=1 -LIBDBUSMENU_REVISION=12 +LIBDBUSMENU_REVISION=13 LIBDBUSMENU_AGE=0 AC_SUBST(LIBDBUSMENU_CURRENT) -- cgit v1.2.3