? 144415
? at-spi-1.5.3.tar.gz
? at-spi-display.diff
? autom4te.cache
? bounds-change-patch.diff
? cspi-1.0-uninstalled.pc
? diff
? libloginhelper-1.0.pc
? libspi-1.0-uninstalled.pc
? revised.patch
? stamp-h1
? docs/reference/cspi/at-spi-cspi.interfaces
? docs/reference/cspi/at-spi-cspi.prerequisites
? docs/reference/cspi/xml
? docs/reference/cspi/tmpl/at-spi-cspi-unused.sgml
? docs/reference/cspi/tmpl/spi_streamable_content.sgml
? login-helper/Accessibility_LoginHelper-common.c
? login-helper/Accessibility_LoginHelper-imodule.c
? login-helper/Accessibility_LoginHelper-skels.c
? login-helper/Accessibility_LoginHelper-stubs.c
? login-helper/Accessibility_LoginHelper.h
? login-helper/Makefile
? login-helper/Makefile.in
? test/event-listener-test
? test/keypad-test
? test/keysynth-test
? test/login-helper-client-test
? test/login-helper-server-test
? test/screen-review-test
? test/stress-test
? test/window-listener-test
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/at-spi/ChangeLog,v
retrieving revision 1.443
diff -u -r1.443 ChangeLog
--- ChangeLog	16 Aug 2004 16:34:10 -0000	1.443
+++ ChangeLog	20 Aug 2004 17:07:24 -0000
@@ -1,3 +1,25 @@
+2004-08-20  Bill Haneman    <bill.haneman@sun.com>
+
+	* registryd/registry-main.c:
+	(main): Set the reg_env to use AT_SPI_DISPLAY instead of
+	$DISPLAY.  
+	
+	* cspi/bonobo/cspi-bonobo.c:
+	(cspi_display_name): New convenience method, gets DISPLAY with
+	screen number stripped, if AT_SPI_DISPLAY isn't already set.
+	(cspi_init): Set the activation env value above before getting
+	the registry.
+	
+	* atk-bridge/bridge.c:
+	(spi_display_name): Create the AT_SPI_DISPLAY activation
+	environment for an app, based on the DISPLAY environment with the
+	screen number stripped off.
+	(atk_bridge_init):  Allow redirection of error messages to a log.
+	(spi_atk_bridge_get_registry): Call
+	bonobo_activation_set_activation_env_value for AT_SPI_DISPLAY.
+
+	Fixes for bugs #.
+	
 2004-08-16  Christian Rose  <menthos@menthos.com>
 
 	* configure.in: Added "bs" to ALL_LINGUAS.
Index: atk-bridge/bridge.c
===================================================================
RCS file: /cvs/gnome/at-spi/atk-bridge/bridge.c,v
retrieving revision 1.77
diff -u -r1.77 bridge.c
--- atk-bridge/bridge.c	11 Jun 2004 16:13:03 -0000	1.77
+++ atk-bridge/bridge.c	20 Aug 2004 17:07:24 -0000
@@ -147,6 +147,7 @@
 atk_bridge_init (gint *argc, gchar **argv[])
 {
   const char *debug_env_string = g_getenv ("AT_SPI_DEBUG");
+  gchar *fname;
 
   if (atk_bridge_initialized)
     {
@@ -154,8 +155,15 @@
     }
   atk_bridge_initialized = TRUE;
 
-  if (debug_env_string)
-    _dbg = (int) g_ascii_strtod (debug_env_string, NULL);
+  if (g_getenv ("ATK_BRIDGE_REDIRECT_LOG"))
+  {
+      fname = g_strconcat ("/tmp/", g_get_prgname (), ".at-spi-log");
+      freopen (fname, "w", stderr);
+      g_free (fname);
+  }
+
+  if (debug_env_string) 
+      _dbg = (int) g_ascii_strtod (debug_env_string, NULL);
 
   if (!bonobo_init (argc, argv ? *argv : NULL))
     {
@@ -261,6 +269,41 @@
                                               &ev);
 }
 
+/* 
+ * Returns a 'canonicalized' value for DISPLAY,
+ * with the screen number stripped off if present.
+ */
+static const gchar*
+spi_display_name (void)
+{
+    static const char *canonical_display_name = NULL;
+    if (!canonical_display_name)
+    {
+        const gchar *display_env = g_getenv ("AT_SPI_DISPLAY");
+	if (!display_env)
+	{
+	    display_env = g_getenv ("DISPLAY");
+	    if (!display_env || !display_env[0]) 
+		canonical_display_name = ":0";
+	    else
+	    {
+		canonical_display_name = g_strdup (display_env);
+		gchar *display_p = strrchr (canonical_display_name, ':');
+		gchar *screen_p = strrchr (canonical_display_name, '.');
+		if (screen_p && display_p && ((guint) screen_p > (guint) display_p))
+		{
+		    *screen_p = '\0';
+		}
+	    }
+	}
+	else
+	{
+	    canonical_display_name = display_env;
+	}
+    }
+    return canonical_display_name;
+}
+
 static Accessibility_Registry
 spi_atk_bridge_get_registry (void)
 {
@@ -270,6 +313,9 @@
 	  CORBA_exception_init (&ev);
 	  if (registry_died) 
 	    DBG (1, g_warning ("registry died! restarting..."));
+	  
+	  bonobo_activation_set_activation_env_value ("AT_SPI_DISPLAY", spi_display_name ());
+
 	  registry = bonobo_activation_activate_from_id (
 		  "OAFIID:Accessibility_Registry:1.0", 0, NULL, &ev);
 	  
Index: cspi/bonobo/cspi-bonobo.c
===================================================================
RCS file: /cvs/gnome/at-spi/cspi/bonobo/cspi-bonobo.c,v
retrieving revision 1.12
diff -u -r1.12 cspi-bonobo.c
--- cspi/bonobo/cspi-bonobo.c	9 Feb 2004 18:15:05 -0000	1.12
+++ cspi/bonobo/cspi-bonobo.c	20 Aug 2004 17:07:24 -0000
@@ -78,6 +78,41 @@
   return ret;
 }
 
+/* 
+ * Returns a 'canonicalized' value for DISPLAY,
+ * with the screen number stripped off if present.
+ */
+static const gchar*
+cspi_display_name (void)
+{
+    static const char *canonical_display_name = NULL;
+    if (!canonical_display_name)
+    {
+        const gchar *display_env = g_getenv ("AT_SPI_DISPLAY");
+	if (!display_env)
+	{
+	    display_env = g_getenv ("DISPLAY");
+	    if (!display_env || !display_env[0]) 
+		canonical_display_name = ":0";
+	    else
+	    {
+		canonical_display_name = g_strdup (display_env);
+		gchar *display_p = strrchr (canonical_display_name, ':');
+		gchar *screen_p = strrchr (canonical_display_name, '.');
+		if (screen_p && display_p && ((guint) screen_p > (guint) display_p))
+		{
+		    *screen_p = '\0';
+		}
+	    }
+	}
+	else
+	{
+	    canonical_display_name = display_env;
+	}
+    }
+    return canonical_display_name;
+}
+
 CORBA_Object
 cspi_init (void)
 {
@@ -93,6 +128,9 @@
   obj_id = "OAFIID:Accessibility_Registry:1.0";
 
   CORBA_exception_init (&ev);
+
+  bonobo_activation_set_activation_env_value ("AT_SPI_DISPLAY", 
+					      cspi_display_name ());
 
   registry = bonobo_activation_activate_from_id (
     obj_id, 0, NULL, &ev);
Index: registryd/registry-main.c
===================================================================
RCS file: /cvs/gnome/at-spi/registryd/registry-main.c,v
retrieving revision 1.14
diff -u -r1.14 registry-main.c
--- registryd/registry-main.c	16 Dec 2003 18:15:44 -0000	1.14
+++ registryd/registry-main.c	20 Aug 2004 17:07:24 -0000
@@ -35,6 +35,7 @@
 {
   int          ret;
   char        *obj_id, *display_name;
+  char        *cp, *dp;
   SpiRegistry *registry;
   GSList      *reg_env = NULL;
 
@@ -47,8 +48,16 @@
 
   registry = spi_registry_new ();
 
-  display_name = gdk_display_get_name (gdk_display_get_default ());
-  reg_env = bonobo_activation_registration_env_set ( reg_env, "DISPLAY", 
+  display_name = g_getenv ("AT_SPI_DISPLAY");
+  if (!display_name)
+  {
+      display_name = g_strdup (gdk_display_get_name (gdk_display_get_default ()));
+      cp = strrchr (display_name, '.');
+      dp = strrchr (display_name, ':');
+      if (cp && dp && ((guint) cp > (guint) dp)) *cp = '\0';
+  }
+
+  reg_env = bonobo_activation_registration_env_set ( reg_env, "AT_SPI_DISPLAY", 
 						     display_name);
   ret = bonobo_activation_register_active_server (
 	  obj_id,
Index: test/stress-test.c
===================================================================
RCS file: /cvs/gnome/at-spi/test/stress-test.c,v
retrieving revision 1.5
diff -u -r1.5 stress-test.c
--- test/stress-test.c	27 May 2004 17:39:19 -0000	1.5
+++ test/stress-test.c	20 Aug 2004 17:07:24 -0000
@@ -55,7 +55,7 @@
 	g_print ("starting stress test...\n");
 
 	CORBA_exception_init (&ev);
-	
+
 	registry = bonobo_activation_activate_from_id (
 		"OAFIID:Accessibility_Registry:1.0", 0, NULL, &ev);
   
