mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-11 04:02:40 -03:00
Fix a few issues related to opening settings and quitting
This commit is contained in:
parent
a14464d834
commit
f4e3f92c7b
3 changed files with 13 additions and 13 deletions
|
@ -237,14 +237,10 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||||
self.website_mode.server_status.autostart_timer_container.hide()
|
self.website_mode.server_status.autostart_timer_container.hide()
|
||||||
|
|
||||||
d = SettingsDialog(self.common)
|
d = SettingsDialog(self.common)
|
||||||
d.settings_saved.connect(reload_settings)
|
# d.settings_saved.connect(reload_settings)
|
||||||
|
# TODO: move the reload_settings logic into tabs
|
||||||
d.exec_()
|
d.exec_()
|
||||||
|
|
||||||
# When settings close, refresh the server status UI
|
|
||||||
self.share_mode.server_status.update()
|
|
||||||
self.receive_mode.server_status.update()
|
|
||||||
self.website_mode.server_status.update()
|
|
||||||
|
|
||||||
def check_for_updates(self):
|
def check_for_updates(self):
|
||||||
"""
|
"""
|
||||||
Check for updates in a new thread, if enabled.
|
Check for updates in a new thread, if enabled.
|
||||||
|
|
|
@ -496,12 +496,15 @@ class Tab(QtWidgets.QWidget):
|
||||||
self.status_bar.clearMessage()
|
self.status_bar.clearMessage()
|
||||||
|
|
||||||
def get_mode(self):
|
def get_mode(self):
|
||||||
if self.mode == self.common.gui.MODE_SHARE:
|
if self.mode:
|
||||||
return self.share_mode
|
if self.mode == self.common.gui.MODE_SHARE:
|
||||||
elif self.mode == self.common.gui.MODE_RECEIVE:
|
return self.share_mode
|
||||||
return self.receive_mode
|
elif self.mode == self.common.gui.MODE_RECEIVE:
|
||||||
|
return self.receive_mode
|
||||||
|
else:
|
||||||
|
return self.website_mode
|
||||||
else:
|
else:
|
||||||
return self.website_mode
|
return None
|
||||||
|
|
||||||
def persistence_button_clicked(self):
|
def persistence_button_clicked(self):
|
||||||
self.common.log("Tab", "persistence_button_clicked")
|
self.common.log("Tab", "persistence_button_clicked")
|
||||||
|
|
|
@ -127,8 +127,9 @@ class TabWidget(QtWidgets.QTabWidget):
|
||||||
"""
|
"""
|
||||||
for tab_id in self.tabs:
|
for tab_id in self.tabs:
|
||||||
mode = self.tabs[tab_id].get_mode()
|
mode = self.tabs[tab_id].get_mode()
|
||||||
if mode.server_status.status != mode.server_status.STATUS_STOPPED:
|
if mode:
|
||||||
return True
|
if mode.server_status.status != mode.server_status.STATUS_STOPPED:
|
||||||
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def resizeEvent(self, event):
|
def resizeEvent(self, event):
|
||||||
|
|
Loading…
Reference in a new issue