gnome-control-center r8597 - in trunk/capplets: accessibility/at-properties mouse
- From: jensg svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-control-center r8597 - in trunk/capplets: accessibility/at-properties mouse
- Date: Thu, 27 Mar 2008 19:23:18 +0000 (GMT)
Author: jensg
Date: Thu Mar 27 19:23:18 2008
New Revision: 8597
URL: http://svn.gnome.org/viewvc/gnome-control-center?rev=8597&view=rev
Log:
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)
Modified:
trunk/capplets/accessibility/at-properties/ChangeLog
trunk/capplets/accessibility/at-properties/at-enable-dialog.glade
trunk/capplets/accessibility/at-properties/main.c
trunk/capplets/mouse/ChangeLog
trunk/capplets/mouse/gnome-mouse-properties.c
trunk/capplets/mouse/gnome-mouse-properties.glade
Modified: trunk/capplets/accessibility/at-properties/at-enable-dialog.glade
==============================================================================
--- trunk/capplets/accessibility/at-properties/at-enable-dialog.glade (original)
+++ trunk/capplets/accessibility/at-properties/at-enable-dialog.glade Thu Mar 27 19:23:18 2008
@@ -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>
Modified: trunk/capplets/accessibility/at-properties/main.c
==============================================================================
--- trunk/capplets/accessibility/at-properties/main.c (original)
+++ trunk/capplets/accessibility/at-properties/main.c Thu Mar 27 19:23:18 2008
@@ -32,6 +32,9 @@
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 @@
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 @@
}
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 @@
"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);
Modified: trunk/capplets/mouse/gnome-mouse-properties.c
==============================================================================
--- trunk/capplets/mouse/gnome-mouse-properties.c (original)
+++ trunk/capplets/mouse/gnome-mouse-properties.c Thu Mar 27 19:23:18 2008
@@ -470,14 +470,31 @@
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 @@
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);
Modified: trunk/capplets/mouse/gnome-mouse-properties.glade
==============================================================================
--- trunk/capplets/mouse/gnome-mouse-properties.glade (original)
+++ trunk/capplets/mouse/gnome-mouse-properties.glade Thu Mar 27 19:23:18 2008
@@ -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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]