##############################################################@
self.DisEnSaveTabAs(False)
- self.ShowMenu(_("View").decode('utf8'), False)
- self.ShowMenu(_("Matrix analysis").decode('utf8'), False)
- self.ShowMenu(_("Text analysis").decode('utf8'), False)
+ self.ShowMenu('view', False)
+ self.ShowMenu('matrix', False)
+ self.ShowMenu('text', False)
self._mgr.Update()
pass
dlg.Destroy()
-
def setlangue(self) :
self.pref.read(self.ConfigPath['preferences'])
guilangue = self.pref.get('iramuteq', 'guilanguage')
item.Enable(DISEN)
def ShowMenu(self, menu, Show=True):
- menu_pos = self.mb.FindMenu(menu)
- self.mb.EnableTop(menu_pos, Show)
- self.mb.UpdateMenus()
+ if menu == 'text' :
+ menu_pos = 4
+ elif menu == 'matrix' :
+ menu_pos = 3
+ elif menu == 'view' :
+ menu_pos = 2
+ else :
+ menu_pos = None
+
+ #menu_pos = self.mb.FindMenu(menu)
+ if not menu_pos is None :
+ self.mb.EnableTop(menu_pos, Show)
+ self.mb.UpdateMenus()
#--------------------------------------------------------------------
def OnOpenAnalyse(self, event):
self.AnalysePath = OnOpen(self, "Analyse")
OpenAnalyse(self, self.AnalysePath[1][0], True)
- self.ShowMenu(_("View"))
+ self.ShowMenu('view')
def OnOpenText(self, event):
inputname, self.input_path = OnOpen(self, "Texte")
else :
count = 1
keepGoing = dlg.Update(count, u"Lecture du fichier")
- self.ShowMenu(_(u"View").decode('utf8'))
- self.ShowMenu(_(u"Text analysis").decode('utf8'))
- self.ShowMenu(_(u"Matrix analysis").decode('utf8'), False)
+ self.ShowMenu('view')
+ self.ShowMenu('text')
+ self.ShowMenu('matrix', False)
self.type = "Texte"
self.DataTxt = False
self.Text = ''
if 'parametres' in dir(npage) :
self.tree.GiveFocus(uuid=npage.parametres['uuid'])
if npage.parametres.get('matrix', False) :
- self.ShowMenu(_(u"Text analysis").decode('utf8'), False)
- self.ShowMenu(_(u"Matrix analysis").decode('utf8'), True)
+ self.ShowMenu('text', False)
+ self.ShowMenu('matrix', True)
elif npage.parametres.get('corpus', False) :
- self.ShowMenu(_(u"Text analysis").decode('utf8'))
- self.ShowMenu(_(u"Matrix analysis").decode('utf8'), False)
+ self.ShowMenu('text')
+ self.ShowMenu('matrix', False)
def OnCloseTab(self, evt):
#log.info('Closing tab %s' % str(evt.GetEventObject()))
elif data.startswith("EVT_"):
events.append(data)
self.parent = parent
+ self.ira = parent
self.events = events
self.styles = treestyles
self.item = None
if event is not None :
item = event.GetItem()
pydata = self.GetPyData(item)
+
if pydata is not None :
+ if 'corpus_name' in pydata :
+ self.ira.ShowMenu('text', True)
+ self.ira.ShowMenu('matrix', False)
+ if 'matrix_name' in pydata :
+ self.ira.ShowMenu('text', False)
+ self.ira.ShowMenu('matrix', True)
self.pydata = pydata
if pydata['uuid'] in self.parent.history.opened :
for i in range(self.parent.nb.GetPageCount()) :