|
|
629b78 |
From b4eeaf7ea12fa7d9713e80371490d8060396b3cb Mon Sep 17 00:00:00 2001
|
|
|
629b78 |
From: Milan Crha <mcrha@redhat.com>
|
|
|
629b78 |
Date: Fri, 17 Apr 2020 09:21:42 +0200
|
|
|
629b78 |
Subject: [PATCH] window-list: Invalid current mode selected in Preferences
|
|
|
629b78 |
|
|
|
629b78 |
It seems that gtk+ resets the active radio whenever a new radio button
|
|
|
629b78 |
is added into the group, thus rather restore the current mode after
|
|
|
629b78 |
the group is fully populated.
|
|
|
629b78 |
|
|
|
629b78 |
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/119
|
|
|
629b78 |
---
|
|
|
629b78 |
extensions/window-list/prefs.js | 9 ++++++++-
|
|
|
629b78 |
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
|
629b78 |
|
|
|
629b78 |
diff --git a/extensions/window-list/prefs.js b/extensions/window-list/prefs.js
|
|
|
629b78 |
index 78792b5..17e9799 100644
|
|
|
629b78 |
--- a/extensions/window-list/prefs.js
|
|
|
629b78 |
+++ b/extensions/window-list/prefs.js
|
|
|
629b78 |
@@ -50,6 +50,7 @@ class WindowListPrefsWidget extends Gtk.Grid {
|
|
|
629b78 |
};
|
|
|
629b78 |
|
|
|
629b78 |
let radio = null;
|
|
|
629b78 |
+ let currentRadio = null;
|
|
|
629b78 |
for (let i = 0; i < modes.length; i++) {
|
|
|
629b78 |
let mode = modes[i];
|
|
|
629b78 |
let label = modeLabels[mode];
|
|
|
629b78 |
@@ -59,18 +60,24 @@ class WindowListPrefsWidget extends Gtk.Grid {
|
|
|
629b78 |
}
|
|
|
629b78 |
|
|
|
629b78 |
radio = new Gtk.RadioButton({
|
|
|
629b78 |
- active: currentMode == mode,
|
|
|
629b78 |
+ active: !i,
|
|
|
629b78 |
label: label,
|
|
|
629b78 |
group: radio
|
|
|
629b78 |
});
|
|
|
629b78 |
grid.add(radio);
|
|
|
629b78 |
|
|
|
629b78 |
+ if (currentMode === mode)
|
|
|
629b78 |
+ currentRadio = radio;
|
|
|
629b78 |
+
|
|
|
629b78 |
radio.connect('toggled', button => {
|
|
|
629b78 |
if (button.active)
|
|
|
629b78 |
this._settings.set_string('grouping-mode', mode);
|
|
|
629b78 |
});
|
|
|
629b78 |
}
|
|
|
629b78 |
|
|
|
629b78 |
+ if (currentRadio)
|
|
|
629b78 |
+ currentRadio.active = true;
|
|
|
629b78 |
+
|
|
|
629b78 |
let check = new Gtk.CheckButton({
|
|
|
629b78 |
label: _('Show on all monitors'),
|
|
|
629b78 |
margin_top: 6
|
|
|
629b78 |
--
|
|
|
629b78 |
2.26.2
|
|
|
629b78 |
|