def focus_out(self, widget, event): if vkb_cancel_on_out: self.dlg.response(gtk.RESPONSE_CANCEL) else : self.dlg.response(gtk.RESPONSE_OK)