Add systray notification when Tor connection is lost, thanks @Baccount

This commit is contained in:
Miguel Jacq 2017-12-27 09:29:45 +11:00
parent 2cd61d76e0
commit 0a5bd45dfe
No known key found for this signature in database
GPG Key ID: EEA4341C6D97A0B6

View File

@ -408,6 +408,8 @@ class OnionShareGui(QtWidgets.QMainWindow):
self.server_status.stop_server() self.server_status.stop_server()
self.server_status.server_button.setEnabled(False) 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))
if self.systemTray.supportsMessages() and self.settings.get('systray_notifications'):
self.systemTray.showMessage(strings._('gui_tor_connection_lost', True), strings._('gui_tor_connection_error_settings', True))
# scroll to the bottom of the dl progress bar log pane # scroll to the bottom of the dl progress bar log pane
# if a new download has been added # if a new download has been added