[GRASS-SVN] r63606 - grass/trunk/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Dec 19 01:29:38 PST 2014
Author: martinl
Date: 2014-12-19 01:29:38 -0800 (Fri, 19 Dec 2014)
New Revision: 63606
Modified:
grass/trunk/gui/wxpython/gui_core/gselect.py
Log:
wxGUI: gdal file selector - all files at first position
Modified: grass/trunk/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/gselect.py 2014-12-19 09:22:00 UTC (rev 63605)
+++ grass/trunk/gui/wxpython/gui_core/gselect.py 2014-12-19 09:29:38 UTC (rev 63606)
@@ -1379,14 +1379,16 @@
fType = 'gdal'
# file
+ fileMask = '%(all)s (*)|*|' % {'all': _('All files')}
if not ogr:
extList = rasterFormatExtension
- fileMask = ('%(name)s (*.%(low1)s;*.%(low2)s;*.%(up1)s;*.%(up2)s)|'
+ fileMask += ('%(name)s (*.%(low1)s;*.%(low2)s;*.%(up1)s;*.%(up2)s)|'
'*.%(low1)s;*.%(low2)s;*.%(up1)s;*.%(up2)s|' %
{'name': 'GeoTIFF', 'low1': 'tif', 'low2': 'tiff', 'up1': 'TIF', 'up2': 'TIFF'})
else:
extList = vectorFormatExtension
- fileMask = '%(name)s (*.%(low)s;*.%(up)s)|*.%(low)s;*.%(up)s|' % {'name': 'ESRI Shapefile', 'low': 'shp', 'up': 'SHP'}
+ 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
@@ -1396,9 +1398,8 @@
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')
# don't include last '|' - windows and mac throw error
- fileMask += '%(all)s (*)|*' % {'all': _('All files')}
+ fileMask += '%s (*.tar.gz;*.TAR.GZ;*.tgz;*.TGZ)|*.tar.gz;*.TAR.GZ;*.tgz;*.TGZ' % _('TARGZ files')
# only contains formats with extensions hardcoded
self.filePanel = wx.Panel(parent=self)
More information about the grass-commit
mailing list