From fc6e61d8d731b4cfb7f8e3598893b4805807ffe4 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 26 Jun 2009 12:49:52 -0500 Subject: Add the property of the menuitems to check to see if they're the root node or not. Also set that when the layout is being parsed. --- libdbusmenu-glib/client.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libdbusmenu-glib/client.c') diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index b9a5b90..7319a7f 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -538,6 +538,9 @@ parse_layout_xml(DbusmenuClient * client, xmlNodePtr node, DbusmenuMenuitem * it /* Build a new item */ item = dbusmenu_menuitem_new_with_id(id); + if (parent == NULL) { + dbusmenu_menuitem_set_root(item, TRUE); + } g_signal_emit(G_OBJECT(client), signals[NEW_MENUITEM], 0, item, TRUE); /* Get the properties queued up for this item */ org_freedesktop_dbusmenu_get_properties_async(proxy, id, menuitem_get_properties_cb, item); -- cgit v1.2.3