[GRASS-SVN] r35909 - grass/branches/develbranch_6/gui/wxpython

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Feb 17 09:53:04 EST 2009


Author: martinl
Date: 2009-02-17 09:53:04 -0500 (Tue, 17 Feb 2009)
New Revision: 35909

Modified:
   grass/branches/develbranch_6/gui/wxpython/gis_set.py
Log:
wxGUI/welcome screen: gray out locked mapsets
	      (merge from trunk, r35908)


Modified: grass/branches/develbranch_6/gui/wxpython/gis_set.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gis_set.py	2009-02-17 14:50:51 UTC (rev 35908)
+++ grass/branches/develbranch_6/gui/wxpython/gis_set.py	2009-02-17 14:53:04 UTC (rev 35909)
@@ -587,10 +587,13 @@
         disabled = []
         idx = 0
         for mapset in self.listOfMapsets:
-            if mapset not in self.listOfMapsetsSelectable:
+            if mapset not in self.listOfMapsetsSelectable or \
+                    os.path.isfile(os.path.join(self.gisdbase,
+                                                locationName,
+                                                mapset, ".gislock")):
                 disabled.append(idx)
             idx += 1
-
+        
         self.lbmapsets.InsertItems(self.listOfMapsets, 0, disabled=disabled)
         
         return self.listOfMapsets
@@ -608,8 +611,12 @@
 
         disabled = []
         idx = 0
+        locationName = self.listOfLocations[self.lblocations.GetSelection()]
         for mapset in self.listOfMapsets:
-            if mapset not in self.listOfMapsetsSelectable:
+            if mapset not in self.listOfMapsetsSelectable or \
+                    os.path.isfile(os.path.join(self.gisdbase,
+                                                locationName,
+                                                mapset, ".gislock")):
                 disabled.append(idx)
             idx += 1
 
@@ -772,6 +779,7 @@
         for item in choices:
             index = self.InsertStringItem(sys.maxint, item)
             self.SetStringItem(index, 0, item)
+            
             if idx in disabled:
                 self.SetItemTextColour(idx, wx.Colour(150, 150, 150))
             idx += 1



More information about the grass-commit mailing list