[gnome-control-center] universal-access: Split typing dialog into its own widget
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] universal-access: Split typing dialog into its own widget
- Date: Wed, 11 Nov 2020 20:06:45 +0000 (UTC)
commit 0bd133489dca6e9d63fbf93af6aa54b62f39e4ec
Author: Robert Ancell <robert ancell canonical com>
Date: Tue Nov 3 09:21:43 2020 +1300
universal-access: Split typing dialog into its own widget
panels/universal-access/cc-typing-dialog.c | 185 ++++++
panels/universal-access/cc-typing-dialog.h | 29 +
panels/universal-access/cc-typing-dialog.ui | 492 ++++++++++++++++
panels/universal-access/cc-ua-panel.c | 114 +---
panels/universal-access/cc-ua-panel.ui | 651 ---------------------
panels/universal-access/meson.build | 2 +
.../universal-access.gresource.xml | 1 +
po/POTFILES.in | 1 +
8 files changed, 712 insertions(+), 763 deletions(-)
---
diff --git a/panels/universal-access/cc-typing-dialog.c b/panels/universal-access/cc-typing-dialog.c
new file mode 100644
index 000000000..35004d4fc
--- /dev/null
+++ b/panels/universal-access/cc-typing-dialog.c
@@ -0,0 +1,185 @@
+/*
+ * Copyright 2020 Canonical Ltd.
+ *
+ * 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
+ */
+
+#include "cc-typing-dialog.h"
+
+#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"
+
+struct _CcTypingDialog
+{
+ GtkDialog parent;
+
+ GtkCheckButton *bouncekeys_beep_rejected_check;
+ GtkBox *bouncekeys_delay_box;
+ GtkScale *bouncekeys_delay_scale;
+ GtkSwitch *bouncekeys_switch;
+ GtkSwitch *keyboard_toggle_switch;
+ GtkCheckButton *slowkeys_beep_accepted_check;
+ GtkCheckButton *slowkeys_beep_pressed_check;
+ GtkCheckButton *slowkeys_beep_rejected_check;
+ GtkBox *slowkeys_delay_box;
+ GtkScale *slowkeys_delay_scale;
+ GtkSwitch *slowkeys_switch;
+ GtkCheckButton *stickykeys_beep_modifier_check;
+ GtkCheckButton *stickykeys_disable_two_keys_check;
+ GtkSwitch *stickykeys_switch;
+
+ GSettings *keyboard_settings;
+};
+
+G_DEFINE_TYPE (CcTypingDialog, cc_typing_dialog, GTK_TYPE_DIALOG);
+
+static void
+cc_typing_dialog_dispose (GObject *object)
+{
+ CcTypingDialog *self = CC_TYPING_DIALOG (object);
+
+ g_clear_object (&self->keyboard_settings);
+
+ G_OBJECT_CLASS (cc_typing_dialog_parent_class)->dispose (object);
+}
+
+static void
+cc_typing_dialog_class_init (CcTypingDialogClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+
+ object_class->dispose = cc_typing_dialog_dispose;
+
+ gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/control-center/universal-access/cc-typing-dialog.ui");
+
+ gtk_widget_class_bind_template_child (widget_class, CcTypingDialog, bouncekeys_beep_rejected_check);
+ gtk_widget_class_bind_template_child (widget_class, CcTypingDialog, bouncekeys_delay_box);
+ gtk_widget_class_bind_template_child (widget_class, CcTypingDialog, bouncekeys_delay_scale);
+ gtk_widget_class_bind_template_child (widget_class, CcTypingDialog, bouncekeys_switch);
+ gtk_widget_class_bind_template_child (widget_class, CcTypingDialog, keyboard_toggle_switch);
+ gtk_widget_class_bind_template_child (widget_class, CcTypingDialog, slowkeys_beep_accepted_check);
+ gtk_widget_class_bind_template_child (widget_class, CcTypingDialog, slowkeys_beep_pressed_check);
+ gtk_widget_class_bind_template_child (widget_class, CcTypingDialog, slowkeys_beep_rejected_check);
+ gtk_widget_class_bind_template_child (widget_class, CcTypingDialog, slowkeys_delay_box);
+ gtk_widget_class_bind_template_child (widget_class, CcTypingDialog, slowkeys_delay_scale);
+ gtk_widget_class_bind_template_child (widget_class, CcTypingDialog, slowkeys_switch);
+ gtk_widget_class_bind_template_child (widget_class, CcTypingDialog, stickykeys_beep_modifier_check);
+ gtk_widget_class_bind_template_child (widget_class, CcTypingDialog, stickykeys_disable_two_keys_check);
+ gtk_widget_class_bind_template_child (widget_class, CcTypingDialog, stickykeys_switch);
+}
+
+static void
+cc_typing_dialog_init (CcTypingDialog *self)
+{
+ gtk_widget_init_template (GTK_WIDGET (self));
+
+ self->keyboard_settings = g_settings_new (KEYBOARD_SETTINGS);
+
+ /* enable shortcuts */
+ g_settings_bind (self->keyboard_settings, KEY_KEYBOARD_TOGGLE,
+ self->keyboard_toggle_switch, "active",
+ G_SETTINGS_BIND_DEFAULT);
+
+ /* sticky keys */
+ g_settings_bind (self->keyboard_settings, KEY_STICKYKEYS_ENABLED,
+ self->stickykeys_switch, "active",
+ G_SETTINGS_BIND_DEFAULT);
+
+ g_settings_bind (self->keyboard_settings, KEY_STICKYKEYS_TWO_KEY_OFF,
+ self->stickykeys_disable_two_keys_check, "active",
+ G_SETTINGS_BIND_NO_SENSITIVITY);
+ g_object_bind_property (self->stickykeys_switch, "active",
+ self->stickykeys_disable_two_keys_check, "sensitive",
+ G_BINDING_SYNC_CREATE);
+
+ g_settings_bind (self->keyboard_settings, KEY_STICKYKEYS_MODIFIER_BEEP,
+ self->stickykeys_beep_modifier_check, "active",
+ G_SETTINGS_BIND_NO_SENSITIVITY);
+ g_object_bind_property (self->stickykeys_switch, "active",
+ self->stickykeys_beep_modifier_check, "sensitive",
+ G_BINDING_SYNC_CREATE);
+
+ /* slow keys */
+ g_settings_bind (self->keyboard_settings, KEY_SLOWKEYS_ENABLED,
+ self->slowkeys_switch, "active",
+ G_SETTINGS_BIND_DEFAULT);
+
+ g_settings_bind (self->keyboard_settings, KEY_SLOWKEYS_DELAY,
+ gtk_range_get_adjustment (GTK_RANGE (self->slowkeys_delay_scale)), "value",
+ G_SETTINGS_BIND_DEFAULT);
+ g_object_bind_property (self->slowkeys_switch, "active",
+ self->slowkeys_delay_box, "sensitive",
+ G_BINDING_SYNC_CREATE);
+
+ g_settings_bind (self->keyboard_settings, KEY_SLOWKEYS_BEEP_PRESS,
+ self->slowkeys_beep_pressed_check, "active",
+ G_SETTINGS_BIND_DEFAULT);
+ g_object_bind_property (self->slowkeys_switch, "active",
+ self->slowkeys_beep_pressed_check, "sensitive",
+ G_BINDING_SYNC_CREATE);
+
+ g_settings_bind (self->keyboard_settings, KEY_SLOWKEYS_BEEP_ACCEPT,
+ self->slowkeys_beep_accepted_check, "active",
+ G_SETTINGS_BIND_DEFAULT);
+ g_object_bind_property (self->slowkeys_switch, "active",
+ self->slowkeys_beep_accepted_check, "sensitive",
+ G_BINDING_SYNC_CREATE);
+
+ g_settings_bind (self->keyboard_settings, KEY_SLOWKEYS_BEEP_REJECT,
+ self->slowkeys_beep_rejected_check, "active",
+ G_SETTINGS_BIND_DEFAULT);
+ g_object_bind_property (self->slowkeys_switch, "active",
+ self->slowkeys_beep_rejected_check, "sensitive",
+ G_BINDING_SYNC_CREATE);
+
+ /* bounce keys */
+ g_settings_bind (self->keyboard_settings, KEY_BOUNCEKEYS_ENABLED,
+ self->bouncekeys_switch, "active",
+ G_SETTINGS_BIND_DEFAULT);
+
+ g_settings_bind (self->keyboard_settings, KEY_BOUNCEKEYS_DELAY,
+ gtk_range_get_adjustment (GTK_RANGE (self->bouncekeys_delay_scale)), "value",
+ G_SETTINGS_BIND_DEFAULT);
+ g_object_bind_property (self->bouncekeys_switch, "active",
+ self->bouncekeys_delay_box, "sensitive",
+ G_BINDING_SYNC_CREATE);
+
+ g_settings_bind (self->keyboard_settings, KEY_BOUNCEKEYS_BEEP_REJECT,
+ self->bouncekeys_beep_rejected_check, "active",
+ G_SETTINGS_BIND_NO_SENSITIVITY);
+ g_object_bind_property (self->bouncekeys_switch, "active",
+ self->bouncekeys_beep_rejected_check, "sensitive",
+ G_BINDING_SYNC_CREATE);
+}
+
+CcTypingDialog *
+cc_typing_dialog_new (void)
+{
+ return g_object_new (cc_typing_dialog_get_type (),
+ "use-header-bar", TRUE,
+ NULL);
+}
diff --git a/panels/universal-access/cc-typing-dialog.h b/panels/universal-access/cc-typing-dialog.h
new file mode 100644
index 000000000..dfe0498ed
--- /dev/null
+++ b/panels/universal-access/cc-typing-dialog.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2020 Canonical Ltd.
+ *
+ * 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
+ */
+
+#pragma once
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+G_DECLARE_FINAL_TYPE (CcTypingDialog, cc_typing_dialog, CC, TYPING_DIALOG, GtkDialog)
+
+CcTypingDialog *cc_typing_dialog_new (void);
+
+G_END_DECLS
diff --git a/panels/universal-access/cc-typing-dialog.ui b/panels/universal-access/cc-typing-dialog.ui
new file mode 100644
index 000000000..a05e70db3
--- /dev/null
+++ b/panels/universal-access/cc-typing-dialog.ui
@@ -0,0 +1,492 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <template class="CcTypingDialog" parent="GtkDialog">
+ <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">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkGrid">
+ <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">
+ <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">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel">
+ <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">stickykeys_switch</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <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>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <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="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>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="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>
+ </child>
+ </object>
+ </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">
+ <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">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel">
+ <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">slowkeys_switch</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <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>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <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="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">
+ <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">slowkeys_delay_scale</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel">
+ <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>
+ </child>
+ <child>
+ <object class="GtkScale" id="slowkeys_delay_scale">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">slowkeys_delay_adjustment</property>
+ <property name="draw_value">False</property>
+ <property name="hexpand">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject">
+ <property name="AtkObject::accessible-description"
translatable="yes">Slow keys typing delay</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <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>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="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>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="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>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="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>
+ </child>
+ </object>
+ </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">
+ <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">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel">
+ <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">bouncekeys_switch</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <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>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <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="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">
+ <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">bouncekeys_delay_scale</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel">
+ <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>
+ </child>
+ <child>
+ <object class="GtkScale" id="bouncekeys_delay_scale">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">bouncekeys_delay_adjustment</property>
+ <property name="draw_value">False</property>
+ <property name="hexpand">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject">
+ <property name="AtkObject::accessible-description"
translatable="yes">Bounce keys typing delay</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <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>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="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>
+ </child>
+ </object>
+ </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="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="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="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">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel">
+ <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">keyboard_toggle_switch</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <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>
+ </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="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>
+ </child>
+ </object>
+ </child>
+ </template>
+ <object class="GtkAdjustment" id="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="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>
+</interface>
diff --git a/panels/universal-access/cc-ua-panel.c b/panels/universal-access/cc-ua-panel.c
index 8604d03e3..29bc11d65 100644
--- a/panels/universal-access/cc-ua-panel.c
+++ b/panels/universal-access/cc-ua-panel.c
@@ -35,6 +35,7 @@
#include "cc-repeat-keys-dialog.h"
#include "cc-sound-keys-dialog.h"
#include "cc-screen-reader-dialog.h"
+#include "cc-typing-dialog.h"
#include "cc-visual-alerts-dialog.h"
#include "cc-zoom-options-dialog.h"
@@ -138,21 +139,6 @@ struct _CcUaPanel
GtkWidget *screen_keyboard_switch;
GtkWidget *section_status;
GtkWidget *switch_status;
- GtkWidget *typing_bouncekeys_beep_rejected_check;
- GtkWidget *typing_bouncekeys_delay_box;
- GtkWidget *typing_bouncekeys_delay_scale;
- GtkWidget *typing_bouncekeys_switch;
- GtkDialog *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;
@@ -256,21 +242,6 @@ cc_ua_panel_class_init (CcUaPanelClass *klass)
gtk_widget_class_bind_template_child (widget_class, CcUaPanel, screen_keyboard_switch);
gtk_widget_class_bind_template_child (widget_class, CcUaPanel, section_status);
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);
@@ -563,7 +534,7 @@ activate_row (CcUaPanel *self, GtkListBoxRow *row)
}
else if (row == self->row_accessx)
{
- show_dialog (self, self->typing_dialog);
+ run_dialog (self, GTK_DIALOG (cc_typing_dialog_new ()));
}
else if (row == self->row_click_assist)
{
@@ -688,8 +659,6 @@ static void
cc_ua_panel_init_keyboard (CcUaPanel *self)
{
GtkWidget *list;
- GtkWidget *w;
- GtkWidget *sw;
list = self->list_typing;
add_section (list, self);
@@ -718,85 +687,6 @@ cc_ua_panel_init_keyboard (CcUaPanel *self)
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_signal_connect (self->typing_dialog, "delete-event",
- G_CALLBACK (gtk_widget_hide_on_delete), NULL);
}
/* mouse/pointing & clicking section */
diff --git a/panels/universal-access/cc-ua-panel.ui b/panels/universal-access/cc-ua-panel.ui
index 930b16cc1..5f04e7ce0 100644
--- a/panels/universal-access/cc-ua-panel.ui
+++ b/panels/universal-access/cc-ua-panel.ui
@@ -1039,657 +1039,6 @@
<widget name="row_click_assist"/>
</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="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>
diff --git a/panels/universal-access/meson.build b/panels/universal-access/meson.build
index 39ce97929..a0f6f84c4 100644
--- a/panels/universal-access/meson.build
+++ b/panels/universal-access/meson.build
@@ -23,6 +23,7 @@ sources = files(
'cc-repeat-keys-dialog.c',
'cc-sound-keys-dialog.c',
'cc-screen-reader-dialog.c',
+ 'cc-typing-dialog.c',
'cc-ua-panel.c',
'cc-visual-alerts-dialog.c',
'cc-zoom-options-dialog.c'
@@ -40,6 +41,7 @@ resource_data = files(
'cc-repeat-keys-dialog.ui',
'cc-sound-keys-dialog.ui',
'cc-screen-reader-dialog.ui',
+ 'cc-typing-dialog.ui',
'cc-visual-alerts-dialog.ui',
'cc-zoom-options-dialog.ui'
)
diff --git a/panels/universal-access/universal-access.gresource.xml
b/panels/universal-access/universal-access.gresource.xml
index 1ec2e9213..cf771105a 100644
--- a/panels/universal-access/universal-access.gresource.xml
+++ b/panels/universal-access/universal-access.gresource.xml
@@ -6,6 +6,7 @@
<file preprocess="xml-stripblanks">cc-repeat-keys-dialog.ui</file>
<file preprocess="xml-stripblanks">cc-sound-keys-dialog.ui</file>
<file preprocess="xml-stripblanks">cc-screen-reader-dialog.ui</file>
+ <file preprocess="xml-stripblanks">cc-typing-dialog.ui</file>
<file preprocess="xml-stripblanks">cc-ua-panel.ui</file>
<file preprocess="xml-stripblanks">cc-visual-alerts-dialog.ui</file>
<file preprocess="xml-stripblanks">cc-zoom-options-dialog.ui</file>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index b8c4b7edf..aa6f3f1f0 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -220,6 +220,7 @@ panels/universal-access/cc-cursor-size-dialog.ui
panels/universal-access/cc-repeat-keys-dialog.ui
panels/universal-access/cc-sound-keys-dialog.ui
panels/universal-access/cc-screen-reader-dialog.ui
+panels/universal-access/cc-typing-dialog.ui
panels/universal-access/cc-ua-panel.c
panels/universal-access/cc-ua-panel.ui
panels/universal-access/cc-visual-alerts-dialog.ui
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]