From d8c6525a72ef89cb6aa5b556082bb4bc1f66ffc8 Mon Sep 17 00:00:00 2001
From: Joachim Breitner <mail@joachim-breitner.de>
Date: Sun, 13 Nov 2011 20:06:41 +0100
Subject: [PATCH] libpanel-applet: Use on_bus_acquired instead of
 on_name_acquired

This helps prevent race conditions at session starts. This is actually
recommended in the gdbus documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=654843
---
 libpanel-applet/panel-applet-factory.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libpanel-applet/panel-applet-factory.c b/libpanel-applet/panel-applet-factory.c
index ffe0998..5d9239b 100644
--- a/libpanel-applet/panel-applet-factory.c
+++ b/libpanel-applet/panel-applet-factory.c
@@ -210,7 +210,7 @@ static const GDBusInterfaceVTable interface_vtable = {
 static GDBusNodeInfo *introspection_data = NULL;
 
 static void
-on_name_acquired (GDBusConnection    *connection,
+on_bus_acquired (GDBusConnection    *connection,
 		  const gchar        *name,
 		  PanelAppletFactory *factory)
 {
@@ -251,8 +251,8 @@ panel_applet_factory_register_service (PanelAppletFactory *factory)
 	g_bus_own_name (G_BUS_TYPE_SESSION,
 			service_name,
 			G_BUS_NAME_OWNER_FLAGS_NONE,
+			(GBusAcquiredCallback) on_bus_acquired,
 			NULL,
-			(GBusNameAcquiredCallback) on_name_acquired,
 			(GBusNameLostCallback) on_name_lost,
 			factory, NULL);
 	g_free (service_name);
-- 
1.7.10

