← Back to team overview

ayatana-commits team mailing list archive

[Merge] lp:~ted/dbusmenu/signal-on-new-menu into lp:dbusmenu

 

Ted Gould has proposed merging lp:~ted/dbusmenu/signal-on-new-menu into lp:dbusmenu.

Requested reviews:
  DBus Menu Team (dbusmenu-team)

For more details, see:
https://code.launchpad.net/~ted/dbusmenu/signal-on-new-menu/+merge/46657

When the object gets put on the bus it signals a LayoutUpdated so that if it had be requested too early we'll update to the new layout.  Hopefully will fix Firefox.
-- 
https://code.launchpad.net/~ted/dbusmenu/signal-on-new-menu/+merge/46657
Your team ayatana-commits is subscribed to branch lp:dbusmenu.
=== modified file 'libdbusmenu-glib/server.c'
--- libdbusmenu-glib/server.c	2011-01-14 15:56:07 +0000
+++ libdbusmenu-glib/server.c	2011-01-18 19:08:43 +0000
@@ -506,6 +506,19 @@
 	if (error != NULL) {
 		g_warning("Unable to register object on bus: %s", error->message);
 		g_error_free(error);
+		return;
+	}
+
+	/* If we've got it registered let's tell everyone about it */
+	g_signal_emit(G_OBJECT(server), signals[LAYOUT_UPDATED], 0, priv->layout_revision, 0, TRUE);
+	if (priv->dbusobject != NULL && priv->bus != NULL) {
+		g_dbus_connection_emit_signal(priv->bus,
+		                              NULL,
+		                              priv->dbusobject,
+		                              DBUSMENU_INTERFACE,
+		                              "LayoutUpdated",
+		                              g_variant_new("(ui)", priv->layout_revision, 0),
+		                              NULL);
 	}
 
 	return;


Follow ups