From a22a559e989bd08f4b7928e2c511ebfdd4cdb3f8 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Thu, 28 May 2020 13:02:16 +1000 Subject: [PATCH] Hide the Clear All button on server start, show it again when stopped --- onionshare_gui/tab/mode/share_mode/__init__.py | 4 ++++ onionshare_gui/tab/mode/website_mode/__init__.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/onionshare_gui/tab/mode/share_mode/__init__.py b/onionshare_gui/tab/mode/share_mode/__init__.py index c64fc78c..942f856f 100644 --- a/onionshare_gui/tab/mode/share_mode/__init__.py +++ b/onionshare_gui/tab/mode/share_mode/__init__.py @@ -206,6 +206,8 @@ class ShareMode(Mode): # Hide and reset the downloads if we have previously shared self.reset_info_counters() + self.clear_all_button.hide() + def start_server_step2_custom(self): """ Step 2 in starting the server. Zipping up files. @@ -265,6 +267,8 @@ class ShareMode(Mode): self.history.update_in_progress() self.file_selection.file_list.adjustSize() + self.clear_all_button.show() + def cancel_server_custom(self): """ Stop the compression thread on cancel diff --git a/onionshare_gui/tab/mode/website_mode/__init__.py b/onionshare_gui/tab/mode/website_mode/__init__.py index 1f7980ff..e8c0a0ef 100644 --- a/onionshare_gui/tab/mode/website_mode/__init__.py +++ b/onionshare_gui/tab/mode/website_mode/__init__.py @@ -199,6 +199,8 @@ class WebsiteMode(Mode): # Hide and reset the downloads if we have previously shared self.reset_info_counters() + self.clear_all_button.hide() + def start_server_step2_custom(self): """ Step 2 in starting the server. Zipping up files. @@ -236,6 +238,8 @@ class WebsiteMode(Mode): self.history.completed_count = 0 self.file_selection.file_list.adjustSize() + self.clear_all_button.show() + def cancel_server_custom(self): """ Log that the server has been cancelled