Make systray exit action call OnionShareGui.close() instead of sys.exit(), to give OnionShare a chance to warn users of open servers, and to gracefully shut down

This commit is contained in:
Micah Lee 2017-05-22 16:19:44 -07:00
parent 02216f246b
commit 65894e2e44
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -149,7 +149,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
def _initSystemTray(self):
menu = QtWidgets.QMenu()
exitAction = menu.addAction(strings._('systray_menu_exit', True))
exitAction.triggered.connect(sys.exit)
exitAction.triggered.connect(self.close)
self.systemTray = QtWidgets.QSystemTrayIcon(self)
self.systemTray.setIcon(QtGui.QIcon(common.get_resource_path('images/logo.png')))