[GRASS-SVN] r30835 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Apr 1 13:33:24 EDT 2008


Author: martinl
Date: 2008-04-01 13:33:24 -0400 (Tue, 01 Apr 2008)
New Revision: 30835

Modified:
   grass/trunk/gui/wxpython/gui_modules/mapdisp.py
   grass/trunk/gui/wxpython/gui_modules/preferences.py
Log:
wxGUI (preferences): auto-rendering option added to 'default display settings'

Modified: grass/trunk/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mapdisp.py	2008-04-01 17:22:09 UTC (rev 30834)
+++ grass/trunk/gui/wxpython/gui_modules/mapdisp.py	2008-04-01 17:33:24 UTC (rev 30835)
@@ -2262,7 +2262,7 @@
         self.autoRender = wx.CheckBox(parent=self.statusbar, id=wx.ID_ANY,
                                       label=_("Render"))
         self.statusbar.Bind(wx.EVT_CHECKBOX, self.OnToggleRender, self.autoRender)
-        self.autoRender.SetValue(False)
+        self.autoRender.SetValue(UserSettings.Get(group='display', key='autoRendering', subkey='enabled'))
         self.autoRender.SetToolTip(wx.ToolTip (_("Enable/disable auto-rendering")))
         # show region
         self.showRegion = wx.CheckBox(parent=self.statusbar, id=wx.ID_ANY,

Modified: grass/trunk/gui/wxpython/gui_modules/preferences.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/preferences.py	2008-04-01 17:22:09 UTC (rev 30834)
+++ grass/trunk/gui/wxpython/gui_modules/preferences.py	2008-04-01 17:33:24 UTC (rev 30835)
@@ -64,6 +64,7 @@
                 'displayFont' : { 'value' : '' },
                 'driver': { 'type': 'default' },
                 'compResolution' : { 'enabled' : False },
+                'autoRendering': { 'enabled' : False },
                 },
             #
             # advanced
@@ -474,6 +475,7 @@
         notebook.AddPage(page=panel, text=_("Display"))
 
         border = wx.BoxSizer(wx.VERTICAL)
+
         box   = wx.StaticBox (parent=panel, id=wx.ID_ANY, label=" %s " % _("Font settings"))
         sizer = wx.StaticBoxSizer(box, wx.VERTICAL)
 
@@ -496,10 +498,19 @@
                       wx.ALIGN_CENTER_VERTICAL,
                       pos=(row, 1))
 
+        sizer.Add(item=gridSizer, proportion=1, flag=wx.ALL | wx.EXPAND, border=5)
+        border.Add(item=sizer, proportion=0, flag=wx.ALL | wx.EXPAND, border=3)
+
+        box   = wx.StaticBox (parent=panel, id=wx.ID_ANY, label=" %s " % _("Default display settings"))
+        sizer = wx.StaticBoxSizer(box, wx.VERTICAL)
+
+        gridSizer = wx.GridBagSizer (hgap=3, vgap=3)
+        gridSizer.AddGrowableCol(0)
+
         #
         # display driver
         #
-        row = 1
+        row = 0
         gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
                                          label=_("Display driver:")),
                       flag=wx.ALIGN_LEFT |
@@ -536,8 +547,21 @@
         gridSizer.Add(item=compResolution,
                       pos=(row, 0), span=(1, 2))
 
+        #
+        # auto-rendering
+        #
+        row += 1
+        autoRendering = wx.CheckBox(parent=panel, id=wx.ID_ANY,
+                                    label=_("Enable auto-rendering"),
+                                    name="IsChecked")
+        autoRendering.SetValue(self.settings.Get(group='display', key='autoRendering', subkey='enabled'))
+        self.winId['display:autoRendering:enabled'] = autoRendering.GetId()
+
+        gridSizer.Add(item=autoRendering,
+                      pos=(row, 0), span=(1, 2))
+
         sizer.Add(item=gridSizer, proportion=1, flag=wx.ALL | wx.EXPAND, border=5)
-        border.Add(item=sizer, proportion=0, flag=wx.ALL | wx.EXPAND, border=3)
+        border.Add(item=sizer, proportion=0, flag=wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, border=3)
 
         panel.SetSizer(border)
         



More information about the grass-commit mailing list