[GRASS-SVN] r42256 - grass/branches/releasebranch_6_4/gui/wxpython

svn_grass at osgeo.org svn_grass at osgeo.org
Sat May 15 06:51:50 EDT 2010


Author: martinl
Date: 2010-05-15 06:51:50 -0400 (Sat, 15 May 2010)
New Revision: 42256

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gis_set.py
Log:
bugfix #1069
(merge r42254 from trunk)


Modified: grass/branches/releasebranch_6_4/gui/wxpython/gis_set.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gis_set.py	2010-05-15 10:21:30 UTC (rev 42255)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gis_set.py	2010-05-15 10:51:50 UTC (rev 42256)
@@ -442,6 +442,12 @@
         """
         location = utils.UnicodeString(self.listOfLocations[self.lblocations.GetSelection()])
         mapset   = utils.UnicodeString(self.listOfMapsets[self.lbmapsets.GetSelection()])
+        if mapset == 'PERMANENT':
+            wx.MessageBox(parent = self,
+                          message = _('Mapset <PERMANENT> is required for valid GRASS location.\n\n'
+                                      'This mapset cannot be renamed.'),
+                          style=wx.OK | wx.ICON_INFORMATION | wx.CENTRE)
+            return
         
         dlg = wx.TextEntryDialog(parent=self,
                                  message=_('Current name: %s\n\nEnter new name:') % mapset,
@@ -510,13 +516,17 @@
         dlg.Destroy()
 
     def DeleteMapset(self):
+        """!Delete selected mapset
         """
-        Delete selected mapset
-        """
-
         location = self.listOfLocations[self.lblocations.GetSelection()]
         mapset   = self.listOfMapsets[self.lbmapsets.GetSelection()]
-
+        if mapset == 'PERMANENT':
+            wx.MessageBox(parent = self,
+                          message = _('Mapset <PERMANENT> is required for valid GRASS location.\n\n'
+                                      'This mapset cannot be deleted.'),
+                          style=wx.OK | wx.ICON_INFORMATION | wx.CENTRE)
+            return
+        
         dlg = wx.MessageDialog(parent=self, message=_("Do you want to continue with deleting mapset <%(mapset)s> "
                                                       "from location <%(location)s>?\n\n"
                                                       "ALL MAPS included in this mapset will be "



More information about the grass-commit mailing list