gdm r5724 - in trunk: . gui/simple-greeter
- From: mccann svn gnome org
- To: svn-commits-list gnome org
- Subject: gdm r5724 - in trunk: . gui/simple-greeter
- Date: Thu, 7 Feb 2008 21:38:55 +0000 (GMT)
Author: mccann
Date: Thu Feb 7 21:38:54 2008
New Revision: 5724
URL: http://svn.gnome.org/viewvc/gdm?rev=5724&view=rev
Log:
2008-02-07 William Jon McCann <jmccann redhat com>
* gui/simple-greeter/Makefile.am:
* gui/simple-greeter/gdm-a11y-preferences-dialog.c:
(gdm_a11y_preferences_dialog_set_property),
(gdm_a11y_preferences_dialog_get_property),
(gdm_a11y_preferences_dialog_constructor),
(gdm_a11y_preferences_dialog_dispose),
(gdm_a11y_preferences_dialog_class_init), (on_response),
(config_get_string), (config_get_bool), (config_get_high_contrast),
(config_set_high_contrast), (config_get_sticky_keys),
(config_set_sticky_keys), (config_get_bounce_keys),
(config_set_bounce_keys), (config_get_slow_keys),
(config_set_slow_keys), (config_get_screen_keyboard),
(config_set_screen_keyboard), (config_get_screen_reader),
(config_set_screen_reader), (config_get_screen_magnifier),
(config_set_screen_magnifier),
(on_sticky_keys_checkbutton_toggled),
(on_bounce_keys_checkbutton_toggled),
(on_slow_keys_checkbutton_toggled),
(on_high_contrast_checkbutton_toggled),
(on_screen_keyboard_checkbutton_toggled),
(on_screen_reader_checkbutton_toggled),
(on_screen_magnifier_checkbutton_toggled), (ui_set_sticky_keys),
(ui_set_bounce_keys), (ui_set_slow_keys), (ui_set_high_contrast),
(ui_set_screen_keyboard), (ui_set_screen_reader),
(ui_set_screen_magnifier), (key_changed_cb), (setup_dialog),
(gdm_a11y_preferences_dialog_init),
(gdm_a11y_preferences_dialog_finalize),
(gdm_a11y_preferences_dialog_new):
* gui/simple-greeter/gdm-a11y-preferences-dialog.glade:
* gui/simple-greeter/gdm-a11y-preferences-dialog.h:
* gui/simple-greeter/gdm-greeter-panel.c:
(on_a11y_dialog_response), (on_a11y_button_clicked),
(gdm_greeter_panel_init):
* gui/simple-greeter/test-a11y-preferences.c: (main):
Add initial cut at a11y dialog. Orca etc don't start yet.
Added:
trunk/gui/simple-greeter/gdm-a11y-preferences-dialog.c
trunk/gui/simple-greeter/gdm-a11y-preferences-dialog.glade
trunk/gui/simple-greeter/gdm-a11y-preferences-dialog.h
trunk/gui/simple-greeter/test-a11y-preferences.c
Modified:
trunk/ChangeLog
trunk/gui/simple-greeter/Makefile.am
trunk/gui/simple-greeter/gdm-greeter-panel.c
Modified: trunk/gui/simple-greeter/Makefile.am
==============================================================================
--- trunk/gui/simple-greeter/Makefile.am (original)
+++ trunk/gui/simple-greeter/Makefile.am Thu Feb 7 21:38:54 2008
@@ -62,6 +62,7 @@
test-language-chooser \
test-user-chooser \
test-user-manager \
+ test-a11y-preferences \
$(NULL)
test_greeter_login_window_SOURCES = \
@@ -112,10 +113,13 @@
gdm-sessions.c \
gdm-session-option-widget.h \
gdm-session-option-widget.c \
+ gdm-a11y-preferences-dialog.h \
+ gdm-a11y-preferences-dialog.c \
$(NULL)
test_greeter_panel_LDADD = \
$(top_builddir)/gui/simple-greeter/libnotificationarea/libnotificationarea.la \
+ $(SIMPLE_GREETER_LIBS) \
$(GTK_LIBS) \
$(GCONF_LIBS) \
$(NULL)
@@ -175,6 +179,17 @@
$(POLKIT_GNOME_LIBS) \
$(NULL)
+test_a11y_preferences_SOURCES = \
+ gdm-a11y-preferences-dialog.h \
+ gdm-a11y-preferences-dialog.c \
+ test-a11y-preferences.c \
+ $(NULL)
+
+test_a11y_preferences_LDADD = \
+ $(COMMON_LIBS) \
+ $(SIMPLE_GREETER_LIBS) \
+ $(NULL)
+
libexec_PROGRAMS = \
gdm-simple-greeter
@@ -217,6 +232,8 @@
gdm-session-option-widget.c \
gdm-user-chooser-widget.h \
gdm-user-chooser-widget.c \
+ gdm-a11y-preferences-dialog.h \
+ gdm-a11y-preferences-dialog.c \
$(NULL)
gdm_simple_greeter_LDADD = \
@@ -231,8 +248,9 @@
$(NULL)
gladedir = $(pkgdatadir)
-glade_DATA = \
- gdm-greeter-login-window.glade \
+glade_DATA = \
+ gdm-greeter-login-window.glade \
+ gdm-a11y-preferences-dialog.glade \
$(NULL)
EXTRA_DIST = \
Added: trunk/gui/simple-greeter/gdm-a11y-preferences-dialog.c
==============================================================================
--- (empty file)
+++ trunk/gui/simple-greeter/gdm-a11y-preferences-dialog.c Thu Feb 7 21:38:54 2008
@@ -0,0 +1,740 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2008 William Jon McCann <jmccann redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+
+#include <glib.h>
+#include <glib/gi18n.h>
+#include <glib-object.h>
+#include <gtk/gtk.h>
+
+#include <glade/glade-xml.h>
+#include <gconf/gconf-client.h>
+
+#include "gdm-a11y-preferences-dialog.h"
+
+#define GDM_A11Y_PREFERENCES_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GDM_TYPE_A11Y_PREFERENCES_DIALOG, GdmA11yPreferencesDialogPrivate))
+
+#define GLADE_XML_FILE "gdm-a11y-preferences-dialog.glade"
+
+#define KEY_A11Y_DIR "/desktop/gnome/accessibility"
+#define KEY_STICKY_KEYS_ENABLED KEY_A11Y_DIR "/keyboard/stickykeys_enable"
+#define KEY_BOUNCE_KEYS_ENABLED KEY_A11Y_DIR "/keyboard/bouncekeys_enable"
+#define KEY_SLOW_KEYS_ENABLED KEY_A11Y_DIR "/keyboard/slowkeys_enable"
+#define KEY_MOUSE_KEYS_ENABLED KEY_A11Y_DIR "/keyboard/mousekeys_enable"
+
+#define KEY_GDM_A11Y_DIR "/apps/gdm/simple-greeter/accessibility"
+#define KEY_SCREEN_KEYBOARD_ENABLED KEY_GDM_A11Y_DIR "screen_keyboard_enabled"
+#define KEY_SCREEN_MAGNIFIER_ENABLED KEY_GDM_A11Y_DIR "screen_magnifier_enabled"
+#define KEY_SCREEN_READER_ENABLED KEY_GDM_A11Y_DIR "screen_reader_enabled"
+
+#define KEY_GTK_THEME "/desktop/gnome/interface/gtk_theme"
+#define KEY_COLOR_SCHEME "/desktop/gnome/interface/gtk_color_scheme"
+#define KEY_METACITY_THEME "/apps/metacity/general/theme"
+#define KEY_ICON_THEME "/desktop/gnome/interface/icon_theme"
+
+#define HIGH_CONTRAST_THEME "HighContrast"
+
+struct GdmA11yPreferencesDialogPrivate
+{
+ GladeXML *xml;
+};
+
+enum {
+ PROP_0,
+};
+
+static void gdm_a11y_preferences_dialog_class_init (GdmA11yPreferencesDialogClass *klass);
+static void gdm_a11y_preferences_dialog_init (GdmA11yPreferencesDialog *a11y_preferences_dialog);
+static void gdm_a11y_preferences_dialog_finalize (GObject *object);
+
+G_DEFINE_TYPE (GdmA11yPreferencesDialog, gdm_a11y_preferences_dialog, GTK_TYPE_DIALOG)
+
+static void
+gdm_a11y_preferences_dialog_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ GdmA11yPreferencesDialog *self;
+
+ self = GDM_A11Y_PREFERENCES_DIALOG (object);
+
+ switch (prop_id) {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gdm_a11y_preferences_dialog_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ GdmA11yPreferencesDialog *self;
+
+ self = GDM_A11Y_PREFERENCES_DIALOG (object);
+
+ switch (prop_id) {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static GObject *
+gdm_a11y_preferences_dialog_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_properties)
+{
+ GdmA11yPreferencesDialog *a11y_preferences_dialog;
+ GdmA11yPreferencesDialogClass *klass;
+
+ klass = GDM_A11Y_PREFERENCES_DIALOG_CLASS (g_type_class_peek (GDM_TYPE_A11Y_PREFERENCES_DIALOG));
+
+ a11y_preferences_dialog = GDM_A11Y_PREFERENCES_DIALOG (G_OBJECT_CLASS (gdm_a11y_preferences_dialog_parent_class)->constructor (type,
+ n_construct_properties,
+ construct_properties));
+
+ return G_OBJECT (a11y_preferences_dialog);
+}
+
+static void
+gdm_a11y_preferences_dialog_dispose (GObject *object)
+{
+ GdmA11yPreferencesDialog *a11y_preferences_dialog;
+
+ a11y_preferences_dialog = GDM_A11Y_PREFERENCES_DIALOG (object);
+
+ G_OBJECT_CLASS (gdm_a11y_preferences_dialog_parent_class)->dispose (object);
+}
+
+static void
+gdm_a11y_preferences_dialog_class_init (GdmA11yPreferencesDialogClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->get_property = gdm_a11y_preferences_dialog_get_property;
+ object_class->set_property = gdm_a11y_preferences_dialog_set_property;
+ object_class->constructor = gdm_a11y_preferences_dialog_constructor;
+ object_class->dispose = gdm_a11y_preferences_dialog_dispose;
+ object_class->finalize = gdm_a11y_preferences_dialog_finalize;
+
+ g_type_class_add_private (klass, sizeof (GdmA11yPreferencesDialogPrivate));
+}
+
+static void
+on_response (GdmA11yPreferencesDialog *dialog,
+ gint response_id)
+{
+ switch (response_id) {
+ default:
+ break;
+ }
+}
+
+static char *
+config_get_string (const char *key,
+ gboolean *is_writable)
+{
+ char *str;
+ GConfClient *client;
+
+ client = gconf_client_get_default ();
+
+ if (is_writable) {
+ *is_writable = gconf_client_key_is_writable (client,
+ key,
+ NULL);
+ }
+
+ str = gconf_client_get_string (client, key, NULL);
+
+ g_object_unref (client);
+
+ return str;
+}
+
+static gboolean
+config_get_bool (const char *key,
+ gboolean *is_writable)
+{
+ int enabled;
+ GConfClient *client;
+
+ client = gconf_client_get_default ();
+
+ if (is_writable) {
+ *is_writable = gconf_client_key_is_writable (client,
+ key,
+ NULL);
+ }
+
+ enabled = gconf_client_get_bool (client, key, NULL);
+
+ g_object_unref (client);
+
+ return enabled;
+}
+
+static gboolean
+config_get_high_contrast (gboolean *is_writable)
+{
+ gboolean ret;
+ char *gtk_theme;
+
+ ret = FALSE;
+
+ gtk_theme = config_get_string (KEY_GTK_THEME, is_writable);
+ if (gtk_theme != NULL && strcmp (gtk_theme, HIGH_CONTRAST_THEME) == 0) {
+ ret = TRUE;
+ }
+ g_free (gtk_theme);
+
+ return ret;
+}
+
+static void
+config_set_high_contrast (gboolean enabled)
+{
+ GConfClient *client;
+
+ client = gconf_client_get_default ();
+
+ if (enabled) {
+ gconf_client_set_string (client, KEY_GTK_THEME, HIGH_CONTRAST_THEME, NULL);
+ gconf_client_set_string (client, KEY_ICON_THEME, HIGH_CONTRAST_THEME, NULL);
+ /* there isn't a high contrast metacity theme afaik */
+ } else {
+ gconf_client_unset (client, KEY_GTK_THEME, NULL);
+ gconf_client_unset (client, KEY_ICON_THEME, NULL);
+ gconf_client_unset (client, KEY_METACITY_THEME, NULL);
+ }
+
+ g_object_unref (client);
+}
+
+static gboolean
+config_get_sticky_keys (gboolean *is_writable)
+{
+ return config_get_bool (KEY_STICKY_KEYS_ENABLED, is_writable);
+}
+
+static void
+config_set_sticky_keys (gboolean enabled)
+{
+ GConfClient *client;
+
+ client = gconf_client_get_default ();
+ gconf_client_set_bool (client, KEY_STICKY_KEYS_ENABLED, enabled, NULL);
+ g_object_unref (client);
+}
+
+static gboolean
+config_get_bounce_keys (gboolean *is_writable)
+{
+ return config_get_bool (KEY_BOUNCE_KEYS_ENABLED, is_writable);
+}
+
+static void
+config_set_bounce_keys (gboolean enabled)
+{
+ GConfClient *client;
+
+ client = gconf_client_get_default ();
+ gconf_client_set_bool (client, KEY_BOUNCE_KEYS_ENABLED, enabled, NULL);
+ g_object_unref (client);
+}
+
+static gboolean
+config_get_slow_keys (gboolean *is_writable)
+{
+ return config_get_bool (KEY_SLOW_KEYS_ENABLED, is_writable);
+}
+
+static void
+config_set_slow_keys (gboolean enabled)
+{
+ GConfClient *client;
+
+ client = gconf_client_get_default ();
+ gconf_client_set_bool (client, KEY_SLOW_KEYS_ENABLED, enabled, NULL);
+ g_object_unref (client);
+}
+
+static gboolean
+config_get_screen_keyboard (gboolean *is_writable)
+{
+ return config_get_bool (KEY_SCREEN_KEYBOARD_ENABLED, is_writable);
+}
+
+static void
+config_set_screen_keyboard (gboolean enabled)
+{
+ GConfClient *client;
+
+ client = gconf_client_get_default ();
+ gconf_client_set_bool (client, KEY_SCREEN_KEYBOARD_ENABLED, enabled, NULL);
+ g_object_unref (client);
+}
+
+static gboolean
+config_get_screen_reader (gboolean *is_writable)
+{
+ return config_get_bool (KEY_SCREEN_READER_ENABLED, is_writable);
+}
+
+static void
+config_set_screen_reader (gboolean enabled)
+{
+ GConfClient *client;
+
+ client = gconf_client_get_default ();
+ gconf_client_set_bool (client, KEY_SCREEN_READER_ENABLED, enabled, NULL);
+ g_object_unref (client);
+}
+
+static gboolean
+config_get_screen_magnifier (gboolean *is_writable)
+{
+ return config_get_bool (KEY_SCREEN_MAGNIFIER_ENABLED, is_writable);
+}
+
+static void
+config_set_screen_magnifier (gboolean enabled)
+{
+ GConfClient *client;
+
+ client = gconf_client_get_default ();
+ gconf_client_set_bool (client, KEY_SCREEN_MAGNIFIER_ENABLED, enabled, NULL);
+ g_object_unref (client);
+}
+
+static void
+on_sticky_keys_checkbutton_toggled (GtkToggleButton *button,
+ GdmA11yPreferencesDialog *dialog)
+{
+ config_set_sticky_keys (gtk_toggle_button_get_active (button));
+}
+
+static void
+on_bounce_keys_checkbutton_toggled (GtkToggleButton *button,
+ GdmA11yPreferencesDialog *dialog)
+{
+ config_set_bounce_keys (gtk_toggle_button_get_active (button));
+}
+
+static void
+on_slow_keys_checkbutton_toggled (GtkToggleButton *button,
+ GdmA11yPreferencesDialog *dialog)
+{
+ config_set_slow_keys (gtk_toggle_button_get_active (button));
+}
+
+static void
+on_high_contrast_checkbutton_toggled (GtkToggleButton *button,
+ GdmA11yPreferencesDialog *dialog)
+{
+ config_set_high_contrast (gtk_toggle_button_get_active (button));
+}
+
+static void
+on_screen_keyboard_checkbutton_toggled (GtkToggleButton *button,
+ GdmA11yPreferencesDialog *dialog)
+{
+ config_set_screen_keyboard (gtk_toggle_button_get_active (button));
+}
+
+static void
+on_screen_reader_checkbutton_toggled (GtkToggleButton *button,
+ GdmA11yPreferencesDialog *dialog)
+{
+ config_set_screen_reader (gtk_toggle_button_get_active (button));
+}
+
+static void
+on_screen_magnifier_checkbutton_toggled (GtkToggleButton *button,
+ GdmA11yPreferencesDialog *dialog)
+{
+ config_set_screen_magnifier (gtk_toggle_button_get_active (button));
+}
+
+static void
+ui_set_sticky_keys (GdmA11yPreferencesDialog *dialog,
+ gboolean enabled)
+{
+ GtkWidget *widget;
+ gboolean active;
+
+ widget = glade_xml_get_widget (dialog->priv->xml, "sticky_keys_checkbutton");
+ active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
+ if (active != enabled) {
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), enabled);
+ }
+}
+
+static void
+ui_set_bounce_keys (GdmA11yPreferencesDialog *dialog,
+ gboolean enabled)
+{
+ GtkWidget *widget;
+ gboolean active;
+
+ widget = glade_xml_get_widget (dialog->priv->xml, "bounce_keys_checkbutton");
+ active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
+ if (active != enabled) {
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), enabled);
+ }
+}
+
+static void
+ui_set_slow_keys (GdmA11yPreferencesDialog *dialog,
+ gboolean enabled)
+{
+ GtkWidget *widget;
+ gboolean active;
+
+ widget = glade_xml_get_widget (dialog->priv->xml, "slow_keys_checkbutton");
+ active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
+ if (active != enabled) {
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), enabled);
+ }
+}
+
+static void
+ui_set_high_contrast (GdmA11yPreferencesDialog *dialog,
+ gboolean enabled)
+{
+ GtkWidget *widget;
+ gboolean active;
+
+ widget = glade_xml_get_widget (dialog->priv->xml, "high_contrast_checkbutton");
+ active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
+ if (active != enabled) {
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), enabled);
+ }
+}
+
+static void
+ui_set_screen_keyboard (GdmA11yPreferencesDialog *dialog,
+ gboolean enabled)
+{
+ GtkWidget *widget;
+ gboolean active;
+
+ widget = glade_xml_get_widget (dialog->priv->xml, "screen_keyboard_checkbutton");
+ active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
+ if (active != enabled) {
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), enabled);
+ }
+}
+
+static void
+ui_set_screen_reader (GdmA11yPreferencesDialog *dialog,
+ gboolean enabled)
+{
+ GtkWidget *widget;
+ gboolean active;
+
+ widget = glade_xml_get_widget (dialog->priv->xml, "screen_reader_checkbutton");
+ active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
+ if (active != enabled) {
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), enabled);
+ }
+}
+
+static void
+ui_set_screen_magnifier (GdmA11yPreferencesDialog *dialog,
+ gboolean enabled)
+{
+ GtkWidget *widget;
+ gboolean active;
+
+ widget = glade_xml_get_widget (dialog->priv->xml, "screen_magnifier_checkbutton");
+ active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
+ if (active != enabled) {
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), enabled);
+ }
+}
+
+static void
+key_changed_cb (GConfClient *client,
+ guint cnxn_id,
+ GConfEntry *entry,
+ GdmA11yPreferencesDialog *dialog)
+{
+ const char *key;
+ GConfValue *value;
+
+ key = gconf_entry_get_key (entry);
+
+ if (! g_str_has_prefix (key, KEY_A11Y_DIR)) {
+ return;
+ }
+
+ value = gconf_entry_get_value (entry);
+
+ if (strcmp (key, KEY_STICKY_KEYS_ENABLED) == 0) {
+ if (value->type == GCONF_VALUE_BOOL) {
+ gboolean enabled;
+
+ enabled = gconf_value_get_bool (value);
+ g_debug ("setting key %s = %d", key, enabled);
+ ui_set_sticky_keys (dialog, enabled);
+ } else {
+ g_warning ("Error retrieving configuration key '%s': Invalid type",
+ key);
+ }
+ } else if (strcmp (key, KEY_BOUNCE_KEYS_ENABLED) == 0) {
+ if (value->type == GCONF_VALUE_BOOL) {
+ gboolean enabled;
+
+ enabled = gconf_value_get_bool (value);
+ g_debug ("setting key %s = %d", key, enabled);
+ ui_set_bounce_keys (dialog, enabled);
+ } else {
+ g_warning ("Error retrieving configuration key '%s': Invalid type",
+ key);
+ }
+ } else if (strcmp (key, KEY_SLOW_KEYS_ENABLED) == 0) {
+ if (value->type == GCONF_VALUE_BOOL) {
+ gboolean enabled;
+
+ enabled = gconf_value_get_bool (value);
+ g_debug ("setting key %s = %d", key, enabled);
+ ui_set_slow_keys (dialog, enabled);
+ } else {
+ g_warning ("Error retrieving configuration key '%s': Invalid type",
+ key);
+ }
+ } else if (strcmp (key, KEY_SCREEN_KEYBOARD_ENABLED) == 0) {
+ if (value->type == GCONF_VALUE_BOOL) {
+ gboolean enabled;
+
+ enabled = gconf_value_get_bool (value);
+ g_debug ("setting key %s = %d", key, enabled);
+ ui_set_screen_keyboard (dialog, enabled);
+ } else {
+ g_warning ("Error retrieving configuration key '%s': Invalid type",
+ key);
+ }
+ } else if (strcmp (key, KEY_SCREEN_READER_ENABLED) == 0) {
+ if (value->type == GCONF_VALUE_BOOL) {
+ gboolean enabled;
+
+ enabled = gconf_value_get_bool (value);
+ g_debug ("setting key %s = %d", key, enabled);
+ ui_set_screen_reader (dialog, enabled);
+ } else {
+ g_warning ("Error retrieving configuration key '%s': Invalid type",
+ key);
+ }
+ } else if (strcmp (key, KEY_SCREEN_MAGNIFIER_ENABLED) == 0) {
+ if (value->type == GCONF_VALUE_BOOL) {
+ gboolean enabled;
+
+ enabled = gconf_value_get_bool (value);
+ g_debug ("setting key %s = %d", key, enabled);
+ ui_set_screen_magnifier (dialog, enabled);
+ } else {
+ g_warning ("Error retrieving configuration key '%s': Invalid type",
+ key);
+ }
+ } else {
+ g_debug ("Config key not handled: %s", key);
+ }
+}
+
+static void
+setup_dialog (GdmA11yPreferencesDialog *dialog)
+{
+ GtkWidget *widget;
+ gboolean enabled;
+ gboolean is_writable;
+ GConfClient *client;
+
+ widget = glade_xml_get_widget (dialog->priv->xml, "sticky_keys_checkbutton");
+ g_signal_connect (widget,
+ "toggled",
+ G_CALLBACK (on_sticky_keys_checkbutton_toggled),
+ NULL);
+ enabled = config_get_sticky_keys (&is_writable);
+ ui_set_sticky_keys (dialog, enabled);
+ if (! is_writable) {
+ gtk_widget_set_sensitive (widget, FALSE);
+ }
+
+ widget = glade_xml_get_widget (dialog->priv->xml, "bounce_keys_checkbutton");
+ g_signal_connect (widget,
+ "toggled",
+ G_CALLBACK (on_bounce_keys_checkbutton_toggled),
+ NULL);
+ enabled = config_get_bounce_keys (&is_writable);
+ ui_set_bounce_keys (dialog, enabled);
+ if (! is_writable) {
+ gtk_widget_set_sensitive (widget, FALSE);
+ }
+
+ widget = glade_xml_get_widget (dialog->priv->xml, "slow_keys_checkbutton");
+ g_signal_connect (widget,
+ "toggled",
+ G_CALLBACK (on_slow_keys_checkbutton_toggled),
+ NULL);
+ enabled = config_get_slow_keys (&is_writable);
+ ui_set_slow_keys (dialog, enabled);
+ if (! is_writable) {
+ gtk_widget_set_sensitive (widget, FALSE);
+ }
+
+ widget = glade_xml_get_widget (dialog->priv->xml, "high_contrast_checkbutton");
+ g_signal_connect (widget,
+ "toggled",
+ G_CALLBACK (on_high_contrast_checkbutton_toggled),
+ NULL);
+ enabled = config_get_high_contrast (&is_writable);
+ ui_set_high_contrast (dialog, enabled);
+ if (! is_writable) {
+ gtk_widget_set_sensitive (widget, FALSE);
+ }
+
+ widget = glade_xml_get_widget (dialog->priv->xml, "screen_keyboard_checkbutton");
+ g_signal_connect (widget,
+ "toggled",
+ G_CALLBACK (on_screen_keyboard_checkbutton_toggled),
+ NULL);
+ enabled = config_get_screen_keyboard (&is_writable);
+ ui_set_screen_keyboard (dialog, enabled);
+ if (! is_writable) {
+ gtk_widget_set_sensitive (widget, FALSE);
+ }
+
+ widget = glade_xml_get_widget (dialog->priv->xml, "screen_reader_checkbutton");
+ g_signal_connect (widget,
+ "toggled",
+ G_CALLBACK (on_screen_reader_checkbutton_toggled),
+ NULL);
+ enabled = config_get_screen_reader (&is_writable);
+ ui_set_screen_reader (dialog, enabled);
+ if (! is_writable) {
+ gtk_widget_set_sensitive (widget, FALSE);
+ }
+
+ widget = glade_xml_get_widget (dialog->priv->xml, "screen_magnifier_checkbutton");
+ g_signal_connect (widget,
+ "toggled",
+ G_CALLBACK (on_screen_magnifier_checkbutton_toggled),
+ NULL);
+ enabled = config_get_screen_magnifier (&is_writable);
+ ui_set_screen_magnifier (dialog, enabled);
+ if (! is_writable) {
+ gtk_widget_set_sensitive (widget, FALSE);
+ }
+
+ client = gconf_client_get_default ();
+ gconf_client_add_dir (client,
+ KEY_A11Y_DIR,
+ GCONF_CLIENT_PRELOAD_ONELEVEL,
+ NULL);
+ gconf_client_notify_add (client,
+ KEY_A11Y_DIR,
+ (GConfClientNotifyFunc)key_changed_cb,
+ dialog,
+ NULL,
+ NULL);
+
+ gconf_client_add_dir (client,
+ KEY_GDM_A11Y_DIR,
+ GCONF_CLIENT_PRELOAD_ONELEVEL,
+ NULL);
+ gconf_client_notify_add (client,
+ KEY_GDM_A11Y_DIR,
+ (GConfClientNotifyFunc)key_changed_cb,
+ dialog,
+ NULL,
+ NULL);
+ g_object_unref (client);
+}
+
+static void
+gdm_a11y_preferences_dialog_init (GdmA11yPreferencesDialog *dialog)
+{
+ GtkWidget *widget;
+
+ dialog->priv = GDM_A11Y_PREFERENCES_DIALOG_GET_PRIVATE (dialog);
+
+ dialog->priv->xml = glade_xml_new (GLADEDIR "/" GLADE_XML_FILE,
+ "main_box",
+ PACKAGE);
+ g_assert (dialog->priv->xml != NULL);
+
+ widget = glade_xml_get_widget (dialog->priv->xml, "main_box");
+ gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), widget);
+
+ gtk_container_set_border_width (GTK_CONTAINER (dialog), 12);
+ gtk_container_set_border_width (GTK_CONTAINER (widget), 12);
+ gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
+ gtk_window_set_title (GTK_WINDOW (dialog), _("Accessibility Preferences"));
+ gtk_window_set_icon_name (GTK_WINDOW (dialog), "preferences-desktop-accessibility");
+
+ gtk_dialog_add_buttons (GTK_DIALOG (dialog),
+ GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
+ NULL);
+ g_signal_connect (dialog,
+ "response",
+ G_CALLBACK (on_response),
+ dialog);
+
+ setup_dialog (dialog);
+
+ gtk_widget_show_all (GTK_WIDGET (dialog));
+}
+
+static void
+gdm_a11y_preferences_dialog_finalize (GObject *object)
+{
+ GdmA11yPreferencesDialog *a11y_preferences_dialog;
+
+ g_return_if_fail (object != NULL);
+ g_return_if_fail (GDM_IS_A11Y_PREFERENCES_DIALOG (object));
+
+ a11y_preferences_dialog = GDM_A11Y_PREFERENCES_DIALOG (object);
+
+ g_return_if_fail (a11y_preferences_dialog->priv != NULL);
+
+ G_OBJECT_CLASS (gdm_a11y_preferences_dialog_parent_class)->finalize (object);
+}
+
+GtkWidget *
+gdm_a11y_preferences_dialog_new (void)
+{
+ GObject *object;
+
+ object = g_object_new (GDM_TYPE_A11Y_PREFERENCES_DIALOG,
+ NULL);
+
+ return GTK_WIDGET (object);
+}
Added: trunk/gui/simple-greeter/gdm-a11y-preferences-dialog.glade
==============================================================================
--- (empty file)
+++ trunk/gui/simple-greeter/gdm-a11y-preferences-dialog.glade Thu Feb 7 21:38:54 2008
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.4.1 on Thu Feb 7 15:36:44 2008 -->
+<glade-interface>
+ <widget class="GtkDialog" id="dialog1">
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">Assistive Technology Preferences</property>
+ <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+ <property name="icon_name">preferences-desktop-accessibility</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="has_separator">False</property>
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">2</property>
+ <child>
+ <widget class="GtkHBox" id="main_box">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">10</property>
+ <child>
+ <widget class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="yalign">0</property>
+ <property name="icon_size">6</property>
+ <property name="icon_name">preferences-desktop-accessibility</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">10</property>
+ <child>
+ <widget class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes"><b>Enable features that make your computer easier to use:</b></property>
+ <property name="use_markup">True</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkCheckButton" id="screen_reader_checkbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">_Hear text onscreen read aloud (Reader)</property>
+ <property name="use_underline">True</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="screen_magnifier_checkbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">_Make items on screen larger (Magnifier)</property>
+ <property name="use_underline">True</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="screen_keyboard_checkbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">_Type without the keyboard (On-screen Keyboard)</property>
+ <property name="use_underline">True</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="high_contrast_checkbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">_See more contrast in colors (High Contrast)</property>
+ <property name="use_underline">True</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="sticky_keys_checkbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">_Press keyboard shortcuts on key at a time (Sticky Keys)</property>
+ <property name="use_underline">True</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="bounce_keys_checkbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">_Ignore duplicate keypresses (Bounce Keys)</property>
+ <property name="use_underline">True</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="slow_keys_checkbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">_Only accept long held keypresses (Slow Keys)</property>
+ <property name="use_underline">True</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="position">6</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <child>
+ <widget class="GtkButton" id="button1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">gtk-close</property>
+ <property name="use_stock">True</property>
+ <property name="response_id">0</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</glade-interface>
Added: trunk/gui/simple-greeter/gdm-a11y-preferences-dialog.h
==============================================================================
--- (empty file)
+++ trunk/gui/simple-greeter/gdm-a11y-preferences-dialog.h Thu Feb 7 21:38:54 2008
@@ -0,0 +1,55 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2008 William Jon McCann <jmccann redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef __GDM_A11Y_PREFERENCES_DIALOG_H
+#define __GDM_A11Y_PREFERENCES_DIALOG_H
+
+#include <glib-object.h>
+#include <gtk/gtkdialog.h>
+
+G_BEGIN_DECLS
+
+#define GDM_TYPE_A11Y_PREFERENCES_DIALOG (gdm_a11y_preferences_dialog_get_type ())
+#define GDM_A11Y_PREFERENCES_DIALOG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDM_TYPE_A11Y_PREFERENCES_DIALOG, GdmA11yPreferencesDialog))
+#define GDM_A11Y_PREFERENCES_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDM_TYPE_A11Y_PREFERENCES_DIALOG, GdmA11yPreferencesDialogClass))
+#define GDM_IS_A11Y_PREFERENCES_DIALOG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDM_TYPE_A11Y_PREFERENCES_DIALOG))
+#define GDM_IS_A11Y_PREFERENCES_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDM_TYPE_A11Y_PREFERENCES_DIALOG))
+#define GDM_A11Y_PREFERENCES_DIALOG_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDM_TYPE_A11Y_PREFERENCES_DIALOG, GdmA11yPreferencesDialogClass))
+
+typedef struct GdmA11yPreferencesDialogPrivate GdmA11yPreferencesDialogPrivate;
+
+typedef struct
+{
+ GtkDialog parent;
+ GdmA11yPreferencesDialogPrivate *priv;
+} GdmA11yPreferencesDialog;
+
+typedef struct
+{
+ GtkDialogClass parent_class;
+} GdmA11yPreferencesDialogClass;
+
+GType gdm_a11y_preferences_dialog_get_type (void);
+
+GtkWidget * gdm_a11y_preferences_dialog_new (void);
+
+G_END_DECLS
+
+#endif /* __GDM_A11Y_PREFERENCES_DIALOG_H */
Modified: trunk/gui/simple-greeter/gdm-greeter-panel.c
==============================================================================
--- trunk/gui/simple-greeter/gdm-greeter-panel.c (original)
+++ trunk/gui/simple-greeter/gdm-greeter-panel.c Thu Feb 7 21:38:54 2008
@@ -35,6 +35,7 @@
#include "gdm-clock-widget.h"
#include "gdm-language-option-widget.h"
#include "gdm-session-option-widget.h"
+#include "gdm-a11y-preferences-dialog.h"
#include "na-tray.h"
@@ -44,6 +45,8 @@
{
int monitor;
GdkRectangle geometry;
+ GtkWidget *a11y_button;
+ GtkWidget *a11y_dialog;
GtkWidget *hbox;
GtkWidget *hostname_label;
GtkWidget *clock;
@@ -444,9 +447,33 @@
}
static void
+on_a11y_dialog_response (GtkDialog *dialog,
+ int response,
+ GdmGreeterPanel *panel)
+{
+ gtk_widget_destroy (GTK_WIDGET (dialog));
+ panel->priv->a11y_dialog = NULL;
+}
+
+static void
+on_a11y_button_clicked (GtkButton *button,
+ GdmGreeterPanel *panel)
+{
+ if (panel->priv->a11y_dialog == NULL) {
+ panel->priv->a11y_dialog = gdm_a11y_preferences_dialog_new ();
+ g_signal_connect (panel->priv->a11y_dialog,
+ "response",
+ G_CALLBACK (on_a11y_dialog_response),
+ panel);
+ }
+ gtk_window_present (GTK_WINDOW (panel->priv->a11y_dialog));
+}
+
+static void
gdm_greeter_panel_init (GdmGreeterPanel *panel)
{
NaTray *tray;
+ GtkWidget *image;
panel->priv = GDM_GREETER_PANEL_GET_PRIVATE (panel);
@@ -469,6 +496,17 @@
gtk_widget_show (panel->priv->hbox);
gtk_container_add (GTK_CONTAINER (panel), panel->priv->hbox);
+ panel->priv->a11y_button = gtk_button_new ();
+ image = gtk_image_new_from_icon_name ("preferences-desktop-accessibility", GTK_ICON_SIZE_BUTTON);
+ gtk_container_add (GTK_CONTAINER (panel->priv->a11y_button), image);
+ gtk_widget_show (image);
+ gtk_widget_show (panel->priv->a11y_button);
+ g_signal_connect (G_OBJECT (panel->priv->a11y_button),
+ "clicked",
+ G_CALLBACK (on_a11y_button_clicked), panel);
+
+ gtk_box_pack_start (GTK_BOX (panel->priv->hbox), panel->priv->a11y_button, FALSE, FALSE, 6);
+
panel->priv->language_option_widget = gdm_language_option_widget_new ();
g_signal_connect (G_OBJECT (panel->priv->language_option_widget),
"language-activated",
Added: trunk/gui/simple-greeter/test-a11y-preferences.c
==============================================================================
--- (empty file)
+++ trunk/gui/simple-greeter/test-a11y-preferences.c Thu Feb 7 21:38:54 2008
@@ -0,0 +1,56 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2008 William Jon McCann <jmccann redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <libintl.h>
+#include <locale.h>
+#include <string.h>
+#include <unistd.h>
+#include <signal.h>
+#include <errno.h>
+
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
+
+#include "gdm-a11y-preferences-dialog.h"
+
+int
+main (int argc, char *argv[])
+{
+ GtkWidget *dialog;
+
+ bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ textdomain (GETTEXT_PACKAGE);
+
+ setlocale (LC_ALL, "");
+
+ gtk_init (&argc, &argv);
+
+ dialog = gdm_a11y_preferences_dialog_new ();
+ /*gtk_widget_set_size_request (dialog, 480, 128);*/
+
+ gtk_dialog_run (GTK_DIALOG (dialog));
+
+ gtk_widget_destroy (dialog);
+
+ return 0;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]