Reviewers: ,
Please review this at http://codereview.tryton.org/140001/ Affected files: M tryton/gui/window/view_form/view/form_gtk/many2many.py Index: tryton/gui/window/view_form/view/form_gtk/many2many.py =================================================================== --- a/tryton/gui/window/view_form/view/form_gtk/many2many.py +++ b/tryton/gui/window/view_form/view/form_gtk/many2many.py @@ -36,6 +36,7 @@ self.wid_text = gtk.Entry() self.wid_text.set_property('width_chars', 13) self.wid_text.connect('activate', self._sig_activate) + self.wid_text.connect('focus-out-event', self._focus_out) hbox.pack_start(self.wid_text, expand=True, fill=True) self.but_add = gtk.Button() @@ -114,6 +115,11 @@ widget.modify_text(gtk.STATE_INSENSITIVE, self.colors['text_color_insensitive']) + def _focus_out(self, *args): + value = self.wid_text.get_text() + if value: + self._sig_add() + def _sig_add(self, *args): domain = self.field.domain_get(self.record) context = self.field.context_get(self.record) -- [email protected] mailing list
