diff options
Diffstat (limited to 'src/preferences.py')
-rw-r--r-- | src/preferences.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/preferences.py b/src/preferences.py index 1a87e29..8e6d150 100644 --- a/src/preferences.py +++ b/src/preferences.py @@ -28,6 +28,7 @@ import os class WeegtkPreferences(Adw.PreferencesDialog): __gtype_name__ = 'WeegtkPreferences' + autoconnect = Gtk.Template.Child() hostname = Gtk.Template.Child() port = Gtk.Template.Child() password = Gtk.Template.Child() @@ -46,6 +47,7 @@ class WeegtkPreferences(Adw.PreferencesDialog): self.config = config.read() + self.autoconnect.set_active(config.str_to_bool(self.config["relay"]["autoconnect"])) self.hostname.set_text(self.config["relay"]["hostname"]) self.port.set_text(self.config["relay"]["port"]) self.password.set_text(self.config["relay"]["password"]) @@ -60,6 +62,7 @@ class WeegtkPreferences(Adw.PreferencesDialog): self.install_action("ssh_key.open", None, self.ssh_key_open) def read_preferences(self): + self.config["relay"]["autoconnect"] = str(self.autoconnect.get_active()) self.config["relay"]["hostname"] = self.hostname.get_text() self.config["relay"]["port"] = self.port.get_text() self.config["relay"]["password"] = self.password.get_text() |