Skip to content

Commit

Permalink
ui: don't set the focus on the action buttons
Browse files Browse the repository at this point in the history
Sometimes you can deny/allow a connection unintentionally while typing.
Now the focus is set to the "+" button, and you can jump to the deny or
allow button with the arrow keys.

Issue #58.
  • Loading branch information
gustavo-iniguez-goya committed Oct 14, 2020
1 parent 7deb2f3 commit 1f6a2db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/opensnitch/dialogs/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,13 @@ def _set_cmd_action_text(self):
if self._cfg.getSettings(self.CFG_DEFAULT_ACTION) == self.ACTION_ALLOW:
self.applyButton.setText("%s (%d)" % (self._apply_text, self._tick))
self.denyButton.setText(self._deny_text)
self.applyButton.setFocus()
else:
self.denyButton.setText("%s (%d)" % (self._deny_text, self._tick))
self.applyButton.setText(self._apply_text)
self.denyButton.setFocus()


self.checkAdvanced.setFocus()

def _render_connection(self, con):
app_name, app_icon, _ = self._apps_parser.get_info_by_path(con.process_path, "terminal")
if app_name != con.process_path and con.process_path not in con.process_args:
Expand Down

0 comments on commit 1f6a2db

Please sign in to comment.