diff options
Diffstat (limited to 'capplets/accessibility/at-properties')
-rw-r--r-- | capplets/accessibility/at-properties/.cvsignore | 5 | ||||
-rw-r--r-- | capplets/accessibility/at-properties/ChangeLog | 99 | ||||
-rw-r--r-- | capplets/accessibility/at-properties/Makefile.am | 29 | ||||
-rw-r--r-- | capplets/accessibility/at-properties/at-enable-capplet.png | bin | 2879 -> 0 bytes | |||
-rw-r--r-- | capplets/accessibility/at-properties/at-enable-dialog.glade | 465 | ||||
-rw-r--r-- | capplets/accessibility/at-properties/at-properties.desktop.in.in | 15 | ||||
-rw-r--r-- | capplets/accessibility/at-properties/at-startup-session.c | 160 | ||||
-rw-r--r-- | capplets/accessibility/at-properties/at-startup-session.h | 18 | ||||
-rw-r--r-- | capplets/accessibility/at-properties/at-startup.png | bin | 2879 -> 0 bytes | |||
-rw-r--r-- | capplets/accessibility/at-properties/at-support.png | bin | 2991 -> 0 bytes | |||
-rw-r--r-- | capplets/accessibility/at-properties/main.c | 296 |
11 files changed, 0 insertions, 1087 deletions
diff --git a/capplets/accessibility/at-properties/.cvsignore b/capplets/accessibility/at-properties/.cvsignore deleted file mode 100644 index 749ba8329..000000000 --- a/capplets/accessibility/at-properties/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -*.desktop -Makefile -Makefile.in -gnome-at-properties -at-properties.desktop.in diff --git a/capplets/accessibility/at-properties/ChangeLog b/capplets/accessibility/at-properties/ChangeLog deleted file mode 100644 index 0d08f7cc3..000000000 --- a/capplets/accessibility/at-properties/ChangeLog +++ /dev/null @@ -1,99 +0,0 @@ -2004-11-09 Mark McLoughlin <mark@skynet.ie> - - * Makefile.am: install the .desktop file in - $(datadir)/applications. - - * at-properties.desktop.in: add OnlyShowIn=GNOME; - -2004-10-14 Jody Goldberg <jody@gnome.org> - - * Release 2.8.1 - -Thu Sep 2 17:06:28 2004 Jonathan Blandford <jrb@redhat.com> - - * main.c: (cb_dialog_response): Change to use help docs instead of - the "foo"/"bar" that's there. - -2004-08-20 Frederic Crozat <fcrozat@mandrakesoft.com> - - * main.c: (setup_dialog): - Use themed icon for window hint. - -2004-04-15 Jody Goldberg <jody@gnome.org> - - * Release 2.6.1 - -2004-04-01 Jody Goldberg <jody@gnome.org> - - * Release 2.6.0.3 - -2004-03-30 Jody Goldberg <jody@gnome.org> - - * Release 2.6.0.1 - -2004-03-23 Jody Goldberg <jody@gnome.org> - - * Release 2.6.0 - -2004-03-11 Jody Goldberg <jody@gnome.org> - - * Release 2.5.4 - -2003-11-27 Muktha <muktha.narayan@wipro.com> - - * main.c: Do not popup the logout dialog when the close button (X) of - window manager is clicked. Fixes bug #124032. - -2004-02-13 Jody Goldberg <jody@gnome.org> - - * Release 2.5.3 - -2004-01-14 Jody Goldberg <jody@gnome.org> - - * Release 2.5.2 - -2003-12-30 Jody Goldberg <jody@gnome.org> - - * Release 2.5.1.1 - -2003-12-30 Jody Goldberg <jody@gnome.org> - - * Release 2.5.1 - -2003-10-28 Jody Goldberg <jody@gnome.org> - - * Release 2.5.0 - -2003-08-01 Dennis Cranston <dennis_cranston at yahoo com> - - * at-enable-dialog.glade: Patch to add two more pixels of spacing - between action area and vbox of preferences dialog. - -Fri Aug 1 14:28:52 2003 Jonathan Blandford <jrb@redhat.com> - - * main.c (init_startup_state): remove markup tags from translated - strings, #118801. - -2003-07-18 Jonathan Blandford <jrb@gnome.org> - - * main.c: Add a check to confirm that the AT's are installed. Add - a warning message if they are not. Change widget naming scheme. - - * at-enable-dialog.glade: Change widget naming scheme. - -2003-07-16 Dennis Cranston <dennis_cranston at yahoo com> - - * at-enable-dialog.glade: Make close the default button. - -2003-07-16 Dennis Cranston <dennis_cranston at yahoo com> - - * at-enable-dialog.glade: Adjust widget padding and remove - separator per HIG. - -2003-07-07 Jody Goldberg <jody@gnome.org> - - * Release 2.3.4 - -2003-07-01 Daniel Baeyens <daniel.baeyens@hispalinux.es> - * capplets/accessibility/at-properties/at-enable-dialog.glade: - "Assistive" is misspelled. diff --git a/capplets/accessibility/at-properties/Makefile.am b/capplets/accessibility/at-properties/Makefile.am deleted file mode 100644 index 28537c63f..000000000 --- a/capplets/accessibility/at-properties/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -bin_PROGRAMS = gnome-at-properties - -gnome_at_properties_LDADD = $(AT_CAPPLET_LIBS) $(top_builddir)/capplets/common/libcommon.la -gnome_at_properties_SOURCES = \ - main.c \ - at-startup-session.h \ - at-startup-session.c -gnome_at_properties_LDFLAGS = -export-dynamic - -@INTLTOOL_DESKTOP_RULE@ - -desktopdir = $(datadir)/applications -Desktop_in_files = at-properties.desktop.in -desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop) - -pixmapdir = $(GNOMECC_PIXMAPS_DIR) -pixmap_DATA = \ - at-startup.png \ - at-support.png - -gladedir = $(GNOMECC_GLADE_DIR) -glade_DATA = at-enable-dialog.glade - -INCLUDES = $(AT_CAPPLET_CFLAGS) \ - $(GNOMECC_CAPPLETS_CFLAGS) \ - -DGLADEDIR=\""$(gladedir)"\" \ - -DPIXMAPDIR=\""$(pixmapdir)"\" -CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(Desktop_in_files) $(desktop_DATA) -EXTRA_DIST = $(glade_DATA) $(pixmap_DATA) diff --git a/capplets/accessibility/at-properties/at-enable-capplet.png b/capplets/accessibility/at-properties/at-enable-capplet.png Binary files differdeleted file mode 100644 index c09f8d496..000000000 --- a/capplets/accessibility/at-properties/at-enable-capplet.png +++ /dev/null diff --git a/capplets/accessibility/at-properties/at-enable-dialog.glade b/capplets/accessibility/at-properties/at-enable-dialog.glade deleted file mode 100644 index cadda6dc8..000000000 --- a/capplets/accessibility/at-properties/at-enable-dialog.glade +++ /dev/null @@ -1,465 +0,0 @@ -<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> -<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> - -<glade-interface> -<requires lib="gnome"/> - -<widget class="GtkDialog" id="at_properties_dialog"> - <property name="border_width">5</property> - <property name="title" translatable="yes">Assistive Technology Preferences</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> - <property name="modal">False</property> - <property name="resizable">False</property> - <property name="destroy_with_parent">False</property> - <property name="has_separator">False</property> - - <child internal-child="vbox"> - <widget class="GtkVBox" id="dialog-vbox1"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</property> - - <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="dialog-action_area1"> - <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> - - <child> - <widget class="GtkButton" id="at_help_button"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-help</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="response_id">-11</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="at_close_logout_button"> - <property name="visible">True</property> - <property name="sensitive">False</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="response_id">0</property> - - <child> - <widget class="GtkAlignment" id="alignment3"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">0</property> - <property name="yscale">0</property> - - <child> - <widget class="GtkHBox" id="hbox1"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</property> - - <child> - <widget class="GtkImage" id="at_close_and_logout_image"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label5"> - <property name="visible">True</property> - <property name="label" translatable="yes">Close and _Log Out</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkButton" id="at_close_button"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="has_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-close</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="response_id">-7</property> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack_type">GTK_PACK_END</property> - </packing> - </child> - - <child> - <widget class="GtkVBox" id="vbox1"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">18</property> - - <child> - <widget class="GtkVBox" id="at_support_frame"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkVBox" id="vbox2"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkLabel" id="label4"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Support</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox2"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">12</property> - - <child> - <widget class="GtkImage" id="at_enable_image"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkVBox" id="vbox3"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkCheckButton" id="at_enable_toggle"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_Enable assistive technologies</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="at_warning_label"> - <property name="visible">True</property> - <property name="label" translatable="yes"><small><i><b>Note:</b> Changes to this setting will not take effect until you next log in.</i></small></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">True</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkVBox" id="at_applications_frame"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkVBox" id="vbox7"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkLabel" id="label3"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Applications</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox3"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">12</property> - - <child> - <widget class="GtkImage" id="at_applications_image"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkVBox" id="vbox5"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkLabel" id="at_applications_label"> - <property name="visible">True</property> - <property name="label" translatable="yes">Start these assistive technologies every time you log in:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">6</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkCheckButton" id="at_screenreader_toggle"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_Screenreader</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkCheckButton" id="at_magnifier_toggle"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_Magnifier</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkCheckButton" id="at_keyboard_toggle"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_On-screen keyboard</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkHSeparator" id="at_applications_hseparator"> - <property name="visible">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="at_applications_warning_label"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">True</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> -</widget> - -</glade-interface> diff --git a/capplets/accessibility/at-properties/at-properties.desktop.in.in b/capplets/accessibility/at-properties/at-properties.desktop.in.in deleted file mode 100644 index 3d52616d7..000000000 --- a/capplets/accessibility/at-properties/at-properties.desktop.in.in +++ /dev/null @@ -1,15 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -_Name=Assistive Technology Support -_Comment=Enable support for GNOME assistive technologies at login -Exec=gnome-at-properties -Icon=gnome-settings-accessibility-technologies -Terminal=false -Type=Application -StartupNotify=true -Categories=GNOME;Settings;Accessibility; -OnlyShowIn=GNOME; -X-GNOME-Bugzilla-Bugzilla=GNOME -X-GNOME-Bugzilla-Product=control-center -X-GNOME-Bugzilla-Component=Assistive Technology Support -X-GNOME-Bugzilla-Version=@VERSION@ diff --git a/capplets/accessibility/at-properties/at-startup-session.c b/capplets/accessibility/at-properties/at-startup-session.c deleted file mode 100644 index 31026204e..000000000 --- a/capplets/accessibility/at-properties/at-startup-session.c +++ /dev/null @@ -1,160 +0,0 @@ -#include <config.h> -#include <string.h> -#include <glib-object.h> -#include <gconf/gconf-client.h> - -#include "at-startup-session.h" - -#define AT_STARTUP_KEY "/desktop/gnome/accessibility/startup/exec_ats" - -#define GNOPERNICUS_MAGNIFIER_KEY "/apps/gnopernicus/srcore/mag_active" -#define GNOPERNICUS_SPEECH_KEY "/apps/gnopernicus/srcore/sp_active" -#define GNOPERNICUS_BRAILLE_KEY "/apps/gnopernicus/srcore/br_active" - -static AtStartupState at_startup_state_recent; - -static GSList * -at_startup_get_list (GConfClient *client) -{ - GError *error = NULL; - GSList *at_list = gconf_client_get_list (client, AT_STARTUP_KEY, GCONF_VALUE_STRING, &error); - if (error) { - g_warning ("Error getting value of " AT_STARTUP_KEY ": %s", error->message); - g_error_free (error); - return NULL; - } - return at_list; -} - -gint -at_startup_string_compare (gconstpointer s1, gconstpointer s2) -{ - if (s1 && s2) { - return strcmp (s1, s2); - } - else - return ((char *)s2-(char *)s1); -} - -static GSList * -at_startup_list_add (GSList *list, const gchar *exec_name) -{ - GSList *l = g_slist_find_custom (list, exec_name, at_startup_string_compare); - if (!l) { - list = g_slist_append (list, g_strdup (exec_name)); - } - return list; -} - -static GSList * -at_startup_list_remove (GSList *list, const gchar *exec_name) -{ - GSList *l = g_slist_find_custom (list, exec_name, at_startup_string_compare); - if (l) { - g_free (l->data); - list = g_slist_delete_link (list, l); - } - return list; -} - -void -at_startup_state_init (AtStartupState *startup_state) -{ - gboolean mag_active, speech_active, braille_active; - GSList *l; - GConfClient *client = gconf_client_get_default (); - GSList *at_list = at_startup_get_list (client); - gchar *prog; - - for (l = at_list; l; l = l->next) { - gchar *exec_name = (char *) l->data; - if (exec_name && !strcmp (exec_name, "gnopernicus")) { - braille_active = gconf_client_get_bool (client, - GNOPERNICUS_BRAILLE_KEY, - NULL); - mag_active = gconf_client_get_bool (client, - GNOPERNICUS_MAGNIFIER_KEY, - NULL); - speech_active = gconf_client_get_bool (client, - GNOPERNICUS_SPEECH_KEY, - NULL); - - startup_state->enabled.screenreader = (braille_active || speech_active); - startup_state->enabled.magnifier = mag_active; - } - else if (exec_name && !strcmp(exec_name, "gok")) { - startup_state->enabled.osk = TRUE; - } - g_free (exec_name); - } - - g_slist_free (at_list); - g_object_unref (client); - at_startup_state_recent.flags = startup_state->flags; - - prog = g_find_program_in_path ("gok"); - if (prog != NULL) { - startup_state->enabled.osk_installed = TRUE; - g_free (prog); - } else { - startup_state->enabled.osk_installed = FALSE; - } - - prog = g_find_program_in_path ("gnopernicus"); - if (prog != NULL) { - startup_state->enabled.magnifier_installed = TRUE; - startup_state->enabled.screenreader_installed = TRUE; - g_free (prog); - } else { - startup_state->enabled.magnifier_installed = FALSE; - startup_state->enabled.screenreader_installed = FALSE; - } -} - -void -at_startup_state_update (AtStartupState *startup_state) -{ - GError *error = NULL; - GConfClient *client = gconf_client_get_default (); - GSList *at_list = at_startup_get_list (client); - - if (startup_state->enabled.screenreader != at_startup_state_recent.enabled.screenreader) { - gconf_client_set_bool (client, GNOPERNICUS_SPEECH_KEY, - startup_state->enabled.screenreader, NULL); - gconf_client_set_bool (client, GNOPERNICUS_BRAILLE_KEY, - startup_state->enabled.screenreader, NULL); - } - - if (startup_state->enabled.magnifier != at_startup_state_recent.enabled.magnifier) { - gconf_client_set_bool (client, GNOPERNICUS_MAGNIFIER_KEY, - startup_state->enabled.magnifier, NULL); - } - - if (startup_state->enabled.screenreader || startup_state->enabled.magnifier) { - if (!(at_startup_state_recent.enabled.screenreader || - at_startup_state_recent.enabled.magnifier)) - /* new state includes SR or magnifier, initial one did not */ - at_list = at_startup_list_add (at_list, "gnopernicus"); - } - else { - if (at_startup_state_recent.enabled.screenreader || - at_startup_state_recent.enabled.magnifier) - at_list = at_startup_list_remove (at_list, "gnopernicus"); - } - if (startup_state->enabled.osk) { - if (!at_startup_state_recent.enabled.osk) - at_list = at_startup_list_add (at_list, "gok"); - } - else { - if (at_startup_state_recent.enabled.osk) - at_list = at_startup_list_remove (at_list, "gok"); - } - if (at_startup_state_recent.flags != startup_state->flags) { - at_startup_state_recent.flags = startup_state->flags; - gconf_client_set_list (client, AT_STARTUP_KEY, GCONF_VALUE_STRING, at_list, &error); - } - g_object_unref (client); - g_slist_free (at_list); -} - - diff --git a/capplets/accessibility/at-properties/at-startup-session.h b/capplets/accessibility/at-properties/at-startup-session.h deleted file mode 100644 index 603957ccb..000000000 --- a/capplets/accessibility/at-properties/at-startup-session.h +++ /dev/null @@ -1,18 +0,0 @@ -#include <glib.h> - -typedef union { - guint flags; - struct { - guint support:1; - guint osk:1; - guint magnifier:1; - guint screenreader:1; - guint osk_installed:1; - guint magnifier_installed:1; - guint screenreader_installed:1; - } enabled; -} AtStartupState; - -void at_startup_state_init (AtStartupState *startup_state); - -void at_startup_state_update (AtStartupState *startup_state); diff --git a/capplets/accessibility/at-properties/at-startup.png b/capplets/accessibility/at-properties/at-startup.png Binary files differdeleted file mode 100644 index c09f8d496..000000000 --- a/capplets/accessibility/at-properties/at-startup.png +++ /dev/null diff --git a/capplets/accessibility/at-properties/at-support.png b/capplets/accessibility/at-properties/at-support.png Binary files differdeleted file mode 100644 index 1a350a8e0..000000000 --- a/capplets/accessibility/at-properties/at-support.png +++ /dev/null diff --git a/capplets/accessibility/at-properties/main.c b/capplets/accessibility/at-properties/main.c deleted file mode 100644 index 11cbe42e4..000000000 --- a/capplets/accessibility/at-properties/main.c +++ /dev/null @@ -1,296 +0,0 @@ -#include <config.h> -#include <gtk/gtk.h> -#include <gconf/gconf-client.h> -#include <glade/glade.h> - -#include "capplet-util.h" -#include "gconf-property-editor.h" -#include "activate-settings-daemon.h" -#include "at-startup-session.h" - -#define ACCESSIBILITY_KEY "/desktop/gnome/interface/accessibility" -#define ACCESSIBILITY_KEY_DIR "/desktop/gnome/interface" -#define AT_STARTUP_DIR "/desktop/gnome/accessibility/startup" -#define AT_STARTUP_KEY "/desktop/gnome/accessibility/startup/exec_ats" -#define SR_PREFS_DIR "/apps/gnopernicus/srcore" - -static AtStartupState at_startup_state, at_startup_state_initial; - -static void -init_startup_state (GladeXML *dialog) -{ - GConfClient *client = gconf_client_get_default (); - - at_startup_state.flags = (gconf_client_get_bool (client, - ACCESSIBILITY_KEY, - NULL)) ? 1 : 0; - - at_startup_state_init (&at_startup_state); - - at_startup_state_initial.flags = at_startup_state.flags; - g_object_unref (client); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("at_keyboard_toggle")), - at_startup_state.enabled.osk); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("at_screenreader_toggle")), - at_startup_state.enabled.screenreader); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("at_magnifier_toggle")), - at_startup_state.enabled.magnifier); - - gtk_widget_set_sensitive (WID ("at_keyboard_toggle"), - at_startup_state.enabled.osk_installed); - gtk_widget_set_sensitive (WID ("at_screenreader_toggle"), - at_startup_state.enabled.screenreader_installed); - gtk_widget_set_sensitive (WID ("at_magnifier_toggle"), - at_startup_state.enabled.magnifier_installed); - - if (at_startup_state.enabled.osk_installed && - at_startup_state.enabled.screenreader_installed && - at_startup_state.enabled.magnifier_installed) { - gtk_widget_hide (WID ("at_applications_warning_label")); - gtk_widget_hide (WID ("at_applications_hseparator")); - } else { - gchar *warning_label; - - gtk_widget_show (WID ("at_applications_warning_label")); - gtk_widget_show (WID ("at_applications_hseparator")); - if (!at_startup_state.enabled.osk_installed && - !(at_startup_state.enabled.screenreader_installed || - at_startup_state.enabled.magnifier_installed)) { - warning_label = g_strdup_printf ("<i>%s</i>", _("No Assistive Technology is available on your system. The 'gok' package must be installed in order to get on-screen keyboard support, and the 'gnopernicus' package must be installed for screenreading and magnifying capabilities.")); - } else if (!at_startup_state.enabled.osk_installed) { - warning_label = g_strdup_printf ("<i>%s</i>", _("Not all available assistive technologies are installed on your system. The 'gok' package must be installed in order to get on-screen keyboard support.")); - } else { - warning_label = g_strdup_printf ("<i>%s</i>", _("Not all available assistive technologies are installed on your system. The 'gnopernicus' package must be installed for screenreading and magnifying capabilities.")); - } - gtk_label_set_markup (GTK_LABEL (WID ("at_applications_warning_label")), warning_label); - g_free (warning_label); - } -} - -static GladeXML * -create_dialog (void) -{ - GladeXML *dialog; - - dialog = glade_xml_new (GLADEDIR "/at-enable-dialog.glade", "at_properties_dialog", NULL); - - gtk_image_set_from_stock (GTK_IMAGE (WID ("at_close_and_logout_image")), - GTK_STOCK_QUIT, GTK_ICON_SIZE_BUTTON); - - gtk_image_set_from_file (GTK_IMAGE (WID ("at_enable_image")), - PIXMAPDIR "/at-support.png"); - - gtk_image_set_from_file (GTK_IMAGE (WID ("at_applications_image")), - PIXMAPDIR "/at-startup.png"); - - return dialog; -} - -static void -cb_dialog_response (GtkDialog *dialog, gint response_id) -{ - GnomeClient *client; - if (response_id == GTK_RESPONSE_HELP) - capplet_help (GTK_WINDOW (dialog), - "user-guide.xml", - "goscustaccess-11"); - else if (response_id == GTK_RESPONSE_CLOSE || response_id == GTK_RESPONSE_DELETE_EVENT) - gtk_main_quit (); - else { - g_message ("CLOSE AND LOGOUT!"); - if (!(client = gnome_master_client ())) { - - gtk_main_quit (); - } - gnome_client_request_save (client, GNOME_SAVE_GLOBAL, TRUE, - GNOME_INTERACT_ANY, FALSE, TRUE); - } -} - -static void -close_logout_update (GladeXML *dialog) -{ - GConfClient *client = gconf_client_get_default (); - gboolean has_changed = - (at_startup_state.flags != at_startup_state_initial.flags) && - gconf_client_get_bool (client, ACCESSIBILITY_KEY, NULL); - - gtk_widget_set_sensitive (WID ("at_close_logout_button"), has_changed); - g_object_unref (client); -} - -static void -at_startup_toggled (GtkToggleButton *toggle_button, - GladeXML *dialog) -{ - if (toggle_button == GTK_TOGGLE_BUTTON (WID ("at_keyboard_toggle"))) { - at_startup_state.enabled.osk = gtk_toggle_button_get_active (toggle_button); - } - else if (toggle_button == GTK_TOGGLE_BUTTON (WID ("at_magnifier_toggle"))) { - at_startup_state.enabled.magnifier = gtk_toggle_button_get_active (toggle_button); - } - else if (toggle_button == GTK_TOGGLE_BUTTON (WID ("at_screenreader_toggle"))) { - at_startup_state.enabled.screenreader = gtk_toggle_button_get_active (toggle_button); - } - - at_startup_state_update (&at_startup_state); - close_logout_update (dialog); -} - -static void -at_enable_toggled (GtkToggleButton *toggle_button, - GladeXML *dialog) -{ - GConfClient *client = gconf_client_get_default (); - gboolean is_enabled = gtk_toggle_button_get_active (toggle_button); - - gconf_client_set_bool (client, ACCESSIBILITY_KEY, - is_enabled, - NULL); - at_startup_state.enabled.support = is_enabled; - g_object_unref (client); -} - -static void -at_startup_update_ui (GConfClient *client, - GladeXML *dialog) -{ - at_startup_state_init (&at_startup_state); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("at_keyboard_toggle")), - at_startup_state.enabled.osk); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("at_screenreader_toggle")), - at_startup_state.enabled.screenreader); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("at_magnifier_toggle")), - at_startup_state.enabled.magnifier); -} - -static void -at_enable_update (GConfClient *client, - GladeXML *dialog) -{ - gboolean is_enabled = gconf_client_get_bool (client, ACCESSIBILITY_KEY, NULL); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("at_enable_toggle")), - is_enabled); - - gtk_widget_set_sensitive (WID ("at_applications_frame"), is_enabled); -} - -static void -at_startup_changed (GConfClient *client, - guint cnxn_id, - GConfEntry *entry, - gpointer user_data) -{ - at_startup_state_init (&at_startup_state); - at_startup_update_ui (client, user_data); - close_logout_update (user_data); -} - -static void -at_enable_changed (GConfClient *client, - guint cnxn_id, - GConfEntry *entry, - gpointer user_data) -{ - at_enable_update (client, user_data); - close_logout_update (user_data); -} - -static void -setup_dialog (GladeXML *dialog) -{ - GConfClient *client; - GtkWidget *widget; - GObject *peditor; - - client = gconf_client_get_default (); - - gconf_client_add_dir (client, ACCESSIBILITY_KEY_DIR, - GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); - - widget = WID ("at_enable_toggle"); - g_signal_connect (widget, "toggled", - G_CALLBACK (at_enable_toggled), - dialog); - - peditor = gconf_peditor_new_boolean (NULL, ACCESSIBILITY_KEY, - widget, - NULL); - - at_enable_update (client, dialog); - - gconf_client_notify_add (client, ACCESSIBILITY_KEY_DIR, - at_enable_changed, - dialog, NULL, NULL); - - gconf_client_add_dir (client, AT_STARTUP_DIR, - GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); - - gconf_client_add_dir (client, SR_PREFS_DIR, - GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); - - gconf_client_notify_add (client, AT_STARTUP_DIR, - at_startup_changed, - dialog, NULL, NULL); - - gconf_client_notify_add (client, SR_PREFS_DIR, - at_startup_changed, - dialog, NULL, NULL); - - widget = WID ("at_keyboard_toggle"); - - g_signal_connect (widget, "toggled", - G_CALLBACK (at_startup_toggled), - dialog); - - widget = WID ("at_magnifier_toggle"); - g_signal_connect (widget, "toggled", - G_CALLBACK (at_startup_toggled), - dialog); - - widget = WID ("at_screenreader_toggle"); - g_signal_connect (widget, "toggled", - G_CALLBACK (at_startup_toggled), - dialog); - - widget = WID ("at_properties_dialog"); - capplet_set_icon (widget, "gnome-settings-accessibility-technologies"); - - g_signal_connect (G_OBJECT (widget), - "response", - G_CALLBACK (cb_dialog_response), NULL); - - gtk_widget_show (widget); - - g_object_unref (client); -} - -int -main (int argc, char *argv[]) -{ - GladeXML *dialog; - - bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); - bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); - textdomain (GETTEXT_PACKAGE); - - gnome_program_init ("gnome-at-properties", VERSION, - LIBGNOMEUI_MODULE, argc, argv, - GNOME_PARAM_APP_DATADIR, GNOMECC_DATA_DIR, - NULL); - - activate_settings_daemon (); - - dialog = create_dialog (); - - init_startup_state (dialog); - - setup_dialog (dialog); - - gtk_main (); - - return 0; -} |