[gnome-control-center] keyboard: Fix activation of input source toggle button
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] keyboard: Fix activation of input source toggle button
- Date: Mon, 15 Aug 2022 09:02:39 +0000 (UTC)
commit 5f3b16b288c4dd326c08bb74a3aa6b4ae681e5aa
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date: Fri Aug 12 21:59:48 2022 +0530
keyboard: Fix activation of input source toggle button
When the options are changed, the first item was never shown as
active when selected. Fix it by binding to the inverse of the
button state instead of binding both toggle buttons to settings.
Fixes #1653
panels/keyboard/cc-keyboard-panel.c | 3 ---
panels/keyboard/cc-keyboard-panel.ui | 1 +
2 files changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/panels/keyboard/cc-keyboard-panel.c b/panels/keyboard/cc-keyboard-panel.c
index 663bcc249..2e91fe79b 100644
--- a/panels/keyboard/cc-keyboard-panel.c
+++ b/panels/keyboard/cc-keyboard-panel.c
@@ -234,9 +234,6 @@ cc_keyboard_panel_init (CcKeyboardPanel *self)
self->input_source_settings = g_settings_new ("org.gnome.desktop.input-sources");
/* "Input Source Switching" section */
- g_settings_bind (self->input_source_settings, "per-window",
- self->per_window_source, "active",
- G_SETTINGS_BIND_DEFAULT);
g_settings_bind (self->input_source_settings, "per-window",
self->same_source, "active",
G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_INVERT_BOOLEAN);
diff --git a/panels/keyboard/cc-keyboard-panel.ui b/panels/keyboard/cc-keyboard-panel.ui
index 3c444931e..4975a408e 100644
--- a/panels/keyboard/cc-keyboard-panel.ui
+++ b/panels/keyboard/cc-keyboard-panel.ui
@@ -45,6 +45,7 @@
<property name="activatable-widget">per_window_source</property>
<child type="prefix">
<object class="GtkCheckButton" id="per_window_source">
+ <property name="active" bind-source="same_source"
bind-flags="sync-create|invert-boolean"/>
<property name="valign">center</property>
<property name="group">same_source</property>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]