mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-16 17:57:30 -05:00
Merge branch 'mig5-707_fix_receive_mode_on_tor_disconnect' into receiver-mode-gui
This commit is contained in:
commit
936a90c62c
@ -307,6 +307,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||||||
if not self.timer.isActive():
|
if not self.timer.isActive():
|
||||||
self.timer.start(500)
|
self.timer.start(500)
|
||||||
self.share_mode.on_reload_settings()
|
self.share_mode.on_reload_settings()
|
||||||
|
self.receive_mode.on_reload_settings()
|
||||||
self.status_bar.clearMessage()
|
self.status_bar.clearMessage()
|
||||||
|
|
||||||
# If we switched off the shutdown timeout setting, ensure the widget is hidden.
|
# If we switched off the shutdown timeout setting, ensure the widget is hidden.
|
||||||
@ -350,6 +351,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||||||
self.system_tray.showMessage(strings._('gui_tor_connection_lost', True), strings._('gui_tor_connection_error_settings', True))
|
self.system_tray.showMessage(strings._('gui_tor_connection_lost', True), strings._('gui_tor_connection_error_settings', True))
|
||||||
|
|
||||||
self.share_mode.handle_tor_broke()
|
self.share_mode.handle_tor_broke()
|
||||||
|
self.receive_mode.handle_tor_broke()
|
||||||
|
|
||||||
# Process events from the web object
|
# Process events from the web object
|
||||||
if self.mode == self.MODE_SHARE:
|
if self.mode == self.MODE_SHARE:
|
||||||
|
@ -123,6 +123,7 @@ class ReceiveMode(Mode):
|
|||||||
"""
|
"""
|
||||||
Connection to Tor broke.
|
Connection to Tor broke.
|
||||||
"""
|
"""
|
||||||
|
self.primary_action.hide()
|
||||||
self.info_widget.hide()
|
self.info_widget.hide()
|
||||||
|
|
||||||
def handle_request_load(self, event):
|
def handle_request_load(self, event):
|
||||||
@ -166,6 +167,13 @@ class ReceiveMode(Mode):
|
|||||||
"""
|
"""
|
||||||
self.uploads.finished(event["data"]["id"])
|
self.uploads.finished(event["data"]["id"])
|
||||||
|
|
||||||
|
def on_reload_settings(self):
|
||||||
|
"""
|
||||||
|
We should be ok to re-enable the 'Start Receive Mode' button now.
|
||||||
|
"""
|
||||||
|
self.primary_action.show()
|
||||||
|
self.info_widget.show()
|
||||||
|
|
||||||
def reset_info_counters(self):
|
def reset_info_counters(self):
|
||||||
"""
|
"""
|
||||||
Set the info counters back to zero.
|
Set the info counters back to zero.
|
||||||
|
Loading…
Reference in New Issue
Block a user