From d69e93a5ba951f86de97f34e759d5d62e8f422b0 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Thu, 7 Dec 2017 13:02:56 +1100 Subject: [PATCH] emit to the status bar when the private key is saved to disk --- onionshare_gui/onionshare_gui.py | 8 ++++++++ share/locale/en.json | 1 + 2 files changed, 9 insertions(+) diff --git a/onionshare_gui/onionshare_gui.py b/onionshare_gui/onionshare_gui.py index dd5c00bf..a5fb0edb 100644 --- a/onionshare_gui/onionshare_gui.py +++ b/onionshare_gui/onionshare_gui.py @@ -80,6 +80,7 @@ class OnionShareGui(QtWidgets.QMainWindow): self.file_selection.file_list.files_updated.connect(self.server_status.update) self.server_status.url_copied.connect(self.copy_url) self.server_status.hidservauth_copied.connect(self.copy_hidservauth) + self.server_status.private_key_saved.connect(self.private_key_saved) self.starting_server_step2.connect(self.start_server_step2) self.starting_server_step3.connect(self.start_server_step3) self.starting_server_error.connect(self.start_server_error) @@ -470,6 +471,13 @@ class OnionShareGui(QtWidgets.QMainWindow): common.log('OnionShareGui', 'copy_hidservauth') self.status_bar.showMessage(strings._('gui_copied_hidservauth', True), 2000) + def private_key_saved(self): + """ + When the private key gets saved, display this in the status bar. + """ + common.log('OnionShareGui', 'private_key_saved') + self.status_bar.showMessage(strings._('gui_private_key_saved', True), 2000) + def clear_message(self): """ Clear messages from the status bar. diff --git a/share/locale/en.json b/share/locale/en.json index 5ec68229..b239433e 100644 --- a/share/locale/en.json +++ b/share/locale/en.json @@ -46,6 +46,7 @@ "gui_canceled": "Canceled", "gui_copied_url": "Copied URL to clipboard", "gui_copied_hidservauth": "Copied HidServAuth line to clipboard", + "gui_private_key_saved": "Private key saved to settings", "gui_starting_server1": "Starting Tor onion service...", "gui_starting_server2": "Crunching files...", "gui_please_wait": "Please wait...",