# -*- coding: utf-8 -*-
#Author: Pierre Ratinaud
#Copyright (c) 2008 Pierre Ratinaud
-#Lisense: GNU/GPL
+#License: GNU/GPL
import wx
from functions import sortedby, DoConf
'nr' : [wx.NewId(),wx.NewId(),u"Formes non reconnues"],
}
self.parent=parent
- self.keys=self.parent.parent.keys
+ self.keys=self.parent.keys
self.listlabel=[]
self.listspin=[]
self.listbutton=[]
self.listcle.append(cle)
- self.button_val = wx.Button(self,wx.ID_OK)
+ self.button_val = wx.Button(self, wx.ID_OK)
for button in self.listbutton :
self.Bind(wx.EVT_BUTTON,self.OnShowList,button)
- self.Bind(wx.EVT_BUTTON, self.OnApply, self.button_val)
+ #self.Bind(wx.EVT_BUTTON, self.OnApply, self.button_val)
- self.dico=self.parent.parent.parent.lexique#'dictionnaires/lexique.txt')
+ self.dico=self.parent.parent.lexique#'dictionnaires/lexique.txt')
self.__set_properties()
self.__do_layout()
def CreateList(self,type):
if type=='ver_sup' or type=='ver':
- liste=[descr[0] for item,descr in self.dico.iteritems() if descr[1]==type]
+ #liste=[descr[0] for item,descr in self.dico.iteritems() if descr[1]==type]
+ liste = [forme for forme in self.corpus.formes if self.corpus.formes[forme].gram==type]
liste=list(set(liste))
else:
- liste=[item for item,descr in self.dico.iteritems() if descr[1]==type]
+ #liste=[item for item,descr in self.dico.iteritems() if descr[1]==type]
+ liste = [forme for forme in self.corpus.formes if self.corpus.formes[forme].gram==type]
liste.sort()
txt=('\n').join(liste)
- ListViewFrame=ListView(self.parent.parent)
+ ListViewFrame=ListView(self.parent)
ListViewFrame.text_ctrl_1.WriteText(txt)
ListViewFrame.text_ctrl_1.SetSelection(0,0)
ListViewFrame.text_ctrl_1.SetInsertionPoint(0)
ListViewFrame.CenterOnParent()
val=ListViewFrame.ShowModal()
- def OnApply(self,evt):
- for i in range(0,len(self.listlabel)):
- self.keys[self.listcle[i]] = self.listspin[i].GetValue()
- DoConf().makeoptions(['KEY'], [self.keys], outfile = self.parent.parent.ira.ConfigPath['key'])
- #self.Disable()
- self.Destroy()
- #return
-
-
class ListView(wx.Dialog):
def __init__(self, parent):
wx.Dialog.__init__(self, parent, size=wx.Size(200, 400),style=wx.DEFAULT_DIALOG_STYLE)