[GRASS-SVN] r63545 - in grass/branches/releasebranch_7_0/gui/wxpython: animation core gui_core lmgr mapdisp mapswipe nviz vdigit

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Dec 14 19:48:20 PST 2014


Author: annakrat
Date: 2014-12-14 19:48:20 -0800 (Sun, 14 Dec 2014)
New Revision: 63545

Modified:
   grass/branches/releasebranch_7_0/gui/wxpython/animation/nviztask.py
   grass/branches/releasebranch_7_0/gui/wxpython/core/settings.py
   grass/branches/releasebranch_7_0/gui/wxpython/core/workspace.py
   grass/branches/releasebranch_7_0/gui/wxpython/gui_core/preferences.py
   grass/branches/releasebranch_7_0/gui/wxpython/lmgr/frame.py
   grass/branches/releasebranch_7_0/gui/wxpython/lmgr/layertree.py
   grass/branches/releasebranch_7_0/gui/wxpython/mapdisp/statusbar.py
   grass/branches/releasebranch_7_0/gui/wxpython/mapswipe/dialogs.py
   grass/branches/releasebranch_7_0/gui/wxpython/nviz/mapwindow.py
   grass/branches/releasebranch_7_0/gui/wxpython/nviz/preferences.py
   grass/branches/releasebranch_7_0/gui/wxpython/nviz/tools.py
   grass/branches/releasebranch_7_0/gui/wxpython/nviz/workspace.py
   grass/branches/releasebranch_7_0/gui/wxpython/vdigit/mapwindow.py
   grass/branches/releasebranch_7_0/gui/wxpython/vdigit/toolbars.py
Log:
wxGUI/settings: make dialog nonmodal and destroy it instead of hiding (caused problems on MacOSX with wxPython3); make apply button label more understandable; fix Set to default behavior not to apply changes but just set default values in widgets (merge from trunk, r63544)

Modified: grass/branches/releasebranch_7_0/gui/wxpython/animation/nviztask.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/animation/nviztask.py	2014-12-15 03:45:26 UTC (rev 63544)
+++ grass/branches/releasebranch_7_0/gui/wxpython/animation/nviztask.py	2014-12-15 03:48:20 UTC (rev 63545)
@@ -139,7 +139,7 @@
         if 'marker' in points:
             marker = list(UserSettings.Get(group='nviz', key='vector',
                                            subkey=['points', 'marker'],
-                                           internal=True))[points['marker']['value']]
+                                           settings_type='internal'))[points['marker']['value']]
             self._setMultiTaskParam('vpoint_marker', marker)
         if 'mode' in points:
             if points['mode']['type'] == '3d':

Modified: grass/branches/releasebranch_7_0/gui/wxpython/core/settings.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/core/settings.py	2014-12-15 03:45:26 UTC (rev 63544)
+++ grass/branches/releasebranch_7_0/gui/wxpython/core/settings.py	2014-12-15 03:48:20 UTC (rev 63545)
@@ -1063,23 +1063,26 @@
                 
         return value
 
-    def Get(self, group, key = None, subkey = None, internal = False):
+    def Get(self, group, key=None, subkey=None, settings_type='user'):
         """Get value by key/subkey
 
         Raise KeyError if key is not found
-        
+
         :param group: settings group
         :param key: (value, None)
         :param subkey: (value, list or None)
-        :param internal: use internal settings instead
+        :param settings_type: 'user', 'internal', 'default'
 
         :return: value
         """
-        if internal is True:
+
+        if settings_type == 'user':
+            settings = self.userSettings
+        elif settings_type == 'internal':
             settings = self.internalSettings
         else:
-            settings = self.userSettings
-            
+            settings = self.defaultSettings
+
         try:
             if subkey is None:
                 if key is None:
@@ -1091,28 +1094,31 @@
                         type(subkey) == type(list()):
                     return settings[group][key][subkey[0]][subkey[1]]
                 else:
-                    return settings[group][key][subkey]  
+                    return settings[group][key][subkey]
 
         except KeyError:
             print >> sys.stderr, "Settings: unable to get value '%s:%s:%s'\n" % \
                 (group, key, subkey)
-        
-    def Set(self, group, value, key = None, subkey = None, internal = False):
+
+    def Set(self, group, value, key=None, subkey=None, settings_type='user'):
         """Set value of key/subkey
-        
+
         Raise KeyError if group/key is not found
-        
+
         :param group: settings group
         :param key: key (value, None)
         :param subkey: subkey (value, list or None)
         :param value: value
-        :param internal: use internal settings instead
+        :param settings_type: 'user', 'internal', 'default'
         """
-        if internal is True:
+
+        if settings_type == 'user':
+            settings = self.userSettings
+        elif settings_type == 'internal':
             settings = self.internalSettings
         else:
-            settings = self.userSettings
-        
+            settings = self.defaultSettings
+
         try:
             if subkey is None:
                 if key is None:
@@ -1127,7 +1133,7 @@
                     settings[group][key][subkey] = value
         except KeyError:
             raise GException("%s '%s:%s:%s'" % (_("Unable to set "), group, key, subkey))
-        
+
     def Append(self, dict, group, key, subkey, value, overwrite = True):
         """Set value of key/subkey
 

Modified: grass/branches/releasebranch_7_0/gui/wxpython/core/workspace.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/core/workspace.py	2014-12-15 03:45:26 UTC (rev 63544)
+++ grass/branches/releasebranch_7_0/gui/wxpython/core/workspace.py	2014-12-15 03:48:20 UTC (rev 63545)
@@ -482,7 +482,7 @@
         """
         marker = str(nodePoints.get('marker', ''))
         markerId = list(UserSettings.Get(group='nviz', key='vector',
-                                         subkey=['points', 'marker'], internal=True)).index(marker)
+                                         subkey=['points', 'marker'], settings_type='internal')).index(marker)
         nvizData['vector']['points']['marker'] = {'value': markerId}
 
         node_mode = nodePoints.find('mode')
@@ -1118,7 +1118,7 @@
             elif attrb == 'points':
                 markerId = data[attrb]['marker']['value']
                 marker = UserSettings.Get(group = 'nviz', key = 'vector',
-                                          subkey = ['points', 'marker'], internal = True)[markerId]
+                                          subkey = ['points', 'marker'], settings_type='internal')[markerId]
                 self.file.write('%s<v%s marker="%s">\n' % (' ' * self.indent,
                                                            attrb,
                                                            marker))

Modified: grass/branches/releasebranch_7_0/gui/wxpython/gui_core/preferences.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gui_core/preferences.py	2014-12-15 03:45:26 UTC (rev 63544)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gui_core/preferences.py	2014-12-15 03:48:20 UTC (rev 63545)
@@ -85,9 +85,10 @@
         
         # bindigs
         self.btnDefault.Bind(wx.EVT_BUTTON, self.OnDefault)
-        self.btnDefault.SetToolTipString(_("Revert settings to default and apply changes"))
+        self.btnDefault.SetToolTipString(_("Revert settings to default"))
         self.btnApply.Bind(wx.EVT_BUTTON, self.OnApply)
-        self.btnApply.SetToolTipString(_("Apply changes for the current session"))
+        self.btnApply.SetToolTipString(_("Apply changes for the current session only and close"))
+        self.btnApply.SetLabel(_("Save for this session only"))
         self.btnSave.Bind(wx.EVT_BUTTON, self.OnSave)
         self.btnSave.SetToolTipString(_("Apply and save changes to user settings file (default for next sessions)"))
         self.btnSave.SetDefault()
@@ -119,21 +120,19 @@
         
         self.SetSizer(mainSizer)
         mainSizer.Fit(self)
-        
+
     def OnDefault(self, event):
         """Button 'Set to default' pressed"""
-        self.settings.userSettings = copy.deepcopy(self.settings.defaultSettings)
-        
         # update widgets
         for gks in self.winId.keys():
             try:
                 group, key, subkey = gks.split(':')
-                value = self.settings.Get(group, key, subkey)
+                value = self.settings.Get(group, key, subkey, settings_type='default')
             except ValueError:
                 group, key, subkey, subkey1 = gks.split(':')
-                value = self.settings.Get(group, key, [subkey, subkey1])
+                value = self.settings.Get(group, key, [subkey, subkey1], settings_type='default')
             win = self.FindWindowById(self.winId[gks])
-            
+
             if win.GetName() in ('GetValue', 'IsChecked'):
                 value = win.SetValue(value)
             elif win.GetName() == 'GetSelection':
@@ -144,7 +143,7 @@
                 value = win.SetLabel(value)
             else:
                 value = win.SetValue(value)
-        
+
     def OnApply(self, event):
         """Button 'Apply' pressed
         Emits signal settingsChanged.
@@ -155,7 +154,8 @@
             self.Close()
 
     def OnCloseWindow(self, event):
-        self.Hide()
+        event.Skip()
+        self.Destroy()
         
     def OnCancel(self, event):
         """Button 'Cancel' pressed"""
@@ -414,7 +414,7 @@
                       wx.ALIGN_CENTER_VERTICAL,
                       pos = (row, 0))
         locales = self.settings.Get(group = 'language', key = 'locale', 
-                                         subkey = 'choices', internal = True)
+                                         subkey = 'choices', settings_type='internal')
         loc = self.settings.Get(group = 'language', key = 'locale', subkey = 'lc_all')
         elementList = wx.Choice(parent = panel, id = wx.ID_ANY, size = (325, -1),
                                 choices = locales, name = "GetStringSelection")
@@ -450,7 +450,7 @@
                       pos = (row, 0))
         elementList = wx.Choice(parent = panel, id = wx.ID_ANY, size = (325, -1),
                                 choices = self.settings.Get(group = 'appearance', key = 'elementListExpand',
-                                                            subkey = 'choices', internal = True),
+                                                            subkey = 'choices', settings_type='internal'),
                                 name = "GetSelection")
         elementList.SetSelection(self.settings.Get(group = 'appearance', key = 'elementListExpand',
                                                    subkey = 'selection'))
@@ -471,7 +471,7 @@
                       wx.ALIGN_CENTER_VERTICAL,
                       pos = (row, 0))
         listOfStyles = self.settings.Get(group = 'appearance', key = 'menustyle',
-                                         subkey = 'choices', internal = True)
+                                         subkey='choices', settings_type='internal')
         
         menuItemText = wx.Choice(parent = panel, id = wx.ID_ANY, size = (325, -1),
                                  choices = listOfStyles,
@@ -494,8 +494,8 @@
                       flag = wx.ALIGN_LEFT |
                       wx.ALIGN_CENTER_VERTICAL,
                       pos = (row, 0))
-        min = self.settings.Get(group = 'appearance', key = 'gSelectPopupHeight', subkey = 'min', internal = True)
-        max = self.settings.Get(group = 'appearance', key = 'gSelectPopupHeight', subkey = 'max', internal = True)
+        min = self.settings.Get(group = 'appearance', key = 'gSelectPopupHeight', subkey = 'min', settings_type='internal')
+        max = self.settings.Get(group = 'appearance', key = 'gSelectPopupHeight', subkey = 'max', settings_type='internal')
         value = self.settings.Get(group = 'appearance', key = 'gSelectPopupHeight', subkey = 'value')
         
         popupHeightSpin = wx.SpinCtrl(parent = panel, id = wx.ID_ANY, size = (100, -1))
@@ -520,7 +520,7 @@
                       pos = (row, 0))
         iconTheme = wx.Choice(parent = panel, id = wx.ID_ANY, size = (100, -1),
                               choices = self.settings.Get(group = 'appearance', key = 'iconTheme',
-                                                        subkey = 'choices', internal = True),
+                                                        subkey = 'choices', settings_type='internal'),
                               name = "GetStringSelection")
         iconTheme.SetStringSelection(self.settings.Get(group = 'appearance', key = 'iconTheme', subkey = 'type'))
         self.winId['appearance:iconTheme:type'] = iconTheme.GetId()
@@ -540,7 +540,7 @@
                       pos = (row, 0))
         styleList = wx.Choice(parent = panel, id = wx.ID_ANY, size = (325, -1),
                                 choices = self.settings.Get(group = 'appearance', key = 'commandNotebook',
-                                                            subkey = 'choices', internal = True),
+                                                            subkey = 'choices', settings_type='internal'),
                                 name = "GetSelection")
         styleList.SetSelection(self.settings.Get(group = 'appearance', key = 'commandNotebook',
                                                    subkey = 'selection'))
@@ -613,7 +613,7 @@
                       flag = wx.ALIGN_LEFT |
                       wx.ALIGN_CENTER_VERTICAL,
                       pos = (row, 0))
-        listOfDrivers = self.settings.Get(group = 'display', key = 'driver', subkey = 'choices', internal = True)
+        listOfDrivers = self.settings.Get(group = 'display', key = 'driver', subkey = 'choices', settings_type='internal')
         driver = wx.Choice(parent = panel, id = wx.ID_ANY, size = (150, -1),
                            choices = listOfDrivers,
                            name = "GetStringSelection")
@@ -633,7 +633,7 @@
                       flag = wx.ALIGN_LEFT |
                       wx.ALIGN_CENTER_VERTICAL,
                       pos = (row, 0))
-        listOfModes = self.settings.Get(group = 'display', key = 'statusbarMode', subkey = 'choices', internal = True)
+        listOfModes = self.settings.Get(group = 'display', key = 'statusbarMode', subkey = 'choices', settings_type='internal')
         statusbarMode = wx.Choice(parent = panel, id = wx.ID_ANY, size = (150, -1),
                                   choices = listOfModes,
                                   name = "GetSelection")
@@ -724,7 +724,7 @@
                       flag = wx.ALIGN_LEFT |
                       wx.ALIGN_CENTER_VERTICAL,
                       pos = (row, 0))
-        listOfModes = self.settings.Get(group = 'display', key = 'mouseWheelZoom', subkey = 'choices', internal = True)
+        listOfModes = self.settings.Get(group = 'display', key = 'mouseWheelZoom', subkey = 'choices', settings_type='internal')
         zoomAction = wx.Choice(parent = panel, id = wx.ID_ANY, size = (200, -1),
                                choices = listOfModes,
                                name = "GetSelection")
@@ -739,7 +739,7 @@
                       flag = wx.ALIGN_LEFT |
                       wx.ALIGN_CENTER_VERTICAL,
                       pos = (row, 0))
-        listOfModes = self.settings.Get(group = 'display', key = 'scrollDirection', subkey = 'choices', internal = True)
+        listOfModes = self.settings.Get(group = 'display', key = 'scrollDirection', subkey = 'choices', settings_type='internal')
         scrollDir = wx.Choice(parent = panel, id = wx.ID_ANY, size = (200, -1),
                                choices = listOfModes,
                                name = "GetSelection")
@@ -859,7 +859,7 @@
                       wx.ALIGN_CENTER_VERTICAL,
                       pos = (row, 0))
         verbosity = wx.Choice(parent = panel, id = wx.ID_ANY, size = (200, -1),
-                              choices = self.settings.Get(group = 'cmd', key = 'verbosity', subkey = 'choices', internal = True),
+                              choices = self.settings.Get(group = 'cmd', key = 'verbosity', subkey = 'choices', settings_type='internal'),
                               name = "GetStringSelection")
         verbosity.SetStringSelection(self.settings.Get(group = 'cmd', key = 'verbosity', subkey = 'selection'))
         self.winId['cmd:verbosity:selection'] = verbosity.GetId()
@@ -1113,7 +1113,7 @@
         flexSizer.AddGrowableCol(0)
         label = wx.StaticText(parent = panel, id = wx.ID_ANY, label = _("Left mouse double click:"))
         leftDbClick = wx.Choice(parent = panel, id = wx.ID_ANY,
-                                choices = self.settings.Get(group = 'atm', key = 'leftDbClick', subkey = 'choices', internal = True),
+                                choices = self.settings.Get(group = 'atm', key = 'leftDbClick', subkey = 'choices', settings_type='internal'),
                                 name = "GetSelection")
         leftDbClick.SetSelection(self.settings.Get(group = 'atm', key = 'leftDbClick', subkey = 'selection'))
         self.winId['atm:leftDbClick:selection'] = leftDbClick.GetId()

Modified: grass/branches/releasebranch_7_0/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/lmgr/frame.py	2014-12-15 03:45:26 UTC (rev 63544)
+++ grass/branches/releasebranch_7_0/gui/wxpython/lmgr/frame.py	2014-12-15 03:48:20 UTC (rev 63545)
@@ -1500,14 +1500,15 @@
         """General GUI preferences/settings
         """
         if not self.dialogs['preferences']:
-            dlg = PreferencesDialog(parent = self, giface = self._giface)
+            dlg = PreferencesDialog(parent=self, giface=self._giface)
             self.dialogs['preferences'] = dlg
-            self.dialogs['preferences'].CenterOnScreen()
-            
+            self.dialogs['preferences'].CenterOnParent()
+
             dlg.settingsChanged.connect(self.OnSettingsChanged)
+            self.Bind(wx.EVT_CLOSE, lambda evt: self.dialogs.update(preferences=None), dlg)
+
+        self.dialogs['preferences'].Show()
         
-        self.dialogs['preferences'].ShowModal()
-        
     def OnNvizPreferences(self, event):
         """Show nviz preferences"""
         if not self.dialogs['nvizPreferences']:

Modified: grass/branches/releasebranch_7_0/gui/wxpython/lmgr/layertree.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/lmgr/layertree.py	2014-12-15 03:45:26 UTC (rev 63544)
+++ grass/branches/releasebranch_7_0/gui/wxpython/lmgr/layertree.py	2014-12-15 03:48:20 UTC (rev 63545)
@@ -1450,7 +1450,7 @@
         if digitToolbar:
             mapLayer = self.GetLayerInfo(layer, key = 'maplayer')
             bgmap = UserSettings.Get(group = 'vdigit', key = 'bgmap', subkey = 'value',
-                                     internal = True)
+                                     settings_type='internal')
             
             if digitToolbar.GetLayer() == mapLayer:
                 self._setGradient('vdigit')

Modified: grass/branches/releasebranch_7_0/gui/wxpython/mapdisp/statusbar.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/mapdisp/statusbar.py	2014-12-15 03:45:26 UTC (rev 63544)
+++ grass/branches/releasebranch_7_0/gui/wxpython/mapdisp/statusbar.py	2014-12-15 03:48:20 UTC (rev 63545)
@@ -205,7 +205,7 @@
                          key = 'statusbarMode',
                          subkey = 'choices',
                          value = self.choice.GetItems(),
-                         internal = True)
+                         settings_type='internal')
 
         if not self._modeIndexSet:
             self.choice.SetSelection(UserSettings.Get(group = 'display',

Modified: grass/branches/releasebranch_7_0/gui/wxpython/mapswipe/dialogs.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/mapswipe/dialogs.py	2014-12-15 03:45:26 UTC (rev 63544)
+++ grass/branches/releasebranch_7_0/gui/wxpython/mapswipe/dialogs.py	2014-12-15 03:48:20 UTC (rev 63545)
@@ -256,7 +256,7 @@
                       flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL, pos=(row, 0))
         cursors = wx.Choice(parent=panel,
                             choices=self.settings.Get(group='mapswipe', key='cursor',
-                                                      subkey=['type', 'choices'], internal=True),
+                                                      subkey=['type', 'choices'], settings_type='internal'),
                             name="GetSelection")
         cursors.SetSelection(self.settings.Get(group='mapswipe', key='cursor',
                                                subkey=['type', 'selection']))

Modified: grass/branches/releasebranch_7_0/gui/wxpython/nviz/mapwindow.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/nviz/mapwindow.py	2014-12-15 03:45:26 UTC (rev 63544)
+++ grass/branches/releasebranch_7_0/gui/wxpython/nviz/mapwindow.py	2014-12-15 03:48:20 UTC (rev 63545)
@@ -182,7 +182,7 @@
         # default values
         self.nvizDefault = NvizSettings()
         self.view = copy.deepcopy(UserSettings.Get(group = 'nviz', key = 'view')) # copy
-        self.iview = UserSettings.Get(group = 'nviz', key = 'view', internal = True)
+        self.iview = UserSettings.Get(group='nviz', key='view', settings_type='internal')
         self.light = copy.deepcopy(UserSettings.Get(group = 'nviz', key = 'light')) # copy
         self.decoration = self.nvizDefault.SetDecorDefaultProp(type = 'arrow')
         self.decoration['scalebar'] = []

Modified: grass/branches/releasebranch_7_0/gui/wxpython/nviz/preferences.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/nviz/preferences.py	2014-12-15 03:45:26 UTC (rev 63544)
+++ grass/branches/releasebranch_7_0/gui/wxpython/nviz/preferences.py	2014-12-15 03:48:20 UTC (rev 63545)
@@ -64,7 +64,7 @@
         row = 0
         # perspective
         pvals = UserSettings.Get(group = 'nviz', key = 'view', subkey = 'persp')
-        ipvals = UserSettings.Get(group = 'nviz', key = 'view', subkey = 'persp', internal = True)
+        ipvals = UserSettings.Get(group='nviz', key='view', subkey='persp', settings_type='internal')
         gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
                                          label = _("Perspective:")),
                       pos = (row, 0), flag = wx.ALIGN_CENTER_VERTICAL)
@@ -127,7 +127,7 @@
         
         # twist
         tvals = UserSettings.Get(group = 'nviz', key = 'view', subkey = 'twist')
-        itvals = UserSettings.Get(group = 'nviz', key = 'view', subkey = 'twist', internal = True)
+        itvals = UserSettings.Get(group='nviz', key='view', subkey='twist', settings_type='internal')
         gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
                                          label = _("Twist:")),
                       pos = (row, 0), flag = wx.ALIGN_CENTER_VERTICAL)
@@ -532,7 +532,7 @@
                       pos = (row, 2), flag = wx.ALIGN_CENTER_VERTICAL)
         isym = wx.Choice (parent = panel, id = wx.ID_ANY, size = (100, -1),
                           choices = UserSettings.Get(group = 'nviz', key = 'vector',
-                                                   subkey = ['points', 'marker'], internal = True))
+                                                   subkey=['points', 'marker'], settings_type='internal'))
         isym.SetName("GetSelection")
         self.winId['nviz:vector:points:marker'] = isym.GetId()
         isym.SetSelection(UserSettings.Get(group = 'nviz', key = 'vector',

Modified: grass/branches/releasebranch_7_0/gui/wxpython/nviz/tools.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/nviz/tools.py	2014-12-15 03:45:26 UTC (rev 63544)
+++ grass/branches/releasebranch_7_0/gui/wxpython/nviz/tools.py	2014-12-15 03:48:20 UTC (rev 63545)
@@ -1420,7 +1420,7 @@
                       pos = (0, 5), flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT)
         isym = wx.Choice (parent = panel, id = wx.ID_ANY, size = (100, -1),
                           choices = UserSettings.Get(group = 'nviz', key = 'vector',
-                                                   subkey = ['points', 'marker'], internal = True))
+                                                   subkey=['points', 'marker'], settings_type='internal'))
         isym.SetName("selection")
         self.win['vector']['points']['marker'] = isym.GetId()
         isym.Bind(wx.EVT_CHOICE, self.OnVectorPoints)

Modified: grass/branches/releasebranch_7_0/gui/wxpython/nviz/workspace.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/nviz/workspace.py	2014-12-15 03:45:26 UTC (rev 63544)
+++ grass/branches/releasebranch_7_0/gui/wxpython/nviz/workspace.py	2014-12-15 03:48:20 UTC (rev 63545)
@@ -344,7 +344,7 @@
                                  subkey='color')[:3])
             data['arrow'].update(copy.deepcopy(UserSettings.Get(group='nviz',
                                                                 key='arrow',
-                                                                internal=True)))
+                                                                settings_type='internal')))
             data['arrow']['show'] = False
 
         # arrow
@@ -356,6 +356,6 @@
                                  subkey='color')[:3])
             data['scalebar'].update(copy.deepcopy(UserSettings.Get(group='nviz',
                                                                    key='scalebar',
-                                                                   internal=True)))
+                                                                   settings_type='internal')))
             data['scalebar']['id'] = 0
         return data

Modified: grass/branches/releasebranch_7_0/gui/wxpython/vdigit/mapwindow.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/vdigit/mapwindow.py	2014-12-15 03:45:26 UTC (rev 63544)
+++ grass/branches/releasebranch_7_0/gui/wxpython/vdigit/mapwindow.py	2014-12-15 03:48:20 UTC (rev 63545)
@@ -756,7 +756,7 @@
         pos2 = self.Pixel2Cell(self.mouse['end'])
         
         if UserSettings.Get(group = 'vdigit', key = 'bgmap',
-                            subkey = 'value', internal = True) == '':
+                            subkey='value', settings_type='internal') == '':
             # no background map -> copy from current vector map layer
             nselected = self.digit.GetDisplay().SelectLinesByBox((pos1, pos2))
             
@@ -774,7 +774,7 @@
                 colorStr = str(color[0]) + ":" + str(color[1]) + ":" + str(color[2])
                 dVectTmp = ['d.vect',
                             'map=%s' % UserSettings.Get(group = 'vdigit', key = 'bgmap',
-                                                        subkey = 'value', internal = True),
+                                                        subkey='value', settings_type='internal'),
                             'cats=%s' % ListOfCatsToRange(self.copyIds),
                             '-i',
                             'color=%s' % colorStr,

Modified: grass/branches/releasebranch_7_0/gui/wxpython/vdigit/toolbars.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/vdigit/toolbars.py	2014-12-15 03:45:26 UTC (rev 63544)
+++ grass/branches/releasebranch_7_0/gui/wxpython/vdigit/toolbars.py	2014-12-15 03:48:20 UTC (rev 63545)
@@ -597,14 +597,14 @@
         
         # close open background map if any
         bgMap = UserSettings.Get(group = 'vdigit', key = 'bgmap', subkey = 'value',
-                                 internal = True)
+                                 settings_type='internal')
         if bgMap:
             self.digit.CloseBackgroundMap()
             self.editingBgMap.emit(mapName = bgMap, unset=True)
 
         # open background map for reading
         UserSettings.Set(group = 'vdigit', key = 'bgmap', subkey = 'value',
-                         value = str(mapName), internal = True)
+                         value=str(mapName), settings_type='internal')
         self.digit.OpenBackgroundMap(mapName)
         self.editingBgMap.emit(mapName = mapName)
 
@@ -867,7 +867,7 @@
             if UserSettings.Get(group = 'vdigit', key = 'bgmap',
                                 subkey = 'value', internal = True) == mapLayer.GetName():
                 UserSettings.Set(group = 'vdigit', key = 'bgmap',
-                                 subkey = 'value', value = '', internal = True)
+                                 subkey='value', value='', settings_type='internal')
             
             self.parent.SetStatusText(_("Please wait, "
                                         "opening vector map <%s> for editing...") % mapLayer.GetName(),
@@ -979,7 +979,7 @@
 
             # close open background map if any
             bgMap = UserSettings.Get(group = 'vdigit', key = 'bgmap', subkey = 'value',
-                                     internal = True)
+                                     settings_type='internal')
             if bgMap:
                 self.digit.CloseBackgroundMap()
                 self.editingBgMap.emit(mapName = bgMap, unset=True)



More information about the grass-commit mailing list