Changeset 30510


Ignore:
Timestamp:
Mar 9, 2008, 12:33:54 PM (16 years ago)
Author:
martinl
Message:

wxGUI (menuform) use wxTextCtrl for numeric types instead of wxSpinCtrl (for multiple parameters).
Message standardization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • grass/trunk/gui/wxpython/gui_modules/menuform.py

    r30503 r30510  
    212212                    p['name'][:lparam] == aParam:
    213213                return p
    214         raise ValueError, _("Parameter not found : %s") % aParam
     214        raise ValueError, _("Parameter not found: %s") % aParam
    215215
    216216    def set_param(self, aParam, aValue):
     
    228228            if f['name'] == aFlag:
    229229                return f
    230         raise ValueError, _("Flag not found : %s") % aFlag
     230        raise ValueError, _("Flag not found: %s") % aFlag
    231231
    232232    def set_flag(self, aFlag, aValue):
     
    802802        """General 'about' information"""
    803803        dlg = wx.MessageDialog(self, _("This is a sample program for\n"
    804             "GRASS command interface parsing\n"
    805             "and automatic GUI building. \n%s") %(__version__),
    806             _("About GrassGUI"), wx.OK | wx.ICON_INFORMATION)
     804                                       "GRASS command interface parsing\n"
     805                                       "and automatic GUI building.\n%s") %(__version__),
     806                               _("About wxPython GRASS GUI"), wx.OK | wx.ICON_INFORMATION)
    807807        dlg.ShowModal()
    808808        dlg.Destroy()
     
    10341034                                flag=wx.RIGHT | wx.LEFT | wx.TOP | wx.EXPAND, border=5)
    10351035
    1036                 if p.get('type','string') == 'string':
     1036                if p.get('multiple','yes') == 'yes' or \
     1037                        p.get('type','string') == 'string':
    10371038                    txt3 = wx.TextCtrl(parent=which_panel, value = p.get('default',''),
    1038                                        size = (STRING_ENTRY_WIDTH, ENTRY_HEIGHT))
     1039                                   size = (STRING_ENTRY_WIDTH, ENTRY_HEIGHT))
    10391040                    txt3.Bind(wx.EVT_TEXT, self.OnSetValue)
    10401041                else:
     
    12911292    cmdout = os.popen(cmd + r' --interface-description', "r").read()
    12921293    if not len(cmdout) > 0 :
    1293         raise IOError, _("Couldn't fetch interface description for command <%s>.") % cmd
     1294        raise IOError, _("Unable to fetch interface description for command '%s'.") % cmd
    12941295    p = re.compile( '(grass-interface.dtd)')
    12951296    p.search( cmdout )
Note: See TracChangeset for help on using the changeset viewer.