aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-02-04 21:13:04 -0800
committerTed Gould <ted@gould.cx>2010-02-04 21:13:04 -0800
commite7c73019f38016f3ccc630d74a312e4428e1acb9 (patch)
treec432137774fcb09991dd10915879f6316a4c5d5f
parent7ab5984535b4e5165f09a7a2dd36c252f8bdfbc2 (diff)
downloadlibdbusmenu-e7c73019f38016f3ccc630d74a312e4428e1acb9.tar.gz
libdbusmenu-e7c73019f38016f3ccc630d74a312e4428e1acb9.tar.bz2
libdbusmenu-e7c73019f38016f3ccc630d74a312e4428e1acb9.zip
Manage whether the menuitem thinks it's a root item in the server based on whether it's set as the root item.
-rw-r--r--libdbusmenu-glib/server.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c
index 7d8e5c3..eb7c383 100644
--- a/libdbusmenu-glib/server.c
+++ b/libdbusmenu-glib/server.c
@@ -237,12 +237,14 @@ set_property (GObject * obj, guint id, const GValue * value, GParamSpec * pspec)
case PROP_ROOT_NODE:
if (priv->root != NULL) {
dbusmenu_menuitem_foreach(priv->root, menuitem_signals_remove, obj);
+ dbusmenu_menuitem_set_root(priv->root, FALSE);
g_object_unref(G_OBJECT(priv->root));
priv->root = NULL;
}
priv->root = DBUSMENU_MENUITEM(g_value_get_object(value));
if (priv->root != NULL) {
g_object_ref(G_OBJECT(priv->root));
+ dbusmenu_menuitem_set_root(priv->root, TRUE);
dbusmenu_menuitem_foreach(priv->root, menuitem_signals_create, obj);
} else {
g_debug("Setting root node to NULL");