Instead of disabling the settings button when share is active, hide it, and show it again when the share stops

This commit is contained in:
Micah Lee 2018-02-10 10:59:01 -08:00
parent 2df4fb643d
commit 532d5d5cf0
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
3 changed files with 2 additions and 5 deletions

View file

@ -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"

View file

@ -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)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 513 B