diff options
author | Ted Gould <ted@gould.cx> | 2010-02-08 16:02:12 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-02-08 16:02:12 -0600 |
commit | 254fbd01f1ea9b2be163cd33e62b140186e0a856 (patch) | |
tree | 1deb6d1194ce530e3553f2c95d65d17d3087fd5d /libdbusmenu-glib | |
parent | d948fb32f9beb6f8c716c7cf20ee72d820705b23 (diff) | |
parent | 2b26528b9d2feefd8ab014e7743a12521837be5f (diff) | |
download | libdbusmenu-254fbd01f1ea9b2be163cd33e62b140186e0a856.tar.gz libdbusmenu-254fbd01f1ea9b2be163cd33e62b140186e0a856.tar.bz2 libdbusmenu-254fbd01f1ea9b2be163cd33e62b140186e0a856.zip |
Removing an extra ref to root and a setting of the root property which is not needed.
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r-- | libdbusmenu-glib/client.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index 2302110..5d7b5b1 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -774,15 +774,14 @@ parse_layout (DbusmenuClient * client, const gchar * layout) g_debug("Client signaling root changed."); #endif - /* Switch the root around */ - g_object_ref(priv->root); - dbusmenu_menuitem_set_root(priv->root, TRUE); - + /* If they are different, and there was an old root we must + clean up that old root */ if (oldroot != NULL) { dbusmenu_menuitem_set_root(oldroot, FALSE); g_object_unref(oldroot); } + /* If the root changed we can signal that */ g_signal_emit(G_OBJECT(client), signals[ROOT_CHANGED], 0, priv->root, TRUE); } |