Register with a reg_env so we can tell which DISPLAY the at-spi-registryd
authorbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Tue, 16 Dec 2003 18:15:44 +0000 (18:15 +0000)
committerbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Tue, 16 Dec 2003 18:15:44 +0000 (18:15 +0000)
instance is using.  Fix for bug #129479.

git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@580 e2bd861d-eb25-0410-b326-f6ed22b6b98c

ChangeLog
registryd/registry-main.c

index 826688b..cf235a2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-12-16     Bill Haneman <billh@gnome.org>
+
+       * registryd/registry-main.c:
+       (main):
+       Set the reg_env DISPLAY variable before registering the
+       activated registry service.  Fixes bug #129479.
+
 2003-12-16     Mohammad DAMT  <mdamt@bisnisweb.com>
 
        * configure.in: Added "id" in ALL_LINGUAS
index 67acfca..14a4a4e 100644 (file)
@@ -34,8 +34,9 @@ int
 main (int argc, char **argv)
 {
   int          ret;
-  char        *obj_id;
+  char        *obj_id, *display_name;
   SpiRegistry *registry;
+  GSList      *reg_env = NULL;
 
   if (!bonobo_init (&argc, argv))
     {
@@ -46,9 +47,14 @@ main (int argc, char **argv)
 
   registry = spi_registry_new ();
 
-  ret = bonobo_activation_active_server_register (
+  display_name = gdk_display_get_name (gdk_display_get_default ());
+  reg_env = bonobo_activation_registration_env_set ( reg_env, "DISPLAY", 
+                                                    display_name);
+  ret = bonobo_activation_register_active_server (
          obj_id,
-         bonobo_object_corba_objref (bonobo_object (registry)));
+         bonobo_object_corba_objref (bonobo_object (registry)),
+         reg_env);
+  bonobo_activation_registration_env_free (reg_env);
 
   if (ret != Bonobo_ACTIVATION_REG_SUCCESS)
     {