# -*- coding: utf-8 -*-
#Author: Pierre Ratinaud
#Copyright (c) 2008-2012, Pierre Ratinaud
-#Lisense: GNU GPL
+#License: GNU GPL
from optparse import OptionParser
#------------------------------------
import wx
#import wx.aui
-if wx.__version__ >= '2.11' :
- import wx.lib.agw.aui as aui
-else :
- import aui
+import wx.lib.agw.aui as aui
import wx.html
import wx.grid
import wx.lib.hyperlink as hl
from checkversion import NewVersion
from guifunct import *
from tableau import Tableau
-from dialog import PrefDialog, EncodeDialog, CorpusPref
+from dialog import PrefDialog, CorpusPref
from tabfrequence import Frequences
from tabchi2 import ChiSquare
#from tabstudent import MakeStudent
from textaslexico import Lexico
from textsimi import SimiTxt, SimiFromCluster
from textwordcloud import WordCloud, ClusterCloud
-from profile_segment import ProfileSegment
+#from profile_segment import ProfileSegment
#from textcheckcorpus import checkcorpus
from openanalyse import OpenAnalyse
-from corpus import BuildFromAlceste, Builder
+from corpus import Builder
from sheet import MySheet
from checkinstall import CreateIraDirectory, CheckRPath, FindRPAthWin32, FindRPathNix, CheckRPackages, IsNew, UpgradeConf, CopyConf, RLibsAreInstalled
from chemins import RscriptsPath, ConstructConfigPath, ConstructDicoPath, ConstructGlobalPath, PathOut
# f.write('')
self.history = History(os.path.join(UserConfigPath, 'history.db'))
self.tree = LeftTree(self)
- self._mgr.AddPane(self.tree, aui.AuiPaneInfo().Name("lefttree").Caption("Navigateur").
+ self._mgr.AddPane(self.tree, aui.AuiPaneInfo().Name("lefttree").Caption(_(u"Navigator").decode('utf8')).
Left().MinSize(wx.Size(200,500)).Layer(1).Position(1).CloseButton(False).MaximizeButton(True).
MinimizeButton(True))
dlg = wx.MessageDialog(self, msg, u"Problème de configuration", wx.OK | wx.NO_DEFAULT | wx.ICON_WARNING)
dlg.CenterOnParent()
if dlg.ShowModal() in [wx.ID_NO, wx.ID_CANCEL]:
- evt.Veto()
+ pass
dlg.Destroy()
dlg = wx.MessageDialog(self, u"Installation OK", u"Installation", wx.OK | wx.ICON_INFORMATION)
dlg.CenterOnParent()
if dlg.ShowModal() in [wx.ID_NO, wx.ID_CANCEL]:
- evt.Veto()
+ evt.Veto()
def DisEnSaveTabAs(self, DISEN):
#Disable SaveTabAs
inputname, self.input_path = OnOpen(self, "Texte")
self.filename = self.input_path[0]
if inputname:
- self.OpenText()
+ self.OpenText()
def OnViewData(self, event):
print self.type
self._mgr.Update()
def OpenText(self):
- #dial = EncodeDialog(self)
dlg = wx.ProgressDialog("Ouverture...",
"Veuillez patienter...",
maximum=2,
elif True in ListFile :
remove = True
if remove:
- del self.DictTab[TabTitle]
+ del self.DictTab[TabTitle]
else :
self.LastTabClose()
else :
self.res = DoSimi(self, param = None)
#self.res = Verges(self)
if self.res.val == wx.ID_OK :
- PlaySound(self)
+ PlaySound(self)
except :
BugReport(self)
#################################################################
class IntroPanel(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent)
- #col = randint(0, 255)
- #col1 = randint(0,255)
- #col2 = randint(0,255)
- col = 0
- bckgrdcolor = wx.Colour(col, col, col)
+ col = randint(0, 255)
+ col1 = randint(0,255)
+ col2 = randint(0,255)
+ col = 57
+ bckgrdcolor = wx.Colour(col, col1, col2)
self.SetBackgroundColour(bckgrdcolor)
txtcolour = wx.Colour(250, 250, 250)
linkcolor = wx.Colour(255, 0, 0)
self.hyper_lerass.UpdateLink()
blank = wx.StaticText(PanelPres, -1, u'\n')
blank1 = wx.StaticText(PanelPres, -1, u'\n')
- labellicence = wx.StaticText(PanelPres, -1, u'Licence GNU GPL')
+ labellicence = wx.StaticText(PanelPres, -1, _(u"License GNU GPL").decode('utf8'))
labellicence.SetForegroundColour(txtcolour)
labellicence.SetBackgroundColour(bckgrdcolor)
labelcopy = wx.StaticText(PanelPres, -1, ConfigGlob.get('DEFAULT', 'copyright'))