GApplication: emit a signal when starting up
authorRyan Lortie <desrt@desrt.ca>
Fri, 29 Oct 2010 03:06:53 +0000 (23:06 -0400)
committerRyan Lortie <desrt@desrt.ca>
Fri, 29 Oct 2010 03:06:53 +0000 (23:06 -0400)
Send a signal to the bus when registration is successful and we are the
primary instance.

gio/gapplicationimpl-dbus.c

index feee24f..1aaa3b8 100644 (file)
@@ -637,6 +637,14 @@ g_application_impl_register (GApplication       *application,
       if (rval != 3)
         {
           /* We are the primary instance. */
+          g_dbus_connection_emit_signal (impl->session_bus,
+                                         NULL,
+                                         impl->object_path,
+                                         "org.gtk.Application",
+                                         "Hello",
+                                         g_variant_new ("(s)",
+                                                        impl->bus_name),
+                                         NULL);
           *remote_actions = NULL;
           return impl;
         }