From 7ccbc81deb1d6ef688e13d6dfeaeb0d0ef59fba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 26 Nov 2008 20:50:58 +0100 Subject: [PATCH] Use the right parent window for message and warning and add missing gettext for issue619 --- tryton/gui/window/win_import.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tryton/gui/window/win_import.py b/tryton/gui/window/win_import.py index 7e3353ef19..e9280b706c 100644 --- a/tryton/gui/window/win_import.py +++ b/tryton/gui/window/win_import.py @@ -240,8 +240,8 @@ class WinImport(object): def sig_autodetect(self, widget=None): fname = self.import_csv_file.get_filename() if not fname: - common.message('You must select an import file first !', - self.parent) + common.message(_('You must select an import file first!'), + self.dialog) return True csvsep = self.import_csv_sep.get_text() csvdel = self.import_csv_del.get_text() @@ -252,7 +252,7 @@ class WinImport(object): try: data = csv.reader(file(fname), quotechar=csvdel, delimiter=csvsep) except: - common.warning(_('Error opening CSV file'), self.parent, + common.warning(_('Error opening CSV file'), self.dialog, _('Error')) return True self.sig_unsel_all() @@ -267,7 +267,7 @@ class WinImport(object): except Exception, exception: common.warning(_('Error processing the file at field %s.\n' \ 'Error message:\n%s') % (word, str(exception)), - self.parent, _('Error')) + self.dialog, _('Error')) return True def sig_sel_all(self, widget=None):