summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Granseuer <jensgr@gmx.net>2008-03-27 19:23:18 +0000
committerJens Granseuer <jensg@src.gnome.org>2008-03-27 19:23:18 +0000
commitdebb696c492340b4c75ff1f9784b3132da2f1ee3 (patch)
treee237358ad0fb320a1df94a1e312c127cd6db8c7c
parenta0dcc1366aec45d154f3eab4c3582de60d6cb298 (diff)
downloadgnome-control-center-debb696c492340b4c75ff1f9784b3132da2f1ee3.tar.gz
Patch by: Patrick Wade <patrick.wade@sun.com>
2008-03-27 Jens Granseuer <jensgr@gmx.net> Patch by: Patrick Wade <patrick.wade@sun.com> * at-enable-dialog.glade: * main.c: (create_dialog), (cb_at_preferences), (cb_keyboard_preferences), (cb_mouse_preferences), (cb_login_preferences), (setup_dialog): add button to launch mouse accessibility properties (bug #515078) 2008-03-27 Jens Granseuer <jensgr@gmx.net> Patch by: Patrick Wade <patrick.wade@sun.com> * gnome-mouse-properties.c: (main): * gnome-mouse-properties.glade: add support for starting the capplet on the appearance tab (required by bug #515078) svn path=/trunk/; revision=8597
-rw-r--r--capplets/accessibility/at-properties/ChangeLog10
-rw-r--r--capplets/accessibility/at-properties/at-enable-dialog.glade21
-rw-r--r--capplets/accessibility/at-properties/main.c23
-rw-r--r--capplets/mouse/ChangeLog8
-rw-r--r--capplets/mouse/gnome-mouse-properties.c38
-rw-r--r--capplets/mouse/gnome-mouse-properties.glade4
6 files changed, 95 insertions, 9 deletions
diff --git a/capplets/accessibility/at-properties/ChangeLog b/capplets/accessibility/at-properties/ChangeLog
index 0506631a3..e70674f77 100644
--- a/capplets/accessibility/at-properties/ChangeLog
+++ b/capplets/accessibility/at-properties/ChangeLog
@@ -1,3 +1,13 @@
+2008-03-27 Jens Granseuer <jensgr@gmx.net>
+
+ Patch by: Patrick Wade <patrick.wade@sun.com>
+
+ * at-enable-dialog.glade:
+ * main.c: (create_dialog), (cb_at_preferences),
+ (cb_keyboard_preferences), (cb_mouse_preferences),
+ (cb_login_preferences), (setup_dialog): add button to launch mouse
+ accessibility properties (bug #515078)
+
2008-02-09 Luca Ferretti <elle.uca@libero.it>
reviewed by: Jens Granseuer
diff --git a/capplets/accessibility/at-properties/at-enable-dialog.glade b/capplets/accessibility/at-properties/at-enable-dialog.glade
index 29386e236..4035fea0e 100644
--- a/capplets/accessibility/at-properties/at-enable-dialog.glade
+++ b/capplets/accessibility/at-properties/at-enable-dialog.glade
@@ -309,6 +309,25 @@
</child>
<child>
+ <widget class="GtkButton" id="mouse_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="label" translatable="yes">_Mouse Accessibility</property>
+ <property name="use_underline">True</property>
+ <accessibility>
+ <atkproperty name="AtkObject::accessible_description" translatable="yes">Jump to the Mouse Accessibility dialog</atkproperty>
+ </accessibility>
+ </widget>
+ <packing>
+ <property name="padding">5</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
<widget class="GtkButton" id="login_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -321,7 +340,7 @@
</accessibility>
</widget>
<packing>
- <property name="padding">0</property>
+ <property name="padding">5</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
diff --git a/capplets/accessibility/at-properties/main.c b/capplets/accessibility/at-properties/main.c
index 1cc9ae5bd..83394d309 100644
--- a/capplets/accessibility/at-properties/main.c
+++ b/capplets/accessibility/at-properties/main.c
@@ -32,6 +32,9 @@ create_dialog (void)
gtk_button_set_image (GTK_BUTTON (WID ("keyboard_button")), image);
image = gtk_image_new_from_stock (GTK_STOCK_JUMP_TO, GTK_ICON_SIZE_BUTTON);
+ gtk_button_set_image (GTK_BUTTON (WID ("mouse_button")), image);
+
+ image = gtk_image_new_from_stock (GTK_STOCK_JUMP_TO, GTK_ICON_SIZE_BUTTON);
gtk_button_set_image (GTK_BUTTON (WID ("login_button")), image);
gtk_image_set_from_file (GTK_IMAGE (WID ("at_enable_image")),
@@ -47,19 +50,25 @@ create_dialog (void)
static void
cb_at_preferences (GtkDialog *dialog, gint response_id)
{
- g_spawn_command_line_async("gnome-default-applications-properties", NULL);
+ g_spawn_command_line_async ("gnome-default-applications-properties", NULL);
}
static void
cb_keyboard_preferences (GtkDialog *dialog, gint response_id)
{
- g_spawn_command_line_async("gnome-keyboard-properties --a11y", NULL);
+ g_spawn_command_line_async ("gnome-keyboard-properties --a11y", NULL);
+}
+
+static void
+cb_mouse_preferences (GtkDialog *dialog, gint response_id)
+{
+ g_spawn_command_line_async ("gnome-mouse-properties --show-page=accessibility", NULL);
}
static void
cb_login_preferences (GtkDialog *dialog, gint response_id)
{
- g_spawn_command_line_async("gdmsetup", NULL);
+ g_spawn_command_line_async ("gdmsetup", NULL);
}
static void
@@ -107,8 +116,8 @@ at_enable_toggled (GtkToggleButton *toggle_button,
}
static void
-at_enable_update (GConfClient *client,
- GladeXML *dialog)
+at_enable_update (GConfClient *client,
+ GladeXML *dialog)
{
gboolean is_enabled = gconf_client_get_bool (client, ACCESSIBILITY_KEY, NULL);
@@ -163,6 +172,10 @@ setup_dialog (GladeXML *dialog)
"clicked",
G_CALLBACK (cb_keyboard_preferences), NULL);
+ g_signal_connect (G_OBJECT (WID("mouse_button")),
+ "clicked",
+ G_CALLBACK (cb_mouse_preferences), NULL);
+
g_signal_connect (G_OBJECT (WID("login_button")),
"clicked",
G_CALLBACK (cb_login_preferences), NULL);
diff --git a/capplets/mouse/ChangeLog b/capplets/mouse/ChangeLog
index 79b00de03..215ff7bd8 100644
--- a/capplets/mouse/ChangeLog
+++ b/capplets/mouse/ChangeLog
@@ -1,3 +1,11 @@
+2008-03-27 Jens Granseuer <jensgr@gmx.net>
+
+ Patch by: Patrick Wade <patrick.wade@sun.com>
+
+ * gnome-mouse-properties.c: (main):
+ * gnome-mouse-properties.glade: add support for starting the capplet
+ on the appearance tab (required by bug #515078)
+
2008-02-29 Denis Washington <denisw@svn.gnome.org>
* gnome-mouse-properties.c: make the mouse orientation radio
diff --git a/capplets/mouse/gnome-mouse-properties.c b/capplets/mouse/gnome-mouse-properties.c
index 3b7306970..7fb2a97d2 100644
--- a/capplets/mouse/gnome-mouse-properties.c
+++ b/capplets/mouse/gnome-mouse-properties.c
@@ -470,14 +470,31 @@ main (int argc, char **argv)
GnomeProgram *program;
GConfClient *client;
GladeXML *dialog;
- GtkWidget *dialog_win;
+ GtkWidget *dialog_win, *w;
+ GOptionContext *context;
+ gchar *start_page = NULL;
+
+ GOptionEntry cap_options[] = {
+ {"show-page", 'p', G_OPTION_FLAG_IN_MAIN,
+ G_OPTION_ARG_STRING,
+ &start_page,
+ /* TRANSLATORS: don't translate the terms in brackets */
+ N_("Specify the name of the page to show (general|accessibility)"),
+ N_("page") },
+ {NULL}
+ };
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
+ context = g_option_context_new (_("- GNOME Mouse Preferences"));
+ g_option_context_add_main_entries (context, cap_options,
+ GETTEXT_PACKAGE);
+
program = gnome_program_init ("gnome-mouse-properties", VERSION,
LIBGNOMEUI_MODULE, argc, argv,
+ GNOME_PARAM_GOPTION_CONTEXT, context,
GNOME_PARAM_APP_DATADIR, GNOMECC_DATA_DIR,
NULL);
@@ -498,6 +515,25 @@ main (int argc, char **argv)
g_signal_connect (dialog_win, "response",
G_CALLBACK (dialog_response_cb), NULL);
+ if (start_page != NULL) {
+ gchar *page_name;
+
+ page_name = g_strconcat (start_page, "_vbox", NULL);
+ g_free (start_page);
+
+ w = WID (page_name);
+ if (w != NULL) {
+ GtkNotebook *nb;
+ gint pindex;
+
+ nb = GTK_NOTEBOOK (WID ("prefs_widget"));
+ pindex = gtk_notebook_page_num (nb, w);
+ if (pindex != -1)
+ gtk_notebook_set_current_page (nb, pindex);
+ }
+ g_free (page_name);
+ }
+
capplet_set_icon (dialog_win, "gnome-dev-mouse-optical");
gtk_widget_show (dialog_win);
diff --git a/capplets/mouse/gnome-mouse-properties.glade b/capplets/mouse/gnome-mouse-properties.glade
index 2b73b08b9..309200bb5 100644
--- a/capplets/mouse/gnome-mouse-properties.glade
+++ b/capplets/mouse/gnome-mouse-properties.glade
@@ -17,7 +17,7 @@
<property name="can_focus">True</property>
<property name="border_width">5</property>
<child>
- <widget class="GtkVBox" id="vbox27">
+ <widget class="GtkVBox" id="general_vbox">
<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="border_width">12</property>
@@ -562,7 +562,7 @@
</packing>
</child>
<child>
- <widget class="GtkVBox" id="vbox1">
+ <widget class="GtkVBox" id="accessibility_vbox">
<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="border_width">12</property>