diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 14:36:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 14:36:24 +0000 |
commit | 9b6d8e63db85c30007b463e91f91a791969fa83f (patch) | |
tree | 0899af51d73c1bf986f73ae39a03c4436083018a /panels/universal-access | |
parent | Initial commit. (diff) | |
download | gnome-control-center-9b6d8e63db85c30007b463e91f91a791969fa83f.tar.xz gnome-control-center-9b6d8e63db85c30007b463e91f91a791969fa83f.zip |
Adding upstream version 1:3.38.4.upstream/1%3.38.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | panels/universal-access/cc-ua-panel.c | 1134 | ||||
-rw-r--r-- | panels/universal-access/cc-ua-panel.h | 31 | ||||
-rw-r--r-- | panels/universal-access/cc-ua-panel.ui | 2958 | ||||
-rw-r--r-- | panels/universal-access/gnome-universal-access-panel.desktop.in.in | 18 | ||||
-rw-r--r-- | panels/universal-access/left_ptr_24px.png | bin | 0 -> 762 bytes | |||
-rw-r--r-- | panels/universal-access/left_ptr_32px.png | bin | 0 -> 1081 bytes | |||
-rw-r--r-- | panels/universal-access/left_ptr_48px.png | bin | 0 -> 1766 bytes | |||
-rw-r--r-- | panels/universal-access/left_ptr_64px.png | bin | 0 -> 2447 bytes | |||
-rw-r--r-- | panels/universal-access/left_ptr_96px.png | bin | 0 -> 3995 bytes | |||
-rw-r--r-- | panels/universal-access/meson.build | 51 | ||||
-rw-r--r-- | panels/universal-access/universal-access.gresource.xml | 12 | ||||
-rw-r--r-- | panels/universal-access/zoom-options.c | 540 | ||||
-rw-r--r-- | panels/universal-access/zoom-options.h | 33 | ||||
-rw-r--r-- | panels/universal-access/zoom-options.ui | 1195 |
14 files changed, 5972 insertions, 0 deletions
diff --git a/panels/universal-access/cc-ua-panel.c b/panels/universal-access/cc-ua-panel.c new file mode 100644 index 0000000..bf098fb --- /dev/null +++ b/panels/universal-access/cc-ua-panel.c @@ -0,0 +1,1134 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- + * + * Copyright (C) 2010 Intel, Inc + * 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, see <http://www.gnu.org/licenses/>. + * + * Authors: Thomas Wood <thomas.wood@intel.com> + * Rodrigo Moya <rodrigo@gnome.org> + * + */ + +#include <config.h> + +#include <math.h> +#include <glib/gi18n-lib.h> +#include <gdesktop-enums.h> + +#include "list-box-helper.h" +#include "cc-ua-panel.h" +#include "cc-ua-resources.h" + +#include "zoom-options.h" + +#define DPI_FACTOR_LARGE 1.25 +#define DPI_FACTOR_NORMAL 1.0 +#define HIGH_CONTRAST_THEME "HighContrast" + +/* shell settings */ +#define A11Y_SETTINGS "org.gnome.desktop.a11y" +#define KEY_ALWAYS_SHOW_STATUS "always-show-universal-access-status" + +/* interface settings */ +#define INTERFACE_SETTINGS "org.gnome.desktop.interface" +#define KEY_TEXT_SCALING_FACTOR "text-scaling-factor" +#define KEY_GTK_THEME "gtk-theme" +#define KEY_ICON_THEME "icon-theme" +#define KEY_CURSOR_BLINKING "cursor-blink" +#define KEY_CURSOR_BLINKING_TIME "cursor-blink-time" +#define KEY_MOUSE_CURSOR_SIZE "cursor-size" +#define KEY_LOCATE_POINTER "locate-pointer" + +/* application settings */ +#define APPLICATION_SETTINGS "org.gnome.desktop.a11y.applications" +#define KEY_SCREEN_KEYBOARD_ENABLED "screen-keyboard-enabled" +#define KEY_SCREEN_MAGNIFIER_ENABLED "screen-magnifier-enabled" +#define KEY_SCREEN_READER_ENABLED "screen-reader-enabled" + +/* wm settings */ +#define WM_SETTINGS "org.gnome.desktop.wm.preferences" +#define KEY_VISUAL_BELL_ENABLED "visual-bell" +#define KEY_VISUAL_BELL_TYPE "visual-bell-type" +#define KEY_WM_THEME "theme" + +/* keyboard settings */ +#define KEYBOARD_SETTINGS "org.gnome.desktop.a11y.keyboard" +#define KEY_KEYBOARD_TOGGLE "enable" +#define KEY_STICKYKEYS_ENABLED "stickykeys-enable" +#define KEY_STICKYKEYS_TWO_KEY_OFF "stickykeys-two-key-off" +#define KEY_STICKYKEYS_MODIFIER_BEEP "stickykeys-modifier-beep" +#define KEY_SLOWKEYS_ENABLED "slowkeys-enable" +#define KEY_SLOWKEYS_DELAY "slowkeys-delay" +#define KEY_SLOWKEYS_BEEP_PRESS "slowkeys-beep-press" +#define KEY_SLOWKEYS_BEEP_ACCEPT "slowkeys-beep-accept" +#define KEY_SLOWKEYS_BEEP_REJECT "slowkeys-beep-reject" +#define KEY_BOUNCEKEYS_ENABLED "bouncekeys-enable" +#define KEY_BOUNCEKEYS_DELAY "bouncekeys-delay" +#define KEY_BOUNCEKEYS_BEEP_REJECT "bouncekeys-beep-reject" +#define KEY_MOUSEKEYS_ENABLED "mousekeys-enable" +#define KEY_TOGGLEKEYS_ENABLED "togglekeys-enable" + +/* keyboard desktop settings */ +#define KEYBOARD_DESKTOP_SETTINGS "org.gnome.desktop.peripherals.keyboard" +#define KEY_REPEAT_KEYS "repeat" + +/* mouse settings */ +#define MOUSE_SETTINGS "org.gnome.desktop.a11y.mouse" +#define KEY_SECONDARY_CLICK_ENABLED "secondary-click-enabled" +#define KEY_SECONDARY_CLICK_TIME "secondary-click-time" +#define KEY_DWELL_CLICK_ENABLED "dwell-click-enabled" +#define KEY_DWELL_TIME "dwell-time" +#define KEY_DWELL_THRESHOLD "dwell-threshold" + +/* gnome-settings-daemon settings */ +#define GSD_MOUSE_SETTINGS "org.gnome.settings-daemon.peripherals.mouse" +#define KEY_DOUBLE_CLICK_DELAY "double-click" + +#define SCROLL_HEIGHT 490 + +struct _CcUaPanel +{ + CcPanel parent_instance; + + GtkWidget *cursor_blinking_dialog; + GtkWidget *cursor_blinking_scale; + GtkWidget *cursor_blinking_switch; + GtkWidget *cursor_size_dialog; + GtkWidget *cursor_size_grid; + GtkWidget *list_hearing; + GtkWidget *list_pointing; + GtkWidget *list_seeing; + GtkWidget *list_typing; + GtkWidget *mouse_keys_switch; + GtkWidget *locate_pointer_switch; + GtkWidget *pointing_dialog; + GtkWidget *pointing_dwell_delay_box; + GtkWidget *pointing_dwell_delay_scale; + GtkWidget *pointing_dwell_threshold_box; + GtkWidget *pointing_dwell_threshold_scale; + GtkWidget *pointing_hover_click_switch; + GtkWidget *pointing_secondary_click_delay_box; + GtkWidget *pointing_secondary_click_delay_scale; + GtkWidget *pointing_secondary_click_switch; + GtkWidget *repeat_keys_delay_grid; + GtkWidget *repeat_keys_delay_scale; + GtkWidget *repeat_keys_dialog; + GtkWidget *repeat_keys_speed_grid; + GtkWidget *repeat_keys_speed_scale; + GtkWidget *repeat_keys_switch; + GtkWidget *row_accessx; + GtkWidget *row_click_assist; + GtkWidget *row_cursor_blinking; + GtkWidget *row_cursor_size; + GtkWidget *row_repeat_keys; + GtkWidget *row_screen_reader; + GtkWidget *row_sound_keys; + GtkWidget *row_visual_alerts; + GtkWidget *row_zoom; + GtkWidget *scale_double_click_delay; + GtkWidget *screen_keyboard_switch; + GtkWidget *screen_reader_dialog; + GtkWidget *screen_reader_switch; + GtkWidget *section_status; + GtkWidget *sound_keys_dialog; + GtkWidget *sound_keys_switch; + GtkWidget *switch_status; + GtkWidget *typing_bouncekeys_beep_rejected_check; + GtkWidget *typing_bouncekeys_delay_box; + GtkWidget *typing_bouncekeys_delay_scale; + GtkWidget *typing_bouncekeys_switch; + GtkWidget *typing_dialog; + GtkWidget *typing_keyboard_toggle_switch; + GtkWidget *typing_slowkeys_beep_accepted_check; + GtkWidget *typing_slowkeys_beep_pressed_check; + GtkWidget *typing_slowkeys_beep_rejected_check; + GtkWidget *typing_slowkeys_delay_box; + GtkWidget *typing_slowkeys_delay_scale; + GtkWidget *typing_slowkeys_switch; + GtkWidget *typing_stickykeys_beep_modifier_check; + GtkWidget *typing_stickykeys_disable_two_keys_check; + GtkWidget *typing_stickykeys_switch; + GtkWidget *universal_access_content; + GtkWidget *universal_access_panel; + GtkWidget *value_accessx; + GtkWidget *value_click_assist; + GtkWidget *value_cursor_size; + GtkWidget *value_highcontrast; + GtkWidget *value_large_text; + GtkWidget *value_repeat_keys; + GtkWidget *value_row_cursor_blinking; + GtkWidget *value_screen_reader; + GtkWidget *value_sound_keys; + GtkWidget *value_visual_alerts; + GtkWidget *value_zoom; + GtkWidget *visual_alerts_dialog; + GtkWidget *visual_alerts_screen_radio; + GtkWidget *visual_alerts_switch; + GtkWidget *visual_alerts_test_button; + GtkWidget *visual_alerts_window_radio; + + GSettings *wm_settings; + GSettings *a11y_settings; + GSettings *interface_settings; + GSettings *kb_settings; + GSettings *mouse_settings; + GSettings *kb_desktop_settings; + GSettings *application_settings; + GSettings *gsd_mouse_settings; + + ZoomOptions *zoom_options; + + GtkAdjustment *focus_adjustment; + + GList *sections; + GList *sections_reverse; + + GSList *toplevels; +}; + +CC_PANEL_REGISTER (CcUaPanel, cc_ua_panel) + +static void +cc_ua_panel_dispose (GObject *object) +{ + CcUaPanel *self = CC_UA_PANEL (object); + + g_clear_pointer ((GtkWidget **)&self->zoom_options, gtk_widget_destroy); + g_slist_free_full (self->toplevels, (GDestroyNotify)gtk_widget_destroy); + self->toplevels = NULL; + + g_clear_object (&self->wm_settings); + g_clear_object (&self->a11y_settings); + g_clear_object (&self->interface_settings); + g_clear_object (&self->kb_settings); + g_clear_object (&self->mouse_settings); + g_clear_object (&self->kb_desktop_settings); + g_clear_object (&self->application_settings); + g_clear_object (&self->gsd_mouse_settings); + + g_clear_pointer (&self->sections, g_list_free); + g_clear_pointer (&self->sections_reverse, g_list_free); + + G_OBJECT_CLASS (cc_ua_panel_parent_class)->dispose (object); +} + +static const char * +cc_ua_panel_get_help_uri (CcPanel *panel) +{ + return "help:gnome-help/a11y"; +} + +static void +cc_ua_panel_class_init (CcUaPanelClass *klass) +{ + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); + GObjectClass *object_class = G_OBJECT_CLASS (klass); + CcPanelClass *panel_class = CC_PANEL_CLASS (klass); + + panel_class->get_help_uri = cc_ua_panel_get_help_uri; + + object_class->dispose = cc_ua_panel_dispose; + + gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/universal-access/cc-ua-panel.ui"); + + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, cursor_blinking_dialog); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, cursor_blinking_scale); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, cursor_blinking_switch); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, cursor_size_dialog); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, cursor_size_grid); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, list_hearing); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, list_pointing); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, list_seeing); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, list_typing); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, mouse_keys_switch); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, locate_pointer_switch); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, pointing_dialog); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, pointing_dwell_delay_box); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, pointing_dwell_delay_scale); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, pointing_dwell_threshold_box); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, pointing_dwell_threshold_scale); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, pointing_hover_click_switch); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, pointing_secondary_click_delay_box); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, pointing_secondary_click_delay_scale); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, pointing_secondary_click_switch); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, repeat_keys_delay_grid); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, repeat_keys_delay_scale); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, repeat_keys_dialog); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, repeat_keys_speed_grid); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, repeat_keys_speed_scale); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, repeat_keys_switch); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, row_accessx); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, row_click_assist); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, row_cursor_blinking); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, row_cursor_size); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, row_repeat_keys); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, row_screen_reader); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, row_sound_keys); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, row_visual_alerts); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, row_zoom); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, scale_double_click_delay); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, screen_keyboard_switch); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, screen_reader_dialog); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, screen_reader_switch); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, section_status); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, sound_keys_dialog); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, sound_keys_switch); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, switch_status); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, typing_bouncekeys_beep_rejected_check); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, typing_bouncekeys_delay_box); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, typing_bouncekeys_delay_scale); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, typing_bouncekeys_switch); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, typing_dialog); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, typing_keyboard_toggle_switch); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, typing_slowkeys_beep_accepted_check); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, typing_slowkeys_beep_pressed_check); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, typing_slowkeys_beep_rejected_check); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, typing_slowkeys_delay_box); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, typing_slowkeys_delay_scale); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, typing_slowkeys_switch); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, typing_stickykeys_beep_modifier_check); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, typing_stickykeys_disable_two_keys_check); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, typing_stickykeys_switch); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, universal_access_content); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, universal_access_panel); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, value_accessx); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, value_click_assist); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, value_cursor_size); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, value_highcontrast); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, value_large_text); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, value_repeat_keys); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, value_row_cursor_blinking); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, value_screen_reader); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, value_sound_keys); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, value_visual_alerts); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, value_zoom); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, visual_alerts_dialog); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, visual_alerts_screen_radio); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, visual_alerts_switch); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, visual_alerts_test_button); + gtk_widget_class_bind_template_child (widget_class, CcUaPanel, visual_alerts_window_radio); +} + +/* zoom options dialog */ +static void +zoom_options_launch (CcUaPanel *self) +{ + if (self->zoom_options == NULL) + { + GtkWindow *window = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (self))); + self->zoom_options = zoom_options_new (window); + } + + gtk_window_present_with_time (GTK_WINDOW (self->zoom_options), GDK_CURRENT_TIME); +} + +/* cursor size dialog */ +static void +cursor_size_toggled (CcUaPanel *self, + GtkWidget *button) +{ + guint cursor_size; + + if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button))) + return; + + cursor_size = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (button), "cursor-size")); + g_settings_set_int (self->interface_settings, KEY_MOUSE_CURSOR_SIZE, cursor_size); + g_debug ("Setting cursor size to %d", cursor_size); +} + +static void +cursor_size_setup (CcUaPanel *self) +{ + guint cursor_sizes[] = { 24, 32, 48, 64, 96 }; + guint current_cursor_size, i; + GtkSizeGroup *size_group; + GtkWidget *last_radio_button = NULL; + + gtk_style_context_add_class (gtk_widget_get_style_context (self->cursor_size_grid), "linked"); + + current_cursor_size = g_settings_get_int (self->interface_settings, + KEY_MOUSE_CURSOR_SIZE); + size_group = gtk_size_group_new (GTK_SIZE_GROUP_BOTH); + + for (i = 0; i < G_N_ELEMENTS(cursor_sizes); i++) + { + GtkWidget *image, *button; + g_autofree gchar *cursor_image_name = NULL; + + cursor_image_name = g_strdup_printf ("/org/gnome/control-center/universal-access/left_ptr_%dpx.png", cursor_sizes[i]); + image = gtk_image_new_from_resource (cursor_image_name); + gtk_widget_show (image); + + button = gtk_radio_button_new_from_widget (GTK_RADIO_BUTTON (last_radio_button)); + gtk_widget_show (button); + last_radio_button = button; + gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (button), FALSE); + g_object_set_data (G_OBJECT (button), "cursor-size", GUINT_TO_POINTER (cursor_sizes[i])); + + gtk_container_add (GTK_CONTAINER (button), image); + gtk_grid_attach (GTK_GRID (self->cursor_size_grid), button, i, 0, 1, 1); + gtk_size_group_add_widget (size_group, button); + + g_signal_connect_object (button, "toggled", + G_CALLBACK (cursor_size_toggled), self, G_CONNECT_SWAPPED); + + if (current_cursor_size == cursor_sizes[i]) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE); + } +} + +/* seeing section */ + +static gboolean +is_large_factor (gdouble factor) +{ + return (factor > DPI_FACTOR_NORMAL); +} + +static gboolean +get_large_text_mapping (GValue *value, + GVariant *variant, + gpointer user_data) +{ + gdouble factor; + + factor = g_variant_get_double (variant); + g_value_set_boolean (value, is_large_factor (factor)); + + return TRUE; +} + +static GVariant * +set_large_text_mapping (const GValue *value, + const GVariantType *expected_type, + gpointer user_data) +{ + gboolean large; + GSettings *settings = user_data; + GVariant *ret = NULL; + + large = g_value_get_boolean (value); + if (large) + ret = g_variant_new_double (DPI_FACTOR_LARGE); + else + g_settings_reset (settings, KEY_TEXT_SCALING_FACTOR); + + return ret; +} + +static gboolean +get_contrast_mapping (GValue *value, + GVariant *variant, + gpointer user_data) +{ + const char *theme; + gboolean hc; + + theme = g_variant_get_string (variant, NULL); + hc = (g_strcmp0 (theme, HIGH_CONTRAST_THEME) == 0); + g_value_set_boolean (value, hc); + + return TRUE; +} + +static GVariant * +set_contrast_mapping (const GValue *value, + const GVariantType *expected_type, + gpointer user_data) +{ + gboolean hc; + CcUaPanel *self = user_data; + GVariant *ret = NULL; + + hc = g_value_get_boolean (value); + if (hc) + { + ret = g_variant_new_string (HIGH_CONTRAST_THEME); + g_settings_set_string (self->interface_settings, KEY_ICON_THEME, HIGH_CONTRAST_THEME); + + g_settings_set_string (self->wm_settings, KEY_WM_THEME, HIGH_CONTRAST_THEME); + } + else + { + g_settings_reset (self->interface_settings, KEY_GTK_THEME); + g_settings_reset (self->interface_settings, KEY_ICON_THEME); + + g_settings_reset (self->wm_settings, KEY_WM_THEME); + } + + return ret; +} + +static gboolean +on_off_label_mapping_get (GValue *value, + GVariant *variant, + gpointer user_data) +{ + g_value_set_string (value, g_variant_get_boolean (variant) ? _("On") : _("Off")); + + return TRUE; +} + +static gboolean +cursor_size_label_mapping_get (GValue *value, + GVariant *variant, + gpointer user_data) +{ + char *label; + int cursor_size; + + cursor_size = g_variant_get_int32 (variant); + + switch (cursor_size) + { + case 24: + /* translators: the labels will read: + * Cursor Size: Default */ + label = g_strdup (C_("cursor size", "Default")); + break; + case 32: + label = g_strdup (C_("cursor size", "Medium")); + break; + case 48: + label = g_strdup (C_("cursor size", "Large")); + break; + case 64: + label = g_strdup (C_("cursor size", "Larger")); + break; + case 96: + label = g_strdup (C_("cursor size", "Largest")); + break; + default: + label = g_strdup_printf (g_dngettext (GETTEXT_PACKAGE, + "%d pixel", + "%d pixels", + cursor_size), + cursor_size); + break; + } + + g_value_take_string (value, label); + + return TRUE; +} + +static void +add_separators (GtkListBox *list) +{ + gtk_list_box_set_header_func (list, cc_list_box_update_header_func, NULL, NULL); +} + +static gboolean +keynav_failed (CcUaPanel *self, GtkDirectionType direction, GtkWidget *list) +{ + GList *item, *sections; + gdouble value, lower, upper, page; + + /* Find the list in the list of GtkListBoxes */ + if (direction == GTK_DIR_DOWN) + sections = self->sections; + else + sections = self->sections_reverse; + + item = g_list_find (sections, list); + g_assert (item); + if (item->next) + { + gtk_widget_child_focus (GTK_WIDGET (item->next->data), direction); + return TRUE; + } + + value = gtk_adjustment_get_value (self->focus_adjustment); + lower = gtk_adjustment_get_lower (self->focus_adjustment); + upper = gtk_adjustment_get_upper (self->focus_adjustment); + page = gtk_adjustment_get_page_size (self->focus_adjustment); + + if (direction == GTK_DIR_UP && value > lower) + { + gtk_adjustment_set_value (self->focus_adjustment, lower); + return TRUE; + } + else if (direction == GTK_DIR_DOWN && value < upper - page) + { + gtk_adjustment_set_value (self->focus_adjustment, upper - page); + return TRUE; + } + + return FALSE; +} + +static void +add_section (GtkWidget *list, CcUaPanel *self) +{ + g_signal_connect_object (list, "keynav-failed", G_CALLBACK (keynav_failed), self, G_CONNECT_SWAPPED); + + self->sections = g_list_append (self->sections, list); + self->sections_reverse = g_list_prepend (self->sections_reverse, list); +} + +static void +cc_ua_panel_init_status (CcUaPanel *self) +{ + GtkWidget *box; + + box = GTK_WIDGET (self->section_status); + self->sections_reverse = g_list_prepend (self->sections_reverse, box); + + g_settings_bind (self->a11y_settings, KEY_ALWAYS_SHOW_STATUS, + self->switch_status, "active", + G_SETTINGS_BIND_DEFAULT); +} + +static void +toggle_switch (GtkWidget *sw) +{ + gboolean active; + + active = gtk_switch_get_active (GTK_SWITCH (sw)); + gtk_switch_set_active (GTK_SWITCH (sw), !active); +} + +static void +activate_row (CcUaPanel *self, GtkListBoxRow *row) +{ + GtkWidget *dialog; + const gchar *dialog_id; + const gchar *widget_name; + + /* Check switches to toggle */ + widget_name = gtk_buildable_get_name (GTK_BUILDABLE (row)); + if (widget_name) + { + if (!g_strcmp0 (widget_name, "row_highcontrast")) + { + toggle_switch (self->value_highcontrast); + return; + } + if (!g_strcmp0 (widget_name, "row_large_text")) + { + toggle_switch (self->value_large_text); + return; + } + if (!g_strcmp0 (widget_name, "row_screen_keyboard")) + { + toggle_switch (self->screen_keyboard_switch); + return; + } + if (!g_strcmp0 (widget_name, "row_mouse_keys")) + { + toggle_switch (self->mouse_keys_switch); + return; + } + } + + /* Check dialog to open */ + dialog_id = (const gchar *)g_object_get_data (G_OBJECT (row), "dialog-id"); + if (g_strcmp0 (dialog_id, "zoom") == 0) + { + zoom_options_launch (self); + return; + } + + dialog = (GtkWidget *)g_object_get_data (G_OBJECT (row), "dialog"); + if (dialog == NULL) + return; + + gtk_window_set_transient_for (GTK_WINDOW (dialog), + GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (self)))); + gtk_window_present (GTK_WINDOW (dialog)); +} + +static void +cc_ua_panel_init_seeing (CcUaPanel *self) +{ + add_section (self->list_seeing, self); + + add_separators (GTK_LIST_BOX (self->list_seeing)); + + g_signal_connect_object (self->list_seeing, "row-activated", + G_CALLBACK (activate_row), self, G_CONNECT_SWAPPED); + + g_settings_bind_with_mapping (self->interface_settings, KEY_GTK_THEME, + self->value_highcontrast, + "active", G_SETTINGS_BIND_DEFAULT, + get_contrast_mapping, + set_contrast_mapping, + self, + NULL); + + /* large text */ + + g_settings_bind_with_mapping (self->interface_settings, KEY_TEXT_SCALING_FACTOR, + self->value_large_text, + "active", G_SETTINGS_BIND_DEFAULT, + get_large_text_mapping, + set_large_text_mapping, + self->interface_settings, + NULL); + + /* cursor size */ + + cursor_size_setup (self); + + g_settings_bind_with_mapping (self->interface_settings, KEY_MOUSE_CURSOR_SIZE, + self->value_cursor_size, + "label", G_SETTINGS_BIND_GET, + cursor_size_label_mapping_get, + NULL, NULL, NULL); + + self->toplevels = g_slist_prepend (self->toplevels, self->cursor_size_dialog); + + g_object_set_data (G_OBJECT (self->row_cursor_size), "dialog", self->cursor_size_dialog); + g_signal_connect (self->cursor_size_dialog, "delete-event", + G_CALLBACK (gtk_widget_hide_on_delete), NULL); + + /* zoom */ + + g_settings_bind_with_mapping (self->application_settings, "screen-magnifier-enabled", + self->value_zoom, + "label", G_SETTINGS_BIND_GET, + on_off_label_mapping_get, + NULL, NULL, NULL); + + g_object_set_data (G_OBJECT (self->row_zoom), "dialog-id", "zoom"); + + /* screen reader */ + + g_settings_bind_with_mapping (self->application_settings, "screen-reader-enabled", + self->value_screen_reader, "label", + G_SETTINGS_BIND_GET, + on_off_label_mapping_get, + NULL, NULL, NULL); + + g_settings_bind (self->application_settings, "screen-reader-enabled", + self->screen_reader_switch, "active", + G_SETTINGS_BIND_DEFAULT); + + self->toplevels = g_slist_prepend (self->toplevels, self->screen_reader_dialog); + + g_object_set_data (G_OBJECT (self->row_screen_reader), "dialog", self->screen_reader_dialog); + g_signal_connect (self->screen_reader_dialog, "delete-event", + G_CALLBACK (gtk_widget_hide_on_delete), NULL); + + /* sound keys */ + + g_settings_bind_with_mapping (self->kb_settings, KEY_TOGGLEKEYS_ENABLED, + self->value_sound_keys, "label", + G_SETTINGS_BIND_GET, + on_off_label_mapping_get, + NULL, NULL, NULL); + + g_settings_bind (self->kb_settings, KEY_TOGGLEKEYS_ENABLED, + self->sound_keys_switch, "active", + G_SETTINGS_BIND_DEFAULT); + + self->toplevels = g_slist_prepend (self->toplevels, self->sound_keys_dialog); + + g_object_set_data (G_OBJECT (self->row_sound_keys), "dialog", self->sound_keys_dialog); + g_signal_connect (self->sound_keys_dialog, "delete-event", + G_CALLBACK (gtk_widget_hide_on_delete), NULL); +} + +/* hearing/sound section */ +static void +visual_bell_type_notify_cb (CcUaPanel *self) +{ + GtkWidget *widget; + GDesktopVisualBellType type; + + type = g_settings_get_enum (self->wm_settings, KEY_VISUAL_BELL_TYPE); + + if (type == G_DESKTOP_VISUAL_BELL_FRAME_FLASH) + widget = self->visual_alerts_window_radio; + else + widget = self->visual_alerts_screen_radio; + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE); +} + +static void +visual_bell_type_toggle_cb (CcUaPanel *self) +{ + gboolean frame_flash; + GDesktopVisualBellType type; + + frame_flash = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (self->visual_alerts_window_radio)); + + if (frame_flash) + type = G_DESKTOP_VISUAL_BELL_FRAME_FLASH; + else + type = G_DESKTOP_VISUAL_BELL_FULLSCREEN_FLASH; + g_settings_set_enum (self->wm_settings, KEY_VISUAL_BELL_TYPE, type); +} + +static void +test_flash (GtkButton *button, + gpointer data) +{ + GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (button)); + gdk_window_beep (gtk_widget_get_window (toplevel)); +} + +static void +cc_ua_panel_init_hearing (CcUaPanel *self) +{ + add_section (self->list_hearing, self); + + add_separators (GTK_LIST_BOX (self->list_hearing)); + + g_signal_connect_object (self->list_hearing, "row-activated", + G_CALLBACK (activate_row), self, G_CONNECT_SWAPPED); + + /* set the initial visual bell values */ + visual_bell_type_notify_cb (self); + + /* and listen */ + g_settings_bind (self->wm_settings, KEY_VISUAL_BELL_ENABLED, + self->visual_alerts_switch, "active", + G_SETTINGS_BIND_DEFAULT); + + g_settings_bind_with_mapping (self->wm_settings, KEY_VISUAL_BELL_ENABLED, + self->value_visual_alerts, + "label", G_SETTINGS_BIND_GET, + on_off_label_mapping_get, + NULL, NULL, NULL); + + g_object_bind_property (self->visual_alerts_switch, "active", + self->visual_alerts_window_radio, "sensitive", + G_BINDING_SYNC_CREATE); + g_object_bind_property (self->visual_alerts_switch, "active", + self->visual_alerts_screen_radio, "sensitive", + G_BINDING_SYNC_CREATE); + + g_signal_connect_object (self->wm_settings, "changed::" KEY_VISUAL_BELL_TYPE, + G_CALLBACK (visual_bell_type_notify_cb), self, G_CONNECT_SWAPPED); + g_signal_connect_object (self->visual_alerts_window_radio, + "toggled", G_CALLBACK (visual_bell_type_toggle_cb), self, G_CONNECT_SWAPPED); + + self->toplevels = g_slist_prepend (self->toplevels, self->visual_alerts_dialog); + + g_object_set_data (G_OBJECT (self->row_visual_alerts), "dialog", self->visual_alerts_dialog); + + g_signal_connect (self->visual_alerts_dialog, "delete-event", + G_CALLBACK (gtk_widget_hide_on_delete), NULL); + + g_signal_connect (self->visual_alerts_test_button, + "clicked", G_CALLBACK (test_flash), NULL); +} + +/* typing/keyboard section */ +static void +on_repeat_keys_toggled (CcUaPanel *self) +{ + gboolean on; + + on = g_settings_get_boolean (self->kb_desktop_settings, KEY_REPEAT_KEYS); + + gtk_label_set_text (GTK_LABEL (self->value_repeat_keys), on ? _("On") : _("Off")); + + gtk_widget_set_sensitive (self->repeat_keys_delay_grid, on); + gtk_widget_set_sensitive (self->repeat_keys_speed_grid, on); +} + +static void +on_cursor_blinking_toggled (CcUaPanel *self) +{ + gboolean on; + + on = g_settings_get_boolean (self->interface_settings, KEY_CURSOR_BLINKING); + + gtk_label_set_text (GTK_LABEL (self->value_row_cursor_blinking), on ? _("On") : _("Off")); +} + +static void +update_accessx_label (CcUaPanel *self) +{ + gboolean on; + + on = g_settings_get_boolean (self->kb_settings, KEY_STICKYKEYS_ENABLED) || + g_settings_get_boolean (self->kb_settings, KEY_SLOWKEYS_ENABLED) || + g_settings_get_boolean (self->kb_settings, KEY_BOUNCEKEYS_ENABLED); + + gtk_label_set_text (GTK_LABEL (self->value_accessx), on ? _("On") : _("Off")); +} + +static void +cc_ua_panel_init_keyboard (CcUaPanel *self) +{ + GtkWidget *list; + GtkWidget *w; + GtkWidget *sw; + + list = self->list_typing; + add_section (list, self); + + add_separators (GTK_LIST_BOX (list)); + + g_signal_connect_object (list, "row-activated", + G_CALLBACK (activate_row), self, G_CONNECT_SWAPPED); + + /* on-screen keyboard */ + g_settings_bind (self->application_settings, KEY_SCREEN_KEYBOARD_ENABLED, + self->screen_keyboard_switch, "active", + G_SETTINGS_BIND_DEFAULT); + + /* Repeat keys */ + g_signal_connect_object (self->kb_desktop_settings, "changed", + G_CALLBACK (on_repeat_keys_toggled), self, G_CONNECT_SWAPPED); + + self->toplevels = g_slist_prepend (self->toplevels, self->repeat_keys_dialog); + + g_object_set_data (G_OBJECT (self->row_repeat_keys), "dialog", self->repeat_keys_dialog); + + g_signal_connect (self->repeat_keys_dialog, "delete-event", + G_CALLBACK (gtk_widget_hide_on_delete), NULL); + + sw = self->repeat_keys_switch; + g_settings_bind (self->kb_desktop_settings, KEY_REPEAT_KEYS, + sw, "active", + G_SETTINGS_BIND_DEFAULT); + on_repeat_keys_toggled (self); + + g_settings_bind (self->kb_desktop_settings, "delay", + gtk_range_get_adjustment (GTK_RANGE (self->repeat_keys_delay_scale)), "value", + G_SETTINGS_BIND_DEFAULT); + g_settings_bind (self->kb_desktop_settings, "repeat-interval", + gtk_range_get_adjustment (GTK_RANGE (self->repeat_keys_speed_scale)), "value", + G_SETTINGS_BIND_DEFAULT); + + /* Cursor Blinking */ + g_signal_connect_object (self->interface_settings, "changed", + G_CALLBACK (on_cursor_blinking_toggled), self, G_CONNECT_SWAPPED); + + self->toplevels = g_slist_prepend (self->toplevels, self->cursor_blinking_dialog); + + g_object_set_data (G_OBJECT (self->row_cursor_blinking), "dialog", self->cursor_blinking_dialog); + + g_signal_connect (self->cursor_blinking_dialog, "delete-event", + G_CALLBACK (gtk_widget_hide_on_delete), NULL); + + sw = self->cursor_blinking_switch; + g_settings_bind (self->interface_settings, KEY_CURSOR_BLINKING, + sw, "active", + G_SETTINGS_BIND_DEFAULT); + on_cursor_blinking_toggled (self); + + g_settings_bind (self->interface_settings, KEY_CURSOR_BLINKING_TIME, + gtk_range_get_adjustment (GTK_RANGE (self->cursor_blinking_scale)), "value", + G_SETTINGS_BIND_DEFAULT); + + + /* accessx */ + g_signal_connect_object (self->kb_settings, "changed", + G_CALLBACK (update_accessx_label), self, G_CONNECT_SWAPPED); + update_accessx_label (self); + + /* enable shortcuts */ + sw = self->typing_keyboard_toggle_switch; + g_settings_bind (self->kb_settings, KEY_KEYBOARD_TOGGLE, + sw, "active", + G_SETTINGS_BIND_DEFAULT); + + /* sticky keys */ + sw = self->typing_stickykeys_switch; + g_settings_bind (self->kb_settings, KEY_STICKYKEYS_ENABLED, + sw, "active", + G_SETTINGS_BIND_DEFAULT); + + w = self->typing_stickykeys_disable_two_keys_check; + g_settings_bind (self->kb_settings, KEY_STICKYKEYS_TWO_KEY_OFF, + w, "active", + G_SETTINGS_BIND_NO_SENSITIVITY); + g_object_bind_property (sw, "active", w, "sensitive", G_BINDING_SYNC_CREATE); + + w = self->typing_stickykeys_beep_modifier_check; + g_settings_bind (self->kb_settings, KEY_STICKYKEYS_MODIFIER_BEEP, + w, "active", + G_SETTINGS_BIND_NO_SENSITIVITY); + g_object_bind_property (sw, "active", w, "sensitive", G_BINDING_SYNC_CREATE); + + /* slow keys */ + sw = self->typing_slowkeys_switch; + g_settings_bind (self->kb_settings, KEY_SLOWKEYS_ENABLED, + sw, "active", + G_SETTINGS_BIND_DEFAULT); + + w = self->typing_slowkeys_delay_scale; + g_settings_bind (self->kb_settings, KEY_SLOWKEYS_DELAY, + gtk_range_get_adjustment (GTK_RANGE (w)), "value", + G_SETTINGS_BIND_DEFAULT); + w = self->typing_slowkeys_delay_box; + g_object_bind_property (sw, "active", w, "sensitive", G_BINDING_SYNC_CREATE); + + w = self->typing_slowkeys_beep_pressed_check; + g_settings_bind (self->kb_settings, KEY_SLOWKEYS_BEEP_PRESS, + w, "active", + G_SETTINGS_BIND_DEFAULT); + g_object_bind_property (sw, "active", w, "sensitive", G_BINDING_SYNC_CREATE); + + w = self->typing_slowkeys_beep_accepted_check; + g_settings_bind (self->kb_settings, KEY_SLOWKEYS_BEEP_ACCEPT, + w, "active", + G_SETTINGS_BIND_DEFAULT); + g_object_bind_property (sw, "active", w, "sensitive", G_BINDING_SYNC_CREATE); + + w = self->typing_slowkeys_beep_rejected_check; + g_settings_bind (self->kb_settings, KEY_SLOWKEYS_BEEP_REJECT, + w, "active", + G_SETTINGS_BIND_DEFAULT); + g_object_bind_property (sw, "active", w, "sensitive", G_BINDING_SYNC_CREATE); + + /* bounce keys */ + sw = self->typing_bouncekeys_switch; + g_settings_bind (self->kb_settings, KEY_BOUNCEKEYS_ENABLED, + sw, "active", + G_SETTINGS_BIND_DEFAULT); + + w = self->typing_bouncekeys_delay_scale; + g_settings_bind (self->kb_settings, KEY_BOUNCEKEYS_DELAY, + gtk_range_get_adjustment (GTK_RANGE (w)), "value", + G_SETTINGS_BIND_DEFAULT); + w = self->typing_bouncekeys_delay_box; + g_object_bind_property (sw, "active", w, "sensitive", G_BINDING_SYNC_CREATE); + + w = self->typing_bouncekeys_beep_rejected_check; + g_settings_bind (self->kb_settings, KEY_BOUNCEKEYS_BEEP_REJECT, + w, "active", + G_SETTINGS_BIND_NO_SENSITIVITY); + g_object_bind_property (sw, "active", w, "sensitive", G_BINDING_SYNC_CREATE); + + self->toplevels = g_slist_prepend (self->toplevels, self->typing_dialog); + + g_object_set_data (G_OBJECT (self->row_accessx), "dialog", self->typing_dialog); + + g_signal_connect (self->typing_dialog, "delete-event", + G_CALLBACK (gtk_widget_hide_on_delete), NULL); +} + +/* mouse/pointing & clicking section */ +static void +update_click_assist_label (CcUaPanel *self) +{ + gboolean on; + + on = g_settings_get_boolean (self->mouse_settings, KEY_SECONDARY_CLICK_ENABLED) || + g_settings_get_boolean (self->mouse_settings, KEY_DWELL_CLICK_ENABLED); + + gtk_label_set_text (GTK_LABEL (self->value_click_assist), on ? _("On") : _("Off")); +} + + +static void +cc_ua_panel_init_mouse (CcUaPanel *self) +{ + GtkWidget *list; + GtkWidget *sw; + GtkWidget *w; + + list = self->list_pointing; + add_section (list, self); + + add_separators (GTK_LIST_BOX (list)); + + g_signal_connect_object (list, "row-activated", + G_CALLBACK (activate_row), self, G_CONNECT_SWAPPED); + + g_settings_bind (self->kb_settings, KEY_MOUSEKEYS_ENABLED, + self->mouse_keys_switch, "active", + G_SETTINGS_BIND_DEFAULT); + + g_settings_bind (self->interface_settings, KEY_LOCATE_POINTER, + self->locate_pointer_switch, "active", + G_SETTINGS_BIND_DEFAULT); + + g_signal_connect_object (self->mouse_settings, "changed", + G_CALLBACK (update_click_assist_label), self, G_CONNECT_SWAPPED); + update_click_assist_label (self); + + /* simulated secondary click */ + sw = self->pointing_secondary_click_switch; + g_settings_bind (self->mouse_settings, KEY_SECONDARY_CLICK_ENABLED, + sw, "active", + G_SETTINGS_BIND_DEFAULT); + + w = self->pointing_secondary_click_delay_scale; + g_settings_bind (self->mouse_settings, KEY_SECONDARY_CLICK_TIME, + gtk_range_get_adjustment (GTK_RANGE (w)), "value", + G_SETTINGS_BIND_DEFAULT); + w = self->pointing_secondary_click_delay_box; + g_object_bind_property (sw, "active", w, "sensitive", G_BINDING_SYNC_CREATE); + + /* dwell click */ + sw = self->pointing_hover_click_switch; + g_settings_bind (self->mouse_settings, KEY_DWELL_CLICK_ENABLED, + sw, "active", + G_SETTINGS_BIND_DEFAULT); + + w = self->pointing_dwell_delay_scale; + g_settings_bind (self->mouse_settings, KEY_DWELL_TIME, + gtk_range_get_adjustment (GTK_RANGE (w)), "value", + G_SETTINGS_BIND_DEFAULT); + w = self->pointing_dwell_delay_box; + g_object_bind_property (sw, "active", w, "sensitive", G_BINDING_SYNC_CREATE); + + w = self->pointing_dwell_threshold_scale; + g_settings_bind (self->mouse_settings, KEY_DWELL_THRESHOLD, + gtk_range_get_adjustment (GTK_RANGE (w)), "value", + G_SETTINGS_BIND_DEFAULT); + w = self->pointing_dwell_threshold_box; + g_object_bind_property (sw, "active", w, "sensitive", G_BINDING_SYNC_CREATE); + + self->toplevels = g_slist_prepend (self->toplevels, self->pointing_dialog); + + g_object_set_data (G_OBJECT (self->row_click_assist), "dialog", self->pointing_dialog); + + g_settings_bind (self->gsd_mouse_settings, "double-click", + gtk_range_get_adjustment (GTK_RANGE (self->scale_double_click_delay)), "value", + G_SETTINGS_BIND_DEFAULT); + + gtk_scale_add_mark (GTK_SCALE (self->scale_double_click_delay), 400, GTK_POS_BOTTOM, NULL); + + g_signal_connect (self->pointing_dialog, "delete-event", + G_CALLBACK (gtk_widget_hide_on_delete), NULL); +} + +static void +cc_ua_panel_init (CcUaPanel *self) +{ + g_resources_register (cc_universal_access_get_resource ()); + + gtk_widget_init_template (GTK_WIDGET (self)); + + self->interface_settings = g_settings_new (INTERFACE_SETTINGS); + self->a11y_settings = g_settings_new (A11Y_SETTINGS); + self->wm_settings = g_settings_new (WM_SETTINGS); + self->kb_settings = g_settings_new (KEYBOARD_SETTINGS); + self->kb_desktop_settings = g_settings_new (KEYBOARD_DESKTOP_SETTINGS); + self->mouse_settings = g_settings_new (MOUSE_SETTINGS); + self->gsd_mouse_settings = g_settings_new (GSD_MOUSE_SETTINGS); + self->application_settings = g_settings_new (APPLICATION_SETTINGS); + + cc_ua_panel_init_status (self); + cc_ua_panel_init_seeing (self); + cc_ua_panel_init_hearing (self); + cc_ua_panel_init_keyboard (self); + cc_ua_panel_init_mouse (self); + + gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (self->universal_access_panel), SCROLL_HEIGHT); + + self->focus_adjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (self->universal_access_panel)); + gtk_container_set_focus_vadjustment (GTK_CONTAINER (self->universal_access_content), self->focus_adjustment); +} diff --git a/panels/universal-access/cc-ua-panel.h b/panels/universal-access/cc-ua-panel.h new file mode 100644 index 0000000..6d925fa --- /dev/null +++ b/panels/universal-access/cc-ua-panel.h @@ -0,0 +1,31 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- + * + * Copyright (C) 2010 Intel, Inc + * + * 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, see <http://www.gnu.org/licenses/>. + * + * Author: Thomas Wood <thomas.wood@intel.com> + * + */ + +#pragma once + +#include <shell/cc-panel.h> + +G_BEGIN_DECLS + +#define CC_TYPE_UA_PANEL (cc_ua_panel_get_type ()) +G_DECLARE_FINAL_TYPE (CcUaPanel, cc_ua_panel, CC, UA_PANEL, CcPanel) + +G_END_DECLS diff --git a/panels/universal-access/cc-ua-panel.ui b/panels/universal-access/cc-ua-panel.ui new file mode 100644 index 0000000..5dc561f --- /dev/null +++ b/panels/universal-access/cc-ua-panel.ui @@ -0,0 +1,2958 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.20.0 --> +<interface> + <requires lib="gtk+" version="3.0"/> + <object class="GtkAdjustment" id="double-click-delay-adjustment"> + <property name="lower">100</property> + <property name="upper">1000</property> + <property name="value">400</property> + <property name="step_increment">100</property> + <property name="page_increment">100</property> + </object> + <object class="GtkAdjustment" id="repeat_delay_adjustment"> + <property name="lower">100</property> + <property name="upper">2000</property> + <property name="value">500</property> + <property name="step_increment">10</property> + <property name="page_increment">10</property> + </object> + <object class="GtkAdjustment" id="repeat_speed_adjustment"> + <property name="lower">0.5</property> + <property name="upper">110</property> + <property name="value">33.3</property> + <property name="step_increment">1</property> + <property name="page_increment">1</property> + </object> + <object class="GtkAdjustment" id="cursor_blink_time_adjustment"> + <property name="lower">100</property> + <property name="upper">2500</property> + <property name="value">1000</property> + <property name="step_increment">200</property> + <property name="page_increment">200</property> + </object> + <!-- interface-requires gtk+ 3.0 --> + <template class="CcUaPanel" parent="CcPanel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkScrolledWindow" id="universal_access_panel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hscrollbar_policy">never</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkViewport" id="viewport1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + + <!-- Content --> + <child> + <object class="HdyClamp"> + <property name="visible">true</property> + <property name="margin-top">32</property> + <property name="margin-bottom">32</property> + <property name="margin-start">12</property> + <property name="margin-end">12</property> + <child> + <object class="GtkBox" id="universal_access_content"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="hexpand">True</property> + <child> + <object class="GtkBox" id="section_status"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_bottom">32</property> + <child> + <object class="GtkLabel" id="heading_status"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">_Always Show Accessibility Menu</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">switch_status</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkSwitch" id="switch_status"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="halign">end</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="section_seeing"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_bottom">32</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="heading_seeing"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_end">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Seeing</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + <accessibility> + <relation target="list_seeing" type="label-for"/> + </accessibility> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame_seeing"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">in</property> + <child> + <object class="GtkListBox" id="list_seeing"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="selection-mode">none</property> + <accessibility> + <relation target="heading_seeing" type="labelled-by"/> + </accessibility> + <child> + <object class="GtkListBoxRow" id="row_highcontrast"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="selectable">False</property> + <property name="activatable">False</property> + <child> + <object class="GtkBox" id="box_highcontrast"> + <property name="visible">True</property> + <child> + <object class="GtkLabel" id="heading_highcontrast"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">6</property> + <property name="margin_bottom">6</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_High Contrast</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">value_highcontrast</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkSwitch" id="value_highcontrast"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child> + <object class="GtkListBoxRow" id="row_large_text"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="selectable">False</property> + <property name="activatable">False</property> + <child> + <object class="GtkBox" id="box_large_text"> + <property name="visible">True</property> + <child> + <object class="GtkLabel" id="heading_large_text"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Large Text</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">value_large_text</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkSwitch" id="value_large_text"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child> + <object class="GtkListBoxRow" id="row_cursor_size"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <child> + <object class="GtkBox" id="box_cursor_size"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkLabel" id="heading_cursor_size"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="label" translatable="yes">C_ursor Size</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="value_cursor_size"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="label">24 pixels</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child> + <object class="GtkListBoxRow" id="row_zoom"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <child> + <object class="GtkBox" id="box_zoom"> + <property name="visible">True</property> + <child> + <object class="GtkLabel" id="heading_zoom"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Zoom</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="value_zoom"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">1</property> + <property name="label" translatable="yes">Off</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child> + <object class="GtkListBoxRow" id="row_screen_reader"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <child> + <object class="GtkBox" id="box_screen_reader"> + <property name="visible">True</property> + <child> + <object class="GtkLabel" id="heading_screen_reader"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Screen _Reader</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="value_screen_reader"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">1</property> + <property name="label" translatable="yes">Off</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child> + <object class="GtkListBoxRow" id="row_sound_keys"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <child> + <object class="GtkBox" id="box_sound_keys"> + <property name="visible">True</property> + <child> + <object class="GtkLabel" id="heading_sound_keys"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Sound Keys</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="value_sound_keys"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">1</property> + <property name="label" translatable="yes">Off</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + </object> + </child> + <child type="label_item"> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkBox" id="section_hearing"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_bottom">32</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="heading_hearing"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_end">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Hearing</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + <accessibility> + <relation target="list_hearing" type="label-for"/> + </accessibility> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame_hearing"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">in</property> + <child> + <object class="GtkListBox" id="list_hearing"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="selection-mode">none</property> + <accessibility> + <relation target="heading_hearing" type="labelled-by"/> + </accessibility> + <child> + <object class="GtkListBoxRow" id="row_visual_alerts"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <child> + <object class="GtkBox" id="box_visual_alerts"> + <property name="visible">True</property> + <child> + <object class="GtkLabel" id="heading_visual_alerts"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Visual Alerts</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="value_visual_alerts"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">1</property> + <property name="label" translatable="yes">Off</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + </object> + </child> + <child type="label_item"> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkBox" id="section_typing"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_bottom">32</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="heading_typing"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_end">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Typing</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + <accessibility> + <relation target="list_typing" type="label-for"/> + </accessibility> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame_typing"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">in</property> + <child> + <object class="GtkListBox" id="list_typing"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="selection-mode">none</property> + <accessibility> + <relation target="heading_typing" type="labelled-by"/> + </accessibility> + <child> + <object class="GtkListBoxRow" id="row_screen_keyboard"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="selectable">False</property> + <property name="activatable">False</property> + <child> + <object class="GtkBox" id="box_screen_keyboard"> + <property name="visible">True</property> + <child> + <object class="GtkLabel" id="heading_screen_keyboard"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Screen _Keyboard</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">screen_keyboard_switch</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkSwitch" id="screen_keyboard_switch"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child> + <object class="GtkListBoxRow" id="row_repeat_keys"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <child> + <object class="GtkBox" id="box_repeat_keys"> + <property name="visible">True</property> + <child> + <object class="GtkLabel" id="heading_repeat_keys"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">R_epeat Keys</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="value_repeat_keys"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">1</property> + <property name="label" translatable="yes">Off</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child> + <object class="GtkListBoxRow" id="row_cursor_blinking"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <child> + <object class="GtkBox" id="box_row_cursor_blinking"> + <property name="visible">True</property> + <child> + <object class="GtkLabel" id="heading_row_cursor_blinking"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Cursor _Blinking</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="value_row_cursor_blinking"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">1</property> + <property name="label" translatable="yes">Off</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child> + <object class="GtkListBoxRow" id="row_accessx"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <child> + <object class="GtkBox" id="box_accessx"> + <property name="visible">True</property> + <child> + <object class="GtkLabel" id="heading_accessx"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Typing Assist (AccessX)</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="value_accessx"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">1</property> + <property name="label" translatable="yes">Off</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + </object> + </child> + <child type="label_item"> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkBox" id="section_pointing"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="heading_pointing"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_end">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Pointing & Clicking</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + <accessibility> + <relation target="list_pointing" type="label-for"/> + </accessibility> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame_pointing"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">in</property> + <child> + <object class="GtkListBox" id="list_pointing"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="selection-mode">none</property> + <accessibility> + <relation target="heading_pointing" type="labelled-by"/> + </accessibility> + <child> + <object class="GtkListBoxRow" id="row_mouse_keys"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="selectable">False</property> + <property name="activatable">False</property> + <child> + <object class="GtkBox" id="box_mouse_keys"> + <property name="visible">True</property> + <child> + <object class="GtkLabel" id="heading_mouse_keys"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Mouse Keys</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">mouse_keys_switch</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkSwitch" id="mouse_keys_switch"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child> + <object class="GtkListBoxRow"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="selectable">False</property> + <property name="activatable">False</property> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="expand">True</property> + <property name="can_focus">False</property> + <property name="margin">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Locate Pointer</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">locate_pointer_switch</property> + </object> + </child> + <child> + <object class="GtkSwitch" id="locate_pointer_switch"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="margin">12</property> + </object> + </child> + </object> + </child> + </object> + </child> + <child> + <object class="GtkListBoxRow" id="row_click_assist"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <child> + <object class="GtkBox" id="box_click_assist"> + <property name="visible">True</property> + <child> + <object class="GtkLabel" id="heading_click_assist"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Click Assist</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="value_click_assist"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">1</property> + <property name="label" translatable="yes">Off</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child> + <object class="GtkListBoxRow" id="row_double_click_delay"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <child> + <object class="GtkBox" id="box_double_click_delay"> + <property name="visible">True</property> + <child> + <object class="GtkLabel" id="heading_double_click_delay"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Double-Click Delay</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkScale" id="scale_double_click_delay"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="adjustment">double-click-delay-adjustment</property> + <property name="draw_value">False</property> + <property name="margin_start">12</property> + <property name="margin_end">12</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <child internal-child="accessible"> + <object class="AtkObject" id="double_click_scale-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes">Double-Click Delay</property> + </object> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + </object> + </child> + <child type="label_item"> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">4</property> + </packing> + </child> + </object> + </child> + </object> + </child> + + </object> + </child> + </object> + </child> + </object> + </child> + </template> + <object class="GtkAdjustment" id="text_scaling_factor_adjustment"> + <property name="lower">0.5</property> + <property name="upper">3</property> + <property name="value">1</property> + <property name="step_increment">0.1</property> + </object> + <object class="GtkSizeGroup" id="rows_sizegroup"> + <property name="mode">vertical</property> + <widgets> + <widget name="row_highcontrast"/> + <widget name="row_large_text"/> + <widget name="row_cursor_size"/> + <widget name="row_zoom"/> + <widget name="row_screen_reader"/> + <widget name="row_sound_keys"/> + <widget name="row_visual_alerts"/> + <widget name="row_screen_keyboard"/> + <widget name="row_accessx"/> + <widget name="row_mouse_keys"/> + <widget name="row_click_assist"/> + </widgets> + </object> + <object class="GtkDialog" id="cursor_size_dialog"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="title" translatable="yes">Cursor Size</property> + <property name="resizable">False</property> + <property name="modal">True</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox7"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">2</property> + <child internal-child="action_area"> + <object class="GtkButtonBox"> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="cursor_size_blurb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">6</property> + <property name="margin_top">6</property> + <property name="margin_bottom">6</property> + <property name="label" translatable="yes">Cursor size can be combined with zoom to make it easier to see the cursor.</property> + <property name="wrap">True</property> + <property name="max_width_chars">45</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="cursor_size_grid"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + </child> + <child> + <placeholder/> + </child> + <child internal-child="headerbar"> + <object class="GtkHeaderBar"> + <property name="can_focus">False</property> + </object> + </child> + </object> + <object class="GtkDialog" id="screen_reader_dialog"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="title" translatable="yes">Screen Reader</property> + <property name="type_hint">dialog</property> + <property name="resizable">False</property> + <property name="modal">True</property> + <property name="use_header_bar">1</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox2"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <property name="margin">12</property> + <child> + <object class="GtkLabel" id="screen_reader_blurb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="max_width_chars">45</property> + <property name="label" translatable="yes">The screen reader reads displayed text as you move the focus.</property> + <property name="wrap">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <style> + <class name="frame"/> + <class name="view"/> + </style> + <child> + <object class="GtkGrid" id="grid3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">6</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="row_spacing">12</property> + <property name="column_spacing">6</property> + <child> + <object class="GtkLabel" id="screen_reader_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Screen Reader</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">screen_reader_switch</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSwitch" id="screen_reader_switch"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="halign">end</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + </child> + </object> + </child> + </object> + <object class="GtkDialog" id="sound_keys_dialog"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="title" translatable="yes">Sound Keys</property> + <property name="resizable">False</property> + <property name="modal">True</property> + <property name="type_hint">dialog</property> + <property name="use_header_bar">1</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox3"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">2</property> + <child> + <object class="GtkLabel" id="sound_keys_blurb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">6</property> + <property name="margin_top">6</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Beep when Num Lock or Caps Lock are turned on or off.</property> + <property name="wrap">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">6</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="row_spacing">12</property> + <property name="column_spacing">6</property> + <child> + <object class="GtkLabel" id="sound_keys_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Sound Keys</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">sound_keys_switch</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSwitch" id="sound_keys_switch"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="halign">end</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + </child> + </object> + <object class="GtkDialog" id="visual_alerts_dialog"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="resizable">False</property> + <property name="modal">True</property> + <property name="type_hint">dialog</property> + <property name="use_header_bar">1</property> + <child internal-child="headerbar"> + <object class="GtkHeaderBar" id="visual_alerts_header_bar"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="title" translatable="yes">Visual Alerts</property> + <property name="show_close_button">True</property> + <child> + <object class="GtkButton" id="visual_alerts_test_button"> + <property name="label" translatable="yes">_Test flash</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="valign">center</property> + <style> + <class name="text-button"/> + </style> + </object> + <packing> + <property name="pack_type">start</property> + </packing> + </child> + </object> + </child> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox4"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">2</property> + <child> + <object class="GtkLabel" id="visual_alerts_blurb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">6</property> + <property name="margin_top">6</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Use a visual indication when an alert sound occurs.</property> + <property name="wrap">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">12</property> + <property name="margin_end">6</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="row_spacing">12</property> + <property name="column_spacing">6</property> + <child> + <object class="GtkLabel" id="visual_alerts_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Visual Alerts</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">visual_alerts_switch</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSwitch" id="visual_alerts_switch"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="halign">end</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkRadioButton" id="visual_alerts_window_radio"> + <property name="label" translatable="yes">Flash the entire _window</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">2</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkRadioButton" id="visual_alerts_screen_radio"> + <property name="label" translatable="yes">Flash the entire _screen</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <property name="group">visual_alerts_window_radio</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">2</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">visual_alerts_test_button</action-widget> + </action-widgets> + </object> + <object class="GtkAdjustment" id="typing_bouncekeys_delay_adjustment"> + <property name="upper">900</property> + <property name="value">0.5</property> + <property name="step_increment">10</property> + <property name="page_increment">10</property> + </object> + <object class="GtkAdjustment" id="typing_slowkeys_delay_adjustment"> + <property name="upper">500</property> + <property name="value">0.5</property> + <property name="step_increment">10</property> + <property name="page_increment">10</property> + </object> + <object class="GtkDialog" id="repeat_keys_dialog"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="title" translatable="yes">Repeat Keys</property> + <property name="resizable">False</property> + <property name="modal">True</property> + <property name="type_hint">dialog</property> + <property name="use_header_bar">1</property> + <child internal-child="headerbar"> + <object class="GtkHeaderBar" id="repeat_keys_headerbar"> + <property name="visible">True</property> + <child> + <object class="GtkSwitch" id="repeat_keys_switch"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="valign">center</property> + </object> + <packing> + <property name="pack_type">end</property> + </packing> + </child> + </object> + </child> + <child internal-child="vbox"> + <object class="GtkBox" id="repeat_keys_vbox5"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="repeat_keys_description"> + <property name="visible">True</property> + <property name="use_underline">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Key presses repeat when key is held down.</property> + <property name="margin_start">12</property> + <property name="margin_end">6</property> + <property name="margin_top">6</property> + <property name="margin_bottom">12</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="repeat_keys_delay_grid"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">start</property> + <property name="margin_start">12</property> + <property name="margin_end">6</property> + <property name="margin_top">6</property> + <property name="margin_bottom">12</property> + <property name="orientation">vertical</property> + <property name="row_spacing">18</property> + <property name="column_spacing">24</property> + <child> + <object class="GtkBox" id="repeat_keys_box6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">start</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkBox" id="repeat_keys_box7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="repeat_keys_delay_label"> + <property name="visible">True</property> + <property name="use_underline">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Delay</property> + <property name="mnemonic_widget">repeat_keys_delay_scale</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkScale" id="repeat_keys_delay_scale"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="adjustment">repeat_delay_adjustment</property> + <property name="draw_value">False</property> + <property name="has_origin">False</property> + <property name="width-request">400</property> + <child internal-child="accessible"> + <object class="AtkObject" id="repeat_delay_scale-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes">Repeat keys delay</property> + </object> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="repeat_keys_speed_grid"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">start</property> + <property name="margin_start">12</property> + <property name="margin_end">6</property> + <property name="margin_top">6</property> + <property name="margin_bottom">12</property> + <property name="orientation">vertical</property> + <property name="row_spacing">18</property> + <property name="column_spacing">24</property> + <child> + <object class="GtkBox" id="repeat_keys_speed-box7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">start</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkBox" id="repeat_keys_speed-box8"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="repeat_keys_speed_label"> + <property name="visible">True</property> + <property name="use_underline">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Speed</property> + <property name="mnemonic_widget">repeat_keys_speed_scale</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkScale" id="repeat_keys_speed_scale"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="adjustment">repeat_speed_adjustment</property> + <property name="draw_value">False</property> + <property name="has_origin">False</property> + <property name="inverted">True</property> + <property name="width-request">200</property> + <child internal-child="accessible"> + <object class="AtkObject" id="repeat_speed_scale-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes">Repeat keys speed</property> + </object> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + </child> + </object> + <object class="GtkDialog" id="cursor_blinking_dialog"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="title" translatable="yes">Cursor Blinking</property> + <property name="resizable">False</property> + <property name="modal">True</property> + <property name="type_hint">dialog</property> + <property name="use_header_bar">1</property> + <child internal-child="headerbar"> + <object class="GtkHeaderBar" id="cursor_blinking_headerbar"> + <property name="visible">True</property> + <child> + <object class="GtkSwitch" id="cursor_blinking_switch"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="valign">center</property> + </object> + <packing> + <property name="pack_type">end</property> + </packing> + </child> + </object> + </child> + <child internal-child="vbox"> + <object class="GtkBox" id="cursor_blinking-vbox5"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="cursor_blinking-description"> + <property name="visible">True</property> + <property name="use_underline">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Cursor blinks in text fields.</property> + <property name="margin_start">12</property> + <property name="margin_end">6</property> + <property name="margin_top">6</property> + <property name="margin_bottom">12</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="cursor_blinking-grid"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">start</property> + <property name="margin_start">12</property> + <property name="margin_end">6</property> + <property name="margin_top">6</property> + <property name="margin_bottom">12</property> + <property name="orientation">vertical</property> + <property name="row_spacing">18</property> + <property name="column_spacing">24</property> + <child> + <object class="GtkBox" id="cursor_blinking-box6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">start</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkBox" id="cursor_blinking-box7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="cursor_blinking_label"> + <property name="visible">True</property> + <property name="use_underline">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Speed</property> + <property name="mnemonic_widget">cursor_blinking_scale</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkScale" id="cursor_blinking_scale"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="adjustment">cursor_blink_time_adjustment</property> + <property name="draw_value">False</property> + <property name="width-request">400</property> + <child internal-child="accessible"> + <object class="AtkObject" id="cursor_blinking_scale-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes">Cursor blinking speed</property> + </object> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + <object class="GtkSizeGroup" id="repeat_keys_dialog_labels_sizegroup"> + <widgets> + <widget name="repeat_keys_delay_label"/> + <widget name="repeat_keys_speed_label"/> + </widgets> + </object> + <object class="GtkSizeGroup" id="repeat_keys_dialog_scales_sizegroup"> + <widgets> + <widget name="repeat_keys_delay_scale"/> + <widget name="repeat_keys_speed_scale"/> + </widgets> + </object> + <object class="GtkDialog" id="typing_dialog"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="title" translatable="yes">Typing Assist</property> + <property name="resizable">False</property> + <property name="modal">True</property> + <property name="type_hint">dialog</property> + <property name="use_header_bar">1</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox5"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkGrid" id="grid6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">start</property> + <property name="margin_start">12</property> + <property name="margin_end">6</property> + <property name="margin_top">6</property> + <property name="margin_bottom">12</property> + <property name="orientation">vertical</property> + <property name="row_spacing">18</property> + <property name="column_spacing">24</property> + <child> + <object class="GtkBox" id="box6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">start</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkBox" id="box7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="typing_stickykeys_label"> + <property name="visible">True</property> + <property name="use_underline">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Sticky Keys</property> + <property name="mnemonic_widget">typing_stickykeys_switch</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="typing_sticky_blurb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Treats a sequence of modifier keys as a key combination</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box8"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">start</property> + <property name="margin_start">10</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkCheckButton" id="typing_stickykeys_disable_two_keys_check"> + <property name="label" translatable="yes">_Disable if two keys are pressed together</property> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="valign">start</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="typing_stickykeys_beep_modifier_check"> + <property name="label" translatable="yes">Beep when a _modifier key is pressed</property> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="valign">start</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box9"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkBox" id="box10"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="typing_slowkeys_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="use_underline">True</property> + <property name="label" translatable="yes">S_low Keys</property> + <property name="mnemonic_widget">typing_slowkeys_switch</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="typing_slowkeys_blurb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Puts a delay between when a key is pressed and when it is accepted</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box11"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">start</property> + <property name="margin_start">10</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkBox" id="typing_slowkeys_delay_box"> + <property name="visible">True</property> + <property name="sensitive">True</property> + <property name="can_focus">False</property> + <property name="spacing">12</property> + <child> + <object class="GtkLabel" id="typing_slowkeys_delay_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">A_cceptance delay:</property> + <property name="use_underline">True</property> + <property name="justify">center</property> + <property name="mnemonic_widget">typing_slowkeys_delay_scale</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="hbox42"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">6</property> + <child> + <object class="GtkLabel" id="typing_slow_keys_slow_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">1</property> + <property name="xpad">10</property> + <property name="label" translatable="yes" context="slow keys delay">Short</property> + <attributes> + <attribute name="scale" value="0.83"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkScale" id="typing_slowkeys_delay_scale"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="adjustment">typing_slowkeys_delay_adjustment</property> + <property name="draw_value">False</property> + <child internal-child="accessible"> + <object class="AtkObject" id="typing_slowkeys_delay_scale-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes">Slow keys typing delay</property> + </object> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="typing_slowkeys_long_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes" context="slow keys delay">Long</property> + <attributes> + <attribute name="scale" value="0.83"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="typing_slowkeys_beep_pressed_check"> + <property name="label" translatable="yes">Beep when a key is pr_essed</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="typing_slowkeys_beep_accepted_check"> + <property name="label" translatable="yes">Beep when a key is _accepted</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="use_underline">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="typing_slowkeys_beep_rejected_check"> + <property name="label" translatable="yes">Beep when a key is _rejected</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="use_underline">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box12"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkBox" id="box13"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="typing_bouncekeys_label"> + <property name="visible">True</property> + <property name="use_underline">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Bounce Keys</property> + <property name="mnemonic_widget">typing_bouncekeys_switch</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="typing_bouncekeys_blurb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Ignores fast duplicate keypresses</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box14"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">start</property> + <property name="margin_start">10</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkBox" id="typing_bouncekeys_delay_box"> + <property name="visible">True</property> + <property name="sensitive">True</property> + <property name="can_focus">False</property> + <property name="spacing">12</property> + <child> + <object class="GtkLabel" id="typing_bouncekeys_delay_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">A_cceptance delay:</property> + <property name="use_underline">True</property> + <property name="justify">center</property> + <property name="mnemonic_widget">typing_bouncekeys_delay_scale</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="hbox44"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">6</property> + <child> + <object class="GtkLabel" id="typing_bouncekeys_short_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">1</property> + <property name="xpad">10</property> + <property name="label" translatable="yes" context="bounce keys delay">Short</property> + <attributes> + <attribute name="scale" value="0.83"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkScale" id="typing_bouncekeys_delay_scale"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="adjustment">typing_bouncekeys_delay_adjustment</property> + <property name="draw_value">False</property> + <child internal-child="accessible"> + <object class="AtkObject" id="typing_bouncekeys_delay_scale-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes">Bounce keys typing delay</property> + </object> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="typing_bouncekeys_long_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes" context="bounce keys delay">Long</property> + <attributes> + <attribute name="scale" value="0.83"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="typing_bouncekeys_beep_rejected_check"> + <property name="label" translatable="yes">Beep when a key is _rejected</property> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">3</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSwitch" id="typing_stickykeys_switch"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="halign">end</property> + <property name="valign">start</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSwitch" id="typing_slowkeys_switch"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="halign">end</property> + <property name="valign">start</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSwitch" id="typing_bouncekeys_switch"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="halign">end</property> + <property name="valign">start</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">3</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box15"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="typing_keyboard_toggle_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Enable by Keyboard</property> + <property name="mnemonic_widget">typing_keyboard_toggle_switch</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="typing_keyboard_toggle_blurb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Turn accessibility features on and off using the keyboard</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSwitch" id="typing_keyboard_toggle_switch"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="halign">end</property> + <property name="valign">start</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + <object class="GtkAdjustment" id="click_delay_adjustment"> + <property name="lower">0.5</property> + <property name="upper">3</property> + <property name="value">1.2</property> + <property name="step_increment">0.1</property> + <property name="page_increment">0.1</property> + </object> + <object class="GtkAdjustment" id="dwell_threshold_adjustment"> + <property name="upper">30</property> + <property name="value">15</property> + <property name="step_increment">1</property> + <property name="page_increment">1</property> + </object> + <object class="GtkAdjustment" id="dwell_time_adjustment"> + <property name="lower">0.2</property> + <property name="upper">3</property> + <property name="value">1.2</property> + <property name="step_increment">0.1</property> + <property name="page_increment">0.1</property> + </object> + <object class="GtkDialog" id="pointing_dialog"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="title" translatable="yes">Click Assist</property> + <property name="resizable">False</property> + <property name="modal">True</property> + <property name="type_hint">dialog</property> + <property name="use_header_bar">1</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox6"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">0</property> + <child> + <object class="GtkGrid" id="grid7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_end">6</property> + <property name="margin_top">6</property> + <property name="margin_bottom">12</property> + <property name="row_spacing">18</property> + <property name="column_spacing">24</property> + <child> + <object class="GtkBox" id="box16"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">start</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkBox" id="box17"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="pointing_secondary_click_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Simulated Secondary Click</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">pointing_secondary_click_switch</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="pointing_secondary_click_blurb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Trigger a secondary click by holding down the primary button</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box18"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">start</property> + <property name="margin_start">10</property> + <property name="margin_end">10</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkBox" id="pointing_secondary_click_delay_box"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">12</property> + <child> + <object class="GtkLabel" id="pointing_secondary_click_delay_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">A_cceptance delay:</property> + <property name="use_underline">True</property> + <property name="justify">center</property> + <property name="mnemonic_widget">pointing_secondary_click_delay_scale</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="hbox1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">6</property> + <child> + <object class="GtkLabel" id="pointing_secondary_click_delay_short_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">1</property> + <property name="label" translatable="yes" context="secondary click">Short</property> + <attributes> + <attribute name="scale" value="0.83"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkScale" id="pointing_secondary_click_delay_scale"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="adjustment">click_delay_adjustment</property> + <property name="draw_value">False</property> + <child internal-child="accessible"> + <object class="AtkObject" id="pointing_secondary_click_delay_scale-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes">Secondary click delay</property> + </object> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="pointing_secondary_click_delay_long_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes" context="secondary click delay">Long</property> + <attributes> + <attribute name="scale" value="0.83"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box19"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">start</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkBox" id="box20"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="pointing_hover_click_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Hover Click</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">pointing_hover_click_switch</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="pointing_hover_click_blurb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Trigger a click when the pointer hovers</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box21"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">start</property> + <property name="margin_start">10</property> + <property name="margin_end">10</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkBox" id="pointing_dwell_delay_box"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">12</property> + <child> + <object class="GtkLabel" id="pointing_dwell_delay_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">D_elay:</property> + <property name="use_underline">True</property> + <property name="justify">center</property> + <property name="mnemonic_widget">pointing_dwell_delay_scale</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="hbox2"> + <property name="visible">True</property> + <property name="can_focus">False</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> + <object class="GtkLabel" id="pointing_dwell_delay_short_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">1</property> + <property name="label" translatable="yes" context="dwell click delay">Short</property> + <property name="justify">center</property> + <attributes> + <attribute name="scale" value="0.83"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkScale" id="pointing_dwell_delay_scale"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="adjustment">dwell_time_adjustment</property> + <property name="draw_value">False</property> + <property name="value_pos">right</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="pointing_dwell_delay_long_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes" context="dwell click delay">Long</property> + <property name="justify">center</property> + <attributes> + <attribute name="scale" value="0.83"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="pointing_dwell_threshold_box"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">12</property> + <child> + <object class="GtkLabel" id="pointing_dwell_threshold_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Motion _threshold:</property> + <property name="use_underline">True</property> + <property name="justify">center</property> + <property name="mnemonic_widget">pointing_dwell_threshold_scale</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="hbox3"> + <property name="visible">True</property> + <property name="can_focus">False</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> + <object class="GtkLabel" id="pointing_dwell_threshold_small_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">1</property> + <property name="label" translatable="yes" context="dwell click threshold">Small</property> + <property name="justify">center</property> + <attributes> + <attribute name="scale" value="0.83"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkScale" id="pointing_dwell_threshold_scale"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="adjustment">dwell_threshold_adjustment</property> + <property name="digits">0</property> + <property name="draw_value">False</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="pointing_dwell_threshold_large_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes" context="dwell click threshold">Large</property> + <property name="justify">center</property> + <attributes> + <attribute name="scale" value="0.83"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSwitch" id="pointing_secondary_click_switch"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="halign">end</property> + <property name="valign">start</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSwitch" id="pointing_hover_click_switch"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="halign">end</property> + <property name="valign">start</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + <object class="GtkSizeGroup" id="sizegroup1"> + <widgets> + <widget name="pointing_secondary_click_delay_label"/> + <widget name="pointing_dwell_delay_label"/> + <widget name="pointing_dwell_threshold_label"/> + </widgets> + </object> +</interface> diff --git a/panels/universal-access/gnome-universal-access-panel.desktop.in.in b/panels/universal-access/gnome-universal-access-panel.desktop.in.in new file mode 100644 index 0000000..bfd99f1 --- /dev/null +++ b/panels/universal-access/gnome-universal-access-panel.desktop.in.in @@ -0,0 +1,18 @@ +[Desktop Entry] +Name=Accessibility +Comment=Make it easier to see, hear, type, point and click +Exec=gnome-control-center universal-access +# Translators: Do NOT translate or transliterate this text (this is an icon file name)! +Icon=preferences-desktop-accessibility +Terminal=false +Type=Application +NoDisplay=true +StartupNotify=true +Categories=GNOME;GTK;Settings;X-GNOME-Settings-Panel;X-GNOME-DetailsSettings; +OnlyShowIn=GNOME;Unity; +X-GNOME-Bugzilla-Bugzilla=GNOME +X-GNOME-Bugzilla-Product=gnome-control-center +X-GNOME-Bugzilla-Component=Universal Access +X-GNOME-Bugzilla-Version=@VERSION@ +# Translators: Search terms to find the Accessibility panel. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! +Keywords=Keyboard;Mouse;a11y;Accessibility;Universal Access;Contrast;Cursor;Sound;Zoom;Screen;Reader;big;high;large;text;font;size;AccessX;Sticky;Keys;Slow;Bounce;Mouse;Double;click;Delay;Speed;Assist;Repeat;Blink;visual;hearing;audio;typing; diff --git a/panels/universal-access/left_ptr_24px.png b/panels/universal-access/left_ptr_24px.png Binary files differnew file mode 100644 index 0000000..46f7760 --- /dev/null +++ b/panels/universal-access/left_ptr_24px.png diff --git a/panels/universal-access/left_ptr_32px.png b/panels/universal-access/left_ptr_32px.png Binary files differnew file mode 100644 index 0000000..5d9ba96 --- /dev/null +++ b/panels/universal-access/left_ptr_32px.png diff --git a/panels/universal-access/left_ptr_48px.png b/panels/universal-access/left_ptr_48px.png Binary files differnew file mode 100644 index 0000000..51b1dc2 --- /dev/null +++ b/panels/universal-access/left_ptr_48px.png diff --git a/panels/universal-access/left_ptr_64px.png b/panels/universal-access/left_ptr_64px.png Binary files differnew file mode 100644 index 0000000..4cf77a4 --- /dev/null +++ b/panels/universal-access/left_ptr_64px.png diff --git a/panels/universal-access/left_ptr_96px.png b/panels/universal-access/left_ptr_96px.png Binary files differnew file mode 100644 index 0000000..5897a7c --- /dev/null +++ b/panels/universal-access/left_ptr_96px.png diff --git a/panels/universal-access/meson.build b/panels/universal-access/meson.build new file mode 100644 index 0000000..fbc2581 --- /dev/null +++ b/panels/universal-access/meson.build @@ -0,0 +1,51 @@ +panels_list += cappletname +desktop = 'gnome-@0@-panel.desktop'.format(cappletname) + +desktop_in = configure_file( + input: desktop + '.in.in', + output: desktop + '.in', + configuration: desktop_conf +) + +i18n.merge_file( + desktop, + type: 'desktop', + input: desktop_in, + output: desktop, + po_dir: po_dir, + install: true, + install_dir: control_center_desktopdir +) + +sources = files( + 'cc-ua-panel.c', + 'zoom-options.c' +) + +resource_data = files( + 'cc-ua-panel.ui', + 'left_ptr_24px.png', + 'left_ptr_32px.png', + 'left_ptr_48px.png', + 'left_ptr_64px.png', + 'left_ptr_96px.png', + 'zoom-options.ui' +) + +sources += gnome.compile_resources( + 'cc-ua-resources', + cappletname + '.gresource.xml', + c_name: 'cc_' + cappletname.underscorify(), + dependencies: resource_data, + export: true +) + +deps = common_deps + [m_dep] + +panels_libs += static_library( + cappletname, + sources: sources, + include_directories: [ top_inc, common_inc ], + dependencies: deps, + c_args: cflags +) diff --git a/panels/universal-access/universal-access.gresource.xml b/panels/universal-access/universal-access.gresource.xml new file mode 100644 index 0000000..dde0edc --- /dev/null +++ b/panels/universal-access/universal-access.gresource.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<gresources> + <gresource prefix="/org/gnome/control-center/universal-access"> + <file preprocess="xml-stripblanks">cc-ua-panel.ui</file> + <file preprocess="xml-stripblanks">zoom-options.ui</file> + <file>left_ptr_24px.png</file> + <file>left_ptr_32px.png</file> + <file>left_ptr_48px.png</file> + <file>left_ptr_64px.png</file> + <file>left_ptr_96px.png</file> + </gresource> +</gresources> diff --git a/panels/universal-access/zoom-options.c b/panels/universal-access/zoom-options.c new file mode 100644 index 0000000..c7aee19 --- /dev/null +++ b/panels/universal-access/zoom-options.c @@ -0,0 +1,540 @@ +/* + * Copyright 2011 Inclusive Design Research Centre, OCAD University. + * + * 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.1 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 Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Author: Joseph Scheuhammer <clown@alum.mit.edu> + */ + +#include "zoom-options.h" +#include <gdk/gdk.h> +#include <glib/gi18n.h> +#include <string.h> + +#define POSITION_MODEL_VALUE_COLUMN 2 +#define FONT_SCALE 1.25 + +struct _ZoomOptions +{ + GtkDialog parent; + + GSettings *settings; + GSettings *application_settings; + + GtkWidget *screen_position_combobox; + GtkWidget *follow_mouse_radio; + GtkWidget *screen_part_radio; + GtkWidget *centered_radio; + GtkWidget *push_radio; + GtkWidget *proportional_radio; + GtkWidget *extend_beyond_checkbox; + GtkWidget *brightness_slider; + GtkWidget *contrast_slider; + GtkWidget *crosshair_picker_color_button; + GtkWidget *magnifier_factor_spin; + GtkWidget *seeing_zoom_switch; + GtkWidget *crosshair_thickness_scale; + GtkWidget *grayscale_slider; + GtkWidget *crosshair_clip_checkbox; + GtkWidget *crosshair_length_slider; + GtkWidget *crosshair_enabled_switcher; + GtkWidget *inverse_enabled_switch; +}; + +G_DEFINE_TYPE (ZoomOptions, zoom_options, GTK_TYPE_DIALOG); + +static gchar *brightness_keys[] = { + "brightness-red", + "brightness-green", + "brightness-blue", + NULL +}; + +static gchar *contrast_keys[] = { + "contrast-red", + "contrast-green", + "contrast-blue", + NULL +}; + +static void set_enable_screen_part_ui (ZoomOptions *self); +static void scale_label (GtkBin *toggle, PangoAttrList *attrs); +static void xhairs_length_add_marks (ZoomOptions *self, GtkScale *scale); +static void effects_slider_set_value (GtkRange *slider, GSettings *settings); +static void brightness_slider_notify_cb (ZoomOptions *self, const gchar *key); +static void contrast_slider_notify_cb (ZoomOptions *self, const gchar *key); +static void effects_slider_changed (ZoomOptions *self, GtkRange *slider); + +static void +mouse_tracking_radio_toggled_cb (ZoomOptions *self, GtkWidget *widget) +{ + if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) + return; + + if (widget == self->centered_radio) + g_settings_set_string (self->settings, "mouse-tracking", "centered"); + else if (widget == self->proportional_radio) + g_settings_set_string (self->settings, "mouse-tracking", "proportional"); + else if (widget == self->push_radio) + g_settings_set_string (self->settings, "mouse-tracking", "push"); +} + +static void +mouse_tracking_notify_cb (ZoomOptions *self) +{ + g_autofree gchar *tracking = NULL; + + tracking = g_settings_get_string (self->settings, "mouse-tracking"); + if (g_strcmp0 (tracking, "centered") == 0) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->centered_radio), TRUE); + else if (g_strcmp0 (tracking, "proportional") == 0) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->proportional_radio), TRUE); + else + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->push_radio), TRUE); +} + +static void +init_screen_part_section (ZoomOptions *self, PangoAttrList *pango_attrs) +{ + gboolean lens_mode; + + /* Scale the labels of the toggles */ + scale_label (GTK_BIN (self->follow_mouse_radio), pango_attrs); + scale_label (GTK_BIN (self->screen_part_radio), pango_attrs); + scale_label (GTK_BIN (self->centered_radio), pango_attrs); + scale_label (GTK_BIN (self->push_radio), pango_attrs); + scale_label (GTK_BIN (self->proportional_radio), pango_attrs); + scale_label (GTK_BIN (self->extend_beyond_checkbox), pango_attrs); + + lens_mode = g_settings_get_boolean (self->settings, "lens-mode"); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->follow_mouse_radio), lens_mode); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->screen_part_radio), !lens_mode); + + set_enable_screen_part_ui (self); + + g_settings_bind (self->settings, "lens-mode", + self->follow_mouse_radio, "active", + G_SETTINGS_BIND_DEFAULT); + + g_settings_bind (self->settings, "scroll-at-edges", + self->extend_beyond_checkbox, "active", + G_SETTINGS_BIND_DEFAULT); + + g_signal_connect_object (G_OBJECT (self->screen_part_radio), "toggled", + G_CALLBACK (set_enable_screen_part_ui), self, G_CONNECT_SWAPPED); + + mouse_tracking_notify_cb (self); + g_signal_connect_object (G_OBJECT (self->settings), "changed::mouse-tracking", + G_CALLBACK (mouse_tracking_notify_cb), self, G_CONNECT_SWAPPED); +} + +static void +set_enable_screen_part_ui (ZoomOptions *self) +{ + gboolean screen_part; + + /* If the "screen part" radio is not checked, then the "follow mouse" radio + * is checked (== lens mode). Set mouse tracking back to the default. + */ + screen_part = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (self->screen_part_radio)); + if (!screen_part) + { + g_settings_set_string (self->settings, + "mouse-tracking", "proportional"); + } + + gtk_widget_set_sensitive (self->centered_radio, screen_part); + gtk_widget_set_sensitive (self->push_radio, screen_part); + gtk_widget_set_sensitive (self->proportional_radio, screen_part); + gtk_widget_set_sensitive (self->extend_beyond_checkbox, screen_part); +} + +static void +scale_label (GtkBin *toggle, PangoAttrList *attrs) +{ + GtkWidget *label; + + label = gtk_bin_get_child (toggle); + gtk_label_set_attributes (GTK_LABEL (label), attrs); +} + +static void +screen_position_combo_changed_cb (ZoomOptions *self) +{ + g_autofree gchar *combo_value = NULL; + GtkTreeIter iter; + + gtk_combo_box_get_active_iter (GTK_COMBO_BOX (self->screen_position_combobox), &iter); + + gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (self->screen_position_combobox)), &iter, + POSITION_MODEL_VALUE_COLUMN, &combo_value, + -1); + + if (g_strcmp0 (combo_value, "")) + { + g_settings_set_string (self->settings, "screen-position", combo_value); + } +} + +static void +screen_position_notify_cb (ZoomOptions *self, + const gchar *key) +{ + g_autofree gchar *position = NULL; + GtkTreeIter iter; + GtkTreeModel *model; + GtkComboBox *combobox; + gboolean valid; + + position = g_settings_get_string (self->settings, key); + combobox = GTK_COMBO_BOX (self->screen_position_combobox); + model = gtk_combo_box_get_model (combobox); + + /* Find the matching screen position value in the combobox model. If nothing + * matches, leave the combobox as is. + */ + valid = gtk_tree_model_get_iter_first (model, &iter); + while (valid) + { + g_autofree gchar *combo_value = NULL; + + gtk_tree_model_get (model, &iter, + POSITION_MODEL_VALUE_COLUMN, &combo_value, + -1); + if (!g_strcmp0 (combo_value, position)) + { + g_signal_handlers_block_by_func (combobox, screen_position_combo_changed_cb, self); + gtk_combo_box_set_active_iter (combobox, &iter); + g_signal_handlers_unblock_by_func (combobox, screen_position_combo_changed_cb, self); + break; + } + + valid = gtk_tree_model_iter_next (model, &iter); + } +} + +static void +init_xhairs_color_opacity (GtkColorButton *color_button, GSettings *settings) +{ + g_autofree gchar *color_setting = NULL; + GdkRGBA rgba; + + color_setting = g_settings_get_string (settings, "cross-hairs-color"); + gdk_rgba_parse (&rgba, color_setting); + + rgba.alpha = g_settings_get_double (settings, "cross-hairs-opacity"); + gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (color_button), &rgba); +} + +static void +xhairs_color_notify_cb (ZoomOptions *self) +{ + init_xhairs_color_opacity (GTK_COLOR_BUTTON (self->crosshair_picker_color_button), self->settings); +} + +static void +xhairs_opacity_notify_cb (ZoomOptions *self, gchar *key) +{ + GdkRGBA rgba; + gdouble opacity; + + opacity = g_settings_get_double (self->settings, key); + gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (self->crosshair_picker_color_button), &rgba); + rgba.alpha = opacity * 65535; + gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (self->crosshair_picker_color_button), &rgba); +} + +#define TO_HEX(x) (int) ((gdouble) x * 255.0) +static void +xhairs_color_opacity_changed (ZoomOptions *self) +{ + GdkRGBA rgba; + g_autofree gchar *color_string = NULL; + + gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (self->crosshair_picker_color_button), &rgba); + color_string = g_strdup_printf ("#%02x%02x%02x", + TO_HEX(rgba.red), + TO_HEX(rgba.green), + TO_HEX(rgba.blue)); + + g_settings_set_string (self->settings, "cross-hairs-color", color_string); + + g_settings_set_double (self->settings, "cross-hairs-opacity", rgba.alpha); +} + +static void xhairs_length_add_marks (ZoomOptions *self, GtkScale *scale) +{ + GtkAdjustment *scale_model; + GdkRectangle rect; + GdkMonitor *monitor; + GdkDisplay *display; + GtkWindow *transient_for; + gint length, quarter_length; + + /* Get maximum dimension of the monitor */ + transient_for = gtk_window_get_transient_for (GTK_WINDOW (self)); + display = gtk_widget_get_display (GTK_WIDGET (transient_for)); + monitor = gdk_display_get_monitor_at_window (display, gtk_widget_get_window (GTK_WIDGET (transient_for))); + gdk_monitor_get_workarea (monitor, &rect); + + length = MAX (rect.width, rect.height); + scale_model = gtk_range_get_adjustment (GTK_RANGE (scale)); + + if (length < gtk_adjustment_get_upper (scale_model)) + gtk_adjustment_set_upper (scale_model, length); + + /* The crosshair is made up of four lines in pairs (top, bottom) and + (left, right). Stipulating: "quarter of the screen" means that the + length of one hair is 25% of the screen. */ + quarter_length = length / 4; + + gtk_scale_add_mark (scale, 0, GTK_POS_BOTTOM, C_("Distance", "Short")); + gtk_scale_add_mark (scale, quarter_length, GTK_POS_BOTTOM, C_("Distance", "¼ Screen")); + gtk_scale_add_mark (scale, quarter_length * 2 , GTK_POS_BOTTOM, C_("Distance", "½ Screen")); + gtk_scale_add_mark (scale, quarter_length * 3, GTK_POS_BOTTOM, C_("Distance", "¾ Screen")); + gtk_scale_add_mark (scale, length, GTK_POS_BOTTOM, C_("Distance", "Long")); +} + +static void +init_effects_slider (GtkRange *slider, + ZoomOptions *self, + gchar **keys, + GCallback notify_cb) +{ + gchar **key; + + g_object_set_data (G_OBJECT (slider), "settings-keys", keys); + effects_slider_set_value (slider, self->settings); + + for (key = keys; *key; key++) + { + g_autofree gchar *signal = g_strdup_printf ("changed::%s", *key); + g_signal_connect_object (G_OBJECT (self->settings), signal, notify_cb, self, G_CONNECT_SWAPPED); + } + g_signal_connect_object (G_OBJECT (slider), "value-changed", + G_CALLBACK (effects_slider_changed), + self, G_CONNECT_SWAPPED); + gtk_scale_add_mark (GTK_SCALE (slider), 0, GTK_POS_BOTTOM, NULL); +} + +static void +effects_slider_set_value (GtkRange *slider, GSettings *settings) +{ + gchar **keys; + gdouble red, green, blue; + gdouble value; + + keys = g_object_get_data (G_OBJECT (slider), "settings-keys"); + + red = g_settings_get_double (settings, keys[0]); + green = g_settings_get_double (settings, keys[1]); + blue = g_settings_get_double (settings, keys[2]); + + if (red == green && green == blue) + value = red; + else + /* use NTSC conversion weights for reasonable average */ + value = 0.299 * red + 0.587 * green + 0.114 * blue; + + gtk_range_set_value (slider, value); +} + +static void +brightness_slider_notify_cb (ZoomOptions *self, + const gchar *key) +{ + GtkRange *slider = GTK_RANGE (self->brightness_slider); + + g_signal_handlers_block_by_func (slider, effects_slider_changed, self); + effects_slider_set_value (slider, self->settings); + g_signal_handlers_unblock_by_func (slider, effects_slider_changed, self); +} + +static void +contrast_slider_notify_cb (ZoomOptions *self, + const gchar *key) +{ + GtkRange *slider = GTK_RANGE (self->contrast_slider); + + g_signal_handlers_block_by_func (slider, effects_slider_changed, self); + effects_slider_set_value (slider, self->settings); + g_signal_handlers_unblock_by_func (slider, effects_slider_changed, self); +} + +static void +effects_slider_changed (ZoomOptions *self, GtkRange *slider) +{ + gchar **keys, **key; + gdouble value; + + keys = g_object_get_data (G_OBJECT (slider), "settings-keys"); + value = gtk_range_get_value (slider); + + for (key = keys; *key; key++) + { + g_settings_set_double (self->settings, *key, value); + } +} + +static void +zoom_options_constructed (GObject *object) +{ + PangoAttribute *attr; + PangoAttrList *pango_attrs; + ZoomOptions *self; + + self = ZOOM_OPTIONS (object); + + G_OBJECT_CLASS (zoom_options_parent_class)->constructed (object); + + pango_attrs = pango_attr_list_new (); + attr = pango_attr_scale_new (FONT_SCALE); + pango_attr_list_insert (pango_attrs, attr); + + /* Zoom switch */ + g_settings_bind (self->application_settings, "screen-magnifier-enabled", + self->seeing_zoom_switch, "active", + G_SETTINGS_BIND_DEFAULT); + + /* Magnification factor */ + g_settings_bind (self->settings, "mag-factor", + gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (self->magnifier_factor_spin)), + "value", G_SETTINGS_BIND_DEFAULT); + + /* Screen position combo */ + screen_position_notify_cb (self, "screen-position"); + g_signal_connect_object (self->settings, "changed::screen-position", + G_CALLBACK (screen_position_notify_cb), self, G_CONNECT_SWAPPED); + g_signal_connect_object (self->screen_position_combobox, "changed", + G_CALLBACK (screen_position_combo_changed_cb), self, G_CONNECT_SWAPPED); + + /* Screen part section */ + init_screen_part_section (self, pango_attrs); + + /* Cross hairs: show/hide ... */ + g_settings_bind (self->settings, "show-cross-hairs", + self->crosshair_enabled_switcher, "active", + G_SETTINGS_BIND_DEFAULT); + + /* ... Cross hairs: color and opacity */ + init_xhairs_color_opacity (GTK_COLOR_BUTTON (self->crosshair_picker_color_button), self->settings); + g_signal_connect_object (self->settings, "changed::cross-hairs-color", + G_CALLBACK (xhairs_color_notify_cb), self, G_CONNECT_SWAPPED); + g_signal_connect_object (self->settings, "changed::cross-hairs-opacity", + G_CALLBACK (xhairs_opacity_notify_cb), self, G_CONNECT_SWAPPED); + g_signal_connect_object (self->crosshair_picker_color_button, "color-set", + G_CALLBACK (xhairs_color_opacity_changed), + self, G_CONNECT_SWAPPED); + + /* ... Cross hairs: thickness ... */ + g_settings_bind (self->settings, "cross-hairs-thickness", + gtk_range_get_adjustment (GTK_RANGE (self->crosshair_thickness_scale)), "value", + G_SETTINGS_BIND_DEFAULT); + + /* ... Cross hairs: clip ... */ + scale_label (GTK_BIN (self->crosshair_clip_checkbox), pango_attrs); + g_settings_bind (self->settings, "cross-hairs-clip", + self->crosshair_clip_checkbox, "active", + G_SETTINGS_BIND_INVERT_BOOLEAN); + + /* ... Cross hairs: length ... */ + xhairs_length_add_marks (self, GTK_SCALE (self->crosshair_length_slider)); + g_settings_bind (self->settings, "cross-hairs-length", + gtk_range_get_adjustment (GTK_RANGE (self->crosshair_length_slider)), "value", + G_SETTINGS_BIND_DEFAULT); + + /* ... Color effects ... */ + g_settings_bind (self->settings, "invert-lightness", self->inverse_enabled_switch, "active", + G_SETTINGS_BIND_DEFAULT); + + init_effects_slider (GTK_RANGE (self->brightness_slider), + self, + brightness_keys, + G_CALLBACK (brightness_slider_notify_cb)); + + init_effects_slider (GTK_RANGE (self->contrast_slider), + self, + contrast_keys, + G_CALLBACK (contrast_slider_notify_cb)); + + g_settings_bind (self->settings, "color-saturation", + gtk_range_get_adjustment (GTK_RANGE (self->grayscale_slider)), "value", + G_SETTINGS_BIND_DEFAULT); + gtk_scale_add_mark (GTK_SCALE(self->grayscale_slider), 1.0, GTK_POS_BOTTOM, NULL); + + pango_attr_list_unref (pango_attrs); +} + +static void +zoom_options_finalize (GObject *object) +{ + ZoomOptions *self = ZOOM_OPTIONS (object); + + g_clear_object (&self->settings); + g_clear_object (&self->application_settings); + + G_OBJECT_CLASS (zoom_options_parent_class)->finalize (object); +} + +static void +zoom_options_class_init (ZoomOptionsClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); + + object_class->finalize = zoom_options_finalize; + object_class->constructed = zoom_options_constructed; + + gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/universal-access/zoom-options.ui"); + + gtk_widget_class_bind_template_child (widget_class, ZoomOptions, brightness_slider); + gtk_widget_class_bind_template_child (widget_class, ZoomOptions, centered_radio); + gtk_widget_class_bind_template_child (widget_class, ZoomOptions, contrast_slider); + gtk_widget_class_bind_template_child (widget_class, ZoomOptions, crosshair_clip_checkbox); + gtk_widget_class_bind_template_child (widget_class, ZoomOptions, crosshair_enabled_switcher); + gtk_widget_class_bind_template_child (widget_class, ZoomOptions, crosshair_length_slider); + gtk_widget_class_bind_template_child (widget_class, ZoomOptions, crosshair_picker_color_button); + gtk_widget_class_bind_template_child (widget_class, ZoomOptions, crosshair_thickness_scale); + gtk_widget_class_bind_template_child (widget_class, ZoomOptions, extend_beyond_checkbox); + gtk_widget_class_bind_template_child (widget_class, ZoomOptions, follow_mouse_radio); + gtk_widget_class_bind_template_child (widget_class, ZoomOptions, grayscale_slider); + gtk_widget_class_bind_template_child (widget_class, ZoomOptions, inverse_enabled_switch); + gtk_widget_class_bind_template_child (widget_class, ZoomOptions, magnifier_factor_spin); + gtk_widget_class_bind_template_child (widget_class, ZoomOptions, proportional_radio); + gtk_widget_class_bind_template_child (widget_class, ZoomOptions, push_radio); + gtk_widget_class_bind_template_child (widget_class, ZoomOptions, screen_part_radio); + gtk_widget_class_bind_template_child (widget_class, ZoomOptions, screen_position_combobox); + gtk_widget_class_bind_template_child (widget_class, ZoomOptions, seeing_zoom_switch); + + gtk_widget_class_bind_template_callback (widget_class, mouse_tracking_radio_toggled_cb); +} + +static void +zoom_options_init (ZoomOptions *self) +{ + gtk_widget_init_template (GTK_WIDGET (self)); + + self->settings = g_settings_new ("org.gnome.desktop.a11y.magnifier"); + self->application_settings = g_settings_new ("org.gnome.desktop.a11y.applications"); +} + +ZoomOptions * +zoom_options_new (GtkWindow *parent) +{ + return g_object_new (ZOOM_TYPE_OPTIONS, + "transient-for", parent, + "use-header-bar", TRUE, + NULL); +} diff --git a/panels/universal-access/zoom-options.h b/panels/universal-access/zoom-options.h new file mode 100644 index 0000000..ea82b22 --- /dev/null +++ b/panels/universal-access/zoom-options.h @@ -0,0 +1,33 @@ +/* + * Copyright 2011 Inclusive Design Research Centre, OCAD University. + * + * 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.1 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 Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Author: Joseph Scheuhammer <clown@alum.mit.edu> + */ + +#pragma once + +#include <gtk/gtk.h> + +G_BEGIN_DECLS + +#define ZOOM_TYPE_OPTIONS (zoom_options_get_type()) + +G_DECLARE_FINAL_TYPE (ZoomOptions, zoom_options, ZOOM, OPTIONS, GtkDialog) + +ZoomOptions *zoom_options_new (GtkWindow *parent); + +G_END_DECLS diff --git a/panels/universal-access/zoom-options.ui b/panels/universal-access/zoom-options.ui new file mode 100644 index 0000000..cd19081 --- /dev/null +++ b/panels/universal-access/zoom-options.ui @@ -0,0 +1,1195 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkAdjustment" id="adjustment2"> + <property name="lower">100</property> + <property name="upper">4096</property> + <property name="value">4096</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + <property name="page_size">10</property> + </object> + <object class="GtkAdjustment" id="brightness"> + <property name="lower">-0.75</property> + <property name="upper">0.75</property> + <property name="step_increment">0.10000000000000001</property> + <property name="page_increment">0.10000000000000001</property> + </object> + <object class="GtkAdjustment" id="contrast"> + <property name="lower">-0.75</property> + <property name="upper">0.75</property> + <property name="step_increment">0.10000000000000001</property> + <property name="page_increment">0.10000000000000001</property> + </object> + <object class="GtkAdjustment" id="grayscale"> + <property name="upper">1</property> + <property name="value">1</property> + <property name="step_increment">0.10000000000000001</property> + <property name="page_increment">0.20000000000000001</property> + </object> + <object class="GtkAdjustment" id="magFactor"> + <property name="lower">1</property> + <property name="upper">20</property> + <property name="value">2</property> + <property name="step_increment">0.25</property> + <property name="page_increment">1</property> + </object> + <object class="GtkListStore" id="screen_position_model"> + <columns> + <!-- column-name positions --> + <column type="gchararray"/> + <!-- column-name text_scale --> + <column type="gfloat"/> + <!-- column-name setting_value --> + <column type="gchararray"/> + </columns> + <data> + <row> + <col id="0" translatable="yes">Full Screen</col> + <col id="1">1.25</col> + <col id="2">full-screen</col> + </row> + <row> + <col id="0" translatable="yes">Top Half</col> + <col id="1">1.25</col> + <col id="2">top-half</col> + </row> + <row> + <col id="0" translatable="yes">Bottom Half</col> + <col id="1">1.25</col> + <col id="2">bottom-half</col> + </row> + <row> + <col id="0" translatable="yes">Left Half</col> + <col id="1">1.25</col> + <col id="2">left-half</col> + </row> + <row> + <col id="0" translatable="yes">Right Half</col> + <col id="1">1.25</col> + <col id="2">right-half</col> + </row> + </data> + </object> + <template class="ZoomOptions" parent="GtkDialog"> + <property name="modal">True</property> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="title" translatable="yes">Zoom Options</property> + <property name="resizable">False</property> + <property name="type_hint">dialog</property> + <signal name="delete-event" handler="gtk_widget_hide_on_delete" object="ZoomOptions" swapped="no" /> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">3</property> + <child> + <object class="GtkBox" id="hbox4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">6</property> + <property name="margin_end">6</property> + <property name="margin_top">6</property> + <child> + <object class="GtkLabel" id="label6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">_Zoom</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">seeing_zoom_switch</property> + <attributes> + <attribute name="weight" value="bold"/> + <attribute name="scale" value="1.25"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box12"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkSwitch" id="seeing_zoom_switch"> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="use_action_appearance">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkNotebook" id="notebook1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="margin_start">6</property> + <property name="margin_end">6</property> + <property name="margin_top">6</property> + <property name="margin_bottom">6</property> + <child> + <object class="GtkBox" id="vbox4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">18</property> + <property name="margin_end">18</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="spacing">12</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkFrame" id="frame2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <placeholder/> + </child> + <child type="label"> + <object class="GtkBox" id="box5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkLabel" id="mag_factor_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="ypad">2</property> + <property name="label" translatable="yes">_Magnification:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">magnifier_factor_spin</property> + <attributes> + <attribute name="weight" value="bold"/> + <attribute name="scale" value="1.25"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="magnifier_factor_spin"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="halign">start</property> + <property name="invisible_char">●</property> + <property name="invisible_char_set">True</property> + <property name="adjustment">magFactor</property> + <property name="digits">2</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="padding">21</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="padding">4</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">24</property> + <child> + <object class="GtkBox" id="box3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkGrid" id="grid4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkRadioButton" id="follow_mouse_radio"> + <property name="label" translatable="yes">_Follow mouse cursor</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkRadioButton" id="screen_part_radio"> + <property name="label" translatable="yes">_Screen part:</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="draw_indicator">True</property> + <property name="group">follow_mouse_radio</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="screen_position_combobox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">screen_position_model</property> + <property name="active">0</property> + <child> + <object class="GtkCellRendererText" id="screen_position_renderer"/> + <attributes> + <attribute name="scale">1</attribute> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkAlignment" id="alignment6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">18</property> + <child> + <object class="GtkBox" id="box4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkCheckButton" id="extend_beyond_checkbox"> + <property name="label" translatable="yes">Magnifier _extends outside of screen</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="padding">2</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkRadioButton" id="centered_radio"> + <property name="label" translatable="yes">_Keep magnifier cursor centered</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <property name="use_underline">True</property> + <signal name="toggled" handler="mouse_tracking_radio_toggled_cb" object="ZoomOptions" swapped="yes"/> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkRadioButton" id="push_radio"> + <property name="label" translatable="yes">Magnifier cursor _pushes contents around</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <property name="group">centered_radio</property> + <property name="use_underline">True</property> + <signal name="toggled" handler="mouse_tracking_radio_toggled_cb" object="ZoomOptions" swapped="yes"/> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkRadioButton" id="proportional_radio"> + <property name="label" translatable="yes">Magnifier cursor moves with _contents</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <property name="group">centered_radio</property> + <property name="use_underline">True</property> + <signal name="toggled" handler="mouse_tracking_radio_toggled_cb" object="ZoomOptions" swapped="yes"/> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Magnifier Position:</property> + <attributes> + <attribute name="weight" value="bold"/> + <attribute name="scale" value="1.25"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="padding">4</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <child type="tab"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Magnifier</property> + </object> + <packing> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <object class="GtkBox" id="vbox1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">18</property> + <property name="margin_end">24</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="spacing">12</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkFrame" id="frame3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">8</property> + <property name="left_padding">16</property> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <placeholder/> + </child> + <child> + <object class="GtkGrid" id="grid2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">16</property> + <child> + <object class="GtkLabel" id="label9"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Thickness:</property> + <property name="justify">center</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">crosshair_thickness_scale</property> + <property name="width_chars">12</property> + <attributes> + <attribute name="scale" value="1.25"/> + </attributes> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkBox" id="hbox7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">3</property> + <child> + <object class="GtkLabel" id="xhairs_thickness_thin_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">1</property> + <property name="label" translatable="yes" context="universal access, thickness">Thin</property> + <property name="justify">center</property> + <attributes> + <attribute name="scale" value="1.25"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkScale" id="crosshair_thickness_scale"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="adjustment">xHairsThickness</property> + <property name="hexpand">True</property> + <property name="draw_value">False</property> + <property name="value_pos">right</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="xhairs_thickness_thick_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes" context="universal access, thickness">Thick</property> + <property name="justify">center</property> + <attributes> + <attribute name="scale" value="1.25"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">8</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Length:</property> + <property name="justify">center</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">crosshair_length_slider</property> + <property name="width_chars">12</property> + <attributes> + <attribute name="scale" value="1.25"/> + </attributes> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkBox" id="hbox6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">3</property> + <child> + <object class="GtkScale" id="crosshair_length_slider"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="adjustment">xhairsLength</property> + <property name="hexpand">True</property> + <property name="draw_value">False</property> + <property name="value_pos">right</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes" comments="The color of the accessibility crosshair">Co_lor:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">crosshair_picker_color_button</property> + <attributes> + <attribute name="scale" value="1.25"/> + </attributes> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">3</property> + <child> + <object class="GtkColorButton" id="crosshair_picker_color_button"> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> + <property name="yalign">0</property> + <property name="use_alpha">True</property> + <property name="color">#ffff00000000</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkBox" id="box2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">12</property> + <child> + <object class="GtkLabel" id="xhairs-section-heading"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">_Crosshairs:</property> + <property name="use_markup">True</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">crosshair_enabled_switcher</property> + <attributes> + <attribute name="weight" value="bold"/> + <attribute name="scale" value="1.25"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">12</property> + <child> + <placeholder/> + </child> + <child> + <object class="GtkSwitch" id="crosshair_enabled_switcher"> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="use_action_appearance">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="crosshair_clip_checkbox"> + <property name="label" translatable="yes">_Overlaps mouse cursor</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="halign">start</property> + <property name="margin_start">100</property> + <property name="hexpand">True</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">4</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="position">1</property> + </packing> + </child> + <child type="tab"> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Crosshairs</property> + </object> + <packing> + <property name="position">1</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <object class="GtkBox" id="vbox2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_start">18</property> + <property name="margin_end">24</property> + <property name="margin_top">12</property> + <property name="margin_bottom">12</property> + <property name="spacing">12</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkFrame" id="frame1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">8</property> + <property name="left_padding">16</property> + <child> + <object class="GtkBox" id="box8"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <placeholder/> + </child> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">16</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkLabel" id="inverse_lightness_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_White on black:</property> + <property name="justify">right</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">inverse_enabled_switch</property> + <attributes> + <attribute name="scale" value="1.25"/> + </attributes> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="brightness_slider_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Brightness:</property> + <property name="justify">right</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">brightness_slider</property> + <property name="width_chars">12</property> + <attributes> + <attribute name="scale" value="1.25"/> + </attributes> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="contrast_slider_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Contrast:</property> + <property name="justify">right</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">contrast_slider</property> + <attributes> + <attribute name="scale" value="1.25"/> + </attributes> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="gray_scale_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes" context="universal access, contrast" comments="The contrast scale goes from Color to None (grayscale)">Co_lor</property> + <property name="justify">right</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">grayscale_slider</property> + <attributes> + <attribute name="scale" value="1.25"/> + </attributes> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">3</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkBox" id="hbox3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">3</property> + <child> + <object class="GtkLabel" id="grayscale_gray_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">1</property> + <property name="label" translatable="yes" context="universal access, color">None</property> + <property name="justify">center</property> + <attributes> + <attribute name="scale" value="1.25"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkScale" id="grayscale_slider"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="adjustment">grayscale</property> + <property name="hexpand">True</property> + <property name="draw_value">False</property> + <property name="value_pos">right</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="grayscale_color_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes" context="universal access, color">Full</property> + <property name="justify">center</property> + <attributes> + <attribute name="scale" value="1.25"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">8</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">3</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box10"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">12</property> + <child> + <placeholder/> + </child> + <child> + <object class="GtkSwitch" id="inverse_enabled_switch"> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="use_action_appearance">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkBox" id="hbox1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">3</property> + <child> + <object class="GtkLabel" id="brightness_low_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">1</property> + <property name="label" translatable="yes" context="universal access, brightness">Low</property> + <property name="justify">center</property> + <attributes> + <attribute name="scale" value="1.25"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkScale" id="brightness_slider"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="adjustment">brightness</property> + <property name="hexpand">True</property> + <property name="lower_stepper_sensitivity">on</property> + <property name="draw_value">False</property> + <property name="value_pos">left</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="brightness_high_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes" context="universal access, brightness">High</property> + <property name="justify">center</property> + <attributes> + <attribute name="scale" value="1.25"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">8</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkBox" id="hbox2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">3</property> + <child> + <object class="GtkLabel" id="contrast_low_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">1</property> + <property name="label" translatable="yes" context="universal access, contrast">Low</property> + <property name="justify">center</property> + <attributes> + <attribute name="scale" value="1.25"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkScale" id="contrast_slider"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="adjustment">contrast</property> + <property name="lower_stepper_sensitivity">on</property> + <property name="hexpand">True</property> + <property name="draw_value">False</property> + <property name="value_pos">left</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="contrast_hi_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes" context="universal access, contrast">High</property> + <property name="justify">center</property> + <attributes> + <attribute name="scale" value="1.25"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">8</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="effects-section-heading"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Color Effects:</property> + <property name="use_markup">True</property> + <attributes> + <attribute name="weight" value="bold"/> + <attribute name="scale" value="1.25"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">4</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="position">2</property> + </packing> + </child> + <child type="tab"> + <object class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Color Effects</property> + </object> + <packing> + <property name="position">2</property> + <property name="tab_fill">False</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + </child> + </template> + <object class="GtkAdjustment" id="xHairsThickness"> + <property name="lower">1</property> + <property name="upper">100</property> + <property name="value">8</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkAdjustment" id="xhairsLength"> + <property name="lower">20</property> + <property name="upper">4096</property> + <property name="value">4096</property> + <property name="step_increment">1</property> + <property name="page_increment">100</property> + </object> +</interface> |