Skip to content
Snippets Groups Projects
Commit 83f4d6e1 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

OptionsDialog: Destroy dialog on ESC

parent b9aba06f
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,11 @@ class OptionsDialog(Gtk.ApplicationWindow):
self.show_all()
self.listbox.connect('row-activated', self.on_row_activated)
self.connect('key-press-event', self.on_key_press)
def on_key_press(self, widget, event):
if event.keyval == Gdk.KEY_Escape:
self.destroy()
@staticmethod
def on_row_activated(listbox, row):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment