mirror of
https://github.com/onionshare/onionshare.git
synced 2025-06-07 06:13:03 -04:00
Disable the 'Start Sharing' button if the connection to Tor has been lost. Re-enable it if we've subsequently reconnected to Tor via Settings dialog
This commit is contained in:
parent
5c84c277da
commit
2cd61d76e0
1 changed files with 6 additions and 1 deletions
|
@ -225,7 +225,11 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
||||||
if self.onion.is_authenticated():
|
if self.onion.is_authenticated():
|
||||||
if not self.timer.isActive():
|
if not self.timer.isActive():
|
||||||
self.timer.start()
|
self.timer.start()
|
||||||
self.status_bar.clearMessage()
|
# If there were some files listed for sharing, we should be ok to
|
||||||
|
# re-enable the 'Start Sharing' button now.
|
||||||
|
if self.server_status.file_selection.get_num_files() > 0:
|
||||||
|
self.server_status.server_button.setEnabled(True)
|
||||||
|
self.status_bar.clearMessage()
|
||||||
|
|
||||||
d = SettingsDialog(self.onion, self.qtapp, self.config)
|
d = SettingsDialog(self.onion, self.qtapp, self.config)
|
||||||
d.settings_saved.connect(reload_settings)
|
d.settings_saved.connect(reload_settings)
|
||||||
|
@ -402,6 +406,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
||||||
self.timer.stop()
|
self.timer.stop()
|
||||||
if self.server_status.status != self.server_status.STATUS_STOPPED:
|
if self.server_status.status != self.server_status.STATUS_STOPPED:
|
||||||
self.server_status.stop_server()
|
self.server_status.stop_server()
|
||||||
|
self.server_status.server_button.setEnabled(False)
|
||||||
self.status_bar.showMessage(strings._('gui_tor_connection_lost', True))
|
self.status_bar.showMessage(strings._('gui_tor_connection_lost', True))
|
||||||
|
|
||||||
# scroll to the bottom of the dl progress bar log pane
|
# scroll to the bottom of the dl progress bar log pane
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue