mirror of
https://github.com/onionshare/onionshare.git
synced 2025-08-02 11:26:16 -04:00
Reload settings in connection tab when tor settings tab closed
This commit is contained in:
parent
940be6b8e2
commit
a10ea04b32
2 changed files with 9 additions and 1 deletions
|
@ -138,7 +138,7 @@ class AutoConnectTab(QtWidgets.QWidget):
|
||||||
"""
|
"""
|
||||||
self.common.log("AutoConnectTab", "autoconnect_checking")
|
self.common.log("AutoConnectTab", "autoconnect_checking")
|
||||||
if self.auto_connect_enabled:
|
if self.auto_connect_enabled:
|
||||||
self.enable_autoconnect_checkbox.setCheckState(QtCore.Qt.Checked)
|
self.enable_autoconnect_checkbox.setChecked(True)
|
||||||
self.connect_clicked()
|
self.connect_clicked()
|
||||||
|
|
||||||
def toggle_auto_connect(self):
|
def toggle_auto_connect(self):
|
||||||
|
@ -191,3 +191,8 @@ class AutoConnectTab(QtWidgets.QWidget):
|
||||||
self.connect_button.show()
|
self.connect_button.show()
|
||||||
self.configure_button.show()
|
self.configure_button.show()
|
||||||
self.error_label.setText(msg)
|
self.error_label.setText(msg)
|
||||||
|
|
||||||
|
def reload_settings(self):
|
||||||
|
self.curr_settings.load()
|
||||||
|
self.auto_connect_enabled = self.curr_settings.get("auto_connect")
|
||||||
|
self.enable_autoconnect_checkbox.setChecked(self.auto_connect_enabled)
|
||||||
|
|
|
@ -382,6 +382,9 @@ class TabWidget(QtWidgets.QTabWidget):
|
||||||
|
|
||||||
def close_tor_settings_tab(self):
|
def close_tor_settings_tab(self):
|
||||||
self.common.log("TabWidget", "close_tor_settings_tab")
|
self.common.log("TabWidget", "close_tor_settings_tab")
|
||||||
|
for tab_id in self.tabs:
|
||||||
|
if type(self.tabs[tab_id]) is AutoConnectTab:
|
||||||
|
self.tabs[tab_id].reload_settings()
|
||||||
for tab_id in self.tabs:
|
for tab_id in self.tabs:
|
||||||
if type(self.tabs[tab_id]) is TorSettingsTab:
|
if type(self.tabs[tab_id]) is TorSettingsTab:
|
||||||
index = self.indexOf(self.tabs[tab_id])
|
index = self.indexOf(self.tabs[tab_id])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue