else :
img = 24
self.SetItemImage(last, img, CT.TreeItemIcon_Normal)
- self.SetItemImage(last, 13, CT.TreeItemIcon_Expanded)
+ self.SetItemImage(last, img, CT.TreeItemIcon_Expanded)
self.matroot = self.AppendItem(self.root, u'Matrices')
self.SetPyData(self.matroot, {'uuid': 'matroot'})
else :
img = 24
self.SetItemImage(last, img, CT.TreeItemIcon_Normal)
- self.SetItemImage(last, 13, CT.TreeItemIcon_Expanded)
+ self.SetItemImage(last, img, CT.TreeItemIcon_Expanded)
else :
orphmat.append(matrix)
if not item in [self.textroot, self.matroot] :
menu = wx.Menu()
- info = menu.Append(wx.ID_ANY, "Informations")
+ info = menu.Append(wx.ID_ANY, _(u"Informations").encode('utf8'))
+ rename = menu.Append(wx.ID_ANY, _(u"Rename").encode('utf8'))
menu.AppendSeparator()
if 'corpus_name' in pydata :
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 corpora from metadata').decode('utf8'))
- subcorpusfromtheme = subcorpus.Append(wx.ID_ANY, _(u'Sub corpora from thematic').decode('utf8'))
- menu.AppendMenu(-1, _(u"SubCorpora").decode('utf8'), subcorpus)
+ 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'))
+ menu.AppendMenu(-1, _(u"Sub corpus").decode('utf8'), subcorpus)
menu.AppendSeparator()
self.Bind(wx.EVT_MENU, self.OnReinert, reinert)
#self.Bind(wx.EVT_MENU, self.OnPam, pam)
itemid = item.GetId()
itemtext = item.GetText()
menu.Append(itemid, itemtext)
+ split = wx.Menu()
+ splitfromvar = split.Append(-1, _(u"Split from variable").decode('utf8'))
+ menu.AppendMenu(-1, _(u"Split matrix").decode('utf8'), split)
+ self.Bind(wx.EVT_MENU, self.OnSplitFromVar, splitfromvar)
#print item, itemid, itemtext
#menu = self.parent.matrix_menu
#freq = menu.Append(wx.ID_ANY, _(u"Frequency").decode('utf8'))
profsr = menu.Append(wx.ID_ANY, _(u"Repeated segments profiles").decode('utf8'))
profgram = menu.Append(wx.ID_ANY, _(u"POS profiles").decode('utf8'))
- export_corpus = menu.Append(wx.ID_ANY, _(u"Export corpora").decode('utf8'))
- colored = menu.Append(wx.ID_ANY, _(u"Colored corpora").decode('utf8'))
+ export_corpus = menu.Append(wx.ID_ANY, _(u"Export corpus").decode('utf8'))
+ colored = menu.Append(wx.ID_ANY, _(u"Colored corpus").decode('utf8'))
navig = menu.Append(wx.ID_ANY, _(u"Navigator").decode('utf8'))
statclasse = menu.Append(wx.ID_ANY, _(u"Clusters statistics").decode('utf8'))
rapport = menu.Append(wx.ID_ANY, _(u"Report").decode('utf8'))
#self.Bind(wx.EVT_MENU, self.OnDisableItem, item7)
#self.Bind(wx.EVT_MENU, self.OnItemIcons, item8)
self.Bind(wx.EVT_MENU, self.OnItemInfo, info)
+ self.Bind(wx.EVT_MENU, self.OnRename, rename)
self.Bind(wx.EVT_MENU, self.OnItemDelete, itemdelete)
#self.Bind(wx.EVT_MENU, self.OnItemPrepend, item11)
#self.Bind(wx.EVT_MENU, self.OnItemAppend, item12)
def OnSimiTab(self, evt):
self.parent.OnSimiTab(evt, self.getmatrix())
+
+ def OnProto(self, evt):
+ self.parent.OnProto(evt, self.getmatrix())
+
+ def OnSplitFromVar(self, evt):
+ self.parent.OnSplitVar(evt, self.getmatrix())
def OnCHDReinert(self, evt):
self.parent.OnCHDReinert(evt, self.getmatrix())
dlg.Destroy()
def OnColored(self, evt) :
- dial = PrefSimpleFile(self, self.parent, **{'mask' : '*.html', 'title': _(u"Colored corpora").decode('utf8')})
+ dial = PrefSimpleFile(self, self.parent, **{'mask' : '*.html', 'title': _(u"Colored corpus").decode('utf8')})
dial.fbb.SetValue(os.path.join(os.path.dirname(self.page.dictpathout['ira']), 'corpus_couleur.html'))
dial.CenterOnParent()
res = dial.ShowModal()
dial = wx.MessageDialog(self, self.page.pathout['classe_x_export.txt'], u"Export", wx.OK|wx.ICON_INFORMATION)
dial.ShowModal()
dial.Destroy()
+
+ def OnRename(self, event):
+ pydata = self.itemdict['pydata']
+ print pydata
def OnItemBackground(self, event):
self.SetItemImage(item, img, CT.TreeItemIcon_Normal)
self.SetItemImage(item, 13, CT.TreeItemIcon_Expanded)
self.SetItemBold(item, bold)
+ self.SelectItem(item)
def AddMatAnalyse(self, parametres, itemParent = None, bold = True) :
uuid = parametres.get('matrix', None)
img = 24
self.SetItemImage(item, img, CT.TreeItemIcon_Normal)
self.SetItemImage(item, 13, CT.TreeItemIcon_Expanded)
- self.SetItemBold(item, bold)
+ self.SetItemBold(item, bold)
+ self.SelectItem(item)
def OnItemAppend(self, item):
if 'corpus_name' in item :
else :
img = 24
self.SetItemImage(child, img, CT.TreeItemIcon_Normal)
- self.SetItemImage(child, 13, CT.TreeItemIcon_Expanded)
+ self.SetItemImage(child, img, CT.TreeItemIcon_Expanded)
self.SetItemBold(child, True)
#dlg = wx.TextEntryDialog(self, "Please Enter The New Item Name", 'Item Naming', 'Python')