Commit d485535c authored by Daniel Brötzmann's avatar Daniel Brötzmann

XMLConsole: Close search bar first when pressing Esc

parent 1b1ca88c
......@@ -116,6 +116,9 @@ class XMLConsoleWindow(Gtk.ApplicationWindow, EventHelper):
def _on_key_press_event(self, _widget, event):
if event.keyval == Gdk.KEY_Escape:
if self._ui.search_revealer.get_child_revealed():
self._ui.search_revealer.set_reveal_child(False)
return
self.destroy()
if (event.get_state() & Gdk.ModifierType.CONTROL_MASK and
event.keyval == Gdk.KEY_Return or
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment