mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
Fix a few issues related to opening settings and quitting
This commit is contained in:
parent
a14464d834
commit
f4e3f92c7b
@ -237,14 +237,10 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||
self.website_mode.server_status.autostart_timer_container.hide()
|
||||
|
||||
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_()
|
||||
|
||||
# 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):
|
||||
"""
|
||||
Check for updates in a new thread, if enabled.
|
||||
|
@ -496,12 +496,15 @@ class Tab(QtWidgets.QWidget):
|
||||
self.status_bar.clearMessage()
|
||||
|
||||
def get_mode(self):
|
||||
if self.mode == self.common.gui.MODE_SHARE:
|
||||
return self.share_mode
|
||||
elif self.mode == self.common.gui.MODE_RECEIVE:
|
||||
return self.receive_mode
|
||||
if self.mode:
|
||||
if self.mode == self.common.gui.MODE_SHARE:
|
||||
return self.share_mode
|
||||
elif self.mode == self.common.gui.MODE_RECEIVE:
|
||||
return self.receive_mode
|
||||
else:
|
||||
return self.website_mode
|
||||
else:
|
||||
return self.website_mode
|
||||
return None
|
||||
|
||||
def persistence_button_clicked(self):
|
||||
self.common.log("Tab", "persistence_button_clicked")
|
||||
|
@ -127,8 +127,9 @@ class TabWidget(QtWidgets.QTabWidget):
|
||||
"""
|
||||
for tab_id in self.tabs:
|
||||
mode = self.tabs[tab_id].get_mode()
|
||||
if mode.server_status.status != mode.server_status.STATUS_STOPPED:
|
||||
return True
|
||||
if mode:
|
||||
if mode.server_status.status != mode.server_status.STATUS_STOPPED:
|
||||
return True
|
||||
return False
|
||||
|
||||
def resizeEvent(self, event):
|
||||
|
Loading…
Reference in New Issue
Block a user