close add contact window when we press esc (fix #204)
This commit is contained in:
parent
583591e18e
commit
11ef5a0787
|
@ -290,6 +290,10 @@ class Add_new_contact_window:
|
||||||
self.xml.signal_autoconnect(self)
|
self.xml.signal_autoconnect(self)
|
||||||
self.window.show_all()
|
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):
|
def on_cancel_button_clicked(self, widget):
|
||||||
'''When Cancel button is clicked'''
|
'''When Cancel button is clicked'''
|
||||||
self.window.destroy()
|
self.window.destroy()
|
||||||
|
|
|
@ -1595,6 +1595,7 @@
|
||||||
<property name="skip_pager_hint">False</property>
|
<property name="skip_pager_hint">False</property>
|
||||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
||||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</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>
|
<child>
|
||||||
<widget class="GtkVBox" id="vbox8">
|
<widget class="GtkVBox" id="vbox8">
|
||||||
|
|
Loading…
Reference in New Issue