Author: asterix Date: 2007-10-09 20:34:10 +0200 (Tue, 09 Oct 2007) New Revision: 8898
Modified: trunk/data/glade/history_window.glade trunk/src/history_window.py Log: close history window on ESC. fixes #3233
Modified: trunk/data/glade/history_window.glade =================================================================== --- trunk/data/glade/history_window.glade 2007-10-09 17:48:22 UTC (rev 8897) +++ trunk/data/glade/history_window.glade 2007-10-09 18:34:10 UTC (rev 8898) @@ -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 @@ <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">
Modified: trunk/src/history_window.py =================================================================== --- trunk/src/history_window.py 2007-10-09 17:48:22 UTC (rev 8897) +++ trunk/src/history_window.py 2007-10-09 18:34:10 UTC (rev 8898) @@ -142,6 +142,10 @@ 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()