mirror of
https://github.com/evilsocket/opensnitch.git
synced 2025-03-04 00:24:40 +01:00
ui: fixed closing the GUI with a popup active
This commit is contained in:
parent
2357186093
commit
c0be3d15dc
2 changed files with 8 additions and 1 deletions
|
@ -210,7 +210,8 @@ class PromptDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
|
||||||
else:
|
else:
|
||||||
self.actionButton.setText(self._action_text[action_idx])
|
self.actionButton.setText(self._action_text[action_idx])
|
||||||
self.actionButton.setIcon(self._action_icon[action_idx])
|
self.actionButton.setIcon(self._action_icon[action_idx])
|
||||||
self._tick_thread.stop = True
|
if self._tick_thread != None:
|
||||||
|
self._tick_thread.stop = True
|
||||||
|
|
||||||
def _check_advanced_toggled(self, state):
|
def _check_advanced_toggled(self, state):
|
||||||
self.checkDstIP.setVisible(state)
|
self.checkDstIP.setVisible(state)
|
||||||
|
@ -496,6 +497,11 @@ class PromptDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
|
||||||
self._send_rule()
|
self._send_rule()
|
||||||
e.ignore()
|
e.ignore()
|
||||||
|
|
||||||
|
def close(self):
|
||||||
|
self._stop_countdown()
|
||||||
|
self._done.set()
|
||||||
|
self.hide()
|
||||||
|
|
||||||
def _add_fixed_options_to_combo(self, combo, con, uid):
|
def _add_fixed_options_to_combo(self, combo, con, uid):
|
||||||
# the order of these combobox entries must match those in the preferences dialog
|
# the order of these combobox entries must match those in the preferences dialog
|
||||||
# prefs -> UI -> Default target
|
# prefs -> UI -> Default target
|
||||||
|
|
|
@ -292,6 +292,7 @@ class UIService(ui_pb2_grpc.UIServicer, QtWidgets.QGraphicsObject):
|
||||||
def _on_close(self):
|
def _on_close(self):
|
||||||
self._exit = True
|
self._exit = True
|
||||||
self._tray.setIcon(self.off_icon)
|
self._tray.setIcon(self.off_icon)
|
||||||
|
self._prompt_dialog.close()
|
||||||
self._app.processEvents()
|
self._app.processEvents()
|
||||||
self._nodes.stop_notifications()
|
self._nodes.stop_notifications()
|
||||||
self._nodes.update_all(Nodes.OFFLINE)
|
self._nodes.update_all(Nodes.OFFLINE)
|
||||||
|
|
Loading…
Add table
Reference in a new issue