...
[iramuteq] / dialog.py
index 2856533..751f888 100755 (executable)
--- a/dialog.py
+++ b/dialog.py
@@ -543,9 +543,9 @@ class PrefGraph(wx.Dialog):
         self.paramgraph=paramgraph
         self.labeltype = wx.StaticText(self, -1, _(u"Graphic type").decode('utf8'))
         if self.paramgraph['clnb'] <= 3 :
-            choix = [u'2D', 'web 2D']
+            choix = [u'2D']#, 'web 2D']
         else :
-            choix=[u'2D' ,u'3D', 'web 2D', 'web 3D']
+            choix=[u'2D' ,u'3D']#, 'web 2D', 'web 3D']
         self.choicetype = wx.Choice(self, -1, (100,50), choices=choix)
         self.label_format = wx.StaticText(self, -1, _(u"Picture format").decode('utf8'))
         self.choix_format =  wx.Choice(self, -1, (100,50), choices = ['png', 'svg'])        
@@ -1053,7 +1053,7 @@ class StatDialog ( wx.Dialog ):
         self.m_staticText1.Wrap( -1 )
         gSizer1.Add( self.m_staticText1, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
         
-        radio_lemChoices = [ u"yes", u"no" ]
+        radio_lemChoices = [ _(u"yes").decode('utf8'), _(u"no").decode('utf8') ]
         self.radio_lem = wx.RadioBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, radio_lemChoices, 1, wx.RA_SPECIFY_COLS )
         self.radio_lem.SetSelection( 0 )
         gSizer1.Add( self.radio_lem, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT|wx.ALL, 5 )
@@ -3082,7 +3082,7 @@ class SubTextFromMetaDial ( wx.Dialog ):
 class BarGraphDialog ( wx.Dialog ):
     
     def __init__( self, parent, width, height ):
-        wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = u"Preferences", pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE )
+        wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = _(u"Preferences").decode('utf8'), pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE )
         
         self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
         
@@ -3090,11 +3090,11 @@ class BarGraphDialog ( wx.Dialog ):
         
         bSizer2 = wx.BoxSizer( wx.HORIZONTAL )
         
-        self.m_staticText1 = wx.StaticText( self, wx.ID_ANY, u"Size", wx.DefaultPosition, wx.DefaultSize, 0 )
+        self.m_staticText1 = wx.StaticText( self, wx.ID_ANY, _(u"Size").decode('utf8'), wx.DefaultPosition, wx.DefaultSize, 0 )
         self.m_staticText1.Wrap( -1 )
         bSizer2.Add( self.m_staticText1, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
         
-        sizeradioChoices = [ u"automatic", u"manual" ]
+        sizeradioChoices = [ _(u"automatic").decode('utf8'), _(u"manual").decode('utf8') ]
         self.sizeradio = wx.RadioBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, sizeradioChoices, 1, wx.RA_SPECIFY_COLS )
         self.sizeradio.SetSelection( 0 )
         bSizer2.Add( self.sizeradio, 0, wx.ALIGN_TOP|wx.ALL, 5 )
@@ -3103,14 +3103,14 @@ class BarGraphDialog ( wx.Dialog ):
         fgSizer1.SetFlexibleDirection( wx.BOTH )
         fgSizer1.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
         
-        self.m_staticText2 = wx.StaticText( self, wx.ID_ANY, u"width", wx.DefaultPosition, wx.DefaultSize, 0 )
+        self.m_staticText2 = wx.StaticText( self, wx.ID_ANY, _(u"width").decode('utf8'), wx.DefaultPosition, wx.DefaultSize, 0 )
         self.m_staticText2.Wrap( -1 )
         fgSizer1.Add( self.m_staticText2, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
         
         self.widthsp = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 1000000, 600 )
         fgSizer1.Add( self.widthsp, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
         
-        self.m_staticText3 = wx.StaticText( self, wx.ID_ANY, u"height", wx.DefaultPosition, wx.DefaultSize, 0 )
+        self.m_staticText3 = wx.StaticText( self, wx.ID_ANY, _(u"height").decode('utf8'), wx.DefaultPosition, wx.DefaultSize, 0 )
         self.m_staticText3.Wrap( -1 )
         fgSizer1.Add( self.m_staticText3, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
         
@@ -3125,7 +3125,7 @@ class BarGraphDialog ( wx.Dialog ):
         
         bSizer3 = wx.BoxSizer( wx.HORIZONTAL )
         
-        self.m_staticText4 = wx.StaticText( self, wx.ID_ANY, u"Image format", wx.DefaultPosition, wx.DefaultSize, 0 )
+        self.m_staticText4 = wx.StaticText( self, wx.ID_ANY, _(u"Image format").decode('utf8'), wx.DefaultPosition, wx.DefaultSize, 0 )
         self.m_staticText4.Wrap( -1 )
         bSizer3.Add( self.m_staticText4, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
         
@@ -3219,7 +3219,7 @@ class MessageImage(wx.Frame):
 
     def OnSaveImage(self, event) :
         dlg = wx.FileDialog(
-            self, message="Enregistrer sous...", defaultDir=os.getcwd(),
+            self, message=_(u"Save as...").decode('utf8'), defaultDir=os.getcwd(),
             defaultFile= self.imagename, wildcard=self.parametres['wildcard'], style=wx.SAVE | wx.OVERWRITE_PROMPT
             )
         dlg.SetFilterIndex(2)
@@ -3263,7 +3263,7 @@ class BarFrame :
             with open(tmpscript,'w') as f :
                 f.write(txt)
             exec_rcode(ira.RPath, tmpscript, wait = True)
-            win = MessageImage(ira, parametres, u"Graphique", size=(700, 500))
+            win = MessageImage(ira, parametres, _(u"Graphic").decode('utf8'), size=(700, 500))
             if svg == 'FALSE' :
                 txt = "<img src='%s'>" % tmpgraph
             else :