Commit 1165bde2 authored by Daniel Brötzmann's avatar Daniel Brötzmann Committed by Philipp Hörist

ManageProxies: Layout changes and code cleanup

parent 3af3b647
Pipeline #3861 passed with stages
in 2 minutes and 58 seconds
......@@ -252,10 +252,11 @@ def on_xml_console(action, param):
def on_manage_proxies(action, param):
if 'manage_proxies' in app.interface.instances:
app.interface.instances['manage_proxies'].window.present()
window = app.get_app_window(ManageProxies)
if window is None:
ManageProxies()
else:
app.interface.instances['manage_proxies'] = ManageProxies()
window.present()
# Admin Actions
......
This diff is collapsed.
This diff is collapsed.
......@@ -347,11 +347,12 @@ class AccountCreationWizard:
model.append([proxy])
proxies_combobox.set_active(0)
def on_manage_proxies_button_clicked(self, widget):
if 'manage_proxies' in app.interface.instances:
app.interface.instances['manage_proxies'].window.present()
def on_manage_proxies_button_clicked(self, _widget):
window = app.get_app_window(ManageProxies)
if window is None:
ManageProxies()
else:
app.interface.instances['manage_proxies'] = ManageProxies()
window.present()
def on_custom_host_port_checkbutton_toggled(self, widget):
self.xml.get_object('custom_host_hbox').set_sensitive(
......
......@@ -972,11 +972,12 @@ class Preferences(Gtk.ApplicationWindow):
proxy = ''
app.config.set('global_proxy', proxy)
def on_manage_proxies_button_clicked(self, widget):
if 'manage_proxies' in app.interface.instances:
app.interface.instances['manage_proxies'].window.present()
def on_manage_proxies_button_clicked(self, _widget):
window = app.get_app_window(ManageProxies)
if window is None:
ManageProxies()
else:
app.interface.instances['manage_proxies'] = ManageProxies()
window.present()
def update_proxy_list(self):
our_proxy = app.config.get('global_proxy')
......
This diff is collapsed.
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