[GRASS-SVN] r42254 - grass/trunk/gui/wxpython
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat May 15 06:19:20 EDT 2010
Author: martinl
Date: 2010-05-15 06:19:19 -0400 (Sat, 15 May 2010)
New Revision: 42254
Modified:
grass/trunk/gui/wxpython/gis_set.py
Log:
bugfix #1069
Modified: grass/trunk/gui/wxpython/gis_set.py
===================================================================
--- grass/trunk/gui/wxpython/gis_set.py 2010-05-13 22:32:09 UTC (rev 42253)
+++ grass/trunk/gui/wxpython/gis_set.py 2010-05-15 10:19:19 UTC (rev 42254)
@@ -36,6 +36,7 @@
import gui_modules.goutput
from gui_modules.ghelp import HelpWindow
+from gui_modules.gcmd import GMessage
import wx
import wx.html
@@ -431,6 +432,12 @@
"""
location = utils.UnicodeString(self.listOfLocations[self.lblocations.GetSelection()])
mapset = utils.UnicodeString(self.listOfMapsets[self.lbmapsets.GetSelection()])
+ if mapset == 'PERMANENT':
+ GMessage(parent = self,
+ message = _('Mapset <PERMANENT> is required for valid GRASS location.\n\n'
+ 'This mapset cannot be renamed.'),
+ msgType = 'info')
+ return
dlg = wx.TextEntryDialog(parent=self,
message=_('Current name: %s\n\nEnter new name:') % mapset,
@@ -499,13 +506,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':
+ GMessage(parent = self,
+ message = _('Mapset <PERMANENT> is required for valid GRASS location.\n\n'
+ 'This mapset cannot be deleted.'),
+ msgType = 'info')
+ 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