[GRASS-SVN] r45555 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Mar 4 16:26:40 EST 2011


Author: martinl
Date: 2011-03-04 13:26:40 -0800 (Fri, 04 Mar 2011)
New Revision: 45555

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/ghelp.py
Log:
wxGUI: sort contributors by osgeo_id
(merge r45554 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/ghelp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/ghelp.py	2011-03-04 21:24:23 UTC (rev 45554)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/ghelp.py	2011-03-04 21:26:40 UTC (rev 45555)
@@ -665,7 +665,7 @@
         contribfile = os.path.join(os.getenv("GISBASE"), "contributors.csv")
         if os.path.exists(contribfile):
             contribFile = open(contribfile, 'r')
-            contribs = list()
+            contribs = dict()
             errLines = list()
             for line in contribFile.readlines():
                 line = line.rstrip('\n')
@@ -674,8 +674,7 @@
                 except ValueError:
                     errLines.append(line)
                     continue
-                contribs.append((name, email, country, osgeo_id))
-            contribs[0] = (_('Name'), _('E-mail'), _('Country'), _('OSGeo_ID'))
+                contribs[osgeo_id] = [name, email, country]
             contribFile.close()
             
             if errLines:
@@ -698,8 +697,11 @@
                                  flag = wx.EXPAND | wx.ALL, border = 3)
         else:
             contribBox = wx.FlexGridSizer(cols = 4, vgap = 5, hgap = 5)
-            for developer in contribs:
-                for item in developer:
+            for item in (_('Name'), _('E-mail'), _('Country'), _('OSGeo_ID')):
+                contribBox.Add(item = wx.StaticText(parent = contribwin, id = wx.ID_ANY,
+                                                    label = item))
+            for osgeo_id in sorted(contribs.keys()):
+                for item in contribs[osgeo_id] + [osgeo_id]:
                     contribBox.Add(item = wx.StaticText(parent = contribwin, id = wx.ID_ANY,
                                                         label = item))
             contribwin.sizer.Add(item = contribBox, proportion = 1,



More information about the grass-commit mailing list