...
[iramuteq] / ProfList.py
index 7308f43..a127a04 100644 (file)
@@ -20,14 +20,14 @@ import  wx.lib.mixins.listctrl  as  listmix
 #from tabsimi import DoSimi
 from listlex import ListForSpec
 from chemins import ConstructPathOut, ffr
-from dialog import PrefExport, PrefUCECarac, SearchDial, message, MessageImage, BarFrame
-from tableau import Tableau, copymatrix
+from dialog import PrefUCECarac, SearchDial, message, BarFrame
+from tableau import copymatrix
 from search_tools import SearchFrame
 import webbrowser
 #import cStringIO
 import tempfile
 import codecs
-from functions import exec_rcode, progressbar, treat_var_mod, doconcorde
+from functions import progressbar, treat_var_mod, doconcorde
 from PrintRScript import barplot
 from textclassechd import ClasseCHD
 from shutil import copyfile
@@ -45,6 +45,7 @@ class ProfListctrlPanel(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.Col
         self.cl = cl
         self.var_mod = {}
         self.them_mod = {}
+        self.ira = wx.GetApp().GetTopWindow()
 
         line1 = profclasse.pop(0)
         classen = [line for line in profclasse if line[0] != '*' and line[0] != '*****']
@@ -518,6 +519,7 @@ class ProfListctrlPanel(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.Col
                           'halo' : 0,
                           'tmpchi': self.tmpchi,
                           'fromprof' : True,
+                          'edgecurved' : True,
                           }
         act = {}
         tableau = copymatrix(tableau)
@@ -545,7 +547,7 @@ class ProfListctrlPanel(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.Col
                         'lem' : self.Source.parametres['lem'],
                         'tmpchi' : self.tmpchi}
         #try :
-        self.parent.SimiFromCluster(self.parent, self.Source.corpus, self.la, self.lfreq, self.lchi, self.cl - 1, parametres = parametres, dlg = progressbar(self, 4))
+        self.parent.SimiFromCluster(self.parent, self.Source.corpus, self.la, self.lfreq, self.lchi, self.cl - 1, parametres = parametres, dlg = progressbar(self.ira, 4))
         #except :
         #    print 'not acitve'
 
@@ -559,7 +561,7 @@ class ProfListctrlPanel(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.Col
                         'lem' : self.Source.parametres['lem'],
                         'tmpchi' : self.tmpchi}
 
-        self.parent.SimiFromCluster(self.parent, self.Source.corpus, self.la, self.lfreq, self.lchi, self.cl - 1, parametres = parametres, dlg = progressbar(self, 4))
+        self.parent.SimiFromCluster(self.parent, self.Source.corpus, self.la, self.lfreq, self.lchi, self.cl - 1, parametres = parametres, dlg = progressbar(self.ira, 4))
 
     def on_segments(self,evt) :
         dlg = progressbar(self, 2)
@@ -616,11 +618,11 @@ class ProfListctrlPanel(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.Col
             dlg.Update(3, u'concordancier...')
             ucis_txt, ucestxt = doconcorde(corpus, nuces, self.la, uci = uci)
             items = dict([[i, '<br>'.join([ucis_txt[i], '<table bgcolor = #1BF0F7 border=0><tr><td><b>score : %.2f</b></td></tr></table><br>' % ntab2[i][0], ucestxt[i]])] for i, uce in enumerate(nuces)])
-            dlg.Update(4, u'texte...')
+            dlg.Destroy()
             win = message(self, items, u"Segments de texte caractéristiques - Classe %i" % self.cl, (750, 600), uceids = nuces)
+            #win.SetWindowStyle(wx.STAY_ON_TOP)
             #win.html = '<html>\n' + '<br>'.join(['<br>'.join([ucis_txt[i], '<table bgcolor = #1BF0F7 border=0><tr><td><b>score : %.2f</b></td></tr></table>' % ntab2[i][0], ucestxt[i]]) for i in range(0,len(ucestxt))]) + '\n</html>'
             #win.HtmlPage.SetPage(win.html)
-            dlg.Destroy()
             win.Show(True)
     
     def on_tablex(self, evt):