diff options
author | Ted Gould <ted@gould.cx> | 2010-02-05 09:37:53 -0800 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-02-05 09:37:53 -0800 |
commit | da41d4b9f71260928d68bee40106bc68e4624023 (patch) | |
tree | acc933b1eb8c7890d42647847e454b070adee270 | |
parent | 917517950f45b048111687f2cbae0616b4ef2cba (diff) | |
download | libdbusmenu-da41d4b9f71260928d68bee40106bc68e4624023.tar.gz libdbusmenu-da41d4b9f71260928d68bee40106bc68e4624023.tar.bz2 libdbusmenu-da41d4b9f71260928d68bee40106bc68e4624023.zip |
Properly unref on layout updates
-rw-r--r-- | libdbusmenu-glib/client.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index 0f7fd65..d63278d 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -339,6 +339,7 @@ id_prop_update (DBusGProxy * proxy, gint id, gchar * property, GValue * value, D g_return_if_fail(menuitem != NULL); dbusmenu_menuitem_property_set_value(menuitem, property, value); + return; } @@ -747,6 +748,13 @@ parse_layout (DbusmenuClient * client, const gchar * layout) #ifdef MASSIVEDEBUGGING g_debug("Client signaling root changed."); #endif + + /* Switch the root around */ + g_object_ref(priv->root); + dbusmenu_menuitem_set_root(priv->root, TRUE); + dbusmenu_menuitem_set_root(oldroot, FALSE); + g_object_unref(oldroot); + g_signal_emit(G_OBJECT(client), signals[ROOT_CHANGED], 0, priv->root, TRUE); } |