Change servers.json format

parent b543f1ab
Pipeline #7367 passed with stages
in 6 minutes and 48 seconds
{ [
"servers":[
"0nl1ne.at", "0nl1ne.at",
"blabber.im", "blabber.im",
"creep.im", "creep.im",
...@@ -24,5 +23,4 @@ ...@@ -24,5 +23,4 @@
"ubuntu-jabber.net", "ubuntu-jabber.net",
"verdammung.org", "verdammung.org",
"xabber.de" "xabber.de"
] ]
}
...@@ -559,7 +559,7 @@ def _on_signup(self, *args): ...@@ -559,7 +559,7 @@ def _on_signup(self, *args):
def _create_server_completion(self): def _create_server_completion(self):
# Parse servers.json # Parse servers.json
file_path = configpaths.get('DATA') / 'other' / 'servers.json' file_path = configpaths.get('DATA') / 'other' / 'servers.json'
self._servers = helpers.load_json(file_path, 'servers', []) self._servers = helpers.load_json(file_path, default=[])
# Create a separate model for the address entry, because it will # Create a separate model for the address entry, because it will
# be updated with our localpart@ # be updated with our localpart@
...@@ -658,7 +658,7 @@ def focus(self): ...@@ -658,7 +658,7 @@ def focus(self):
def _create_server_completion(self): def _create_server_completion(self):
# Parse servers.json # Parse servers.json
file_path = configpaths.get('DATA') / 'other' / 'servers.json' file_path = configpaths.get('DATA') / 'other' / 'servers.json'
servers = helpers.load_json(file_path, 'servers', []) servers = helpers.load_json(file_path, default=[])
# Create servers_model for comboboxes and entries # Create servers_model for comboboxes and entries
servers_model = Gtk.ListStore(str) servers_model = Gtk.ListStore(str)
......
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