[gnome-control-center] universal-access: Fix initial state of typing help
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] universal-access: Fix initial state of typing help
- Date: Fri, 25 Feb 2011 18:08:00 +0000 (UTC)
commit 232c0e5862e99555a354c7ee2b7d4d1527c8f6b8
Author: Bastien Nocera <hadess hadess net>
Date: Fri Feb 25 18:06:17 2011 +0000
universal-access: Fix initial state of typing help
Bounce keys, slow keys, and sticky keys had the wrong state on
startup.
panels/universal-access/cc-ua-panel.c | 11 +++++++++--
panels/universal-access/uap.ui | 6 +++---
2 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/panels/universal-access/cc-ua-panel.c b/panels/universal-access/cc-ua-panel.c
index 3c83e38..b39bcd5 100644
--- a/panels/universal-access/cc-ua-panel.c
+++ b/panels/universal-access/cc-ua-panel.c
@@ -215,6 +215,13 @@ static gchar *visual_alerts_section[] = {
NULL
};
+static gchar *shortcuts_section[] = {
+ "stickykeys_frame",
+ "slowkeys_frame",
+ "bouncekeys_frame",
+ NULL
+};
+
static void
cc_ua_panel_section_switched (GObject *object,
GParamSpec *pspec,
@@ -226,7 +233,7 @@ cc_ua_panel_section_switched (GObject *object,
widgets = g_object_get_data (object, "section-widgets");
- enabled = gtk_switch_get_active (GTK_SWITCH (object));
+ g_object_get (object, "active", &enabled, NULL);
for (s = widgets; *s; s++)
{
@@ -699,7 +706,7 @@ cc_ua_panel_init_keyboard (CcUaPanel *self)
/* enable shortcuts */
w = WID (priv->builder, "typing_keyboard_toggle_checkbox");
- g_settings_bind (priv->kb_settings, "enable", w, "active", G_SETTINGS_BIND_DEFAULT);
+ settings_on_off_editor_new (priv, priv->kb_settings, "enable", w, shortcuts_section);
/* sticky keys */
w = WID (priv->builder, "typing_sticky_keys_switch");
diff --git a/panels/universal-access/uap.ui b/panels/universal-access/uap.ui
index e54598e..152a28e 100644
--- a/panels/universal-access/uap.ui
+++ b/panels/universal-access/uap.ui
@@ -1262,7 +1262,7 @@
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame2">
+ <object class="GtkFrame" id="stickykeys_frame">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
@@ -1397,7 +1397,7 @@
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame3">
+ <object class="GtkFrame" id="slowkeys_frame">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
@@ -1685,7 +1685,7 @@
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame6">
+ <object class="GtkFrame" id="bouncekeys_frame">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]