X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=tree.py;h=12627f455964c5d8b04b5de2b0b3096dba9bee95;hp=3d8196c6ac18bba2b70567aa76904637da9fdea5;hb=ead6ffe8d4024e2afb3dc0c8457cd78dd15768e5;hpb=a8c7144718828c3f7745c054d1e16c100734d9d5 diff --git a/tree.py b/tree.py index 3d8196c..12627f4 100644 --- a/tree.py +++ b/tree.py @@ -394,11 +394,11 @@ class LeftTree(CT.CustomTreeCtrl): stat = menu.Append(wx.ID_ANY, _(u"Statistics").decode('utf8')) spec = menu.Append(wx.ID_ANY, _(u"Specificities and CA").decode('utf8')) classification = wx.Menu() - reinert = classification.Append(wx.ID_ANY, _(u"Reinert method").decode('utf8')) + reinert = classification.Append(wx.ID_ANY, _(u"Reinert's Method").decode('utf8')) #pam = classification.Append(wx.ID_ANY, u"Par matrice des distances") menu.AppendMenu(-1, _(u"Clustering").decode('utf8'), classification) - simi = menu.Append(wx.ID_ANY, _(u"Similarities analysis").decode('utf8')) - wdc = menu.Append(wx.ID_ANY, _(u"Wordcloud").decode('utf8')) + simi = menu.Append(wx.ID_ANY, _(u"Similarities Analysis").decode('utf8')) + wdc = menu.Append(wx.ID_ANY, _(u"WordCloud").decode('utf8')) subcorpus = wx.Menu() subcorpusfrommeta = subcorpus.Append(wx.ID_ANY, _(u'Sub corpus from metadata').decode('utf8')) subcorpusfromtheme = subcorpus.Append(wx.ID_ANY, _(u'Sub corpus from thematic').decode('utf8')) @@ -750,7 +750,25 @@ class LeftTree(CT.CustomTreeCtrl): def OnRename(self, event): pydata = self.itemdict['pydata'] - print pydata + if 'matrix_name' in pydata : + name = 'matrix_name' + elif 'corpus_name' in pydata : + name = 'corpus_name' + else : + name = 'name' + oldname = pydata[name] + dlg = wx.TextEntryDialog(self, "Please Enter The New Item Name", 'Item Naming', oldname) + if dlg.ShowModal() == wx.ID_OK: + newname = dlg.GetValue() + dlg.Destroy() + pydata[name] = newname + Totconf = DoConf(configfile=pydata['ira']) + conf = Totconf.getoptions() + conf[name] = newname + Totconf.makeoptions(Totconf.getsections(), [conf]) + self.history.update(pydata) + self.SetItemText(self.current, newname) + self.EnsureVisible(self.current) def OnItemBackground(self, event):