mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-28 08:49:30 -05:00
#440 disable the Settings menu action when server is active
This commit is contained in:
parent
c6b19a2864
commit
22971fc205
@ -152,12 +152,12 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
||||
system = common.get_platform()
|
||||
|
||||
menu = QtWidgets.QMenu()
|
||||
settingsAction = menu.addAction(strings._('gui_settings_window_title', True))
|
||||
settingsAction.triggered.connect(self.open_settings)
|
||||
helpAction = menu.addAction(strings._('gui_settings_button_help', True))
|
||||
helpAction.triggered.connect(SettingsDialog.help_clicked)
|
||||
exitAction = menu.addAction(strings._('systray_menu_exit', True))
|
||||
exitAction.triggered.connect(self.close)
|
||||
self.settingsAction = menu.addAction(strings._('gui_settings_window_title', True))
|
||||
self.settingsAction.triggered.connect(self.open_settings)
|
||||
self.helpAction = menu.addAction(strings._('gui_settings_button_help', True))
|
||||
self.helpAction.triggered.connect(SettingsDialog.help_clicked)
|
||||
self.exitAction = menu.addAction(strings._('systray_menu_exit', True))
|
||||
self.exitAction.triggered.connect(self.close)
|
||||
|
||||
self.systemTray = QtWidgets.QSystemTrayIcon(self)
|
||||
# The convention is Mac systray icons are always grayscale
|
||||
@ -443,6 +443,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
||||
Disable the Settings button while an OnionShare server is active.
|
||||
"""
|
||||
self.settings_button.setEnabled(not active)
|
||||
self.settingsAction.setEnabled(not active)
|
||||
|
||||
def closeEvent(self, e):
|
||||
common.log('OnionShareGui', 'closeEvent')
|
||||
|
Loading…
Reference in New Issue
Block a user