close the groupchat window when esc is pressed

This commit is contained in:
Yann Leboulanger 2005-04-06 07:31:18 +00:00
parent 62e05c0c2c
commit bac6ec88dd
2 changed files with 4 additions and 2 deletions

View File

@ -57,6 +57,8 @@ class Groupchat_window(Chat):
self.on_chat_notebook_switch_page) self.on_chat_notebook_switch_page)
self.xml.signal_connect('on_set_button_clicked', \ self.xml.signal_connect('on_set_button_clicked', \
self.on_set_button_clicked) self.on_set_button_clicked)
self.xml.signal_connect('on_groupchat_window_key_press_event', \
self.on_groupchat_window_key_press_event)
def on_groupchat_window_delete_event(self, widget, event): def on_groupchat_window_delete_event(self, widget, event):
"""close window""" """close window"""
@ -486,8 +488,7 @@ class Groupchat_window(Chat):
self.redraw_tab(room_jid) self.redraw_tab(room_jid)
self.show_title() self.show_title()
def on_join_groupchat_window_key_press_event(self, widget, event): def on_groupchat_window_key_press_event(self, widget, event):
print 'called'
if event.keyval == gtk.keysyms.Escape: if event.keyval == gtk.keysyms.Escape:
widget.get_toplevel().destroy() widget.get_toplevel().destroy()

View File

@ -7648,6 +7648,7 @@ Custom</property>
<signal name="focus_in_event" handler="on_groupchat_window_focus_in_event" last_modification_time="Sat, 05 Mar 2005 00:34:51 GMT"/> <signal name="focus_in_event" handler="on_groupchat_window_focus_in_event" last_modification_time="Sat, 05 Mar 2005 00:34:51 GMT"/>
<signal name="delete_event" handler="on_groupchat_window_delete_event" last_modification_time="Mon, 07 Mar 2005 11:19:05 GMT"/> <signal name="delete_event" handler="on_groupchat_window_delete_event" last_modification_time="Mon, 07 Mar 2005 11:19:05 GMT"/>
<signal name="destroy" handler="on_groupchat_window_destroy" last_modification_time="Mon, 07 Mar 2005 16:46:37 GMT"/> <signal name="destroy" handler="on_groupchat_window_destroy" last_modification_time="Mon, 07 Mar 2005 16:46:37 GMT"/>
<signal name="key_press_event" handler="on_groupchat_window_key_press_event" last_modification_time="Wed, 06 Apr 2005 07:24:19 GMT"/>
<child> <child>
<widget class="GtkVBox" id="vbox27"> <widget class="GtkVBox" id="vbox27">