From 4dea36b65076939e4f556a0f5e9d5c81c1553eb2 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 21 Jan 2010 17:13:52 -0600 Subject: Removing the revision from the generated XML --- libdbusmenu-glib/menuitem-private.h | 2 +- libdbusmenu-glib/menuitem.c | 10 ++++------ libdbusmenu-glib/server.c | 6 +++--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/libdbusmenu-glib/menuitem-private.h b/libdbusmenu-glib/menuitem-private.h index 0120435..1c7c16a 100644 --- a/libdbusmenu-glib/menuitem-private.h +++ b/libdbusmenu-glib/menuitem-private.h @@ -33,7 +33,7 @@ License version 3 and version 2.1 along with this program. If not, see G_BEGIN_DECLS -void dbusmenu_menuitem_buildxml (DbusmenuMenuitem * mi, GPtrArray * array, gint revision); +void dbusmenu_menuitem_buildxml (DbusmenuMenuitem * mi, GPtrArray * array); G_END_DECLS diff --git a/libdbusmenu-glib/menuitem.c b/libdbusmenu-glib/menuitem.c index 3e06719..0dcbade 100644 --- a/libdbusmenu-glib/menuitem.c +++ b/libdbusmenu-glib/menuitem.c @@ -1047,7 +1047,6 @@ dbusmenu_menuitem_get_root (DbusmenuMenuitem * mi) dbusmenu_menuitem_buildxml: @mi: #DbusmenuMenuitem to represent in XML @array: A list of string that will be turned into an XML file - @revision: The revision of the layout to embed in the XML This function will add strings to the array @array. It will put at least one entry if this menu item has no children. If it has @@ -1056,7 +1055,7 @@ dbusmenu_menuitem_get_root (DbusmenuMenuitem * mi) children to place their own tags in the array in between those two. */ void -dbusmenu_menuitem_buildxml (DbusmenuMenuitem * mi, GPtrArray * array, gint revision) +dbusmenu_menuitem_buildxml (DbusmenuMenuitem * mi, GPtrArray * array) { g_return_if_fail(DBUSMENU_IS_MENUITEM(mi)); @@ -1066,13 +1065,12 @@ dbusmenu_menuitem_buildxml (DbusmenuMenuitem * mi, GPtrArray * array, gint revis } GList * children = dbusmenu_menuitem_get_children(mi); - /* TODO: Only put revision info in the root node. Save some bandwidth. */ if (children == NULL) { - g_ptr_array_add(array, g_strdup_printf("", id, revision)); + g_ptr_array_add(array, g_strdup_printf("", id)); } else { - g_ptr_array_add(array, g_strdup_printf("", id, revision)); + g_ptr_array_add(array, g_strdup_printf("", id)); for ( ; children != NULL; children = children->next) { - dbusmenu_menuitem_buildxml(DBUSMENU_MENUITEM(children->data), array, revision); + dbusmenu_menuitem_buildxml(DBUSMENU_MENUITEM(children->data), array); } g_ptr_array_add(array, g_strdup("")); } diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c index 0971162..2c040a0 100644 --- a/libdbusmenu-glib/server.c +++ b/libdbusmenu-glib/server.c @@ -376,13 +376,13 @@ _dbusmenu_server_get_layout (DbusmenuServer * server, guint parent, guint * revi if (parent == 0) { if (priv->root == NULL) { /* g_debug("Getting layout without root node!"); */ - g_ptr_array_add(xmlarray, g_strdup_printf("", priv->layout_revision)); + g_ptr_array_add(xmlarray, g_strdup("")); } else { - dbusmenu_menuitem_buildxml(priv->root, xmlarray, priv->layout_revision); + dbusmenu_menuitem_buildxml(priv->root, xmlarray); } } else { DbusmenuMenuitem * item = dbusmenu_menuitem_find_id(priv->root, parent); - dbusmenu_menuitem_buildxml(item, xmlarray, priv->layout_revision); + dbusmenu_menuitem_buildxml(item, xmlarray); } g_ptr_array_add(xmlarray, NULL); -- cgit v1.2.3