X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=dialog.py;h=630b60f2371f3fb8a765a50a02f895482a985ee1;hp=d9185387530a9b046bef8efb1d9670eca1642d73;hb=b19770356272772c8c8ba75f351520eca186bd19;hpb=12b4b71c8c8feb6154abc04dfa9bb93a521ef789 diff --git a/dialog.py b/dialog.py index d918538..630b60f 100755 --- a/dialog.py +++ b/dialog.py @@ -410,6 +410,20 @@ nouvelle version est disponible""" 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_RIGHT|wx.ALL, 5 ) + + msg = u"""Langue de l'interface""" + self.m_staticText45 = wx.StaticText( self, wx.ID_ANY, msg, wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText45.Wrap( -1 ) + fgSizer1.Add( self.m_staticText45, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + self.m_staticText46 = wx.StaticText( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText46.Wrap( -1 ) + fgSizer1.Add( self.m_staticText46, 0, wx.ALL, 5 ) + + self.listlangues = [ u"french", u"english" ] + self.langues = wx.Choice( self, wx.ID_ANY, (200, -1), choices = self.listlangues) + #self.langues.SetSelection( 0 ) + fgSizer1.Add( self.langues, 0, wx.ALIGN_RIGHT|wx.ALL, 5 ) msg = u"""Vérifier l'installation des bibliothèques de R""" @@ -504,6 +518,7 @@ bibliothèques de R""" if self.parent.pref.getboolean('iramuteq', 'checkupdate') : val2 = 0 else : val2 = 1 self.m_radioBox2.SetSelection(val2) + self.langues.SetSelection(self.listlangues.index(self.parent.pref.get('iramuteq', 'guilanguage'))) if sys.platform == 'win32' : if self.parent.pref.getboolean('iramuteq', 'R_mem') : self.m_checkBox1.SetValue(True) @@ -542,6 +557,7 @@ bibliothèques de R""" if self.m_radioBox2.GetSelection() == 0 : valcheck = 'true' else : valcheck = 'false' parent.pref.set('iramuteq', 'checkupdate', valcheck) + parent.pref.set('iramuteq', 'guilanguage', self.listlangues[self.langues.GetSelection()]) if sys.platform == 'win32' : if self.m_checkBox1.GetValue() : parent.pref.set('iramuteq', 'R_mem', 'true') @@ -1076,18 +1092,8 @@ class StatDialog(wx.Dialog): wx.Dialog.__init__(self, *args, **kwds) self.fileout = "" self.parent = parent - #box = wx.BoxSizer(wx.HORIZONTAL) self.label_lem = wx.StaticText(self, -1, u"Lemmatisation") self.radio_lem = wx.RadioBox(self, -1, u"", choices=['oui', 'non'], majorDimension=0, style=wx.RA_SPECIFY_ROWS) - #sizer.Add(box, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT, 5) - #box2 = wx.BoxSizer(wx.HORIZONTAL) - #self.txt_exp = wx.StaticText(self, -1, u"Utiliser le Dict. des expressions") - #self.exp = wx.RadioBox(self, -1, u"", choices=['oui', 'non'], majorDimension=0, style=wx.RA_SPECIFY_ROWS) - #self.label_uce = wx.StaticText(self, -1, u"Construire des UCE") - #self.check_uce = wx.CheckBox(self, -1) - #txt = """Nombre d'occurrences par uce""" - #self.label_occuce = wx.StaticText(self, -1, txt) - #self.spin_ctrl_4 = wx.SpinCtrl(self, -1, "",size = (100,30), min=10, max=1000, initial = 35) #txt = u"""Fréquence minimum d'une forme #analysée (0 = non utilisé)""" #self.label_8 = wx.StaticText(self, -1, txt) @@ -1139,31 +1145,9 @@ class StatDialog(wx.Dialog): def __set_properties(self) : self.SetTitle(u'Préférences') - #self.spin_ctrl_4.Enable(False) - #self.spin_ctrl_5.Enable(False) - #self.spin_max_actives.Enable(False) - -# def OnCheckUce(self, evt) : -# if self.check_uce.GetValue() : -# self.spin_ctrl_4.Enable(True) -# self.spin_ctrl_5.Enable(True) -# if self.spin_ctrl_5.GetValue() > 0 : -# self.spin_max_actives.Enable(False) -# else : -# self.spin_max_actives.Enable(True) -# else : -# self.spin_ctrl_4.Enable(False) -# self.spin_ctrl_5.Enable(False) -# self.spin_max_actives.Enable(False) - -# def OnSpin(self, evt) : -# if self.spin_ctrl_5.GetValue() > 0 : -# self.spin_max_actives.Enable(False) -# else : -# self.spin_max_actives.Enable(True) def OnKeys(self, evt): - dial = AlcOptFrame(self.parent, self) + dial = AlcOptFrame(self, self.parent.parent) dial.CenterOnParent() val = dial.ShowModal()