...
[iramuteq] / functions.py
index 6373176..f38a5c5 100644 (file)
@@ -695,20 +695,21 @@ 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)
+    prog.SetSize((400,150))
+    return prog
 
 
 def treat_var_mod(variables) :