Now About Social Code
aboutsummaryrefslogtreecommitdiff
path: root/src/preferences.py
diff options
context:
space:
mode:
authorLucas Fryzek <lucas.fryzek@fryzekconcepts.com>2024-10-06 00:39:55 +0100
committerLucas Fryzek <lucas.fryzek@fryzekconcepts.com>2024-10-06 00:39:55 +0100
commitba4fbab831b09bd66fca8136333db384b44ff6c1 (patch)
treedb385c694fba440063562354741a79cbc9ea5ef7 /src/preferences.py
parentd68dbc893c4b76627b28b189b870aedddcad55bb (diff)
chat: Add support for file upload
Diffstat (limited to 'src/preferences.py')
-rw-r--r--src/preferences.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/preferences.py b/src/preferences.py
index d864012..1a87e29 100644
--- a/src/preferences.py
+++ b/src/preferences.py
@@ -39,6 +39,8 @@ class WeegtkPreferences(Adw.PreferencesDialog):
ssh_key_path = ""
+ upload_url = Gtk.Template.Child()
+
def __init__(self, **kwargs):
super().__init__(**kwargs)
@@ -53,6 +55,8 @@ class WeegtkPreferences(Adw.PreferencesDialog):
self.ssh_username.set_text(self.config["ssh"]["username"])
self.set_ssh_key(self.config["ssh"]["key"])
+ self.upload_url.set_text(self.config["upload"]["url"])
+
self.install_action("ssh_key.open", None, self.ssh_key_open)
def read_preferences(self):
@@ -65,6 +69,8 @@ class WeegtkPreferences(Adw.PreferencesDialog):
self.config["ssh"]["username"] = self.ssh_username.get_text()
self.config["ssh"]["key"] = self.ssh_key_path
+ self.config["upload"]["url"] = self.upload_url.get_text()
+
def set_ssh_key(self, key_path):
self.ssh_key_path = key_path
short_name = os.path.basename(key_path)