close add contact window when we press esc (fix #204)

This commit is contained in:
Yann Leboulanger 2005-04-28 13:01:47 +00:00
parent 583591e18e
commit 11ef5a0787
2 changed files with 5 additions and 0 deletions

View File

@ -290,6 +290,10 @@ class Add_new_contact_window:
self.xml.signal_autoconnect(self)
self.window.show_all()
def on_add_new_contact_window_key_press_event(self, widget, event):
if event.keyval == gtk.keysyms.Escape: # ESCAPE
self.window.destroy()
def on_cancel_button_clicked(self, widget):
'''When Cancel button is clicked'''
self.window.destroy()

View File

@ -1595,6 +1595,7 @@
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<signal name="key_press_event" handler="on_add_new_contact_window_key_press_event" last_modification_time="Thu, 28 Apr 2005 12:59:51 GMT"/>
<child>
<widget class="GtkVBox" id="vbox8">