...
authorPierre Ratinaud <ratinaud@univ-tlse2.fr>
Wed, 17 Dec 2014 23:20:12 +0000 (00:20 +0100)
committerPierre Ratinaud <ratinaud@univ-tlse2.fr>
Wed, 17 Dec 2014 23:20:12 +0000 (00:20 +0100)
checkversion.py
dialog.py
guifunct.py
images/splash.png
images/splash.svg
iramuteq.py
layout.py
parse_factiva_xml.py
tree.py

index 743f7ca..d1211ee 100644 (file)
@@ -41,7 +41,7 @@ def NewVersion(parent):
 Une nouvelle version d'IRaMuTeQ (%s) est disponible.
 Vous pouvez la télécharger à partir du site web iramuteq :
 http://www.iramuteq.org""" % '-'.join(lastversion)
-        dlg = wx.MessageDialog(parent, msg, u"Nouvelle version disponible", wx.OK | wx.NO_DEFAULT | wx.ICON_WARNING)
+        dlg = wx.MessageDialog(parent, msg, u"Nouvelle version disponible", wx.OK | wx.ICON_WARNING)
         dlg.CenterOnParent()
         if dlg.ShowModal() in [wx.ID_NO, wx.ID_CANCEL]:
              evt.Veto()
index 818485e..bfd17e2 100755 (executable)
--- a/dialog.py
+++ b/dialog.py
@@ -1881,38 +1881,38 @@ class PrefDendro ( wx.Dialog ):
         self.m_staticline41 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
         fgSizer1.Add( self.m_staticline41, 0, wx.EXPAND |wx.ALL, 5 )        
         
+        if self.param['typedendro'] == 'classique' :
+            self.m_staticText5 = wx.StaticText( self, wx.ID_ANY, _(u"Color or black and white").decode('utf8'), wx.DefaultPosition, wx.DefaultSize, 0 )
+            self.m_staticText5.Wrap( -1 )
+            fgSizer1.Add( self.m_staticText5, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
         
-        self.m_staticText5 = wx.StaticText( self, wx.ID_ANY, _(u"Color or black and white").decode('utf8'), wx.DefaultPosition, wx.DefaultSize, 0 )
-        self.m_staticText5.Wrap( -1 )
-        fgSizer1.Add( self.m_staticText5, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+            m_radioBox1Choices = [ _(u"color").decode('utf8'), _(u"black and white").decode('utf8') ]
+            self.m_radioBox1 = wx.RadioBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, m_radioBox1Choices, 1, wx.RA_SPECIFY_COLS )
+            self.m_radioBox1.SetSelection( 0 )
+            fgSizer1.Add( self.m_radioBox1, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT|wx.ALL, 5 )
         
-        m_radioBox1Choices = [ _(u"color").decode('utf8'), _(u"black and white").decode('utf8') ]
-        self.m_radioBox1 = wx.RadioBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, m_radioBox1Choices, 1, wx.RA_SPECIFY_COLS )
-        self.m_radioBox1.SetSelection( 0 )
-        fgSizer1.Add( self.m_radioBox1, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT|wx.ALL, 5 )
+            self.m_staticline5 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
+            fgSizer1.Add( self.m_staticline5, 0, wx.EXPAND |wx.ALL, 5 )
         
-        self.m_staticline5 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
-        fgSizer1.Add( self.m_staticline5, 0, wx.EXPAND |wx.ALL, 5 )
+            self.m_staticline6 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
+            fgSizer1.Add( self.m_staticline6, 0, wx.EXPAND |wx.ALL, 5 )
         
-        self.m_staticline6 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
-        fgSizer1.Add( self.m_staticline6, 0, wx.EXPAND |wx.ALL, 5 )
+            bSizer4 = wx.BoxSizer( wx.HORIZONTAL )
         
-        bSizer4 = wx.BoxSizer( wx.HORIZONTAL )
-        
-        self.m_staticText6 = wx.StaticText( self, wx.ID_ANY, _(u"Add cluster size").decode('utf8'), wx.DefaultPosition, wx.DefaultSize, 0 )
-        self.m_staticText6.Wrap( -1 )
-        bSizer4.Add( self.m_staticText6, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+            self.m_staticText6 = wx.StaticText( self, wx.ID_ANY, _(u"Add cluster size").decode('utf8'), wx.DefaultPosition, wx.DefaultSize, 0 )
+            self.m_staticText6.Wrap( -1 )
+            bSizer4.Add( self.m_staticText6, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
         
-        self.m_checkBox1 = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
-        self.m_checkBox1.SetValue(True) 
-        bSizer4.Add( self.m_checkBox1, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+            self.m_checkBox1 = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
+            self.m_checkBox1.SetValue(True) 
+            bSizer4.Add( self.m_checkBox1, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
         
-        fgSizer1.Add( bSizer4, 1, wx.EXPAND, 5 )
+            fgSizer1.Add( bSizer4, 1, wx.EXPAND, 5 )
         
-        m_radioBox2Choices = [ _(u"circular diagram").decode('utf8'), _(u"bar").decode('utf8') ]
-        self.m_radioBox2 = wx.RadioBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, m_radioBox2Choices, 1, wx.RA_SPECIFY_COLS )
-        self.m_radioBox2.SetSelection( 0 )
-        fgSizer1.Add( self.m_radioBox2, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT|wx.ALL, 5 )
+            m_radioBox2Choices = [ _(u"circular diagram").decode('utf8'), _(u"bar").decode('utf8') ]
+            self.m_radioBox2 = wx.RadioBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, m_radioBox2Choices, 1, wx.RA_SPECIFY_COLS )
+            self.m_radioBox2.SetSelection( 0 )
+            fgSizer1.Add( self.m_radioBox2, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT|wx.ALL, 5 )
         
         self.m_staticline7 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
         fgSizer1.Add( self.m_staticline7, 0, wx.EXPAND |wx.ALL, 5 )
@@ -1942,10 +1942,11 @@ class PrefDendro ( wx.Dialog ):
         self.m_spinCtrl2.SetValue(self.param['width'])
         self.m_spinCtrl1.SetValue(self.param['height'])
         self.m_choice1.SetSelection(self.param['type_dendro'])
-        self.m_radioBox1.SetSelection(self.param['color_nb'])
-        self.m_checkBox1.SetValue(self.param['taille_classe'])
-        self.m_radioBox2.SetSelection(self.param['type_tclasse'])
         self.choice_format.SetSelection(self.param['svg'])
+        if self.param['typedendro'] == 'classique' :
+            self.m_radioBox1.SetSelection(self.param['color_nb'])
+            self.m_checkBox1.SetValue(self.param['taille_classe'])
+            self.m_radioBox2.SetSelection(self.param['type_tclasse'])
     
     def __del__( self ):
         pass
index 6396a5b..03afc95 100644 (file)
@@ -999,8 +999,6 @@ class CreateTgenDialog ( wx.Frame ):
         
         bSizer2 = wx.BoxSizer( wx.VERTICAL )
         
-        namesizer = wx.BoxSizer( wx.VERTICAL )
-        
         namepan = wx.Panel(self, -1)
         
         fgSizer3 = wx.FlexGridSizer( 0, 2, 0, 0 )
@@ -1014,15 +1012,12 @@ class CreateTgenDialog ( wx.Frame ):
         
         self.m_textCtrl1 = wx.TextCtrl( namepan, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
         self.m_textCtrl1.SetMinSize( wx.Size( 250,-1 ) )
-
         
         fgSizer3.Add( self.m_textCtrl1, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
         
         namepan.SetSizer( fgSizer3 )
         
-        namesizer.Add( namepan, 1, wx.EXPAND, 5 )
-        
-        bSizer2.Add( namesizer, 1, wx.ALIGN_CENTER_HORIZONTAL, 5 )
+        bSizer2.Add( namepan, 1, wx.EXPAND, 5 )
         
         self.ip = VItemsPicker(self,-1, lemlist, _(u'Forms').decode('utf8'), _('Selection').decode('utf8'))
         self.ip._source.SetMinSize( wx.Size( 350, 400 ) )
index 0e60598..38f9b9b 100644 (file)
Binary files a/images/splash.png and b/images/splash.png differ
index cf09a24..9f5f1af 100644 (file)
            x="110.10663"
            y="146.45171"
            style="font-size:14px;font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#1c1010;fill-opacity:1;font-family:gargi;-inkscape-font-specification:gargi Medium" /></flowRegion><flowPara
-         id="flowPara3866">Version 0.7 alpha 1</flowPara></flowRoot>    <flowRoot
+         id="flowPara3866">Version 0.7 alpha 2</flowPara></flowRoot>    <flowRoot
        xml:space="preserve"
        id="flowRoot3868"
        style="fill:black;stroke:none;stroke-opacity:1;stroke-width:1px;stroke-linejoin:miter;stroke-linecap:butt;fill-opacity:1;font-family:Bitstream Vera Sans;font-style:normal;font-weight:normal;font-size:40px;line-height:125%;letter-spacing:0px;word-spacing:0px"
index 492e4ea..f1898a8 100644 (file)
@@ -29,7 +29,7 @@ import wx.html
 import wx.grid
 import wx.lib.hyperlink as hl
 #------------------------------------
-from functions import BugReport, PlaySound, History
+from functions import BugReport, PlaySound, History, progressbar
 from checkversion import NewVersion
 from guifunct import *
 from tableau import Tableau
@@ -313,7 +313,7 @@ class IraFrame(wx.Frame):
         #view_menu.AppendSeparator()
         matrix_menu = wx.Menu()
         matanalyses = [[ID_Freq, _(u"Frequencies").decode('utf8'), 'freq'],
-                       [ID_Freq, _(u"Multiple  Frequencies").decode('utf8'), 'freqmulti'],
+                       [ID_FreqMulti, _(u"Multiple  Frequencies").decode('utf8'), 'freqmulti'],
                        [ID_Chi2, _(u"Chi2").decode('utf8'), 'chi2'],
                        {'name' : _(u"Clustering").decode('utf8'),
                         'content' : [[ID_CHDReinert, _(u"Reinert's Method").decode('utf8'), 'reinertmatrix']]},
@@ -786,17 +786,12 @@ class IraFrame(wx.Frame):
             wx.SafeYield()
             corpus = builder.doanalyse()
             self.history.add(corpus.parametres)
-            self.tree.OnItemAppend(corpus.parametres)
             OpenAnalyse(self, corpus.parametres)
+            self.tree.OnItemAppend(corpus.parametres)
             del busy
             
     def OpenText(self):
-        dlg = wx.ProgressDialog("Ouverture...",
-                                   "Veuillez patienter...",
-                                   maximum=2,
-                                   parent=self,
-                                   style=wx.PD_APP_MODAL | wx.PD_AUTO_HIDE | wx.PD_ELAPSED_TIME | wx.PD_CAN_ABORT
-                                   )
+        dlg = progressbar(self, 5) 
         
         builder =  Builder(self, dlg)
         if builder.res == wx.ID_OK :
index a7d7b2e..7992583 100644 (file)
--- a/layout.py
+++ b/layout.py
@@ -548,7 +548,7 @@ class OpenCHDS():
             dial.Destroy()
             self.corpus.get_stat_by_cluster(fileout)
             msg = u"Fini !"
-            dlg = wx.MessageDialog(self.parent, msg, _(u"Stat by cluster").decode('utf8'), wx.OK | wx.NO_DEFAULT | wx.ICON_INFORMATION)
+            dlg = wx.MessageDialog(self.parent, msg, _(u"Stat by cluster").decode('utf8'), wx.OK | wx.ICON_INFORMATION)
             dlg.CenterOnParent()
             if dlg.ShowModal() == wx.ID_OK :
                 dlg.Destroy()
@@ -870,10 +870,11 @@ class GraphPanelDendro(wx.Panel):
         self.param['width'] = dial.m_spinCtrl2.GetValue()
         self.param['height'] = dial.m_spinCtrl1.GetValue()
         self.param['type_dendro'] = dial.m_choice1.GetSelection()
-        self.param['color_nb'] = dial.m_radioBox1.GetSelection()
-        self.param['taille_classe'] = dial.m_checkBox1.GetValue()
-        self.param['type_tclasse'] = dial.m_radioBox2.GetSelection()
         self.param['svg'] = dial.choice_format.GetSelection()
+        if self.param['typedendro'] == 'classique' :
+            self.param['color_nb'] = dial.m_radioBox1.GetSelection()
+            self.param['taille_classe'] = dial.m_checkBox1.GetValue()
+            self.param['type_tclasse'] = dial.m_radioBox2.GetSelection()
 
     def make_dendro(self, dendro = 'simple') :
         if self.param['svg'] :
@@ -961,6 +962,7 @@ class GraphPanelDendro(wx.Panel):
 
 
     def ondendro(self, evt):
+        self.param['typedendro'] = 'classique'
         dial = PrefDendro(self.ira, self.param)
         val = dial.ShowModal()
         if val == wx.ID_OK :
@@ -968,6 +970,7 @@ class GraphPanelDendro(wx.Panel):
             self.make_dendro()
     
     def ondendrotexte(self, evt):
+        self.param['typedendro'] = 'texte'
         dial = PrefDendro(self.ira, self.param)
         val = dial.ShowModal()
         if val == wx.ID_OK :
@@ -975,6 +978,7 @@ class GraphPanelDendro(wx.Panel):
             self.make_dendro(dendro = 'texte')
 
     def ondendrocloud(self, evt):
+        self.param['typedendro'] = 'cloud'
         dial = PrefDendro(self.ira, self.param)
         val = dial.ShowModal()
         if val == wx.ID_OK :
index d43e9ae..35d150e 100644 (file)
@@ -179,13 +179,13 @@ class ImportFactiva():
                     res = ParseEuropress(xmldir, corp_out, 'utf8', 'utf8')
                 del busy
                 if res == 'nofile' :
-                    dlg = wx.MessageDialog(parent, u"Pas de fichiers dans %s" % xmldir, 'ATTENTION', wx.OK | wx.NO_DEFAULT | wx.ICON_WARNING)
+                    dlg = wx.MessageDialog(parent, u"Pas de fichiers dans %s" % xmldir, 'ATTENTION', wx.OK | wx.ICON_WARNING)
                     dlg.CenterOnParent()
                     dlg.ShowModal()
                     dlg.Destroy()
                 else :
                     msg = '\n'.join([_(u"Corpus created :").decode('utf8'), corp_out, _(u"Do you want to open it in IRaMuTeQ ?").decode('utf8')])
-                    dlg = wx.MessageDialog(parent, msg, _(u'Information').decode('utf8'), wx.YES_NO | wx.NO_DEFAULT | wx.ICON_INFORMATION | wx.STAY_ON_TOP)
+                    dlg = wx.MessageDialog(parent, msg, _(u'Information').decode('utf8'), wx.YES_NO | wx.ICON_INFORMATION | wx.STAY_ON_TOP)
                     dlg.CenterOnParent()
                     val = dlg.ShowModal()
                     if val == wx.ID_YES :
diff --git a/tree.py b/tree.py
index 0745ebd..a4c3aa3 100644 (file)
--- a/tree.py
+++ b/tree.py
@@ -143,6 +143,13 @@ class LeftTree(CT.CustomTreeCtrl):
 
         self.history = parent.history
         self.h = self.history.history
+        
+        idopenfolder = wx.NewId()
+        accel_tbl = wx.AcceleratorTable([(wx.ACCEL_CTRL,  ord('E'),  idopenfolder)])
+        self.SetAcceleratorTable(accel_tbl)
+        
+        self.Bind(wx.EVT_MENU, self.OnOpenFolder, id=idopenfolder)
+        
         self.root = self.AddRoot("Iramuteq")
         
         if not(self.GetAGWWindowStyleFlag() & CT.TR_HIDE_ROOT):
@@ -578,7 +585,7 @@ class LeftTree(CT.CustomTreeCtrl):
             self.page.corpus.export_corpus_classes(dial.fbb.GetValue(), alc = alc, lem = lem, uci = uci)
             msg = u"Fini !"
             dial.Destroy()
-            dlg = wx.MessageDialog(self.parent, msg, u"Export", wx.OK | wx.NO_DEFAULT | wx.ICON_INFORMATION)
+            dlg = wx.MessageDialog(self.parent, msg, u"Export", wx.OK | wx.ICON_INFORMATION)
             dlg.CenterOnParent()
             dlg.ShowModal()
             dlg.Destroy()
@@ -599,7 +606,7 @@ class LeftTree(CT.CustomTreeCtrl):
             with open(fileout, 'w') as f :
                 f.write(txt)
             msg = ' !\n'.join([_(u"Done").decode('utf8'), _(u"Open in a web browser ?").decode('utf8')])
-            dlg = wx.MessageDialog(self.parent, msg, u"Corpus en couleur", wx.NO | wx.YES | wx.NO_DEFAULT | wx.ICON_QUESTION)
+            dlg = wx.MessageDialog(self.parent, msg, u"Corpus en couleur", wx.NO | wx.YES | wx.ICON_QUESTION)
             dlg.CenterOnParent()
             if dlg.ShowModal() == wx.ID_YES :
                 webbrowser.open(fileout)
@@ -620,7 +627,7 @@ class LeftTree(CT.CustomTreeCtrl):
             dial.Destroy()
             self.page.corpus.get_stat_by_cluster(fileout)
             msg = u"Fini !"
-            dlg = wx.MessageDialog(self.parent, msg, _(u"Clusters statistics").decode('utf8'), wx.OK | wx.NO_DEFAULT | wx.ICON_INFORMATION)
+            dlg = wx.MessageDialog(self.parent, msg, _(u"Clusters statistics").decode('utf8'), wx.OK | wx.ICON_INFORMATION)
             dlg.CenterOnParent()
             if dlg.ShowModal() == wx.ID_OK :
                 dlg.Destroy()        
@@ -648,7 +655,7 @@ class LeftTree(CT.CustomTreeCtrl):
             with open(fileout, 'w') as f :
                 f.write(self.page.debtext + '\n' + GetTxtProfile(self.page.DictProfile, self.page.cluster_size))
             msg = u"Fini !"
-            dlg = wx.MessageDialog(self.parent, msg, _(u"Report").decode('utf8'), wx.OK | wx.NO_DEFAULT | wx.ICON_INFORMATION)
+            dlg = wx.MessageDialog(self.parent, msg, _(u"Report").decode('utf8'), wx.OK | wx.ICON_INFORMATION)
             dlg.CenterOnParent()
             dlg.ShowModal()
             dlg.Destroy()