? ariel.patch
? gnome-session-atspi-3.patch
? gnome-session-atspi-4.patch
? gnome-session-atspi-5.patch
? gnome-session-atspi-6.patch
? gnome-session-atspi-7.patch
? gnome-session-atspi-8.patch
? gnome-session-atspi.patch
? gnome-session.patch
Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/gnome-session/gnome-session/Makefile.am,v
retrieving revision 1.109
diff -u -r1.109 Makefile.am
--- Makefile.am	15 Apr 2006 08:56:06 -0000	1.109
+++ Makefile.am	10 Oct 2006 18:44:44 -0000
@@ -11,6 +11,7 @@
 	-DGCONF_SANITY_CHECK=\""$(GCONF_SANITY_CHECK)"\"	    \
 	-DGNOME_KEYRING_DAEMON=\""$(GNOME_KEYRING_DAEMON)"\"	    \
 	-DGNOME_ICONDIR=\""$(datadir)/pixmaps\""	\
+	-DLIBEXECDIR=\""$(libexecdir)"\"                \
 	-DREBOOT_COMMAND=\""$(REBOOT_COMMAND)\""	\
 	-DHALT_COMMAND=\""$(HALT_COMMAND)\""		\
 	-DRSH_COMMAND=\""$(RSH_COMMAND)\""		\
Index: gsm-at-startup.c
===================================================================
RCS file: /cvs/gnome/gnome-session/gnome-session/gsm-at-startup.c,v
retrieving revision 1.5
diff -u -r1.5 gsm-at-startup.c
--- gsm-at-startup.c	24 Apr 2006 21:55:25 -0000	1.5
+++ gsm-at-startup.c	10 Oct 2006 18:44:44 -0000
@@ -2,14 +2,20 @@
 #include <string.h>
 
 #include "gsm-at-startup.h"
+#include "headers.h"
 #include "util.h"
 
+#include <gtk/gtk.h>
+#include <gnome.h>
 #include <gdk/gdk.h>
+#include <gdk/gdkx.h>
 #include <libgnome/libgnome.h>
 #include <gconf/gconf-client.h>
 
 #define AT_STARTUP_KEY    "/desktop/gnome/accessibility/startup/exec_ats"
 
+static Atom AT_SPI_IOR;
+
 static void
 gsm_assistive_tech_exec (gchar *exec_string)
 {
@@ -19,6 +25,73 @@
     g_spawn_command_line_async (exec_string, &error);
     g_free (s);
   }
+}
+
+static GdkFilterReturn 
+gsm_assistive_filter_watch (GdkXEvent *xevent, GdkEvent *event, gpointer data){
+     XEvent *xev = (XEvent *)xevent;
+     gint tid = *(gint *)data;
+
+     if (xev->xany.type == PropertyNotify &&
+	 xev->xproperty.atom == AT_SPI_IOR) {
+	  g_source_remove (tid);
+	  gtk_main_quit ();
+	  
+	  return GDK_FILTER_REMOVE;
+     }
+
+     return GDK_FILTER_CONTINUE;
+}
+
+static void
+gsm_assistive_error_dialog (void)
+{
+     GtkWidget *dialog = gtk_message_dialog_new (NULL,
+						 GTK_DIALOG_MODAL,
+						 GTK_MESSAGE_ERROR,
+						 GTK_BUTTONS_OK,
+						 _("Assistive technology support has been requested for this session, but the accessibility registry was not found.  Please ensure that the AT-SPI package is installed. Your session has been started without assistive technology support."));
+     gtk_dialog_run (GTK_DIALOG (dialog));
+     gtk_widget_destroy (dialog);     
+}
+
+     
+static gboolean
+gsm_assistive_filter_timeout (gpointer data)
+{
+
+     GConfClient *client;
+     
+     gsm_assistive_error_dialog ();
+     client = gsm_get_conf_client ();
+     gconf_client_set_bool (client, ACCESSIBILITY_KEY, FALSE, NULL);
+
+     gtk_main_quit ();
+
+     return FALSE;
+
+}
+
+void
+gsm_assistive_registry_start (void)
+{
+     GdkWindow *w = gdk_get_default_root_window (); 
+     gchar *command;
+     guint tid;
+ 
+     if (!AT_SPI_IOR)
+	  AT_SPI_IOR = XInternAtom (GDK_DISPLAY (), "AT_SPI_IOR", False); 
+
+     command = g_strdup (LIBEXECDIR "/at-spi-registryd");
+
+     gdk_window_set_events (w, GDK_PROPERTY_CHANGE_MASK);
+     gsm_assistive_tech_exec (command);
+     gdk_window_add_filter (w, gsm_assistive_filter_watch, &tid);
+     tid = g_timeout_add (2e3, gsm_assistive_filter_timeout, NULL);    
+
+     gtk_main ();
+
+     g_free (command);
 }
 
 void 
Index: gsm-at-startup.h
===================================================================
RCS file: /cvs/gnome/gnome-session/gnome-session/gsm-at-startup.h,v
retrieving revision 1.2
diff -u -r1.2 gsm-at-startup.h
--- gsm-at-startup.h	10 Jan 2006 00:48:20 -0000	1.2
+++ gsm-at-startup.h	10 Oct 2006 18:44:44 -0000
@@ -1,6 +1,7 @@
 #ifndef GSM_AT_STARTUP_H
 #define GSM_AT_STARTUP_H
 
+void gsm_assistive_registry_start (void);
 void gsm_assistive_technologies_start (void);
 void gsm_at_set_gtk_modules (void);
 
Index: main.c
===================================================================
RCS file: /cvs/gnome/gnome-session/gnome-session/main.c,v
retrieving revision 1.78
diff -u -r1.78 main.c
--- main.c	24 Apr 2006 21:50:44 -0000	1.78
+++ main.c	10 Oct 2006 18:44:44 -0000
@@ -395,9 +395,11 @@
   gconf_client_add_dir (gconf_client, GSM_GCONF_CONFIG_PREFIX, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); 
   a_t_support = gconf_client_get_bool (gconf_client, ACCESSIBILITY_KEY, NULL);
 
-  if (a_t_support)
-    gsm_at_set_gtk_modules ();
-
+  if (a_t_support) {
+       gsm_assistive_registry_start ();
+       gsm_at_set_gtk_modules ();
+  }
+    
   gnome_program_init("gnome-session", VERSION, LIBGNOMEUI_MODULE, argc, argv, 
 		  GNOME_PARAM_POPT_TABLE, options,
 		  NULL);
