[GRASS-SVN] r42255 - grass/branches/develbranch_6/gui/wxpython
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat May 15 06:21:30 EDT 2010
Author: martinl
Date: 2010-05-15 06:21:30 -0400 (Sat, 15 May 2010)
New Revision: 42255
Modified:
grass/branches/develbranch_6/gui/wxpython/gis_set.py
Log:
bugfix #1069
(merge r42254 from trunk)
Modified: grass/branches/develbranch_6/gui/wxpython/gis_set.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gis_set.py 2010-05-15 10:19:19 UTC (rev 42254)
+++ grass/branches/develbranch_6/gui/wxpython/gis_set.py 2010-05-15 10:21:30 UTC (rev 42255)
@@ -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
@@ -433,6 +434,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,
@@ -501,13 +508,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