[gnome-control-center] universal-access: Split repeat keys 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 repeat keys dialog into its own widget
- Date: Wed, 11 Nov 2020 20:06:45 +0000 (UTC)
commit 31102bd256648208210756baf2f3c51637256eec
Author: Robert Ancell <robert ancell canonical com>
Date: Mon Nov 2 17:17:42 2020 +1300
universal-access: Split repeat keys dialog into its own widget
panels/universal-access/cc-repeat-keys-dialog.c | 108 +++++++++
panels/universal-access/cc-repeat-keys-dialog.h | 29 +++
panels/universal-access/cc-repeat-keys-dialog.ui | 216 ++++++++++++++++++
panels/universal-access/cc-ua-panel.c | 35 +--
panels/universal-access/cc-ua-panel.ui | 247 ---------------------
panels/universal-access/meson.build | 2 +
.../universal-access.gresource.xml | 1 +
po/POTFILES.in | 1 +
8 files changed, 359 insertions(+), 280 deletions(-)
---
diff --git a/panels/universal-access/cc-repeat-keys-dialog.c b/panels/universal-access/cc-repeat-keys-dialog.c
new file mode 100644
index 000000000..4a653997b
--- /dev/null
+++ b/panels/universal-access/cc-repeat-keys-dialog.c
@@ -0,0 +1,108 @@
+/*
+ * 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-repeat-keys-dialog.h"
+
+#define KEYBOARD_SETTINGS "org.gnome.desktop.peripherals.keyboard"
+#define KEY_REPEAT_KEYS "repeat"
+#define KEY_DELAY "delay"
+#define KEY_REPEAT_INTERVAL "repeat-interval"
+
+struct _CcRepeatKeysDialog
+{
+ GtkDialog parent;
+
+ GtkSwitch *enable_switch;
+ GtkGrid *delay_grid;
+ GtkScale *delay_scale;
+ GtkGrid *speed_grid;
+ GtkScale *speed_scale;
+
+ GSettings *keyboard_settings;
+};
+
+G_DEFINE_TYPE (CcRepeatKeysDialog, cc_repeat_keys_dialog, GTK_TYPE_DIALOG);
+
+static void
+on_repeat_keys_toggled (CcRepeatKeysDialog *self)
+{
+ gboolean on;
+
+ on = g_settings_get_boolean (self->keyboard_settings, KEY_REPEAT_KEYS);
+
+ gtk_widget_set_sensitive (GTK_WIDGET (self->delay_grid), on);
+ gtk_widget_set_sensitive (GTK_WIDGET (self->speed_grid), on);
+}
+
+static void
+cc_repeat_keys_dialog_dispose (GObject *object)
+{
+ CcRepeatKeysDialog *self = CC_REPEAT_KEYS_DIALOG (object);
+
+ g_clear_object (&self->keyboard_settings);
+
+ G_OBJECT_CLASS (cc_repeat_keys_dialog_parent_class)->dispose (object);
+}
+
+static void
+cc_repeat_keys_dialog_class_init (CcRepeatKeysDialogClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+
+ object_class->dispose = cc_repeat_keys_dialog_dispose;
+
+ gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/control-center/universal-access/cc-repeat-keys-dialog.ui");
+
+ gtk_widget_class_bind_template_child (widget_class, CcRepeatKeysDialog, enable_switch);
+ gtk_widget_class_bind_template_child (widget_class, CcRepeatKeysDialog, delay_grid);
+ gtk_widget_class_bind_template_child (widget_class, CcRepeatKeysDialog, delay_scale);
+ gtk_widget_class_bind_template_child (widget_class, CcRepeatKeysDialog, speed_grid);
+ gtk_widget_class_bind_template_child (widget_class, CcRepeatKeysDialog, speed_scale);
+}
+
+static void
+cc_repeat_keys_dialog_init (CcRepeatKeysDialog *self)
+{
+ gtk_widget_init_template (GTK_WIDGET (self));
+
+ self->keyboard_settings = g_settings_new (KEYBOARD_SETTINGS);
+
+ g_signal_connect_object (self->keyboard_settings, "changed",
+ G_CALLBACK (on_repeat_keys_toggled), self, G_CONNECT_SWAPPED);
+ on_repeat_keys_toggled (self);
+
+ g_settings_bind (self->keyboard_settings, KEY_REPEAT_KEYS,
+ self->enable_switch, "active",
+ G_SETTINGS_BIND_DEFAULT);
+
+ g_settings_bind (self->keyboard_settings, KEY_DELAY,
+ gtk_range_get_adjustment (GTK_RANGE (self->delay_scale)), "value",
+ G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (self->keyboard_settings, KEY_REPEAT_INTERVAL,
+ gtk_range_get_adjustment (GTK_RANGE (self->speed_scale)), "value",
+ G_SETTINGS_BIND_DEFAULT);
+}
+
+CcRepeatKeysDialog *
+cc_repeat_keys_dialog_new (void)
+{
+ return g_object_new (cc_repeat_keys_dialog_get_type (),
+ "use-header-bar", TRUE,
+ NULL);
+}
diff --git a/panels/universal-access/cc-repeat-keys-dialog.h b/panels/universal-access/cc-repeat-keys-dialog.h
new file mode 100644
index 000000000..ebc1a7693
--- /dev/null
+++ b/panels/universal-access/cc-repeat-keys-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 (CcRepeatKeysDialog, cc_repeat_keys_dialog, CC, REPEAT_KEYS_DIALOG, GtkDialog)
+
+CcRepeatKeysDialog *cc_repeat_keys_dialog_new (void);
+
+G_END_DECLS
diff --git a/panels/universal-access/cc-repeat-keys-dialog.ui
b/panels/universal-access/cc-repeat-keys-dialog.ui
new file mode 100644
index 000000000..cf44651a2
--- /dev/null
+++ b/panels/universal-access/cc-repeat-keys-dialog.ui
@@ -0,0 +1,216 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <template class="CcRepeatKeysDialog" parent="GtkDialog">
+ <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">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkSwitch" id="enable_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">
+ <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">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>
+ </child>
+ <child>
+ <object class="GtkGrid" id="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">
+ <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" id="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">delay_scale</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </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="GtkScale" id="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">
+ <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>
+ </child>
+ <child>
+ <object class="GtkGrid" id="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">
+ <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" id="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">speed_scale</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </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="GtkScale" id="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">
+ <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>
+ </child>
+ </object>
+ </child>
+ </template>
+ <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="GtkSizeGroup">
+ <widgets>
+ <widget name="delay_label"/>
+ <widget name="speed_label"/>
+ </widgets>
+ </object>
+ <object class="GtkSizeGroup">
+ <widgets>
+ <widget name="delay_scale"/>
+ <widget name="speed_scale"/>
+ </widgets>
+ </object>
+</interface>
diff --git a/panels/universal-access/cc-ua-panel.c b/panels/universal-access/cc-ua-panel.c
index 49dfa1e4b..316408664 100644
--- a/panels/universal-access/cc-ua-panel.c
+++ b/panels/universal-access/cc-ua-panel.c
@@ -31,6 +31,7 @@
#include "cc-ua-panel.h"
#include "cc-ua-resources.h"
#include "cc-cursor-size-dialog.h"
+#include "cc-repeat-keys-dialog.h"
#include "cc-sound-keys-dialog.h"
#include "cc-screen-reader-dialog.h"
#include "cc-visual-alerts-dialog.h"
@@ -122,12 +123,6 @@ struct _CcUaPanel
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;
- GtkDialog *repeat_keys_dialog;
- GtkWidget *repeat_keys_speed_grid;
- GtkWidget *repeat_keys_speed_scale;
- GtkWidget *repeat_keys_switch;
GtkListBoxRow *row_accessx;
GtkListBoxRow *row_click_assist;
GtkListBoxRow *row_cursor_blinking;
@@ -253,12 +248,6 @@ cc_ua_panel_class_init (CcUaPanelClass *klass)
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);
@@ -571,7 +560,7 @@ activate_row (CcUaPanel *self, GtkListBoxRow *row)
}
else if (row == self->row_repeat_keys)
{
- show_dialog (self, self->repeat_keys_dialog);
+ run_dialog (self, GTK_DIALOG (cc_repeat_keys_dialog_new ()));
}
else if (row == self->row_cursor_blinking)
{
@@ -676,9 +665,6 @@ on_repeat_keys_toggled (CcUaPanel *self)
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
@@ -726,25 +712,8 @@ cc_ua_panel_init_keyboard (CcUaPanel *self)
/* 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_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);
diff --git a/panels/universal-access/cc-ua-panel.ui b/panels/universal-access/cc-ua-panel.ui
index bf5cdd79e..f19e48e29 100644
--- a/panels/universal-access/cc-ua-panel.ui
+++ b/panels/universal-access/cc-ua-panel.ui
@@ -9,20 +9,6 @@
<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>
@@ -1072,227 +1058,6 @@
<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>
@@ -1426,18 +1191,6 @@
</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>
diff --git a/panels/universal-access/meson.build b/panels/universal-access/meson.build
index f2df85b08..d9c7354e7 100644
--- a/panels/universal-access/meson.build
+++ b/panels/universal-access/meson.build
@@ -19,6 +19,7 @@ i18n.merge_file(
sources = files(
'cc-cursor-size-dialog.c',
+ 'cc-repeat-keys-dialog.c',
'cc-sound-keys-dialog.c',
'cc-screen-reader-dialog.c',
'cc-ua-panel.c',
@@ -34,6 +35,7 @@ resource_data = files(
'left_ptr_64px.png',
'left_ptr_96px.png',
'cc-cursor-size-dialog.ui',
+ 'cc-repeat-keys-dialog.ui',
'cc-sound-keys-dialog.ui',
'cc-screen-reader-dialog.ui',
'cc-visual-alerts-dialog.ui',
diff --git a/panels/universal-access/universal-access.gresource.xml
b/panels/universal-access/universal-access.gresource.xml
index 9558627d2..8b8cf59bb 100644
--- a/panels/universal-access/universal-access.gresource.xml
+++ b/panels/universal-access/universal-access.gresource.xml
@@ -2,6 +2,7 @@
<gresources>
<gresource prefix="/org/gnome/control-center/universal-access">
<file preprocess="xml-stripblanks">cc-cursor-size-dialog.ui</file>
+ <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-ua-panel.ui</file>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 4eff4fef1..912db39db 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -216,6 +216,7 @@ panels/thunderbolt/cc-bolt-panel.c
panels/thunderbolt/cc-bolt-panel.ui
panels/thunderbolt/gnome-thunderbolt-panel.desktop.in.in
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-ua-panel.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]