Ted Gould has proposed merging lp:~ted/dbusmenu/menu-repeat-repeat-repeat into 
lp:dbusmenu.

    Requested reviews:
    DBus Menu Team (dbusmenu-team)


Removing an extra ref to the root item.
-- 
https://code.launchpad.net/~ted/dbusmenu/menu-repeat-repeat-repeat/+merge/18922
Your team ayatana-commits is subscribed to branch lp:dbusmenu.
=== modified file 'libdbusmenu-glib/client.c'
--- libdbusmenu-glib/client.c	2010-02-05 18:48:48 +0000
+++ libdbusmenu-glib/client.c	2010-02-09 14:25:20 +0000
@@ -774,15 +774,14 @@
 		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);
 	}
 

_______________________________________________
Mailing list: https://launchpad.net/~ayatana-commits
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~ayatana-commits
More help   : https://help.launchpad.net/ListHelp

Reply via email to