From bbfcf780e71cf494dfa5d23a3495456e6c6989d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 16 Oct 2008 17:22:53 +0200 Subject: [PATCH] Improve title name for one2many in the menu and dialog --- tryton/gui/window/view_form/view/form_gtk/one2many.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) 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 fa362bbae5..acc36595d6 100644 --- a/tryton/gui/window/view_form/view/form_gtk/one2many.py +++ b/tryton/gui/window/view_form/view/form_gtk/one2many.py @@ -230,10 +230,7 @@ class Dialog(object): self.screen.add_view_id(False, 'form', display=True, context=default_get_ctx) - name = attrs.get('string', '') - if name: - name += ' - ' - name += self.screen.current_view.title + name = self.screen.current_view.title self.dia.set_title(name) if menuitem_title: menuitem_title.get_child().set_text(name) @@ -471,11 +468,7 @@ class One2Many(WidgetInterface): default_get=attrs.get('default_get', {}), exclude_field=attrs.get('relation_field', None)) self.screen.signal_connect(self, 'record-message', self._sig_label) - name = attrs.get('string', '') - if name: - name += ' - ' - name += self.screen.current_view.title - menuitem_title.get_child().set_text(name) + menuitem_title.get_child().set_text(attrs.get('string', '')) self.widget.pack_start(self.screen.widget, expand=True, fill=True)