From 532d5d5cf0c1650b3bc931090ec269a23882c6dd Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Sat, 10 Feb 2018 10:59:01 -0800 Subject: [PATCH] Instead of disabling the settings button when share is active, hide it, and show it again when the share stops --- install/onionshare.nsi | 2 -- onionshare_gui/onionshare_gui.py | 5 ++--- share/images/settings_inactive.png | Bin 513 -> 0 bytes 3 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 share/images/settings_inactive.png diff --git a/install/onionshare.nsi b/install/onionshare.nsi index e5f989bb..151d36d4 100644 --- a/install/onionshare.nsi +++ b/install/onionshare.nsi @@ -209,7 +209,6 @@ Section "install" File "${BINPATH}\share\images\server_stopped.png" File "${BINPATH}\share\images\server_working.png" File "${BINPATH}\share\images\settings.png" - File "${BINPATH}\share\images\settings_inactive.png" SetOutPath "$INSTDIR\share\locale" File "${BINPATH}\share\locale\cs.json" @@ -388,7 +387,6 @@ FunctionEnd Delete "$INSTDIR\share\images\server_stopped.png" Delete "$INSTDIR\share\images\server_working.png" Delete "$INSTDIR\share\images\settings.png" - Delete "$INSTDIR\share\images\settings_inactive.png" Delete "$INSTDIR\share\license.txt" Delete "$INSTDIR\share\locale\cs.json" Delete "$INSTDIR\share\locale\de.json" diff --git a/onionshare_gui/onionshare_gui.py b/onionshare_gui/onionshare_gui.py index 75baf3d5..05e01530 100644 --- a/onionshare_gui/onionshare_gui.py +++ b/onionshare_gui/onionshare_gui.py @@ -569,11 +569,10 @@ class OnionShareGui(QtWidgets.QMainWindow): """ Disable the Settings button while an OnionShare server is active. """ - self.settings_button.setEnabled(not active) if active: - self.settings_button.setIcon( QtGui.QIcon(common.get_resource_path('images/settings_inactive.png')) ) + self.settings_button.hide() else: - self.settings_button.setIcon( QtGui.QIcon(common.get_resource_path('images/settings.png')) ) + self.settings_button.show() # Disable settings menu action when server is active self.settingsAction.setEnabled(not active) diff --git a/share/images/settings_inactive.png b/share/images/settings_inactive.png deleted file mode 100644 index 1b35201b804dd4bd20d3272419403735d88c983b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 513 zcmV+c0{;DpP)K z;Kz6j_tlq>CO8tqefA{;k?WlT&%iQJ1IoZcLf&6s6Zit`18hzU#(HdUAc(-oij$nv88`-M|kg zsN@k?cg}yzYz!bUvnk*xVQVUqR-FD-fMUXrerJJE&k8P^*&`G-3N`((veg{^cpby}R+Vgu;0bUW?rGyj$G(JjSOI6ktl}3l00000NkvXXu0mjf Dza!DZ