X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=dialog.py;h=22fb4957f497698526912a4c386a355a2089df0b;hp=ae59c3b630869eb91dee61da509fda6aa5e767eb;hb=ed89938c9c6812c3f9cef21200973e62cf3d3232;hpb=6523e3596df7ec9b7b94b875593953d4b34b6117 diff --git a/dialog.py b/dialog.py index ae59c3b..22fb495 100755 --- a/dialog.py +++ b/dialog.py @@ -79,7 +79,7 @@ class FileOptionDialog(wx.Dialog): grid_sizer.Add(self.choice4, 1, wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL, 5) self.choice3.SetSelection(0) self.choice4.SetSelection(0) - self.text = wx.StaticText(self, -1, _(u"Character set").decode('utf8')) + self.text = wx.StaticText(self, -1, _(u"Characters set").decode('utf8')) grid_sizer.Add(self.text, 1, wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL, 5) self.le = [enc[0].lower() for enc in encodages] self.list_encodages = wx.Choice(self, -1, (25, 30), choices=[' - '.join(encodage) for encodage in encodages]) @@ -593,7 +593,7 @@ class PrefGraph(wx.Dialog): self.spin_f2 = wx.SpinCtrl(self, -1, '',size = (100,30), min=1, max=self.paramgraph['clnb']-1) self.label_f3 = wx.StaticText(self, -1, _(u"Factor z : ").decode('utf8')) self.spin_f3 = wx.SpinCtrl(self, -1, '',size = (100,30), min=1, max=self.paramgraph['clnb']-1) - self.label_sphere = wx.StaticText(self, -1, _(u"Sphere transparency").decode('utf8')) + self.label_sphere = wx.StaticText(self, -1, _(u"Spheres transparency").decode('utf8')) self.slider_sphere = wx.Slider(self, -1, 10, 1, 100, size = (255,-1), style = wx.SL_HORIZONTAL | wx.SL_AUTOTICKS | wx.SL_LABELS) self.label_film = wx.StaticText(self, -1, _(u"Make a movie").decode('utf8')) @@ -1270,7 +1270,7 @@ class PrefSegProf(wx.Dialog) : self.spin_min.SetValue(2) fgSizer1.Add( self.spin_min, 0, wx.ALL, 5 ) - self.m_staticText4 = wx.StaticText( self, wx.ID_ANY, _(u"Minimum size of segments").decode('utf8'), wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText4 = wx.StaticText( self, wx.ID_ANY, _(u"Maxmum size of segments").decode('utf8'), wx.DefaultPosition, wx.DefaultSize, 0 ) self.m_staticText4.Wrap( -1 ) fgSizer1.Add( self.m_staticText4, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) @@ -1358,7 +1358,7 @@ class PrefQuestAlc ( wx.Dialog ): fgSizer1.Add( self.but_prec, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) if not sim : - self.lab_nbcl = wx.StaticText( self, wx.ID_ANY, _(u"Number of terminal clusters in phase 1").decode('utf8'), wx.DefaultPosition, wx.DefaultSize, 0 ) + self.lab_nbcl = wx.StaticText( self, wx.ID_ANY, _(u"Number of terminal clusters on phase 1").decode('utf8'), wx.DefaultPosition, wx.DefaultSize, 0 ) self.lab_nbcl.Wrap( -1 ) fgSizer1.Add( self.lab_nbcl, 0, wx.ALL, 5 ) @@ -1564,7 +1564,7 @@ class FindInCluster(wx.Frame): class SearchDial ( wx.Frame ): def __init__( self, parent, listctrl, col, shown): - wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_FRAME_STYLE ) + wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_FRAME_STYLE | wx.STAY_ON_TOP ) self.parent = parent self.listctrl = listctrl self.col = col @@ -1852,6 +1852,21 @@ class PrefDendro ( wx.Dialog ): self.m_staticline4 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) fgSizer1.Add( self.m_staticline4, 0, wx.EXPAND |wx.ALL, 5 ) + + self.text_format_image = wx.StaticText( self, wx.ID_ANY, _(u"Image format").decode('utf8'), wx.DefaultPosition, wx.DefaultSize, 0 ) + self.text_format_image.Wrap( -1 ) + fgSizer1.Add( self.text_format_image, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + self.choice_format = wx.Choice( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, ['png', 'svg'], 0 ) + self.choice_format.SetSelection( 0 ) + fgSizer1.Add( self.choice_format, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT|wx.ALL, 5 ) + + self.m_staticline31 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer1.Add( self.m_staticline31, 0, wx.EXPAND |wx.ALL, 5 ) + + self.m_staticline41 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer1.Add( self.m_staticline41, 0, wx.EXPAND |wx.ALL, 5 ) + self.m_staticText5 = wx.StaticText( self, wx.ID_ANY, _(u"Color or black and white").decode('utf8'), wx.DefaultPosition, wx.DefaultSize, 0 ) self.m_staticText5.Wrap( -1 ) @@ -1916,6 +1931,7 @@ class PrefDendro ( wx.Dialog ): self.m_radioBox1.SetSelection(self.param['color_nb']) self.m_checkBox1.SetValue(self.param['taille_classe']) self.m_radioBox2.SetSelection(self.param['type_tclasse']) + self.choice_format.SetSelection(self.param['svg']) def __del__( self ): pass @@ -2247,9 +2263,9 @@ class ChiDialog(wx.Dialog): class CorpusPref ( wx.Dialog ): def __init__( self, parent, parametres ): - wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = _(u"Settings").decode('utf8'), pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE ) + wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = _(u"Settings").decode('utf8'), pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE | wx.STAY_ON_TOP ) self.parent = parent - langues_n = [u'français', u'english', u'german (expérimentale)', u'italian', u'swedish (expérimentale)', u'portuguese (expérimentale)', u'spanish (expérimentale)', u'greek (expériementale)', u'galician (expérimentale)', u'autre...'] + langues_n = [u'français', u'english', u'german (expérimentale)', u'italian', u'swedish (expérimentale)', u'portuguese', u'spanish (expérimentale)', u'greek (expériementale)', u'galician (expérimentale)', u'autre...'] self.langues = [u'french', u'english', u'german', u'italian', u'swedish', u'portuguese', u'spanish', u'greek', u'galician', u'other'] self.encodages = [enc[0].lower() for enc in encodages] @@ -2274,7 +2290,7 @@ class CorpusPref ( wx.Dialog ): self.txtpath.Wrap( -1 ) fgSizer1.Add( self.txtpath, 0, wx.ALL, 5 ) - self.m_staticText18 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Corpus' name", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText18 = wx.StaticText( self.m_panel1, wx.ID_ANY, _(u"Corpus' name").decode('utf8'), wx.DefaultPosition, wx.DefaultSize, 0 ) self.m_staticText18.Wrap( -1 ) fgSizer1.Add( self.m_staticText18, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT|wx.ALL, 5 ) @@ -2299,7 +2315,7 @@ class CorpusPref ( wx.Dialog ): self.lang_choices.SetSelection( 0 ) fgSizer1.Add( self.lang_choices, 0, wx.ALL, 5 ) - self.m_staticText19 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Dictionary", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText19 = wx.StaticText( self.m_panel1, wx.ID_ANY, _(u"Dictionary").decode('utf8'), wx.DefaultPosition, wx.DefaultSize, 0 ) self.m_staticText19.Wrap( -1 ) fgSizer1.Add( self.m_staticText19, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT|wx.ALL, 5 ) @@ -2309,7 +2325,7 @@ class CorpusPref ( wx.Dialog ): fgSizer5.SetFlexibleDirection( wx.BOTH ) fgSizer5.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) - self.radio_default_dict = wx.RadioButton( self.m_panel1, wx.ID_ANY, u"Default", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.radio_default_dict = wx.RadioButton( self.m_panel1, wx.ID_ANY, _(u"Default").decode('utf8'), wx.DefaultPosition, wx.DefaultSize, 0 ) fgSizer5.Add( self.radio_default_dict, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) self.defaultdictpath = wx.TextCtrl( self.m_panel1, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size( 300,-1 ), wx.TE_READONLY ) @@ -2317,11 +2333,13 @@ class CorpusPref ( wx.Dialog ): fgSizer5.Add( self.defaultdictpath, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - self.radio_other_dict = wx.RadioButton( self.m_panel1, wx.ID_ANY, u"Other", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.radio_other_dict = wx.RadioButton( self.m_panel1, wx.ID_ANY, _(u"Other").decode('utf8'), wx.DefaultPosition, wx.DefaultSize, 0 ) fgSizer5.Add( self.radio_other_dict, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - self.otherdictpath = wx.FilePickerCtrl( self.m_panel1, wx.ID_ANY, wx.EmptyString, u"Select a file", u"*.*", wx.DefaultPosition, wx.Size( 300,-1 ), wx.FLP_DEFAULT_STYLE ) + self.otherdictpath = wx.FilePickerCtrl( self.m_panel1, wx.ID_ANY, wx.EmptyString, _(u"Select a file").decode('utf8'), u"*.*", wx.DefaultPosition, wx.Size( 300,-1 ), wx.FLP_DEFAULT_STYLE ) + self.otherdictpath.SetMinSize(wx.Size(300, -1)) fgSizer5.Add( self.otherdictpath, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + self.otherdictpath.Enable( False ) bSizer2.Add( fgSizer5, 1, wx.EXPAND, 5 ) @@ -2477,7 +2495,9 @@ class CorpusPref ( wx.Dialog ): # Connect Events self.Bind(wx.EVT_BUTTON, self.OnChangeDir, self.m_button1) self.lang_choices.Bind( wx.EVT_CHOICE, self.OnChangeLangage ) - self.radio_other_dict.Bind( wx.EVT_RADIOBUTTON, self.changedictchoice ) + self.radio_other_dict.Bind( wx.EVT_RADIOBUTTON, self.changedictchoice ) + self.radio_default_dict.Bind( wx.EVT_RADIOBUTTON, self.changedictchoice ) + self.otherdictpath.Bind( wx.EVT_FILEPICKER_CHANGED, self.selectdict) self.setparametres(parametres) self.SetSizer( bSizer1 ) @@ -2505,6 +2525,7 @@ class CorpusPref ( wx.Dialog ): self.encodage_choices.SetSelection(enc) self.lang_choices.SetSelection(0) self.repout_choices.SetValue(parametres['pathout']) + self.corpusname.SetValue(parametres['corpus_name']) self.ucimark_choices.SetSelection(parametres['ucimark']) self.check_expressions.SetValue(parametres['expressions']) self.check_makeuce.SetValue(parametres['douce']) @@ -2517,12 +2538,14 @@ class CorpusPref ( wx.Dialog ): self.check_tirets.SetValue(parametres['tiret']) self.check_tolist.SetValue(parametres['tolist']) self.check_ponct.SetValue(parametres['keep_ponct']) + self.defaultdictpath.SetValue(self.langues[0]) def doparametres(self) : parametres = {} parametres['encoding'] = encodages[self.encodage_choices.GetSelection()][0] parametres['lang'] = self.langues[self.lang_choices.GetSelection()] parametres['pathout'] = self.repout_choices.GetValue() + parametres['corpus_name'] = self.corpusname.GetValue() parametres['ucimark'] = self.ucimark_choices.GetSelection() parametres['expressions'] = self.check_expressions.GetValue() parametres['douce'] = self.check_makeuce.GetValue() @@ -2535,6 +2558,8 @@ class CorpusPref ( wx.Dialog ): parametres['tiret'] = self.check_tirets.GetValue() parametres['tolist'] = self.check_tolist.GetValue() parametres['keep_ponct'] = self.check_ponct.GetValue() + if self.radio_other_dict.GetValue() : + parametres['dictionary'] = self.otherdictpath.GetPath() for val in parametres : if isinstance(parametres[val], bool) : if parametres[val] : @@ -2544,10 +2569,21 @@ class CorpusPref ( wx.Dialog ): return parametres def OnChangeLangage(self, evt): - pass + self.defaultdictpath.SetValue(self.langues[self.lang_choices.GetSelection()]) def changedictchoice(self, evt): - pass + if self.radio_default_dict.GetValue() : + self.otherdictpath.Enable( False ) + self.m_sdbSizer1OK.Enable( True ) + else : + self.otherdictpath.Enable( True ) + if self.otherdictpath.GetPath() == '' : + self.m_sdbSizer1OK.Enable( False ) + + def selectdict(self, evt): + if self.otherdictpath.GetPath() != '' : + self.m_sdbSizer1OK.Enable( True ) + class ConcordList(wx.HtmlListBox): @@ -2563,11 +2599,14 @@ class ConcordList(wx.HtmlListBox): return self.concord[index] #+ '
' class message(wx.Frame): - def __init__(self, parent, items, title, size, save = True): + def __init__(self, parent, items, title, size, save = True, uceids = None): wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = title, pos = wx.DefaultPosition, size = size, style = wx.DEFAULT_FRAME_STYLE ) - self.save = save + self.save = save + self.uceids = uceids + self.ira = wx.GetApp().GetTopWindow() + self.SetIcon(self.ira._icon) self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize ) - + self.items = items self.html = "" #self.HtmlPage=wx.html.HtmlWindow(self, -1) self.HtmlPage = ConcordList(self, items) @@ -2582,18 +2621,24 @@ class message(wx.Frame): if self.save : self.button_2 = wx.Button(self, wx.ID_SAVE) self.Bind(wx.EVT_BUTTON, self.OnSavePage, self.button_2) + if self.uceids is not None : + self.butsub = wx.Button(self, -1, _(u"Build sub corpus").decode('utf8')) + self.Bind(wx.EVT_BUTTON, self.OnSub, self.butsub) self.Bind(wx.EVT_CLOSE, self.OnCloseWindow) self.__do_layout() def __do_layout(self): sizer_2 = wx.BoxSizer(wx.VERTICAL) sizer_2.Add(self.HtmlPage, 1, wx.EXPAND|wx.ADJUST_MINSIZE, 0) - m_sdbSizer1 = wx.StdDialogButtonSizer() - m_sdbSizer1.AddButton( self.button_1 ) + #m_sdbSizer1 = wx.StdDialogButtonSizer() + m_sdbSizer1 = wx.BoxSizer(wx.HORIZONTAL) + m_sdbSizer1.Add( self.button_1 , 0, wx.RIGHT | wx.EXPAND) if self.save : - m_sdbSizer1.AddButton( self.button_2 ) - m_sdbSizer1.Realize() - sizer_2.Add(m_sdbSizer1, 0, wx.EXPAND, 5) + m_sdbSizer1.Add( self.button_2 , 0, wx.RIGHT | wx.EXPAND) + if self.uceids is not None : + m_sdbSizer1.Add( self.butsub , 0, wx.RIGHT | wx.EXPAND) + #m_sdbSizer1.Realize() + sizer_2.Add(m_sdbSizer1, 0, wx.RIGHT | wx.EXPAND, 5) self.SetSizer(sizer_2) self.Layout() sizer_2.Fit( self ) @@ -2605,6 +2650,7 @@ class message(wx.Frame): ) dlg.SetFilterIndex(2) dlg.CenterOnParent() + self.html = '
'.join([self.items[i] for i in range(0,len(self.items))]) if dlg.ShowModal() == wx.ID_OK: path = dlg.GetPath() with open(path, 'w') as f : @@ -2615,6 +2661,10 @@ class message(wx.Frame): def OnCloseWindow(self, event): self.Destroy() + + def OnSub(self ,evt): + parametres = {'fromuceids' : True, 'uceids' : self.uceids} + self.ira.OnSubText(None, parametres) @@ -2707,7 +2757,7 @@ class ExtractDialog ( wx.Dialog ): m_sdbSizer1.AddButton( self.m_sdbSizer1OK ) self.m_sdbSizer1Cancel = wx.Button( self, wx.ID_CANCEL ) m_sdbSizer1.AddButton( self.m_sdbSizer1Cancel ) - m_sdbSizer1.Realize(); + m_sdbSizer1.Realize() fgSizer1.Add( m_sdbSizer1, 1, wx.EXPAND, 5 ) @@ -2744,49 +2794,101 @@ class ExtractDialog ( wx.Dialog ): def __del__( self ): pass -class FreqDialog(wx.Dialog): - def __init__(self, parent, ID, listcol, title, size) : - wx.Dialog.__init__(self, parent, ID, title, size=size, pos=wx.DefaultPosition,style=wx.DEFAULT_DIALOG_STYLE | wx.CANCEL | wx.OK ) - pre = wx.PreDialog() - pre.SetExtraStyle(wx.DIALOG_EX_CONTEXTHELP) - pre.Create(parent, ID, title, wx.DefaultPosition, size, wx.DEFAULT_DIALOG_STYLE | wx.CANCEL | wx.OK) - self.PostCreate(pre) - self.parent = parent - sizer = wx.BoxSizer(wx.VERTICAL) - #self.content = parent.content +# class FreqDialog(wx.Dialog): +# def __init__(self, parent, ID, listcol, title, size) : +# wx.Dialog.__init__(self, parent, ID, title, size=size, pos=wx.DefaultPosition,style=wx.DEFAULT_DIALOG_STYLE | wx.CANCEL | wx.OK ) +# pre = wx.PreDialog() +# pre.SetExtraStyle(wx.DIALOG_EX_CONTEXTHELP) +# pre.Create(parent, ID, title, wx.DefaultPosition, size, wx.DEFAULT_DIALOG_STYLE | wx.CANCEL | wx.OK) +# self.PostCreate(pre) +# self.parent = parent +# sizer = wx.BoxSizer(wx.VERTICAL) +# #self.content = parent.content +# self.header = listcol +# #LABELLIST = [] +# #for i in self.header: +# # forme = i +# # if len(forme) > 60 : +# # LABELLIST.append(i[0:60]) +# # else: +# # LABELLIST.append(i) +# self.list_box_1 = wx.ListBox(self, -1, choices=self.header, style=wx.LB_EXTENDED | wx.LB_HSCROLL) +# sizer.Add(self.list_box_1, 0, 5) +# +# btnsizer = wx.BoxSizer(wx.HORIZONTAL) +# +# btn = wx.Button(self, wx.ID_CANCEL) +# btnsizer.Add(btn) +# +# btn = wx.Button(self, wx.ID_OK) +# btn.SetDefault() +# btnsizer.Add(btn) +# +# sizer.Add(btnsizer, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL, 5) +# self.SetSizer(sizer) +# sizer.Fit(self) +# self.SetTitle(_(u"Selection").decode('utf8')) +# + # end wxGlade + + +class FreqDialog ( wx.Dialog ): + + def __init__( self, parent, listcol, title, size = wx.Size( -1,-1 ), showNA = True): + wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.Size( -1,-1 ), style = wx.DEFAULT_DIALOG_STYLE ) + self.header = listcol - #LABELLIST = [] - #for i in self.header: - # forme = i - # if len(forme) > 60 : - # LABELLIST.append(i[0:60]) - # else: - # LABELLIST.append(i) - self.list_box_1 = wx.ListBox(self, -1, choices=self.header, style=wx.LB_EXTENDED | wx.LB_HSCROLL) - sizer.Add(self.list_box_1, 0, 5) - - btnsizer = wx.BoxSizer(wx.HORIZONTAL) - btn = wx.Button(self, wx.ID_CANCEL) - btnsizer.Add(btn) + self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize ) - btn = wx.Button(self, wx.ID_OK) - btn.SetDefault() - btnsizer.Add(btn) + bSizer1 = wx.BoxSizer( wx.VERTICAL ) - sizer.Add(btnsizer, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL, 5) - self.SetSizer(sizer) - sizer.Fit(self) - self.SetTitle(_(u"Selection").decode('utf8')) - - # end wxGlade + m_listBox1Choices = self.header + self.m_listBox1 = wx.ListBox( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_listBox1Choices, wx.LB_EXTENDED|wx.LB_HSCROLL ) + self.m_listBox1.SetMinSize( wx.Size( 500,-1 ) ) + bSizer1.Add( self.m_listBox1, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + if showNA : + fgSizer1 = wx.FlexGridSizer( 0, 2, 0, 0 ) + fgSizer1.SetFlexibleDirection( wx.BOTH ) + fgSizer1.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) + + self.m_staticText1 = wx.StaticText( self, wx.ID_ANY, _(u"Include empty cells (NA)").decode('utf8'), wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText1.Wrap( -1 ) + fgSizer1.Add( self.m_staticText1, 0, wx.ALL, 5 ) + + self.includeNA = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) + fgSizer1.Add( self.includeNA, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + bSizer1.Add( fgSizer1, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + m_sdbSizer1 = wx.StdDialogButtonSizer() + self.m_sdbSizer1OK = wx.Button( self, wx.ID_OK ) + m_sdbSizer1.AddButton( self.m_sdbSizer1OK ) + self.m_sdbSizer1Cancel = wx.Button( self, wx.ID_CANCEL ) + m_sdbSizer1.AddButton( self.m_sdbSizer1Cancel ) + m_sdbSizer1.Realize(); + + bSizer1.Add( m_sdbSizer1, 0, wx.EXPAND, 5 ) + + + self.SetSizer( bSizer1 ) + self.Layout() + bSizer1.Fit( self ) + + self.Centre( wx.BOTH ) + + def __del__( self ): + pass + + class ProtoDial ( wx.Dialog ): def __init__( self, parent, headers ): wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = _(u"Settings").decode('utf8'), pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE ) - self.SetSizeHintsSz( wx.Size( 200,300 ), wx.DefaultSize ) + self.SetSizeHintsSz( wx.Size( -1,-1 ), wx.DefaultSize ) bSizer1 = wx.BoxSizer( wx.VERTICAL ) @@ -2803,19 +2905,19 @@ class ProtoDial ( wx.Dialog ): fgSizer1.Add( self.m_staticText2, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALL, 5 ) variablesChoices = headers - self.variables = wx.ListBox( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, variablesChoices, wx.LB_MULTIPLE ) - self.variables.SetMinSize( wx.Size( 150,-1 ) ) + self.variables = wx.ListBox( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, variablesChoices, wx.LB_HSCROLL|wx.LB_MULTIPLE ) + self.variables.SetMinSize( wx.Size( 350,-1 ) ) - fgSizer1.Add( self.variables, 0, wx.ALL|wx.EXPAND, 5 ) + fgSizer1.Add( self.variables, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.ALL|wx.EXPAND, 5 ) rangsChoices = headers - self.rangs = wx.ListBox( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, rangsChoices, wx.LB_MULTIPLE ) - self.rangs.SetMinSize( wx.Size( 150,-1 ) ) + self.rangs = wx.ListBox( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, rangsChoices, wx.LB_HSCROLL|wx.LB_MULTIPLE ) + self.rangs.SetMinSize( wx.Size( 350,-1 ) ) - fgSizer1.Add( self.rangs, 0, wx.ALL|wx.EXPAND, 5 ) + fgSizer1.Add( self.rangs, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.ALL|wx.EXPAND, 5 ) - bSizer1.Add( fgSizer1, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 5 ) + bSizer1.Add( fgSizer1, 1, wx.ALIGN_CENTER_HORIZONTAL, 5 ) fgSizer3 = wx.FlexGridSizer( 0, 2, 0, 0 ) fgSizer3.SetFlexibleDirection( wx.BOTH ) @@ -2868,8 +2970,16 @@ class ProtoDial ( wx.Dialog ): self.m_textCtrl4 = wx.TextCtrl( self, wx.ID_ANY, u"2", wx.DefaultPosition, wx.DefaultSize, wx.TE_CENTRE ) fgSizer3.Add( self.m_textCtrl4, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALL, 5 ) + self.m_staticText6 = wx.StaticText( self, wx.ID_ANY, u"Type de représentation", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText6.Wrap( -1 ) + fgSizer3.Add( self.m_staticText6, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + m_choice3Choices = [ u"Classical - List", u"Classical - Cloud", u"Plan" ] + self.typegraph = wx.Choice( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_choice3Choices, 0 ) + self.typegraph.SetSelection( 0 ) + fgSizer3.Add( self.typegraph, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALL, 5 ) - bSizer1.Add( fgSizer3, 1, wx.EXPAND, 5 ) + bSizer1.Add( fgSizer3, 0, wx.ALIGN_CENTER_HORIZONTAL, 5 ) m_sdbSizer1 = wx.StdDialogButtonSizer() self.m_sdbSizer1OK = wx.Button( self, wx.ID_OK )