[GRASS-dev] Making start of GRASS GIS easier for newcomers

Vaclav Petras wenzeslaus at gmail.com
Wed Jan 21 20:35:40 PST 2015


On Wed, Jan 21, 2015 at 5:15 PM, Vaclav Petras <wenzeslaus at gmail.com> wrote:

>
> To satisfy everybody, I suggest to provide a buttons with something like
> "Take me to LL", "Take me to default location" and "Take me to XY". What do
> you think about that?
>
> But the real improvement should be the messages which would guide you
> through the process.
>

So, here is screenshot and diff for new layout of the window together the
description what the things are useful for. The descriptions can be easily
changed, they are wrapped texts, so they will work well with translations.
So, feel free to suggest different ones. We can also make them "gray" as
suggested earlier.

I used GRASS Location and Location. I though that GRASS could help to
emphasize that it is something GRASS-related and few people were using
Location and Mapset with capital letter which could say that it is a
something like files format or spatial database name. I aimed to address
the things I considered confusing. I'm not sure about the GRASS GIS data
directory as I mentioned earlier.

Now it is higher then the old one but with removal of the image it will be
smaller. If a small-enough image is used, it could be the same. I would
like to not include the image to have more space for the error messages
(currently one line between GISDBASE and Location boxes), so messages can
be longer and perhaps some what to do next tips can be shown as well. The
position of this text can/should be changed, now middle of the window
(usually these are at the bottom or at the top). However, without image it
might be actually a little boring.

I reorganized the buttons to manage the (list of) Locations and (list of)
Mapsets, so now it looks like any other lists, e.g. in Simple Layer Manager
or in Cartographic Composer. In future we can add buttons, for example
unpack a zipped location or download sample datasets in case of Locations
and show existing maps button in case of Mapsets.

A "Skip" button can be added next to Start button, once implemented. I
think that XY location in /tmp/grassdata would be appropriate.

http://lists.osgeo.org/pipermail/grass-dev/2015-January/073268.html
http://lists.osgeo.org/pipermail/grass-dev/2015-January/073266.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20150121/62aad5af/attachment-0001.html>
-------------- next part --------------
Index: gis_set.py
===================================================================
--- gis_set.py	(revision 64276)
+++ gis_set.py	(working copy)
@@ -41,7 +41,7 @@
 from core.utils     import GetListOfLocations, GetListOfMapsets, _
 from location_wizard.dialogs import RegionDef
 from gui_core.dialogs import TextEntryDialog
-from gui_core.widgets import GenericValidator
+from gui_core.widgets import GenericValidator, StaticWrapText
 
 sys.stderr = codecs.getwriter('utf8')(sys.stderr)
 
@@ -67,7 +67,7 @@
         
         self.locale = wx.Locale(language = wx.LANGUAGE_DEFAULT)
         
-        self.panel = scrolled.ScrolledPanel(parent = self, id = wx.ID_ANY)
+        self.panel = wx.Panel(parent = self, id = wx.ID_ANY)
         
         # i18N
         
@@ -102,21 +102,20 @@
             grassVersion = versionLine
             grassRevisionStr = ''
         
-        self.select_box = wx.StaticBox (parent = self.panel, id = wx.ID_ANY,
-                                        label = " %s " % _("Choose project location and mapset"))
+        self.gisdbase_box = wx.StaticBox(parent=self.panel, id=wx.ID_ANY,
+                                         label=" %s " % _("Select GRASS GIS data directory"))
+        
+        self.location_box = wx.StaticBox(parent=self.panel, id=wx.ID_ANY,
+                                         label=" %s " % _("Select GRASS Location"))
+        self.mapset_box = wx.StaticBox(parent=self.panel, id=wx.ID_ANY,
+                                         label=" %s " % _("Select GRASS Mapset"))
 
-        self.manage_box = wx.StaticBox (parent = self.panel, id = wx.ID_ANY,
-                                        label = " %s " % _("Manage"))
-        self.lwelcome = wx.StaticText(parent = self.panel, id = wx.ID_ANY,
-                                      label = _("Welcome to GRASS GIS %s%s\n"
-                                              "The world's leading open source GIS") % (grassVersion, grassRevisionStr),
-                                      style = wx.ALIGN_CENTRE)
-        self.ltitle = wx.StaticText(parent = self.panel, id = wx.ID_ANY,
-                                    label = _("Select an existing project location and mapset\n"
-                                            "or define a new location"),
-                                    style = wx.ALIGN_CENTRE)
-        self.ldbase = wx.StaticText(parent = self.panel, id = wx.ID_ANY,
-                                    label = _("GIS Data Directory:"))
+        # grassVersion, grassRevisionStr
+        
+        #self.ltitle = StaticWrapText(
+        #    parent=self.panel, id=wx.ID_ANY,
+        ##    label = _("..."),
+         #   style = wx.ALIGN_LEFT)
         # no message at the beginning
         self.lmessage = wx.StaticText(parent=self.panel, id=wx.ID_ANY,
                                     label=_(""))
@@ -128,49 +127,69 @@
             self.lmessage.SetForegroundColour(wx.Colour(255, 0, 0))
         except AttributeError:
             pass
-        self.llocation = wx.StaticText(parent = self.panel, id = wx.ID_ANY,
-                                       label = _("Project location\n(projection/coordinate system)"),
-                                       style = wx.ALIGN_CENTRE)
-        self.lmapset = wx.StaticText(parent = self.panel, id = wx.ID_ANY,
-                                     label = _("Accessible mapsets\n(directories of GIS files)"),
-                                     style = wx.ALIGN_CENTRE)
-        self.lcreate = wx.StaticText(parent = self.panel, id = wx.ID_ANY,
-                                     label = _("Create new mapset\nin selected location"),
-                                     style = wx.ALIGN_CENTRE)
-        self.ldefine = wx.StaticText(parent = self.panel, id = wx.ID_ANY,
-                                     label = _("Define new location"),
-                                     style = wx.ALIGN_CENTRE)
-        self.lmanageloc = wx.StaticText(parent = self.panel, id = wx.ID_ANY,
-                                        label = _("Rename/delete selected\nmapset or location"),
-                                        style = wx.ALIGN_CENTRE)
+        
+        self.gisdbase_panel = wx.Panel(parent=self.panel)
+        self.location_panel = wx.Panel(parent=self.panel)
+        self.mapset_panel = wx.Panel(parent=self.panel)
+        
+        
+        self.ldbase = StaticWrapText(
+            parent = self.gisdbase_panel, id = wx.ID_ANY,
+            label = _("GRASS GIS data directory contains Locations."
+                      " There can be one or more directories like this on one machine."))
+        
+        self.llocation = StaticWrapText(
+             parent = self.location_panel, id = wx.ID_ANY,
+             label=_("Location represents a project."
+                     " All data in one Location is in the same coordinate reference system (projection)."
+                     " Location contains Mapsets."),
+             style = wx.ALIGN_LEFT)
+        #self.llocation.SetForegroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_GRAYTEXT))
+        self.lmapset = StaticWrapText(
+            parent = self.mapset_panel, id = wx.ID_ANY,
+            label = _("Mapset contains GIS data related"
+                      " to one task within one project,"
+                      " or to one subregion or user."
+                      " PERMANENT Mapset is in each Location and usually contains common data."),
+            style = wx.ALIGN_LEFT)
 
+        
+
         # buttons
         self.bstart = wx.Button(parent = self.panel, id = wx.ID_ANY,
-                                label = _("Start &GRASS"))
+                                label = _("Start &GRASS session"))
         self.bstart.SetDefault()
         self.bexit = wx.Button(parent = self.panel, id = wx.ID_EXIT)
         self.bstart.SetMinSize((180, self.bexit.GetSize()[1]))
         self.bhelp = wx.Button(parent = self.panel, id = wx.ID_HELP)
-        self.bbrowse = wx.Button(parent = self.panel, id = wx.ID_ANY,
+        self.bbrowse = wx.Button(parent = self.gisdbase_panel, id = wx.ID_ANY,
                                  label = _("&Browse"))
-        self.bmapset = wx.Button(parent = self.panel, id = wx.ID_ANY,
-                                 label = _("&Create mapset"))
-        self.bwizard = wx.Button(parent = self.panel, id = wx.ID_ANY,
-                                 label = _("&Location wizard"))
-        self.bwizard.SetToolTipString(_("Start location wizard."
+        self.bmapset = wx.Button(parent = self.mapset_panel, id = wx.ID_ANY,
+                                 label = _("&New"))
+        self.bwizard = wx.Button(parent = self.location_panel, id = wx.ID_ANY,
+                                 label = _("N&ew"))
+        self.bwizard.SetToolTipString(_("Create a new location using location wizard."
                                         " After location is created successfully,"
                                         " GRASS session is started."))
-        self.manageloc = wx.Choice(parent = self.panel, id = wx.ID_ANY,
-                                   choices = [_('Rename mapset'), _('Rename location'),
-                                            _('Delete mapset'), _('Delete location')])
-        self.manageloc.SetSelection(0)
+        self.rename_location_button = wx.Button(parent=self.location_panel, id=wx.ID_ANY,
+                                                label=_("Rename"))
+        self.rename_location_button.SetToolTipString(_("Rename selected location"))
+        self.delete_location_button = wx.Button(parent=self.location_panel, id=wx.ID_ANY,
+                                                label=_("Delete"))
+        self.delete_location_button.SetToolTipString(_("Delete selected location"))
+        self.rename_mapset_button = wx.Button(parent=self.mapset_panel, id=wx.ID_ANY,
+                                                label=_("Rename"))
+        self.rename_mapset_button.SetToolTipString(_("Rename selected mapset"))
+        self.delete_mapset_button = wx.Button(parent=self.mapset_panel, id=wx.ID_ANY,
+                                              label=_("Delete"))
+        self.delete_mapset_button.SetToolTipString(_("Delete selected mapset"))
 
         # textinputs
-        self.tgisdbase = wx.TextCtrl(parent = self.panel, id = wx.ID_ANY, value = "", size = (300, -1),
+        self.tgisdbase = wx.TextCtrl(parent = self.gisdbase_panel, id = wx.ID_ANY, value = "", size = (300, -1),
                                      style = wx.TE_PROCESS_ENTER)
 
         # Locations
-        self.lblocations = GListBox(parent = self.panel,
+        self.lblocations = GListBox(parent = self.location_panel,
                                     id = wx.ID_ANY, size = (180, 200),
                                     choices = self.listOfLocations)
         
@@ -178,7 +197,7 @@
 
         # TODO: sort; but keep PERMANENT on top of list
         # Mapsets
-        self.lbmapsets = GListBox(parent = self.panel,
+        self.lbmapsets = GListBox(parent = self.mapset_panel,
                                   id = wx.ID_ANY, size = (180, 200),
                                   choices = self.listOfMapsets)
         
@@ -195,7 +214,12 @@
         self.bhelp.Bind(wx.EVT_BUTTON,        self.OnHelp)
         self.bmapset.Bind(wx.EVT_BUTTON,      self.OnCreateMapset)
         self.bwizard.Bind(wx.EVT_BUTTON,      self.OnWizard)
-        self.manageloc.Bind(wx.EVT_CHOICE,    self.OnManageLoc)
+        
+        self.rename_location_button.Bind(wx.EVT_BUTTON, self.RenameLocation)
+        self.delete_location_button.Bind(wx.EVT_BUTTON, self.DeleteLocation)
+        self.rename_mapset_button.Bind(wx.EVT_BUTTON, self.RenameMapset)
+        self.delete_mapset_button.Bind(wx.EVT_BUTTON, self.DeleteMapset)
+        
         self.lblocations.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnSelectLocation)
         self.lbmapsets.Bind(wx.EVT_LIST_ITEM_SELECTED,   self.OnSelectMapset)
         self.lbmapsets.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnStart)
@@ -208,14 +232,15 @@
         self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, "grass.ico"),
                              wx.BITMAP_TYPE_ICO))
 
-        self.lwelcome.SetForegroundColour(wx.Colour(35, 142, 35))
-        self.lwelcome.SetFont(wx.Font(13, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
-
         self.bstart.SetForegroundColour(wx.Colour(35, 142, 35))
         self.bstart.SetToolTipString(_("Enter GRASS session"))
         self.bstart.Enable(False)
         self.bmapset.Enable(False)
-        self.manageloc.Enable(False)
+        # replacing disabled choice, perhaps just mapset needed
+        self.rename_location_button.Enable(False)
+        self.delete_location_button.Enable(False)
+        self.rename_mapset_button.Enable(False)
+        self.delete_mapset_button.Enable(False)
 
         # set database
         if not self.gisdbase:
@@ -270,20 +295,46 @@
     def _do_layout(self):
         sizer           = wx.BoxSizer(wx.VERTICAL)
         dbase_sizer     = wx.BoxSizer(wx.HORIZONTAL)
+        
+        location_mapset_sizer  = wx.BoxSizer(wx.HORIZONTAL)
+        
+        gisdbase_panel_sizer  = wx.BoxSizer(wx.VERTICAL)
+        gisdbase_boxsizer = wx.StaticBoxSizer(self.gisdbase_box, wx.VERTICAL)        
+        
+        location_panel_sizer  = wx.BoxSizer(wx.VERTICAL)
         location_sizer  = wx.BoxSizer(wx.HORIZONTAL)
-        select_boxsizer = wx.StaticBoxSizer(self.select_box, wx.VERTICAL)
-        select_sizer    = wx.FlexGridSizer(rows = 2, cols = 2, vgap = 4, hgap = 4)
-        select_sizer.AddGrowableRow(1)
-        select_sizer.AddGrowableCol(0)
-        select_sizer.AddGrowableCol(1)
-        manage_sizer    = wx.StaticBoxSizer(self.manage_box, wx.VERTICAL)
+        location_boxsizer = wx.StaticBoxSizer(self.location_box, wx.VERTICAL)
+        location_buttons_sizer = wx.BoxSizer(wx.VERTICAL)
+        
+        mapset_panel_sizer  = wx.BoxSizer(wx.VERTICAL)
+        mapset_sizer  = wx.BoxSizer(wx.HORIZONTAL)
+        mapset_boxsizer = wx.StaticBoxSizer(self.mapset_box, wx.VERTICAL)
+        mapset_buttons_sizer = wx.BoxSizer(wx.VERTICAL)
+
         btns_sizer      = wx.BoxSizer(wx.HORIZONTAL)
         
+        self.gisdbase_panel.SetSizer(gisdbase_panel_sizer)
+        gisdbase_panel_sizer.Fit(self.gisdbase_panel)
+        
+        self.location_panel.SetSizer(location_panel_sizer)
+        location_panel_sizer.Fit(self.location_panel)
+        
+        self.mapset_panel.SetSizer(mapset_panel_sizer)
+        mapset_panel_sizer.Fit(self.mapset_panel)
+        
         # gis data directory
-        dbase_sizer.Add(item = self.ldbase, proportion = 0,
-                        flag = wx.ALIGN_CENTER_VERTICAL |
-                        wx.ALIGN_CENTER_HORIZONTAL | wx.ALL,
-                        border = 3)
+        
+        gisdbase_boxsizer.Add(item=self.gisdbase_panel, proportion=1,
+                         flag=wx.EXPAND | wx.ALL,
+                         border=3)
+        
+        gisdbase_panel_sizer.Add(item=dbase_sizer, proportion=1,
+                         flag=wx.EXPAND | wx.ALL,
+                         border=3)
+        gisdbase_panel_sizer.Add(item=self.ldbase, proportion=1,
+                         flag=wx.EXPAND | wx.ALL,
+                         border=3)
+
         dbase_sizer.Add(item = self.tgisdbase, proportion = 1,
                         flag = wx.ALIGN_CENTER_VERTICAL | wx.ALL,
                         border = 3)
@@ -290,50 +341,72 @@
         dbase_sizer.Add(item = self.bbrowse, proportion = 0,
                         flag = wx.ALIGN_CENTER_VERTICAL | wx.ALL,
                         border = 3)
+                        
+                        
+        location_boxsizer.Add(item=self.location_panel, proportion=1,
+                         flag=wx.EXPAND | wx.ALL,
+                         border=3)
+                         
+        location_sizer.Add(item = self.lblocations, proportion = 1,
+                         flag=wx.EXPAND | wx.ALL,
+                         border=3)
+        location_sizer.Add(item = location_buttons_sizer, proportion=0,
+                         flag=wx.ALIGN_CENTER_HORIZONTAL | wx.ALL,
+                         border=3)
         
-        # select sizer
-        select_sizer.Add(item = self.llocation, proportion = 0,
-                         flag = wx.ALIGN_CENTER_HORIZONTAL | wx.ALL,
-                         border = 3)
-        select_sizer.Add(item = self.lmapset, proportion = 0,
-                         flag = wx.ALIGN_CENTER_HORIZONTAL | wx.ALL,
-                         border = 3)
-        select_sizer.Add(item = self.lblocations, proportion = 1,
-                         flag = wx.EXPAND)
-        select_sizer.Add(item = self.lbmapsets, proportion = 1,
-                         flag = wx.EXPAND)
+        location_buttons_sizer.Add(item=self.bwizard, proportion=0,
+                         flag=wx.EXPAND | wx.ALL,
+                         border=3)
+        location_buttons_sizer.Add(item=self.rename_location_button, proportion=0,
+                         flag=wx.EXPAND | wx.ALL,
+                         border=3)
+        location_buttons_sizer.Add(item=self.delete_location_button, proportion=0,
+                         flag=wx.EXPAND | wx.ALL,
+                         border=3)
         
-        select_boxsizer.Add(item = select_sizer, proportion = 1,
-                            flag = wx.EXPAND)
+        location_panel_sizer.Add(item=location_sizer, proportion=1,
+                         flag=wx.EXPAND | wx.ALL,
+                         border=3)
+        location_panel_sizer.Add(item=self.llocation, proportion=0,
+                         flag=wx.ALIGN_CENTER_VERTICAL | wx.ALL,
+                         border=3)
         
-        # define new location and mapset
-        manage_sizer.Add(item = self.ldefine, proportion = 0,
-                         flag = wx.ALIGN_CENTER_HORIZONTAL | wx.ALL,
-                         border = 3)
-        manage_sizer.Add(item = self.bwizard, proportion = 0,
-                         flag = wx.ALIGN_CENTER_HORIZONTAL | wx.BOTTOM,
-                         border = 5)
-        manage_sizer.Add(item = self.lcreate, proportion = 0,
-                         flag = wx.ALIGN_CENTER_HORIZONTAL | wx.ALL,
-                         border = 3)
-        manage_sizer.Add(item = self.bmapset, proportion = 0,
-                         flag = wx.ALIGN_CENTER_HORIZONTAL | wx.BOTTOM,
-                         border = 5)
-        manage_sizer.Add(item = self.lmanageloc, proportion = 0,
-                         flag = wx.ALIGN_CENTER_HORIZONTAL | wx.ALL,
-                         border = 3)
-        manage_sizer.Add(item = self.manageloc, proportion = 0,
-                         flag = wx.ALIGN_CENTER_HORIZONTAL | wx.BOTTOM,
-                         border = 5)
+        mapset_sizer.Add(item = self.lbmapsets, proportion=1,
+                         flag=wx.EXPAND | wx.ALL,
+                         border=3)
+        mapset_sizer.Add(item = mapset_buttons_sizer, proportion = 0,
+                         flag=wx.ALIGN_CENTER_HORIZONTAL | wx.ALL,
+                         border=3)
         
+        mapset_buttons_sizer.Add(item = self.bmapset, proportion = 0,
+                         flag=wx.EXPAND | wx.ALL,
+                         border=3)
+        mapset_buttons_sizer.Add(item=self.rename_mapset_button, proportion=0,
+                         flag=wx.EXPAND | wx.ALL,
+                         border=3)
+        mapset_buttons_sizer.Add(item=self.delete_mapset_button, proportion=0,
+                         flag=wx.EXPAND | wx.ALL,
+                         border=3)
+        
+        mapset_boxsizer.Add(item=self.mapset_panel, proportion=1,
+                         flag=wx.EXPAND | wx.ALL,
+                         border=3)
+        
+        mapset_panel_sizer.Add(item=mapset_sizer, proportion=1,
+                         flag=wx.EXPAND | wx.ALL,
+                         border=3)
+        mapset_panel_sizer.Add(item=self.lmapset, proportion=0,
+                         flag=wx.EXPAND | wx.ALL,
+                         border=3)
+
         # location sizer
-        location_sizer.Add(item = select_boxsizer, proportion = 1,
+        location_mapset_sizer.Add(item = location_boxsizer, proportion = 1,
                            flag = wx.LEFT | wx.RIGHT | wx.EXPAND,
                            border = 3) 
-        location_sizer.Add(item = manage_sizer, proportion = 0,
+        location_mapset_sizer.Add(item = mapset_boxsizer, proportion = 1,
                            flag = wx.RIGHT | wx.EXPAND,
                            border = 3)
-        
+
         # buttons
         btns_sizer.Add(item = self.bstart, proportion = 0,
                        flag = wx.ALIGN_CENTER_HORIZONTAL |
@@ -358,26 +431,21 @@
                   wx.ALIGN_CENTER_HORIZONTAL |
                   wx.ALL,
                   border = 3) # image
-        sizer.Add(item = self.lwelcome, # welcome message
-                  proportion = 0,
-                  flag = wx.ALIGN_CENTER_VERTICAL |
-                  wx.ALIGN_CENTER_HORIZONTAL |
-                  wx.BOTTOM,
-                  border = 5)
-        sizer.Add(item = self.ltitle, # title
-                  proportion = 0,
-                  flag = wx.ALIGN_CENTER_VERTICAL |
-                  wx.ALIGN_CENTER_HORIZONTAL)
-        sizer.Add(item = dbase_sizer, proportion = 0,
+        #sizer.Add(item = self.ltitle, # title
+        #          proportion=0,
+        #          flag=wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.ALL,
+        #          border=3)
+        sizer.Add(item = gisdbase_boxsizer, proportion = 0,
                   flag = wx.ALIGN_CENTER_HORIZONTAL |
                   wx.RIGHT | wx.LEFT | wx.EXPAND,
-                  border = 20) # GISDBASE setting
+                  border=3) # GISDBASE setting
+
         # warning/error message
         sizer.Add(item=self.lmessage,
                   proportion=0,
                   flag=wx.ALIGN_CENTER_VERTICAL |
                   wx.ALIGN_LEFT| wx.LEFT | wx.RIGHT | wx.BOTTOM, border=8)
-        sizer.Add(item = location_sizer, proportion = 1,
+        sizer.Add(item = location_mapset_sizer, proportion = 1,
                   flag = wx.RIGHT | wx.LEFT | wx.EXPAND,
                   border = 1)
         sizer.Add(item = btns_sizer, proportion = 0,
@@ -544,23 +612,8 @@
                 else:
                     args = {'raster' : mapName}
                 RunCommand('g.region', flags = 's', parent = self, **args)
-        
-    def OnManageLoc(self, event):
-        """Location management choice control handler
-        """
-        sel = event.GetSelection()
-        if sel ==  0:
-            self.RenameMapset()
-        elif sel ==  1:
-            self.RenameLocation()
-        elif sel ==  2:
-            self.DeleteMapset()
-        elif sel ==  3:
-            self.DeleteLocation()
-        
-        event.Skip()
-        
-    def RenameMapset(self):
+
+    def RenameMapset(self, event):
         """Rename selected mapset
         """
         location = self.listOfLocations[self.lblocations.GetSelection()]
@@ -602,7 +655,7 @@
             
         dlg.Destroy()
 
-    def RenameLocation(self):
+    def RenameLocation(self, event):
         """Rename selected location
         """
         location = self.listOfLocations[self.lblocations.GetSelection()]
@@ -639,7 +692,7 @@
         
         dlg.Destroy()
 
-    def DeleteMapset(self):
+    def DeleteMapset(self, event):
         """Delete selected mapset
         """
         location = self.listOfLocations[self.lblocations.GetSelection()]
@@ -668,7 +721,7 @@
 
         dlg.Destroy()
 
-    def DeleteLocation(self):
+    def DeleteLocation(self, event):
         """
         Delete selected location
         """
@@ -797,12 +850,20 @@
                 self.bstart.Enable()
                 self.bstart.SetFocus()
                 self.bmapset.Enable()
-                self.manageloc.Enable()
+                # replacing disabled choice, perhaps just mapset needed
+                self.rename_location_button.Enable()
+                self.delete_location_button.Enable()
+                self.rename_mapset_button.Enable()
+                self.delete_mapset_button.Enable()
         else:
             self.lbmapsets.SetSelection(wx.NOT_FOUND)
             self.bstart.Enable(False)
             self.bmapset.Enable(False)
-            self.manageloc.Enable(False)
+            # replacing disabled choice, perhaps just mapset needed
+            self.rename_location_button.Enable(False)
+            self.delete_location_button.Enable(False)
+            self.rename_mapset_button.Enable(False)
+            self.delete_mapset_button.Enable(False)
         
     def OnSelectMapset(self, event):
         """Mapset selected"""
@@ -1049,16 +1110,12 @@
         StartUp.Show()
         
         if StartUp.GetRCValue("LOCATION_NAME") ==  "<UNKNOWN>":
-            wx.MessageBox(parent = StartUp,
-                          caption = _('Starting GRASS for the first time'),
-                          message = _('GRASS needs a directory in which to store its data. '
+            StartUp._showWarning(_('GRASS needs a directory in which to store its data. '
                                     'Create one now if you have not already done so. '
                                     'A popular choice is "grassdata", located in '
-                                    'your home directory.'),
-                          style = wx.OK | wx.ICON_ERROR | wx.CENTRE)
-            
-            StartUp.OnBrowse(None)
-        
+                                    'your home directory. '
+                                    'Press Browse button to select the directory.'))
+
         return 1
 
 if __name__ ==  "__main__":
Index: gui_core/widgets.py
===================================================================
--- gui_core/widgets.py	(revision 64276)
+++ gui_core/widgets.py	(working copy)
@@ -496,7 +496,9 @@
 
     def _updateLabel(self):
         """Calculates size of wrapped label"""
+        
         parent = self.GetParent()
+        print "Update label", parent.GetSize()[0]
         newLabel = wordwrap(text=self._initialLabel, width=parent.GetSize()[0],
                             dc=wx.ClientDC(parent), breakLongWords=True,
                             margin=self._margin)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: startup_with_explanations.png
Type: image/png
Size: 217320 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20150121/62aad5af/attachment-0001.png>


More information about the grass-dev mailing list