[GRASS-SVN] r63607 - grass/branches/releasebranch_7_0/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Dec 19 01:31:33 PST 2014


Author: martinl
Date: 2014-12-19 01:31:33 -0800 (Fri, 19 Dec 2014)
New Revision: 63607

Modified:
   grass/branches/releasebranch_7_0/gui/wxpython/gui_core/gselect.py
Log:
wxGUI: gdal file selector - all files at first position
       (merge r63606 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-12-19 09:29:38 UTC (rev 63606)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gui_core/gselect.py	2014-12-19 09:31:33 UTC (rev 63607)
@@ -1362,14 +1362,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
@@ -1379,9 +1381,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