From 4c959afafbe1f1ec29b01fa8db3ae1af1b8cd4cf Mon Sep 17 00:00:00 2001 From: Pierre Ratinaud Date: Thu, 4 Dec 2014 23:01:56 +0100 Subject: [PATCH] ... --- functions.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/functions.py b/functions.py index 6373176..1e8141f 100644 --- a/functions.py +++ b/functions.py @@ -695,20 +695,20 @@ def read_list_file(filename, encoding = sys.getdefaultencoding()): def progressbar(self, maxi) : - if 'parent' in dir(self) : - parent = self.parent - else : - parent = self + ira = wx.GetApp().GetTopWindow() + parent = ira try : maxi = int(maxi) except : maxi = 1 - return wx.ProgressDialog("Traitements", + prog = wx.ProgressDialog("Traitements", "Veuillez patienter...", maximum=maxi, parent=parent, style=wx.PD_APP_MODAL | wx.PD_AUTO_HIDE | wx.PD_ELAPSED_TIME | wx.PD_CAN_ABORT ) + prog.SetIcon(ira._icon) + return prog def treat_var_mod(variables) : -- 2.7.4