mirror of
https://github.com/onionshare/onionshare.git
synced 2025-06-28 16:27:23 -04:00
When Tor settings change, make sure the tabs know
This commit is contained in:
parent
695fecd21e
commit
8530321e5d
3 changed files with 27 additions and 36 deletions
|
@ -527,6 +527,19 @@ class Tab(QtWidgets.QWidget):
|
|||
else:
|
||||
return None
|
||||
|
||||
def settings_have_changed(self):
|
||||
# Global settings have changed
|
||||
self.common.log("Tab", "settings_have_changed")
|
||||
|
||||
# We might've stopped the main requests timer if a Tor connection failed. If we've reloaded
|
||||
# settings, we probably succeeded in obtaining a new connection. If so, restart the timer.
|
||||
if not self.common.gui.local_only:
|
||||
if self.common.gui.onion.is_authenticated():
|
||||
if not self.timer.isActive():
|
||||
self.timer.start(500)
|
||||
self.get_mode().on_reload_settings()
|
||||
self.get_mode().primary_action.show()
|
||||
|
||||
def close_tab(self):
|
||||
self.common.log("Tab", "close_tab")
|
||||
if self.mode is None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue