From 8de02fd73773cbff7633a5f7b2120ea9b29424d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 14 Jun 2008 20:08:37 +0200 Subject: [PATCH] Add default response to one2many and many2mane dialog --- tryton/gui/window/view_form/view/form_gtk/many2one.py | 2 ++ tryton/gui/window/view_form/view/form_gtk/one2many.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tryton/gui/window/view_form/view/form_gtk/many2one.py b/tryton/gui/window/view_form/view/form_gtk/many2one.py index 9d8533be00..1c85fdc202 100644 --- a/tryton/gui/window/view_form/view/form_gtk/many2one.py +++ b/tryton/gui/window/view_form/view/form_gtk/many2one.py @@ -46,6 +46,8 @@ class Dialog(object): self.but_ok.add_accelerator('clicked', self.accel_group, gtk.keysyms.Return, gtk.gdk.CONTROL_MASK, gtk.ACCEL_VISIBLE) + self.dia.set_default_response(gtk.RESPONSE_OK) + scroll = gtk.ScrolledWindow() scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) scroll.set_placement(gtk.CORNER_TOP_LEFT) diff --git a/tryton/gui/window/view_form/view/form_gtk/one2many.py b/tryton/gui/window/view_form/view/form_gtk/one2many.py index 9774996e5d..615d98df74 100644 --- a/tryton/gui/window/view_form/view/form_gtk/one2many.py +++ b/tryton/gui/window/view_form/view/form_gtk/one2many.py @@ -147,6 +147,8 @@ class Dialog(object): self.but_ok.add_accelerator('clicked', self.accel_group, gtk.keysyms.Return, gtk.gdk.CONTROL_MASK, gtk.ACCEL_VISIBLE) + self.dia.set_default_response(gtk.RESPONSE_OK) + self.default_get_ctx = default_get_ctx menuitem_title = None