summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/main_window.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/main_window.py b/config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/main_window.py
index 720779d..3d3d69f 100644
--- a/config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/main_window.py
+++ b/config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/main_window.py
@@ -217,9 +217,17 @@ class GreeterMainWindow(Gtk.Window, TranslatableWindow):
# We only add the setting to the list of additional settings
# if it was actually changed. Else it is either already added or
# it has the default value.
- if changed:
+ if not changed:
+ continue
+ settings_loaded = True
+ # Add the setting to the listbox of added settings, if it was
+ # not added before (by the user, before unlocking perrsistence).
+ if self.setting_added(setting.id):
+ # The setting was already added, we only have to call apply()
+ # to update the label
+ setting.apply()
+ else:
self.add_setting(setting.id)
- settings_loaded = True
except SettingNotFoundError as e:
logging.debug(e)
# The settings file does not exist, so we create it by
@@ -266,6 +274,10 @@ class GreeterMainWindow(Gtk.Window, TranslatableWindow):
else:
self.run_add_setting_dialog(id_)
+ def setting_added(self, id_):
+ setting = self.settings.additional_settings[id_]
+ return setting.listboxrow in self.listbox_settings.get_children()
+
def show(self):
super().show()
self.button_start.grab_focus()