mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-23 05:01:24 -05:00
Respect --local-only
This commit is contained in:
parent
7b162b4bc7
commit
7448f76f2e
@ -128,7 +128,10 @@ class Mode(QtWidgets.QWidget):
|
|||||||
self.wrapper_layout.addWidget(self.tor_not_connected_widget)
|
self.wrapper_layout.addWidget(self.tor_not_connected_widget)
|
||||||
self.setLayout(self.wrapper_layout)
|
self.setLayout(self.wrapper_layout)
|
||||||
|
|
||||||
self.tor_connection_init()
|
if self.common.gui.onion.is_authenticated():
|
||||||
|
self.tor_connection_started()
|
||||||
|
else:
|
||||||
|
self.tor_connection_stopped()
|
||||||
|
|
||||||
def init(self):
|
def init(self):
|
||||||
"""
|
"""
|
||||||
@ -554,15 +557,6 @@ class Mode(QtWidgets.QWidget):
|
|||||||
"""
|
"""
|
||||||
self.history.cancel(event["data"]["id"])
|
self.history.cancel(event["data"]["id"])
|
||||||
|
|
||||||
def tor_connection_init(self):
|
|
||||||
"""
|
|
||||||
Figure out if Tor is connected and display the right widget
|
|
||||||
"""
|
|
||||||
if self.common.gui.onion.is_authenticated():
|
|
||||||
self.tor_connection_started()
|
|
||||||
else:
|
|
||||||
self.tor_connection_stopped()
|
|
||||||
|
|
||||||
def tor_connection_started(self):
|
def tor_connection_started(self):
|
||||||
"""
|
"""
|
||||||
This is called on every Mode when Tor is connected
|
This is called on every Mode when Tor is connected
|
||||||
@ -574,5 +568,9 @@ class Mode(QtWidgets.QWidget):
|
|||||||
"""
|
"""
|
||||||
This is called on every Mode when Tor is disconnected
|
This is called on every Mode when Tor is disconnected
|
||||||
"""
|
"""
|
||||||
|
if self.common.gui.local_only:
|
||||||
|
self.tor_connection_started()
|
||||||
|
return
|
||||||
|
|
||||||
self.content_widget.hide()
|
self.content_widget.hide()
|
||||||
self.tor_not_connected_widget.show()
|
self.tor_not_connected_widget.show()
|
||||||
|
Loading…
Reference in New Issue
Block a user