Skip to content
Snippets Groups Projects
Commit 5b940a24 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

close history window on ESC. fixes #3233

parent aff3697f
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@
<property name="role">history</property>
<property name="default_width">650</property>
<property name="default_height">350</property>
<signal name="key_press_event" handler="on_history_window_key_press_event"/>
<signal name="destroy" handler="on_history_window_destroy"/>
<child>
<widget class="GtkVBox" id="vbox">
......@@ -17,7 +18,6 @@
<widget class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<child>
<widget class="GtkAlignment" id="alignment1">
......@@ -64,7 +64,6 @@ Enter the jid of a groupchat or a contact here. For online accounts you can even
<widget class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<child>
<widget class="GtkAlignment" id="alignment2">
......
......@@ -142,6 +142,10 @@ class HistoryWindow:
self.history_textview.del_handlers()
del gajim.interface.instances['logs']
def on_history_window_key_press_event(self, widget, event):
if event.keyval == gtk.keysyms.Escape:
self.window.destroy()
def on_close_button_clicked(self, widget):
self.window.destroy()
......
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