X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=functions.py;h=1e8141f33a2fad7c95df1d16c87cfb93efc2878b;hp=6ad088dc9dcd063d8b0ed63910144e2c34a4fb66;hb=4c959afafbe1f1ec29b01fa8db3ae1af1b8cd4cf;hpb=83802e662acde01994fe0bd2bf6978fef90b14f8 diff --git a/functions.py b/functions.py index 6ad088d..1e8141f 100644 --- a/functions.py +++ b/functions.py @@ -189,6 +189,19 @@ class History : def rmtab(self, analyse) : del self.opened[analyse['uuid']] + + def update(self, analyse) : + if 'matrix_name' in analyse : + self.matrixanalyse[analyse['uuid']].update(analyse) + elif 'corpus_name' in analyse : + self.corpus[analyse['uuid']].update(analyse) + elif 'corpus' in analyse : + self.analyses[analyse['uuid']].update(analyse) + else : + toupdate = [an for an in self.matrixanalyse[analyse['matrix']]['analyses'] if an['uuid'] == analyse['uuid']] + toupdate[0].update(analyse) + self.write() + self.read() def clean(self) : corpustodel = [corpus for corpus in self.history if not os.path.exists(corpus['ira'])] @@ -682,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) :