--- control-center-2.16.0/capplets/accessibility/at-properties/main.c.start-at-helper 2006-09-19 18:45:32.000000000 -0400
+++ control-center-2.16.0/capplets/accessibility/at-properties/main.c 2006-09-19 21:10:19.000000000 -0400
@@ -44,6 +44,9 @@
gtk_widget_set_sensitive (WID ("at_magnifier_toggle"),
at_startup_state.enabled.magnifier_installed);
+ if (!at_startup_state.enabled.orca_installed)
+ gtk_widget_hide (WID ("at_pref_button"));
+
if (at_startup_state.enabled.osk_installed &&
at_startup_state.enabled.screenreader_installed &&
at_startup_state.enabled.magnifier_installed) {
@@ -149,6 +152,14 @@
is_enabled,
NULL);
at_startup_state.enabled.support = is_enabled;
+
+ if (at_startup_state.enabled.orca_installed) {
+ if (is_enabled)
+ at_orca_start ();
+ else
+ at_orca_stop ();
+ }
+
g_object_unref (client);
}
@@ -200,6 +211,13 @@
}
static void
+at_pref_clicked (GtkButton *button)
+{
+ if (at_startup_state.enabled.orca_installed)
+ at_orca_config ();
+}
+
+static void
setup_dialog (GladeXML *dialog)
{
GConfClient *client;
@@ -255,7 +273,13 @@
g_signal_connect (widget, "toggled",
G_CALLBACK (at_startup_toggled),
dialog);
-
+
+ widget = WID ("at_pref_button");
+ g_signal_connect (widget, "clicked",
+ G_CALLBACK (at_pref_clicked),
+ NULL);
+
+
widget = WID ("at_properties_dialog");
capplet_set_icon (widget, "gnome-settings-accessibility-technologies");
--- control-center-2.16.0/capplets/accessibility/at-properties/at-startup-session.h.start-at-helper 2006-09-19 20:09:48.000000000 -0400
+++ control-center-2.16.0/capplets/accessibility/at-properties/at-startup-session.h 2006-09-19 20:01:13.000000000 -0400
@@ -18,3 +18,10 @@
void at_startup_state_init (AtStartupState *startup_state);
void at_startup_state_update (AtStartupState *startup_state);
+
+void at_orca_start (void);
+
+void at_orca_stop (void);
+
+void at_orca_config (void);
+
--- control-center-2.16.0/capplets/accessibility/at-properties/at-enable-dialog.glade.start-at-helper 2006-09-19 18:44:33.000000000 -0400
+++ control-center-2.16.0/capplets/accessibility/at-properties/at-enable-dialog.glade 2006-09-19 19:46:21.000000000 -0400
@@ -12,6 +12,13 @@
False
False
False
+ True
+ False
+ False
+ GDK_WINDOW_TYPE_HINT_DIALOG
+ GDK_GRAVITY_NORTH_WEST
+ True
+ False
False
@@ -33,6 +40,7 @@
gtk-help
True
GTK_RELIEF_NORMAL
+ True
-11
@@ -44,6 +52,7 @@
True
True
GTK_RELIEF_NORMAL
+ True
0
@@ -53,6 +62,10 @@
0.5
0
0
+ 0
+ 0
+ 0
+ 0
@@ -88,6 +101,10 @@
0.5
0
0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
0
@@ -111,6 +128,7 @@
gtk-close
True
GTK_RELIEF_NORMAL
+ True
-7
@@ -155,6 +173,10 @@
0.5
0
0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
0
@@ -197,6 +219,7 @@
_Enable assistive technologies
True
GTK_RELIEF_NORMAL
+ True
False
False
True
@@ -221,6 +244,10 @@
0.5
0
0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
0
@@ -282,6 +309,10 @@
0.5
0
0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
0
@@ -330,6 +361,10 @@
0.5
0
6
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
0
@@ -345,6 +380,7 @@
_Screenreader
True
GTK_RELIEF_NORMAL
+ True
False
False
True
@@ -363,6 +399,7 @@
_Magnifier
True
GTK_RELIEF_NORMAL
+ True
False
False
True
@@ -381,6 +418,7 @@
_On-screen keyboard
True
GTK_RELIEF_NORMAL
+ True
False
False
True
@@ -393,6 +431,39 @@
+
+ True
+ False
+ 0
+
+
+
+ True
+ True
+ gtk-preferences
+ True
+ GTK_RELIEF_NORMAL
+ True
+
+
+ 0
+ False
+ False
+
+
+
+
+
+
+
+
+ 0
+ False
+ False
+
+
+
+
True
@@ -416,6 +487,10 @@
0.5
0
0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
0
--- control-center-2.16.0/capplets/accessibility/at-properties/at-startup-session.c.start-at-helper 2006-09-19 20:09:38.000000000 -0400
+++ control-center-2.16.0/capplets/accessibility/at-properties/at-startup-session.c 2006-09-19 21:13:35.000000000 -0400
@@ -57,6 +57,48 @@
return list;
}
+/* Hack for starting and stopping orca when Enable assitive technologies
+ is toggled */
+static char *orca_start_cmd;
+static char *orca_stop_cmd;
+static char *orca_config_cmd;
+
+static void
+orca_execute_cmd (const char *cmd)
+{
+ char **argv;
+
+ argv = g_strsplit (cmd, " ", -1);
+ g_spawn_async (NULL,
+ argv,
+ NULL,
+ 0,
+ NULL,
+ NULL,
+ NULL,
+ NULL);
+
+ g_strfreev (argv);
+}
+
+void
+at_orca_start ()
+{
+ orca_execute_cmd (orca_start_cmd);
+}
+
+void
+at_orca_stop ()
+{
+ orca_execute_cmd (orca_stop_cmd);
+}
+
+void
+at_orca_config ()
+{
+ orca_execute_cmd (orca_config_cmd);
+}
+
void
at_startup_state_init (AtStartupState *startup_state)
{
@@ -111,6 +153,10 @@
prog = g_find_program_in_path ("orca");
if (prog != NULL) {
startup_state->enabled.orca_installed = TRUE;
+ orca_start_cmd = g_strdup_printf ("%s --no-setup", prog);
+ orca_stop_cmd = g_strdup_printf ("%s --stop", prog);
+ orca_config_cmd = g_strdup_printf ("%s --gui-setup", prog);
+
g_free (prog);
} else {
startup_state->enabled.orca_installed = FALSE;