|
@@ -36,6 +36,7 @@ if not os.getenv("GRASS_WXBUNDLED"):
|
|
|
|
|
|
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 @@ class GRASSStartup(wx.Frame):
|
|
|
"""
|
|
|
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 @@ class GRASSStartup(wx.Frame):
|
|
|
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 "
|