summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsegfault <segfault@riseup.net>2020-06-18 10:44:50 +0200
committersegfault <segfault@riseup.net>2020-06-18 10:44:50 +0200
commit9060cb0314f0f625e521996af96bbf0c419a5381 (patch)
tree405e9affe29b42e98aa526f94b3f4c52fcae74f8
parent0907a9ca2a3086e4c6165e89e96673b8dfd28ef9 (diff)
Select the correct listboxrow when setting is loaded (refs: #17136)
-rw-r--r--config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py b/config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py
index 543d60b..08b774c 100644
--- a/config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py
+++ b/config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/additional_settings.py
@@ -208,6 +208,12 @@ class MACSpoofSettingUI(AdditionalSetting):
except SettingNotFoundError:
raise
+ # Select the correct listboxrow (used in the popover)
+ if value:
+ self.listbox_macspoof_controls.select_row(self.listboxrow_macspoof_on)
+ else:
+ self.listbox_macspoof_controls.select_row(self.listboxrow_macspoof_off)
+
if self.spoofing_enabled == value:
return False
@@ -279,6 +285,14 @@ class NetworkSettingUI(AdditionalSetting):
except SettingNotFoundError:
raise
+ # Select the correct listboxrow (used in the popover)
+ if value == NETCONF_DIRECT:
+ self.listbox_network_controls.select_row(self.listboxrow_network_clear)
+ elif value == NETCONF_OBSTACLE:
+ self.listbox_network_controls.select_row(self.listboxrow_network_specific)
+ elif value == NETCONF_DISABLED:
+ self.listbox_network_controls.select_row(self.listboxrow_network_off)
+
if self.value == value:
return False