aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib/server.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-02-05 11:00:07 -0800
committerTed Gould <ted@gould.cx>2010-02-05 11:00:07 -0800
commitc77ed1ccc280c56949b0a5a3f2d8d08bae498d29 (patch)
tree4b8cc5313c3c6828565df8efad57ab85d53f4d3a /libdbusmenu-glib/server.c
parenta61a7ba8cc024d3d75f73e336ba83128631d3019 (diff)
parentf3a13c8b0be55927b8b91ff37ba922ba323b44b7 (diff)
downloadlibdbusmenu-c77ed1ccc280c56949b0a5a3f2d8d08bae498d29.tar.gz
libdbusmenu-c77ed1ccc280c56949b0a5a3f2d8d08bae498d29.tar.bz2
libdbusmenu-c77ed1ccc280c56949b0a5a3f2d8d08bae498d29.zip
* Upstrem Merge
* Fixing handing of root IDs being zero * Handling syncing of properties when reusing items * Shipping new JSON files and READMEs for testing.
Diffstat (limited to 'libdbusmenu-glib/server.c')
-rw-r--r--libdbusmenu-glib/server.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c
index 7d8e5c3..f8267c2 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");
@@ -516,7 +518,7 @@ static gboolean
_dbusmenu_server_get_children (DbusmenuServer * server, gint id, GPtrArray * properties, GPtrArray ** output, GError ** error)
{
DbusmenuServerPrivate * priv = DBUSMENU_SERVER_GET_PRIVATE(server);
- DbusmenuMenuitem * mi = id == 0 ? priv->root : dbusmenu_menuitem_find_id(priv->root, id);
+ DbusmenuMenuitem * mi = dbusmenu_menuitem_find_id(priv->root, id);
if (mi == NULL) {
if (error != NULL) {