[GRASS-SVN] r59787 - grass/branches/releasebranch_7_0/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Apr 18 10:22:17 PDT 2014
Author: martinl
Date: 2014-04-18 10:22:17 -0700 (Fri, 18 Apr 2014)
New Revision: 59787
Modified:
grass/branches/releasebranch_7_0/gui/wxpython/gui_core/gselect.py
Log:
wxGUI: import dialog - fix extension list for vectors
define default formats: GeoTIFF and Shapefile
(merge r59786 from trunk)
Modified: grass/branches/releasebranch_7_0/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gui_core/gselect.py 2014-04-18 17:21:12 UTC (rev 59786)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gui_core/gselect.py 2014-04-18 17:22:17 UTC (rev 59787)
@@ -1350,15 +1350,23 @@
fType = 'gdal'
# file
- fileMask = '%(all)s (*.*)|*.*|' % {'all': _('All files')}
- for name, ext in sorted(rasterFormatExtension.items()):
+ if not ogr:
+ extList = rasterFormatExtension
+ fileMask = '%(name)s (*.%(low)s;*.%(up)s)|*.%(low)s;*.%(up)s|' % {'name': 'GeoTIFF', 'low': 'tif', 'up': 'TIF'}
+ else:
+ extList = vectorFormatExtension
+ fileMask = '%(name)s (*.%(low)s;*.%(up)s)|*.%(low)s;*.%(up)s|' % {'name': 'ESRI Shapefile', 'low': 'shp', 'up': 'SHP'}
+ for name, ext in sorted(extList.items()):
+ if name in ('ESRI Shapefile', 'GeoTIFF'):
+ continue
fileMask += '%(name)s (*.%(low)s;*.%(up)s)|*.%(low)s;*.%(up)s|' % {'name': name,
'low': ext.lower(),
'up': ext.upper()}
fileMask += '%s (*.zip;*.ZIP)|*.zip;*.ZIP|' % _('ZIP files')
fileMask += '%s (*.gz;*.GZ)|*.gz;*.GZ|' % _('GZIP files')
fileMask += '%s (*.tar;*.TAR)|*.tar;*.TAR|' % _('TAR files')
- fileMask += '%s (*.tar.gz;*.TAR.GZ;*.tgz;*.TGZ)|*.tar.gz;*.TAR.GZ;*.tgz;*.TGZ' % _('TARGZ files')
+ fileMask += '%s (*.tar.gz;*.TAR.GZ;*.tgz;*.TGZ)|*.tar.gz;*.TAR.GZ;*.tgz;*.TGZ|' % _('TARGZ files')
+ fileMask += '%(all)s (*.*)|*.*|' % {'all': _('All files')}
# only contains formats with extensions hardcoded
self.filePanel = wx.Panel(parent=self)
More information about the grass-commit
mailing list