Commit c1613748 authored by segfault's avatar segfault

Greeter: Set default setting if a setting is not found

To fix the case that setting files are not created at all if they don't
exist in the persistent settings dir.
parent aa29af76
......@@ -190,6 +190,10 @@ class GreeterMainWindow(Gtk.Window, TranslatableWindow):
settings_loaded = True
except SettingNotFoundError as e:
logging.debug(e)
# The settings file does not exist, so we create it by
# applying the setting's default value.
setting.apply()
for setting in self.settings.additional_settings:
try:
changed = setting.load()
......@@ -201,6 +205,9 @@ class GreeterMainWindow(Gtk.Window, TranslatableWindow):
settings_loaded = True
except SettingNotFoundError as e:
logging.debug(e)
# The settings file does not exist, so we create it by
# applying the setting's default value.
setting.apply()
if settings_loaded:
self.infobar_settings_loaded.set_visible(True)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment