Browse Source

wxGUI: change size of wx.SpinCtrl for gtk3, see https://trac.osgeo.org/grass/ticket/3201

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@69790 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 8 years ago
parent
commit
4041d1c7be

+ 6 - 5
gui/wxpython/animation/dialogs.py

@@ -36,6 +36,7 @@ from core.settings import UserSettings
 from core.utils import _
 from core.utils import _
 from gui_core.gselect import Select
 from gui_core.gselect import Select
 from gui_core.widgets import FloatValidator
 from gui_core.widgets import FloatValidator
+from gui_core.wrap import GSpinCtrl as SpinCtrl
 
 
 from animation.utils import TemporalMode, getRegisteredMaps, getNameAndLayer, getCpuCount
 from animation.utils import TemporalMode, getRegisteredMaps, getNameAndLayer, getCpuCount
 from animation.data import AnimationData, AnimLayer
 from animation.data import AnimationData, AnimLayer
@@ -103,7 +104,7 @@ class SpeedDialog(wx.Dialog):
         labelDuration = wx.StaticText(
         labelDuration = wx.StaticText(
             self, id=wx.ID_ANY, label=_("Frame duration:"))
             self, id=wx.ID_ANY, label=_("Frame duration:"))
         labelUnits = wx.StaticText(self, id=wx.ID_ANY, label=_("ms"))
         labelUnits = wx.StaticText(self, id=wx.ID_ANY, label=_("ms"))
-        self.spinDuration = wx.SpinCtrl(
+        self.spinDuration = SpinCtrl(
             self,
             self,
             id=wx.ID_ANY,
             id=wx.ID_ANY,
             min=self.minimumDuration,
             min=self.minimumDuration,
@@ -144,7 +145,7 @@ class SpeedDialog(wx.Dialog):
         labelDuration = wx.StaticText(
         labelDuration = wx.StaticText(
             self, id=wx.ID_ANY, label=_("Duration of time unit:"))
             self, id=wx.ID_ANY, label=_("Duration of time unit:"))
         labelUnits = wx.StaticText(self, id=wx.ID_ANY, label=_("ms"))
         labelUnits = wx.StaticText(self, id=wx.ID_ANY, label=_("ms"))
-        self.spinDurationTemp = wx.SpinCtrl(
+        self.spinDurationTemp = SpinCtrl(
             self, id=wx.ID_ANY, min=self.minimumDuration, max=10000,
             self, id=wx.ID_ANY, min=self.minimumDuration, max=10000,
             initial=self.defaultSpeed)
             initial=self.defaultSpeed)
         self.choiceUnits = wx.Choice(self, id=wx.ID_ANY)
         self.choiceUnits = wx.Choice(self, id=wx.ID_ANY)
@@ -1115,9 +1116,9 @@ class ExportDialog(wx.Dialog):
                 "Placement as percentage of"
                 "Placement as percentage of"
                 " screen coordinates (X: 0, Y: 0 is top left):"))
                 " screen coordinates (X: 0, Y: 0 is top left):"))
         label.Wrap(400)
         label.Wrap(400)
-        self.spinX = wx.SpinCtrl(
+        self.spinX = SpinCtrl(
             panel, id=wx.ID_ANY, min=0, max=100, initial=10)
             panel, id=wx.ID_ANY, min=0, max=100, initial=10)
-        self.spinY = wx.SpinCtrl(
+        self.spinY = SpinCtrl(
             panel, id=wx.ID_ANY, min=0, max=100, initial=10)
             panel, id=wx.ID_ANY, min=0, max=100, initial=10)
         self.spinX.Bind(
         self.spinX.Bind(
             wx.EVT_SPINCTRL,
             wx.EVT_SPINCTRL,
@@ -1895,7 +1896,7 @@ class PreferencesDialog(PreferencesBaseDialog):
                 key='nprocs',
                 key='nprocs',
                 subkey='value',
                 subkey='value',
                 value=getCpuCount())
                 value=getCpuCount())
-        nprocs = wx.SpinCtrl(
+        nprocs = SpinCtrl(
             parent=panel,
             parent=panel,
             initial=UserSettings.Get(
             initial=UserSettings.Get(
                 group='animation',
                 group='animation',

+ 2 - 0
gui/wxpython/core/globalvar.py

@@ -217,6 +217,8 @@ toolbarSize = (24, 24)
 hasAgw = CheckWxVersion([2, 8, 11, 0])
 hasAgw = CheckWxVersion([2, 8, 11, 0])
 wxPython3 = CheckWxVersion([3, 0, 0, 0])
 wxPython3 = CheckWxVersion([3, 0, 0, 0])
 
 
+gtk3 = True if 'gtk3' in wx.PlatformInfo else False
+
 """@Add GUIDIR/scripts into path"""
 """@Add GUIDIR/scripts into path"""
 os.environ['PATH'] = os.path.join(
 os.environ['PATH'] = os.path.join(
     GUIDIR, 'scripts') + os.pathsep + os.environ['PATH']
     GUIDIR, 'scripts') + os.pathsep + os.environ['PATH']

+ 3 - 2
gui/wxpython/dbmgr/base.py

@@ -53,6 +53,7 @@ from dbmgr.vinfo import VectorDBInfo, GetUnicodeValue, CreateDbInfoDesc
 from core.debug import Debug
 from core.debug import Debug
 from dbmgr.dialogs import ModifyTableRecord, AddColumnDialog
 from dbmgr.dialogs import ModifyTableRecord, AddColumnDialog
 from core.settings import UserSettings
 from core.settings import UserSettings
+from gui_core.wrap import GSpinCtrl as SpinCtrl
 
 
 
 
 class Log:
 class Log:
@@ -2326,7 +2327,7 @@ class DbMgrTablesPage(DbMgrNotebookBase):
                      flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT,
                      flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT,
                      border=5)
                      border=5)
 
 
-        length = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+        length = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                              initial=250,
                              initial=250,
                              min=1, max=1e6)
                              min=1, max=1e6)
         length.Enable(False)
         length.Enable(False)
@@ -3055,7 +3056,7 @@ class LayerBook(wx.Notebook):
         self.addLayerWidgets = {'layer':
         self.addLayerWidgets = {'layer':
                                 (wx.StaticText(parent=self.addPanel, id=wx.ID_ANY,
                                 (wx.StaticText(parent=self.addPanel, id=wx.ID_ANY,
                                                label='%s:' % _("Layer")),
                                                label='%s:' % _("Layer")),
-                                 wx.SpinCtrl(parent=self.addPanel, id=wx.ID_ANY, size=(65, -1),
+                                 SpinCtrl(parent=self.addPanel, id=wx.ID_ANY, size=(65, -1),
                                              initial=maxLayer + 1,
                                              initial=maxLayer + 1,
                                              min=1, max=1e6)),
                                              min=1, max=1e6)),
                                 'driver':
                                 'driver':

+ 3 - 2
gui/wxpython/dbmgr/dialogs.py

@@ -30,6 +30,7 @@ from core.debug import Debug
 from core.settings import UserSettings
 from core.settings import UserSettings
 from dbmgr.vinfo import VectorDBInfo, GetUnicodeValue
 from dbmgr.vinfo import VectorDBInfo, GetUnicodeValue
 from gui_core.widgets import IntegerValidator, FloatValidator
 from gui_core.widgets import IntegerValidator, FloatValidator
+from gui_core.wrap import GSpinCtrl as SpinCtrl
 
 
 
 
 class DisplayAttributesDialog(wx.Dialog):
 class DisplayAttributesDialog(wx.Dialog):
@@ -642,7 +643,7 @@ class ModifyTableRecord(wx.Dialog):
                     cId += 1
                     cId += 1
                     continue
                     continue
                 else:
                 else:
-                    valueWin = wx.SpinCtrl(
+                    valueWin = SpinCtrl(
                         parent=self.dataPanel, id=wx.ID_ANY, value=value,
                         parent=self.dataPanel, id=wx.ID_ANY, value=value,
                         min=-1e9, max=1e9, size=(250, -1))
                         min=-1e9, max=1e9, size=(250, -1))
             else:
             else:
@@ -763,7 +764,7 @@ class AddColumnDialog(wx.Dialog):
         self.data['addColType'].SetSelection(0)
         self.data['addColType'].SetSelection(0)
         self.data['addColType'].Bind(wx.EVT_CHOICE, self.OnTableChangeType)
         self.data['addColType'].Bind(wx.EVT_CHOICE, self.OnTableChangeType)
 
 
-        self.data['addColLength'] = wx.SpinCtrl(
+        self.data['addColLength'] = SpinCtrl(
             parent=self, id=wx.ID_ANY, size=(
             parent=self, id=wx.ID_ANY, size=(
                 65, -1), initial=250, min=1, max=1e6)
                 65, -1), initial=250, min=1, max=1e6)
         self.data['addColLength'].Enable(False)
         self.data['addColLength'].Enable(False)

+ 3 - 2
gui/wxpython/gcp/manager.py

@@ -49,6 +49,7 @@ from core.gcmd import RunCommand, GMessage, GError, GWarning, EncodeString
 from core.settings import UserSettings
 from core.settings import UserSettings
 from gcp.mapdisplay import MapFrame
 from gcp.mapdisplay import MapFrame
 from core.giface import Notification
 from core.giface import Notification
+from gui_core.wrap import GSpinCtrl as SpinCtrl
 
 
 from location_wizard.wizard import TitledPage as TitledPage
 from location_wizard.wizard import TitledPage as TitledPage
 
 
@@ -2793,7 +2794,7 @@ class GrSettingsDialog(wx.Dialog):
                 group='gcpman',
                 group='gcpman',
                 key='symbol',
                 key='symbol',
                 subkey='size'))
                 subkey='size'))
-        sizeWin = wx.SpinCtrl(parent=panel, id=wx.ID_ANY,
+        sizeWin = SpinCtrl(parent=panel, id=wx.ID_ANY,
                               min=1, max=20)
                               min=1, max=20)
         sizeWin.SetValue(symsize)
         sizeWin.SetValue(symsize)
         self.symbol['size'] = sizeWin.GetId()
         self.symbol['size'] = sizeWin.GetId()
@@ -2815,7 +2816,7 @@ class GrSettingsDialog(wx.Dialog):
                 group='gcpman',
                 group='gcpman',
                 key='symbol',
                 key='symbol',
                 subkey='width'))
                 subkey='width'))
-        widWin = wx.SpinCtrl(parent=panel, id=wx.ID_ANY,
+        widWin = SpinCtrl(parent=panel, id=wx.ID_ANY,
                              min=1, max=10)
                              min=1, max=10)
         widWin.SetValue(width)
         widWin.SetValue(width)
         self.symbol['width'] = widWin.GetId()
         self.symbol['width'] = widWin.GetId()

+ 2 - 1
gui/wxpython/gcp/statusbar.py

@@ -22,6 +22,7 @@ import wx
 from core.gcmd import GMessage
 from core.gcmd import GMessage
 from core.utils import _
 from core.utils import _
 from mapdisp.statusbar import SbItem, SbTextItem
 from mapdisp.statusbar import SbItem, SbTextItem
+from gui_core.wrap import GSpinCtrl as SpinCtrl
 
 
 
 
 class SbGoToGCP(SbItem):
 class SbGoToGCP(SbItem):
@@ -36,7 +37,7 @@ class SbGoToGCP(SbItem):
         self.name = 'gotoGCP'
         self.name = 'gotoGCP'
         self.label = _("Go to GCP No.")
         self.label = _("Go to GCP No.")
 
 
-        self.widget = wx.SpinCtrl(parent=self.statusbar, id=wx.ID_ANY,
+        self.widget = SpinCtrl(parent=self.statusbar, id=wx.ID_ANY,
                                   value="", min=0)
                                   value="", min=0)
         self.widget.Hide()
         self.widget.Hide()
 
 

+ 9 - 8
gui/wxpython/gmodeler/preferences.py

@@ -22,6 +22,7 @@ from core import globalvar
 from gui_core.preferences import PreferencesBaseDialog
 from gui_core.preferences import PreferencesBaseDialog
 from core.settings import UserSettings
 from core.settings import UserSettings
 from core.utils import _
 from core.utils import _
+from gui_core.wrap import GSpinCtrl as SpinCtrl
 
 
 
 
 class PreferencesDialog(PreferencesBaseDialog):
 class PreferencesDialog(PreferencesBaseDialog):
@@ -185,7 +186,7 @@ class PreferencesDialog(PreferencesBaseDialog):
                       wx.ALIGN_CENTER_VERTICAL,
                       wx.ALIGN_CENTER_VERTICAL,
                       pos=(row, 0))
                       pos=(row, 0))
 
 
-        width = wx.SpinCtrl(
+        width = SpinCtrl(
             parent=panel,
             parent=panel,
             id=wx.ID_ANY,
             id=wx.ID_ANY,
             min=0,
             min=0,
@@ -211,7 +212,7 @@ class PreferencesDialog(PreferencesBaseDialog):
                       wx.ALIGN_CENTER_VERTICAL,
                       wx.ALIGN_CENTER_VERTICAL,
                       pos=(row, 0))
                       pos=(row, 0))
 
 
-        height = wx.SpinCtrl(
+        height = SpinCtrl(
             parent=panel,
             parent=panel,
             id=wx.ID_ANY,
             id=wx.ID_ANY,
             min=0,
             min=0,
@@ -351,7 +352,7 @@ class PreferencesDialog(PreferencesBaseDialog):
                       wx.ALIGN_CENTER_VERTICAL,
                       wx.ALIGN_CENTER_VERTICAL,
                       pos=(row, 0))
                       pos=(row, 0))
 
 
-        width = wx.SpinCtrl(
+        width = SpinCtrl(
             parent=panel,
             parent=panel,
             id=wx.ID_ANY,
             id=wx.ID_ANY,
             min=0,
             min=0,
@@ -377,7 +378,7 @@ class PreferencesDialog(PreferencesBaseDialog):
                       wx.ALIGN_CENTER_VERTICAL,
                       wx.ALIGN_CENTER_VERTICAL,
                       pos=(row, 0))
                       pos=(row, 0))
 
 
-        height = wx.SpinCtrl(
+        height = SpinCtrl(
             parent=panel,
             parent=panel,
             id=wx.ID_ANY,
             id=wx.ID_ANY,
             min=0,
             min=0,
@@ -463,7 +464,7 @@ class PreferencesDialog(PreferencesBaseDialog):
                       wx.ALIGN_CENTER_VERTICAL,
                       wx.ALIGN_CENTER_VERTICAL,
                       pos=(row, 0))
                       pos=(row, 0))
 
 
-        width = wx.SpinCtrl(
+        width = SpinCtrl(
             parent=panel,
             parent=panel,
             id=wx.ID_ANY,
             id=wx.ID_ANY,
             min=0,
             min=0,
@@ -489,7 +490,7 @@ class PreferencesDialog(PreferencesBaseDialog):
                       wx.ALIGN_CENTER_VERTICAL,
                       wx.ALIGN_CENTER_VERTICAL,
                       pos=(row, 0))
                       pos=(row, 0))
 
 
-        height = wx.SpinCtrl(
+        height = SpinCtrl(
             parent=panel,
             parent=panel,
             id=wx.ID_ANY,
             id=wx.ID_ANY,
             min=0,
             min=0,
@@ -579,7 +580,7 @@ class PreferencesDialog(PreferencesBaseDialog):
                       wx.ALIGN_CENTER_VERTICAL,
                       wx.ALIGN_CENTER_VERTICAL,
                       pos=(row, 0))
                       pos=(row, 0))
 
 
-        width = wx.SpinCtrl(
+        width = SpinCtrl(
             parent=panel,
             parent=panel,
             id=wx.ID_ANY,
             id=wx.ID_ANY,
             min=0,
             min=0,
@@ -605,7 +606,7 @@ class PreferencesDialog(PreferencesBaseDialog):
                       wx.ALIGN_CENTER_VERTICAL,
                       wx.ALIGN_CENTER_VERTICAL,
                       pos=(row, 0))
                       pos=(row, 0))
 
 
-        height = wx.SpinCtrl(
+        height = SpinCtrl(
             parent=panel,
             parent=panel,
             id=wx.ID_ANY,
             id=wx.ID_ANY,
             min=0,
             min=0,

+ 4 - 3
gui/wxpython/gui_core/dialogs.py

@@ -47,6 +47,7 @@ from gui_core.widgets import SingleSymbolPanel, GListCtrl, SimpleValidator, MapV
 from core.utils import _
 from core.utils import _
 from core.settings import UserSettings
 from core.settings import UserSettings
 from core.debug import Debug
 from core.debug import Debug
+from gui_core.wrap import GSpinCtrl as SpinCtrl
 
 
 
 
 class SimpleDialog(wx.Dialog):
 class SimpleDialog(wx.Dialog):
@@ -1893,12 +1894,12 @@ class ImageSizeDialog(wx.Dialog):
                                 label=' % s' % _("Image size"))
                                 label=' % s' % _("Image size"))
 
 
         size = self.parent.GetWindow().GetClientSize()
         size = self.parent.GetWindow().GetClientSize()
-        self.width = wx.SpinCtrl(parent=self.panel, id=wx.ID_ANY,
+        self.width = SpinCtrl(parent=self.panel, id=wx.ID_ANY,
                                  style=wx.SP_ARROW_KEYS)
                                  style=wx.SP_ARROW_KEYS)
         self.width.SetRange(20, 1e6)
         self.width.SetRange(20, 1e6)
         self.width.SetValue(size.width)
         self.width.SetValue(size.width)
         wx.CallAfter(self.width.SetFocus)
         wx.CallAfter(self.width.SetFocus)
-        self.height = wx.SpinCtrl(parent=self.panel, id=wx.ID_ANY,
+        self.height = SpinCtrl(parent=self.panel, id=wx.ID_ANY,
                                   style=wx.SP_ARROW_KEYS)
                                   style=wx.SP_ARROW_KEYS)
         self.height.SetRange(20, 1e6)
         self.height.SetRange(20, 1e6)
         self.height.SetValue(size.height)
         self.height.SetValue(size.height)
@@ -2472,7 +2473,7 @@ class DefaultFontDialog(wx.Dialog):
                           flag=wx.ALIGN_CENTER_VERTICAL,
                           flag=wx.ALIGN_CENTER_VERTICAL,
                           pos=(2, 0))
                           pos=(2, 0))
 
 
-            self.spin = wx.SpinCtrl(parent=panel, id=wx.ID_ANY)
+            self.spin = SpinCtrl(parent=panel, id=wx.ID_ANY)
             if self.fontsize:
             if self.fontsize:
                 self.spin.SetValue(int(self.fontsize))
                 self.spin.SetValue(int(self.fontsize))
             self.spin.Bind(wx.EVT_SPINCTRL, self.OnSizeSpin)
             self.spin.Bind(wx.EVT_SPINCTRL, self.OnSizeSpin)

+ 6 - 5
gui/wxpython/gui_core/forms.py

@@ -98,6 +98,7 @@ from core.settings import UserSettings
 from gui_core.widgets import FloatValidator, GNotebook, FormNotebook, FormListbook
 from gui_core.widgets import FloatValidator, GNotebook, FormNotebook, FormListbook
 from core.giface import Notification
 from core.giface import Notification
 from gui_core.widgets import LayersList
 from gui_core.widgets import LayersList
+from gui_core.wrap import GSpinCtrl as SpinCtrl
 
 
 wxUpdateDialog, EVT_DIALOG_UPDATE = NewEvent()
 wxUpdateDialog, EVT_DIALOG_UPDATE = NewEvent()
 
 
@@ -1200,7 +1201,7 @@ class CmdPanel(wx.Panel):
                             except ValueError:
                             except ValueError:
                                 minValue = -1e6
                                 minValue = -1e6
                                 maxValue = 1e6
                                 maxValue = 1e6
-                            txt2 = wx.SpinCtrl(
+                            txt2 = SpinCtrl(
                                 parent=which_panel,
                                 parent=which_panel,
                                 id=wx.ID_ANY,
                                 id=wx.ID_ANY,
                                 size=globalvar.DIALOG_SPIN_SIZE,
                                 size=globalvar.DIALOG_SPIN_SIZE,
@@ -1216,7 +1217,7 @@ class CmdPanel(wx.Panel):
                         value = self._getValue(p)
                         value = self._getValue(p)
                         # parameter previously set
                         # parameter previously set
                         if value:
                         if value:
-                            if isinstance(txt2, wx.SpinCtrl):
+                            if isinstance(txt2, SpinCtrl):
                                 txt2.SetValue(int(value))
                                 txt2.SetValue(int(value))
                             else:
                             else:
                                 txt2.SetValue(value)
                                 txt2.SetValue(value)
@@ -1317,7 +1318,7 @@ class CmdPanel(wx.Panel):
                     maxValue = 1e9
                     maxValue = 1e9
                     value = self._getValue(p)
                     value = self._getValue(p)
 
 
-                    win = wx.SpinCtrl(
+                    win = SpinCtrl(
                         parent=which_panel,
                         parent=which_panel,
                         value=p.get(
                         value=p.get(
                             'default',
                             'default',
@@ -1620,7 +1621,7 @@ class CmdPanel(wx.Panel):
                                 win.SetValue(
                                 win.SetValue(
                                     str(value))    # default or previously set value
                                     str(value))    # default or previously set value
                             else:
                             else:
-                                win = wx.SpinCtrl(
+                                win = SpinCtrl(
                                     parent=which_panel, id=wx.ID_ANY, min=1,
                                     parent=which_panel, id=wx.ID_ANY, min=1,
                                     max=100, initial=int(p['default']))
                                     max=100, initial=int(p['default']))
                                 win.Bind(wx.EVT_SPINCTRL, self.OnSetValue)
                                 win.Bind(wx.EVT_SPINCTRL, self.OnSetValue)
@@ -2600,7 +2601,7 @@ class CmdPanel(wx.Panel):
             if pLayer:
             if pLayer:
                 pLayer['value'] = ''
                 pLayer['value'] = ''
         else:
         else:
-            if isinstance(me, wx.SpinCtrl):
+            if isinstance(me, SpinCtrl):
                 porf['value'] = str(me.GetValue())
                 porf['value'] = str(me.GetValue())
             elif isinstance(me, wx.ComboBox):
             elif isinstance(me, wx.ComboBox):
                 porf['value'] = me.GetValue()
                 porf['value'] = me.GetValue()

+ 6 - 5
gui/wxpython/gui_core/preferences.py

@@ -50,6 +50,7 @@ from core.settings import UserSettings
 from gui_core.dialogs import SymbolDialog, DefaultFontDialog
 from gui_core.dialogs import SymbolDialog, DefaultFontDialog
 from gui_core.widgets import IntegerValidator, ColorTablesComboBox
 from gui_core.widgets import IntegerValidator, ColorTablesComboBox
 from core.debug import Debug
 from core.debug import Debug
+from gui_core.wrap import GSpinCtrl as SpinCtrl
 
 
 
 
 class PreferencesBaseDialog(wx.Dialog):
 class PreferencesBaseDialog(wx.Dialog):
@@ -647,7 +648,7 @@ class PreferencesDialog(PreferencesBaseDialog):
             key='gSelectPopupHeight',
             key='gSelectPopupHeight',
             subkey='value')
             subkey='value')
 
 
-        popupHeightSpin = wx.SpinCtrl(
+        popupHeightSpin = SpinCtrl(
             parent=panel, id=wx.ID_ANY, size=(100, -1))
             parent=panel, id=wx.ID_ANY, size=(100, -1))
         popupHeightSpin.SetRange(min, max)
         popupHeightSpin.SetRange(min, max)
         popupHeightSpin.SetValue(value)
         popupHeightSpin.SetValue(value)
@@ -1362,7 +1363,7 @@ class PreferencesDialog(PreferencesBaseDialog):
         gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
         gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
                                          label=_("Line width:")),
                                          label=_("Line width:")),
                       flag=wx.ALIGN_CENTER_VERTICAL, pos=(row, col))
                       flag=wx.ALIGN_CENTER_VERTICAL, pos=(row, col))
-        hlWidth = wx.SpinCtrl(
+        hlWidth = SpinCtrl(
             parent=panel, id=wx.ID_ANY, size=(50, -1),
             parent=panel, id=wx.ID_ANY, size=(50, -1),
             initial=self.settings.Get(
             initial=self.settings.Get(
                 group='vectorLayer', key='line', subkey='width'),
                 group='vectorLayer', key='line', subkey='width'),
@@ -1379,7 +1380,7 @@ class PreferencesDialog(PreferencesBaseDialog):
         gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
         gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
                                          label=_("Symbol size:")),
                                          label=_("Symbol size:")),
                       flag=wx.ALIGN_CENTER_VERTICAL, pos=(row, col))
                       flag=wx.ALIGN_CENTER_VERTICAL, pos=(row, col))
-        ptSize = wx.SpinCtrl(
+        ptSize = SpinCtrl(
             parent=panel, id=wx.ID_ANY, size=(50, -1),
             parent=panel, id=wx.ID_ANY, size=(50, -1),
             initial=self.settings.Get(
             initial=self.settings.Get(
                 group='vectorLayer', key='point', subkey='size'),
                 group='vectorLayer', key='point', subkey='size'),
@@ -1473,7 +1474,7 @@ class PreferencesDialog(PreferencesBaseDialog):
             parent=panel,
             parent=panel,
             id=wx.ID_ANY,
             id=wx.ID_ANY,
             label=_("Line width (in pixels):"))
             label=_("Line width (in pixels):"))
-        hlWidth = wx.SpinCtrl(
+        hlWidth = SpinCtrl(
             parent=panel, id=wx.ID_ANY, size=(50, -1),
             parent=panel, id=wx.ID_ANY, size=(50, -1),
             initial=self.settings.Get(
             initial=self.settings.Get(
                 group='atm', key='highlight', subkey='width'),
                 group='atm', key='highlight', subkey='width'),
@@ -1757,7 +1758,7 @@ class PreferencesDialog(PreferencesBaseDialog):
             ll.SetSelection(1)
             ll.SetSelection(1)
 
 
         # precision
         # precision
-        precision = wx.SpinCtrl(parent=panel, id=wx.ID_ANY,
+        precision = SpinCtrl(parent=panel, id=wx.ID_ANY,
                                 min=0, max=12,
                                 min=0, max=12,
                                 name="GetValue")
                                 name="GetValue")
         precision.SetValue(int(self.settings.Get(
         precision.SetValue(int(self.settings.Get(

+ 36 - 0
gui/wxpython/gui_core/wrap.py

@@ -0,0 +1,36 @@
+"""
+@package gui_core.wrap
+
+@brief Core wrapped wxpython widgets 
+
+Classes:
+ - wrap::GSpinCtrl
+
+
+(C) 2016 by the GRASS Development Team
+
+This program is free software under the GNU General Public License
+(>=v2). Read the file COPYING that comes with GRASS for details.
+
+@author Anna Petrasova <kratochanna gmail.com>
+"""
+
+import wx
+
+from core.globalvar import gtk3
+
+
+class GSpinCtrl(wx.SpinCtrl):
+    """Wrapper around wx.SpinCtrl to have more control
+    over the widget on different platforms"""
+
+    gtk3MinSize = 130
+
+    def __init__(self, *args, **kwargs):
+        if gtk3:
+            if 'size' in kwargs:
+                kwargs['size'] = wx.Size(max(self.gtk3MinSize, kwargs['size'][0]), kwargs['size'][1])
+            else:
+                kwargs['size'] = wx.Size(self.gtk3MinSize, -1)
+                
+        wx.SpinCtrl.__init__(self, *args, **kwargs)

+ 2 - 1
gui/wxpython/iscatt/dialogs.py

@@ -31,6 +31,7 @@ from core import globalvar
 from core.gcmd import GMessage
 from core.gcmd import GMessage
 from core.settings import UserSettings
 from core.settings import UserSettings
 from gui_core.dialogs import SimpleDialog
 from gui_core.dialogs import SimpleDialog
+from gui_core.wrap import GSpinCtrl as SpinCtrl
 
 
 
 
 class AddScattPlotDialog(wx.Dialog):
 class AddScattPlotDialog(wx.Dialog):
@@ -375,7 +376,7 @@ class SettingsDialog(wx.Dialog):
         for settKey, sett in self.sizeSetts.iteritems():
         for settKey, sett in self.sizeSetts.iteritems():
             settsLabels[settKey] = wx.StaticText(
             settsLabels[settKey] = wx.StaticText(
                 parent=self, id=wx.ID_ANY, label=sett[1])
                 parent=self, id=wx.ID_ANY, label=sett[1])
-            self.settings[settKey] = wx.SpinCtrl(
+            self.settings[settKey] = SpinCtrl(
                 parent=self, id=wx.ID_ANY, min=0, max=100)
                 parent=self, id=wx.ID_ANY, min=0, max=100)
             size = int(
             size = int(
                 UserSettings.Get(
                 UserSettings.Get(

+ 2 - 1
gui/wxpython/location_wizard/wizard.py

@@ -46,6 +46,7 @@ from core import utils
 from core.utils import _
 from core.utils import _
 from core.gcmd import RunCommand, GError, GMessage, GWarning
 from core.gcmd import RunCommand, GError, GMessage, GWarning
 from gui_core.widgets import GenericValidator
 from gui_core.widgets import GenericValidator
+from gui_core.wrap import GSpinCtrl as SpinCtrl
 from location_wizard.base import BaseClass
 from location_wizard.base import BaseClass
 from location_wizard.dialogs import SelectTransformDialog
 from location_wizard.dialogs import SelectTransformDialog
 
 
@@ -860,7 +861,7 @@ class ProjParamsPage(TitledPage):
                     win.SetSelection(param['value'])
                     win.SetSelection(param['value'])
                     win.Bind(wx.EVT_CHOICE, self.OnParamEntry)
                     win.Bind(wx.EVT_CHOICE, self.OnParamEntry)
                 elif param['type'] == 'zone':
                 elif param['type'] == 'zone':
-                    win = wx.SpinCtrl(parent=self.panel, id=id,
+                    win = SpinCtrl(parent=self.panel, id=id,
                                       size=(100, -1),
                                       size=(100, -1),
                                       style=wx.SP_ARROW_KEYS | wx.SP_WRAP,
                                       style=wx.SP_ARROW_KEYS | wx.SP_WRAP,
                                       min=1, max=60)
                                       min=1, max=60)

+ 3 - 2
gui/wxpython/mapswipe/dialogs.py

@@ -27,6 +27,7 @@ from gui_core.preferences import PreferencesBaseDialog
 from core.gcmd import GMessage
 from core.gcmd import GMessage
 from core.layerlist import LayerList
 from core.layerlist import LayerList
 from core.settings import UserSettings
 from core.settings import UserSettings
+from gui_core.wrap import GSpinCtrl as SpinCtrl
 from gui_core.simplelmgr import SimpleLayerManager, SIMPLE_LMGR_RASTER, \
 from gui_core.simplelmgr import SimpleLayerManager, SIMPLE_LMGR_RASTER, \
     SIMPLE_LMGR_VECTOR, SIMPLE_LMGR_RGB, SIMPLE_LMGR_TB_LEFT, SIMPLE_LMGR_TB_RIGHT
     SIMPLE_LMGR_VECTOR, SIMPLE_LMGR_RGB, SIMPLE_LMGR_TB_LEFT, SIMPLE_LMGR_TB_RIGHT
 
 
@@ -328,7 +329,7 @@ class PreferencesDialog(PreferencesBaseDialog):
             pos=(
             pos=(
                 row,
                 row,
                 0))
                 0))
-        width = wx.SpinCtrl(
+        width = SpinCtrl(
             parent=panel,
             parent=panel,
             min=1,
             min=1,
             max=10,
             max=10,
@@ -351,7 +352,7 @@ class PreferencesDialog(PreferencesBaseDialog):
             pos=(
             pos=(
                 row,
                 row,
                 0))
                 0))
-        size = wx.SpinCtrl(
+        size = SpinCtrl(
             parent=panel,
             parent=panel,
             min=4,
             min=4,
             max=50,
             max=50,

+ 3 - 2
gui/wxpython/modules/colorrules.py

@@ -45,6 +45,7 @@ from gui_core.forms import GUI
 from core.debug import Debug as Debug
 from core.debug import Debug as Debug
 from core.settings import UserSettings
 from core.settings import UserSettings
 from gui_core.widgets import ColorTablesComboBox
 from gui_core.widgets import ColorTablesComboBox
+from gui_core.wrap import GSpinCtrl as SpinCtrl
 
 
 
 
 class RulesPanel:
 class RulesPanel:
@@ -80,7 +81,7 @@ class RulesPanel:
         # clear button
         # clear button
         self.clearAll = wx.Button(parent, id=wx.ID_ANY, label=_("Clear all"))
         self.clearAll = wx.Button(parent, id=wx.ID_ANY, label=_("Clear all"))
         #  determines how many rules should be added
         #  determines how many rules should be added
-        self.numRules = wx.SpinCtrl(parent, id=wx.ID_ANY,
+        self.numRules = SpinCtrl(parent, id=wx.ID_ANY,
                                     min=1, max=1e6, initial=1)
                                     min=1, max=1e6, initial=1)
         # add rules
         # add rules
         self.btnAdd = wx.Button(parent, id=wx.ID_ADD)
         self.btnAdd = wx.Button(parent, id=wx.ID_ADD)
@@ -154,7 +155,7 @@ class RulesPanel:
                 init = 2
                 init = 2
                 if self.attributeType == 'size':
                 if self.attributeType == 'size':
                     init = 100
                     init = 100
-                columnCtrl = wx.SpinCtrl(self.mainPanel, id=2000 + num,
+                columnCtrl = SpinCtrl(self.mainPanel, id=2000 + num,
                                          size=(50, -1), min=1, max=1e4,
                                          size=(50, -1), min=1, max=1e4,
                                          initial=init)
                                          initial=init)
                 columnCtrl.Bind(wx.EVT_SPINCTRL, self.OnRuleSize)
                 columnCtrl.Bind(wx.EVT_SPINCTRL, self.OnRuleSize)

+ 3 - 2
gui/wxpython/modules/vkrige.py

@@ -39,6 +39,7 @@ from gui_core import goutput
 from core.settings import UserSettings
 from core.settings import UserSettings
 from gui_core.widgets import GNotebook
 from gui_core.widgets import GNotebook
 from core.giface import Notification
 from core.giface import Notification
+from gui_core.wrap import GSpinCtrl as SpinCtrl
 #import help
 #import help
 
 
 import wx
 import wx
@@ -502,7 +503,7 @@ class RBookPanel(wx.Panel):
                 setattr(
                 setattr(
                     self,
                     self,
                     n + "Ctrl",
                     n + "Ctrl",
-                    (wx.SpinCtrl(
+                    (SpinCtrl(
                         self,
                         self,
                         id=wx.ID_ANY,
                         id=wx.ID_ANY,
                         min=MinValues[
                         min=MinValues[
@@ -550,7 +551,7 @@ class RBookPanel(wx.Panel):
         # block kriging parameters. Size.
         # block kriging parameters. Size.
         BlockSizer = wx.BoxSizer(wx.HORIZONTAL)
         BlockSizer = wx.BoxSizer(wx.HORIZONTAL)
         BlockLabel = wx.StaticText(self, id=wx.ID_ANY, label=_("Block size:"))
         BlockLabel = wx.StaticText(self, id=wx.ID_ANY, label=_("Block size:"))
-        self.BlockSpinBox = wx.SpinCtrl(self, id=wx.ID_ANY, min=1, max=maxint)
+        self.BlockSpinBox = SpinCtrl(self, id=wx.ID_ANY, min=1, max=maxint)
         # default choice is Ordinary kriging so block param is disabled
         # default choice is Ordinary kriging so block param is disabled
         self.BlockSpinBox.Enable(False)
         self.BlockSpinBox.Enable(False)
         BlockSizer.Add(
         BlockSizer.Add(

+ 18 - 17
gui/wxpython/nviz/preferences.py

@@ -26,6 +26,7 @@ from core import globalvar
 from core.settings import UserSettings
 from core.settings import UserSettings
 from core.utils import _
 from core.utils import _
 from gui_core.preferences import PreferencesBaseDialog
 from gui_core.preferences import PreferencesBaseDialog
+from gui_core.wrap import GSpinCtrl as SpinCtrl
 
 
 
 
 class NvizPreferencesDialog(PreferencesBaseDialog):
 class NvizPreferencesDialog(PreferencesBaseDialog):
@@ -89,7 +90,7 @@ class NvizPreferencesDialog(PreferencesBaseDialog):
                 parent=panel, id=wx.ID_ANY, label=_("value:")), pos=(
                 parent=panel, id=wx.ID_ANY, label=_("value:")), pos=(
                 row, 1), flag=wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT)
                 row, 1), flag=wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT)
 
 
-        pval = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+        pval = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                            initial=pvals['value'],
                            initial=pvals['value'],
                            min=ipvals['min'],
                            min=ipvals['min'],
                            max=ipvals['max'])
                            max=ipvals['max'])
@@ -102,7 +103,7 @@ class NvizPreferencesDialog(PreferencesBaseDialog):
                 parent=panel, id=wx.ID_ANY, label=_("step:")), pos=(
                 parent=panel, id=wx.ID_ANY, label=_("step:")), pos=(
                 row, 3), flag=wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT)
                 row, 3), flag=wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT)
 
 
-        pstep = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+        pstep = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                             initial=pvals['step'],
                             initial=pvals['step'],
                             min=ipvals['min'],
                             min=ipvals['min'],
                             max=ipvals['max'] - 1)
                             max=ipvals['max'] - 1)
@@ -121,7 +122,7 @@ class NvizPreferencesDialog(PreferencesBaseDialog):
                 parent=panel, id=wx.ID_ANY, label=_("x:")), pos=(
                 parent=panel, id=wx.ID_ANY, label=_("x:")), pos=(
                 row, 1), flag=wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT)
                 row, 1), flag=wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT)
 
 
-        px = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+        px = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                          initial=posvals['x'] * 100,
                          initial=posvals['x'] * 100,
                          min=0,
                          min=0,
                          max=100)
                          max=100)
@@ -134,7 +135,7 @@ class NvizPreferencesDialog(PreferencesBaseDialog):
                 parent=panel, id=wx.ID_ANY, label="y:"), pos=(
                 parent=panel, id=wx.ID_ANY, label="y:"), pos=(
                 row, 3), flag=wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT)
                 row, 3), flag=wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT)
 
 
-        py = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+        py = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                          initial=posvals['y'] * 100,
                          initial=posvals['y'] * 100,
                          min=0,
                          min=0,
                          max=100)
                          max=100)
@@ -160,7 +161,7 @@ class NvizPreferencesDialog(PreferencesBaseDialog):
                 parent=panel, id=wx.ID_ANY, label=_("value:")), pos=(
                 parent=panel, id=wx.ID_ANY, label=_("value:")), pos=(
                 row, 1), flag=wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT)
                 row, 1), flag=wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT)
 
 
-        tval = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+        tval = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                            initial=tvals['value'],
                            initial=tvals['value'],
                            min=itvals['min'],
                            min=itvals['min'],
                            max=itvals['max'])
                            max=itvals['max'])
@@ -179,7 +180,7 @@ class NvizPreferencesDialog(PreferencesBaseDialog):
                 parent=panel, id=wx.ID_ANY, label=_("value:")), pos=(
                 parent=panel, id=wx.ID_ANY, label=_("value:")), pos=(
                 row, 1), flag=wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT)
                 row, 1), flag=wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT)
 
 
-        zval = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+        zval = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                            initial=zvals['value'],
                            initial=zvals['value'],
                            min=-1e6,
                            min=-1e6,
                            max=1e6)
                            max=1e6)
@@ -246,7 +247,7 @@ class NvizPreferencesDialog(PreferencesBaseDialog):
                                          label=_("Move exag:")),
                                          label=_("Move exag:")),
                       pos=(0, 0), flag=wx.ALIGN_CENTER_VERTICAL)
                       pos=(0, 0), flag=wx.ALIGN_CENTER_VERTICAL)
 
 
-        moveExag = wx.SpinCtrl(
+        moveExag = SpinCtrl(
             panel, id=wx.ID_ANY, min=1, max=20, initial=UserSettings.Get(
             panel, id=wx.ID_ANY, min=1, max=20, initial=UserSettings.Get(
                 group='nviz', key='fly', subkey=[
                 group='nviz', key='fly', subkey=[
                     'exag', 'move']), size=(
                     'exag', 'move']), size=(
@@ -259,7 +260,7 @@ class NvizPreferencesDialog(PreferencesBaseDialog):
                                          label=_("Turn exag:")),
                                          label=_("Turn exag:")),
                       pos=(1, 0), flag=wx.ALIGN_CENTER_VERTICAL)
                       pos=(1, 0), flag=wx.ALIGN_CENTER_VERTICAL)
 
 
-        turnExag = wx.SpinCtrl(
+        turnExag = SpinCtrl(
             panel, id=wx.ID_ANY, min=1, max=20, initial=UserSettings.Get(
             panel, id=wx.ID_ANY, min=1, max=20, initial=UserSettings.Get(
                 group='nviz', key='fly', subkey=[
                 group='nviz', key='fly', subkey=[
                     'exag', 'turn']), size=(
                     'exag', 'turn']), size=(
@@ -303,7 +304,7 @@ class NvizPreferencesDialog(PreferencesBaseDialog):
                 parent=panel, id=wx.ID_ANY, label=_("x:")), pos=(
                 parent=panel, id=wx.ID_ANY, label=_("x:")), pos=(
                 0, 1), flag=wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT)
                 0, 1), flag=wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT)
 
 
-        px = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+        px = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                          initial=posvals['x'] * 100,
                          initial=posvals['x'] * 100,
                          min=-100,
                          min=-100,
                          max=100)
                          max=100)
@@ -316,7 +317,7 @@ class NvizPreferencesDialog(PreferencesBaseDialog):
                 parent=panel, id=wx.ID_ANY, label="y:"), pos=(
                 parent=panel, id=wx.ID_ANY, label="y:"), pos=(
                 0, 3), flag=wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT)
                 0, 3), flag=wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT)
 
 
-        py = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+        py = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                          initial=posvals['y'] * 100,
                          initial=posvals['y'] * 100,
                          min=-100,
                          min=-100,
                          max=100)
                          max=100)
@@ -329,7 +330,7 @@ class NvizPreferencesDialog(PreferencesBaseDialog):
                 parent=panel, id=wx.ID_ANY, label=_("z:")), pos=(
                 parent=panel, id=wx.ID_ANY, label=_("z:")), pos=(
                 0, 5), flag=wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT)
                 0, 5), flag=wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT)
 
 
-        pz = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+        pz = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                          initial=posvals['z'],
                          initial=posvals['z'],
                          min=0,
                          min=0,
                          max=100)
                          max=100)
@@ -344,7 +345,7 @@ class NvizPreferencesDialog(PreferencesBaseDialog):
                                          label=_("Brightness:")),
                                          label=_("Brightness:")),
                       pos=(1, 0), flag=wx.ALIGN_CENTER_VERTICAL)
                       pos=(1, 0), flag=wx.ALIGN_CENTER_VERTICAL)
 
 
-        bright = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+        bright = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                              initial=brightval,
                              initial=brightval,
                              min=0,
                              min=0,
                              max=100)
                              max=100)
@@ -358,7 +359,7 @@ class NvizPreferencesDialog(PreferencesBaseDialog):
                                          label=_("Ambient:")),
                                          label=_("Ambient:")),
                       pos=(2, 0), flag=wx.ALIGN_CENTER_VERTICAL)
                       pos=(2, 0), flag=wx.ALIGN_CENTER_VERTICAL)
 
 
-        amb = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+        amb = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                           initial=ambval,
                           initial=ambval,
                           min=0,
                           min=0,
                           max=100)
                           max=100)
@@ -448,7 +449,7 @@ class NvizPreferencesDialog(PreferencesBaseDialog):
             pos=(
             pos=(
                 1,
                 1,
                 1))
                 1))
-        fine = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+        fine = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                            initial=res,
                            initial=res,
                            min=1,
                            min=1,
                            max=100)
                            max=100)
@@ -479,7 +480,7 @@ class NvizPreferencesDialog(PreferencesBaseDialog):
             pos=(
             pos=(
                 2,
                 2,
                 1))
                 1))
-        coarse = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+        coarse = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                              initial=res,
                              initial=res,
                              min=1,
                              min=1,
                              max=100)
                              max=100)
@@ -558,7 +559,7 @@ class NvizPreferencesDialog(PreferencesBaseDialog):
                                          label=_("Width:")),
                                          label=_("Width:")),
                       pos=(row, 0), flag=wx.ALIGN_CENTER_VERTICAL)
                       pos=(row, 0), flag=wx.ALIGN_CENTER_VERTICAL)
 
 
-        iwidth = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+        iwidth = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                              initial=12,
                              initial=12,
                              min=1,
                              min=1,
                              max=100)
                              max=100)
@@ -606,7 +607,7 @@ class NvizPreferencesDialog(PreferencesBaseDialog):
                                          label=_("Size:")),
                                          label=_("Size:")),
                       pos=(row, 0), flag=wx.ALIGN_CENTER_VERTICAL)
                       pos=(row, 0), flag=wx.ALIGN_CENTER_VERTICAL)
 
 
-        isize = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+        isize = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                             initial=100,
                             initial=100,
                             min=1,
                             min=1,
                             max=1e6)
                             max=1e6)

+ 14 - 13
gui/wxpython/nviz/tools.py

@@ -53,6 +53,7 @@ from modules.colorrules import ThematicVectorTable
 from core.settings import UserSettings
 from core.settings import UserSettings
 from gui_core.widgets import ScrolledPanel, NumTextCtrl, FloatSlider, SymbolButton
 from gui_core.widgets import ScrolledPanel, NumTextCtrl, FloatSlider, SymbolButton
 from gui_core.gselect import Select
 from gui_core.gselect import Select
+from gui_core.wrap import GSpinCtrl as SpinCtrl
 from core.debug import Debug
 from core.debug import Debug
 try:
 try:
     from nviz.mapwindow import wxUpdateProperties, wxUpdateView,\
     from nviz.mapwindow import wxUpdateProperties, wxUpdateView,\
@@ -548,7 +549,7 @@ class NvizToolWindow(FN.FlatNotebook):
             parent=panel,
             parent=panel,
             id=wx.ID_ANY,
             id=wx.ID_ANY,
             label=_("Frame rate (FPS):"))
             label=_("Frame rate (FPS):"))
-        fps = wx.SpinCtrl(
+        fps = SpinCtrl(
             parent=panel, id=wx.ID_ANY, size=(65, -1),
             parent=panel, id=wx.ID_ANY, size=(65, -1),
             initial=UserSettings.Get(
             initial=UserSettings.Get(
                 group='nviz', key='animation', subkey='fps'),
                 group='nviz', key='animation', subkey='fps'),
@@ -897,7 +898,7 @@ class NvizToolWindow(FN.FlatNotebook):
         gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
         gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
                                          label=_("resolution:")),
                                          label=_("resolution:")),
                       pos=(2, 1), flag=wx.ALIGN_CENTER_VERTICAL)
                       pos=(2, 1), flag=wx.ALIGN_CENTER_VERTICAL)
-        resC = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+        resC = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                            initial=6,
                            initial=6,
                            min=1,
                            min=1,
                            max=100)
                            max=100)
@@ -943,7 +944,7 @@ class NvizToolWindow(FN.FlatNotebook):
         gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
         gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
                                          label=_("resolution:")),
                                          label=_("resolution:")),
                       pos=(1, 1), flag=wx.ALIGN_CENTER_VERTICAL)
                       pos=(1, 1), flag=wx.ALIGN_CENTER_VERTICAL)
-        resF = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+        resF = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                            initial=3,
                            initial=3,
                            min=1,
                            min=1,
                            max=100)
                            max=100)
@@ -1018,7 +1019,7 @@ class NvizToolWindow(FN.FlatNotebook):
             elif code == 'mask':
             elif code == 'mask':
                 value = None
                 value = None
             else:
             else:
-                value = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+                value = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                                     initial=0)
                                     initial=0)
                 value.SetRange(minVal=0, maxVal=100)
                 value.SetRange(minVal=0, maxVal=100)
                 value.Bind(wx.EVT_TEXT, self.OnSurfaceMap)
                 value.Bind(wx.EVT_TEXT, self.OnSurfaceMap)
@@ -1383,7 +1384,7 @@ class NvizToolWindow(FN.FlatNotebook):
         gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
         gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
                                          label=_("Fine resolution:")),
                                          label=_("Fine resolution:")),
                       pos=(0, 0), flag=wx.ALIGN_CENTER_VERTICAL)
                       pos=(0, 0), flag=wx.ALIGN_CENTER_VERTICAL)
-        resF = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+        resF = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                            initial=3,
                            initial=3,
                            min=1,
                            min=1,
                            max=100)
                            max=100)
@@ -1398,7 +1399,7 @@ class NvizToolWindow(FN.FlatNotebook):
                                          label=_("Value:")), pos=(1, 0),
                                          label=_("Value:")), pos=(1, 0),
                       flag=wx.ALIGN_CENTER_VERTICAL)
                       flag=wx.ALIGN_CENTER_VERTICAL)
 
 
-        value = wx.SpinCtrl(panel, id=wx.ID_ANY,
+        value = SpinCtrl(panel, id=wx.ID_ANY,
                             min=-1e9, max=1e9,
                             min=-1e9, max=1e9,
                             size=(65, -1))
                             size=(65, -1))
         self.win['constant']['value'] = value.GetId()
         self.win['constant']['value'] = value.GetId()
@@ -1410,7 +1411,7 @@ class NvizToolWindow(FN.FlatNotebook):
                                          label=_("Transparency:")), pos=(2, 0),
                                          label=_("Transparency:")), pos=(2, 0),
                       flag=wx.ALIGN_CENTER_VERTICAL)
                       flag=wx.ALIGN_CENTER_VERTICAL)
 
 
-        transp = wx.SpinCtrl(panel, id=wx.ID_ANY,
+        transp = SpinCtrl(panel, id=wx.ID_ANY,
                              min=0, max=100,
                              min=0, max=100,
                              size=(65, -1))
                              size=(65, -1))
         self.win['constant']['transp'] = transp.GetId()
         self.win['constant']['transp'] = transp.GetId()
@@ -1496,7 +1497,7 @@ class NvizToolWindow(FN.FlatNotebook):
                       pos=(0, 1), flag=wx.ALIGN_CENTER_VERTICAL |
                       pos=(0, 1), flag=wx.ALIGN_CENTER_VERTICAL |
                       wx.ALIGN_RIGHT)
                       wx.ALIGN_RIGHT)
 
 
-        width = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+        width = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                             initial=1,
                             initial=1,
                             min=1,
                             min=1,
                             max=100)
                             max=100)
@@ -1667,7 +1668,7 @@ class NvizToolWindow(FN.FlatNotebook):
             isize.SetDigits(1)
             isize.SetDigits(1)
             isize.Bind(fs.EVT_FLOATSPIN, self.OnVectorPoints)
             isize.Bind(fs.EVT_FLOATSPIN, self.OnVectorPoints)
         else:
         else:
-            isize = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+            isize = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                                 initial=1,
                                 initial=1,
                                 min=1,
                                 min=1,
                                 max=1e6)
                                 max=1e6)
@@ -1921,7 +1922,7 @@ class NvizToolWindow(FN.FlatNotebook):
         gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
         gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
                                          label=_("Resolution:")),
                                          label=_("Resolution:")),
                       pos=(0, 4), flag=wx.ALIGN_CENTER_VERTICAL)
                       pos=(0, 4), flag=wx.ALIGN_CENTER_VERTICAL)
-        resol = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+        resol = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                             initial=1,
                             initial=1,
                             min=1,
                             min=1,
                             max=100)
                             max=100)
@@ -2279,7 +2280,7 @@ class NvizToolWindow(FN.FlatNotebook):
                 label=_("Elevation of fringe from bottom:")),
                 label=_("Elevation of fringe from bottom:")),
             pos=(0, 0),
             pos=(0, 0),
             flag=wx.ALIGN_CENTER_VERTICAL)
             flag=wx.ALIGN_CENTER_VERTICAL)
-        spin = wx.SpinCtrl(parent=panel, id=wx.ID_ANY,
+        spin = SpinCtrl(parent=panel, id=wx.ID_ANY,
                            size=(65, -1), min=-1e6, max=1e6)
                            size=(65, -1), min=-1e6, max=1e6)
         spin.SetValue(
         spin.SetValue(
             UserSettings.Get(
             UserSettings.Get(
@@ -2886,7 +2887,7 @@ class NvizToolWindow(FN.FlatNotebook):
 ##                value.Bind(wx.EVT_TEXT, self.OnVolumeIsosurfMap)
 ##                value.Bind(wx.EVT_TEXT, self.OnVolumeIsosurfMap)
             else:
             else:
                 size = (65, -1)
                 size = (65, -1)
-                value = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=size,
+                value = SpinCtrl(parent=panel, id=wx.ID_ANY, size=size,
                                     initial=0)
                                     initial=0)
                 if code == 'topo':
                 if code == 'topo':
                     value.SetRange(minVal=-1e9, maxVal=1e9)
                     value.SetRange(minVal=-1e9, maxVal=1e9)
@@ -3029,7 +3030,7 @@ class NvizToolWindow(FN.FlatNotebook):
         hSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
         hSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
                                       label=_("Transparency:")), proportion=0,
                                       label=_("Transparency:")), proportion=0,
                    flag=wx.ALIGN_CENTER_VERTICAL | wx.RIGHT | wx.TOP, border=7)
                    flag=wx.ALIGN_CENTER_VERTICAL | wx.RIGHT | wx.TOP, border=7)
-        spin = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
+        spin = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                            min=0, max=100, initial=0)
                            min=0, max=100, initial=0)
         spin.Bind(wx.EVT_SPINCTRL, self.OnSliceTransparency)
         spin.Bind(wx.EVT_SPINCTRL, self.OnSliceTransparency)
         self.win['volume']['slice']['transp'] = spin.GetId()
         self.win['volume']['slice']['transp'] = spin.GetId()

+ 26 - 25
gui/wxpython/psmap/dialogs.py

@@ -57,6 +57,7 @@ from dbmgr.vinfo import VectorDBInfo
 from gui_core.gselect import Select
 from gui_core.gselect import Select
 from core.gcmd import RunCommand, GError, GMessage
 from core.gcmd import RunCommand, GError, GMessage
 from gui_core.dialogs import SymbolDialog
 from gui_core.dialogs import SymbolDialog
+from gui_core.wrap import GSpinCtrl as SpinCtrl
 from psmap.utils import *
 from psmap.utils import *
 from psmap.instructions import *
 from psmap.instructions import *
 
 
@@ -401,7 +402,7 @@ class PsmapDialog(wx.Dialog):
             parent.font['fontCtrl'].SetStringSelection(dialogDict['font'])
             parent.font['fontCtrl'].SetStringSelection(dialogDict['font'])
         else:
         else:
             parent.font['fontCtrl'].SetStringSelection('Helvetica')
             parent.font['fontCtrl'].SetStringSelection('Helvetica')
-        parent.font['fontSizeCtrl'] = wx.SpinCtrl(
+        parent.font['fontSizeCtrl'] = SpinCtrl(
             parent, id=wx.ID_ANY, min=4, max=50, initial=10)
             parent, id=wx.ID_ANY, min=4, max=50, initial=10)
         parent.font['fontSizeCtrl'].SetValue(dialogDict['fontsize'])
         parent.font['fontSizeCtrl'].SetValue(dialogDict['fontsize'])
 
 
@@ -1046,7 +1047,7 @@ class MapFramePanel(wx.Panel):
 
 
         resolutionText = wx.StaticText(
         resolutionText = wx.StaticText(
             self, id=wx.ID_ANY, label=_("Map max resolution (dpi):"))
             self, id=wx.ID_ANY, label=_("Map max resolution (dpi):"))
-        self.resolutionSpin = wx.SpinCtrl(
+        self.resolutionSpin = SpinCtrl(
             self, id=wx.ID_ANY, min=1, max=1000, initial=300)
             self, id=wx.ID_ANY, min=1, max=1000, initial=300)
 
 
         flexSizer.Add(
         flexSizer.Add(
@@ -1099,7 +1100,7 @@ class MapFramePanel(wx.Panel):
         self.borderWidthText = wx.StaticText(
         self.borderWidthText = wx.StaticText(
             self, id=wx.ID_ANY, label=_("border width (pts):"))
             self, id=wx.ID_ANY, label=_("border width (pts):"))
         self.borderColourPicker = wx.ColourPickerCtrl(self, id=wx.ID_ANY)
         self.borderColourPicker = wx.ColourPickerCtrl(self, id=wx.ID_ANY)
-        self.borderWidthCtrl = wx.SpinCtrl(
+        self.borderWidthCtrl = SpinCtrl(
             self, id=wx.ID_ANY, min=1, max=100, initial=1)
             self, id=wx.ID_ANY, min=1, max=100, initial=1)
 
 
         if self.mapFrameDict['border'] == 'y':
         if self.mapFrameDict['border'] == 'y':
@@ -2346,7 +2347,7 @@ class VPropertiesDialog(PsmapDialog):
             self.widthSpin.SetFormat("%f")
             self.widthSpin.SetFormat("%f")
             self.widthSpin.SetDigits(2)
             self.widthSpin.SetDigits(2)
         else:
         else:
-            self.widthSpin = wx.SpinCtrl(
+            self.widthSpin = SpinCtrl(
                 panel, id=wx.ID_ANY, min=1, max=25, initial=1,
                 panel, id=wx.ID_ANY, min=1, max=25, initial=1,
                 size=self.spinCtrlSize)
                 size=self.spinCtrlSize)
 
 
@@ -2510,7 +2511,7 @@ class VPropertiesDialog(PsmapDialog):
             self.outWidthSpin.SetFormat("%f")
             self.outWidthSpin.SetFormat("%f")
             self.outWidthSpin.SetDigits(1)
             self.outWidthSpin.SetDigits(1)
         else:
         else:
-            self.outWidthSpin = wx.SpinCtrl(
+            self.outWidthSpin = SpinCtrl(
                 panel, id=wx.ID_ANY, min=1, max=30, initial=1,
                 panel, id=wx.ID_ANY, min=1, max=30, initial=1,
                 size=self.spinCtrlSize)
                 size=self.spinCtrlSize)
 
 
@@ -2720,13 +2721,13 @@ class VPropertiesDialog(PsmapDialog):
         self.sizeRadio = wx.RadioButton(
         self.sizeRadio = wx.RadioButton(
             panel, id=wx.ID_ANY, label=_("size:"),
             panel, id=wx.ID_ANY, label=_("size:"),
             style=wx.RB_GROUP)
             style=wx.RB_GROUP)
-        self.sizeSpin = wx.SpinCtrl(
+        self.sizeSpin = SpinCtrl(
             panel, id=wx.ID_ANY, min=1, max=50, initial=1)
             panel, id=wx.ID_ANY, min=1, max=50, initial=1)
         self.sizecolumnRadio = wx.RadioButton(
         self.sizecolumnRadio = wx.RadioButton(
             panel, id=wx.ID_ANY, label=_("size from map table column:"))
             panel, id=wx.ID_ANY, label=_("size from map table column:"))
         self.sizeColChoice = self.getColsChoice(panel)
         self.sizeColChoice = self.getColsChoice(panel)
         self.scaleText = wx.StaticText(panel, id=wx.ID_ANY, label=_("scale:"))
         self.scaleText = wx.StaticText(panel, id=wx.ID_ANY, label=_("scale:"))
-        self.scaleSpin = wx.SpinCtrl(
+        self.scaleSpin = SpinCtrl(
             panel, id=wx.ID_ANY, min=1, max=25, initial=1)
             panel, id=wx.ID_ANY, min=1, max=25, initial=1)
 
 
         self.sizeRadio.SetValue(self.vPropertiesDict['size'] is not None)
         self.sizeRadio.SetValue(self.vPropertiesDict['size'] is not None)
@@ -2798,7 +2799,7 @@ class VPropertiesDialog(PsmapDialog):
             panel, id=wx.ID_ANY, label=_("rotate symbols:"))
             panel, id=wx.ID_ANY, label=_("rotate symbols:"))
         self.rotateRadio = wx.RadioButton(panel, id=wx.ID_ANY, label=_(
         self.rotateRadio = wx.RadioButton(panel, id=wx.ID_ANY, label=_(
             "counterclockwise in degrees:"), style=wx.RB_GROUP)
             "counterclockwise in degrees:"), style=wx.RB_GROUP)
-        self.rotateSpin = wx.SpinCtrl(
+        self.rotateSpin = SpinCtrl(
             panel, id=wx.ID_ANY, min=0, max=360, initial=0)
             panel, id=wx.ID_ANY, min=0, max=360, initial=0)
         self.rotatecolumnRadio = wx.RadioButton(
         self.rotatecolumnRadio = wx.RadioButton(
             panel, id=wx.ID_ANY, label=_("from map table column:"))
             panel, id=wx.ID_ANY, label=_("from map table column:"))
@@ -2889,7 +2890,7 @@ class VPropertiesDialog(PsmapDialog):
             self.widthSpin.SetFormat("%f")
             self.widthSpin.SetFormat("%f")
             self.widthSpin.SetDigits(1)
             self.widthSpin.SetDigits(1)
         else:
         else:
-            self.widthSpin = wx.SpinCtrl(
+            self.widthSpin = SpinCtrl(
                 panel, id=wx.ID_ANY, min=1, max=30, initial=1)
                 panel, id=wx.ID_ANY, min=1, max=30, initial=1)
 
 
         self.cwidthCheck = wx.CheckBox(
         self.cwidthCheck = wx.CheckBox(
@@ -3012,11 +3013,11 @@ class VPropertiesDialog(PsmapDialog):
             fileMode=wx.FD_OPEN)
             fileMode=wx.FD_OPEN)
         self.patWidthText = wx.StaticText(
         self.patWidthText = wx.StaticText(
             panel, id=wx.ID_ANY, label=_("pattern line width (pts):"))
             panel, id=wx.ID_ANY, label=_("pattern line width (pts):"))
-        self.patWidthSpin = wx.SpinCtrl(
+        self.patWidthSpin = SpinCtrl(
             panel, id=wx.ID_ANY, min=1, max=25, initial=1)
             panel, id=wx.ID_ANY, min=1, max=25, initial=1)
         self.patScaleText = wx.StaticText(
         self.patScaleText = wx.StaticText(
             panel, id=wx.ID_ANY, label=_("pattern scale factor:"))
             panel, id=wx.ID_ANY, label=_("pattern scale factor:"))
-        self.patScaleSpin = wx.SpinCtrl(
+        self.patScaleSpin = SpinCtrl(
             panel, id=wx.ID_ANY, min=1, max=25, initial=1)
             panel, id=wx.ID_ANY, min=1, max=25, initial=1)
 
 
         self.patternCheck.SetValue(bool(self.vPropertiesDict['pat']))
         self.patternCheck.SetValue(bool(self.vPropertiesDict['pat']))
@@ -3872,7 +3873,7 @@ class LegendDialog(PsmapDialog):
                 minVect = 1
                 minVect = 1
                 maxVect = min(10, len(self.instruction[self.vectorId]['list']))
                 maxVect = min(10, len(self.instruction[self.vectorId]['list']))
             cols = wx.StaticText(panel, id=wx.ID_ANY, label=_("Columns:"))
             cols = wx.StaticText(panel, id=wx.ID_ANY, label=_("Columns:"))
-            panel.colsCtrl = wx.SpinCtrl(
+            panel.colsCtrl = SpinCtrl(
                 panel,
                 panel,
                 id=wx.ID_ANY,
                 id=wx.ID_ANY,
                 value="",
                 value="",
@@ -4037,7 +4038,7 @@ class LegendDialog(PsmapDialog):
         self.panelRaster.heightOrColumnsCtrl.Destroy()
         self.panelRaster.heightOrColumnsCtrl.Destroy()
         if self.discrete.GetValue():
         if self.discrete.GetValue():
             self.panelRaster.heightOrColumnsLabel.SetLabel(_("Columns:"))
             self.panelRaster.heightOrColumnsLabel.SetLabel(_("Columns:"))
-            self.panelRaster.heightOrColumnsCtrl = wx.SpinCtrl(
+            self.panelRaster.heightOrColumnsCtrl = SpinCtrl(
                 self.panelRaster, id=wx.ID_ANY, value="", min=1, max=10,
                 self.panelRaster, id=wx.ID_ANY, value="", min=1, max=10,
                 initial=self.rLegendDict['cols'])
                 initial=self.rLegendDict['cols'])
             self.panelRaster.heightOrColumnsCtrl.Enable(enabledSize)
             self.panelRaster.heightOrColumnsCtrl.Enable(enabledSize)
@@ -4949,21 +4950,21 @@ class ScalebarDialog(PsmapDialog):
 
 
         sbSegmentsText = wx.StaticText(
         sbSegmentsText = wx.StaticText(
             panel, id=wx.ID_ANY, label=_("Number of segments:"))
             panel, id=wx.ID_ANY, label=_("Number of segments:"))
-        self.sbSegmentsCtrl = wx.SpinCtrl(
+        self.sbSegmentsCtrl = SpinCtrl(
             panel, id=wx.ID_ANY, min=1, max=30, initial=4)
             panel, id=wx.ID_ANY, min=1, max=30, initial=4)
         self.sbSegmentsCtrl.SetValue(self.scalebarDict['segment'])
         self.sbSegmentsCtrl.SetValue(self.scalebarDict['segment'])
 
 
         sbLabelsText1 = wx.StaticText(
         sbLabelsText1 = wx.StaticText(
             panel, id=wx.ID_ANY, label=_("Label every "))
             panel, id=wx.ID_ANY, label=_("Label every "))
         sbLabelsText2 = wx.StaticText(panel, id=wx.ID_ANY, label=_("segments"))
         sbLabelsText2 = wx.StaticText(panel, id=wx.ID_ANY, label=_("segments"))
-        self.sbLabelsCtrl = wx.SpinCtrl(
+        self.sbLabelsCtrl = SpinCtrl(
             panel, id=wx.ID_ANY, min=1, max=30, initial=1)
             panel, id=wx.ID_ANY, min=1, max=30, initial=1)
         self.sbLabelsCtrl.SetValue(self.scalebarDict['numbers'])
         self.sbLabelsCtrl.SetValue(self.scalebarDict['numbers'])
 
 
         # font
         # font
         fontsizeText = wx.StaticText(
         fontsizeText = wx.StaticText(
             panel, id=wx.ID_ANY, label=_("Font size:"))
             panel, id=wx.ID_ANY, label=_("Font size:"))
-        self.fontsizeCtrl = wx.SpinCtrl(
+        self.fontsizeCtrl = SpinCtrl(
             panel, id=wx.ID_ANY, min=4, max=30, initial=10)
             panel, id=wx.ID_ANY, min=4, max=30, initial=10)
         self.fontsizeCtrl.SetValue(self.scalebarDict['fontsize'])
         self.fontsizeCtrl.SetValue(self.scalebarDict['fontsize'])
 
 
@@ -5265,7 +5266,7 @@ class TextDialog(PsmapDialog):
             panel, id=wx.ID_ANY, label=_("highlight"))
             panel, id=wx.ID_ANY, label=_("highlight"))
         self.effect['highlightColor'] = wx.ColourPickerCtrl(
         self.effect['highlightColor'] = wx.ColourPickerCtrl(
             panel, id=wx.ID_ANY)
             panel, id=wx.ID_ANY)
-        self.effect['highlightWidth'] = wx.SpinCtrl(
+        self.effect['highlightWidth'] = SpinCtrl(
             panel, id=wx.ID_ANY, size=self.spinCtrlSize, min=0, max=5, initial=1)
             panel, id=wx.ID_ANY, size=self.spinCtrlSize, min=0, max=5, initial=1)
         self.effect['highlightWidthLabel'] = wx.StaticText(
         self.effect['highlightWidthLabel'] = wx.StaticText(
             panel, id=wx.ID_ANY, label=_("Width (pts):"))
             panel, id=wx.ID_ANY, label=_("Width (pts):"))
@@ -5273,7 +5274,7 @@ class TextDialog(PsmapDialog):
         self.effect['borderCtrl'] = wx.CheckBox(
         self.effect['borderCtrl'] = wx.CheckBox(
             panel, id=wx.ID_ANY, label=_("text border"))
             panel, id=wx.ID_ANY, label=_("text border"))
         self.effect['borderColor'] = wx.ColourPickerCtrl(panel, id=wx.ID_ANY)
         self.effect['borderColor'] = wx.ColourPickerCtrl(panel, id=wx.ID_ANY)
-        self.effect['borderWidth'] = wx.SpinCtrl(
+        self.effect['borderWidth'] = SpinCtrl(
             panel, id=wx.ID_ANY, size=self.spinCtrlSize, min=1, max=25, initial=1)
             panel, id=wx.ID_ANY, size=self.spinCtrlSize, min=1, max=25, initial=1)
         self.effect['borderWidthLabel'] = wx.StaticText(
         self.effect['borderWidthLabel'] = wx.StaticText(
             panel, id=wx.ID_ANY, label=_("Width (pts):"))
             panel, id=wx.ID_ANY, label=_("Width (pts):"))
@@ -5387,10 +5388,10 @@ class TextDialog(PsmapDialog):
             panel, id=wx.ID_ANY, label=_("horizontal (pts):"))
             panel, id=wx.ID_ANY, label=_("horizontal (pts):"))
         self.yoffLabel = wx.StaticText(
         self.yoffLabel = wx.StaticText(
             panel, id=wx.ID_ANY, label=_("vertical (pts):"))
             panel, id=wx.ID_ANY, label=_("vertical (pts):"))
-        self.xoffCtrl = wx.SpinCtrl(
+        self.xoffCtrl = SpinCtrl(
             panel, id=wx.ID_ANY, size=(50, -1),
             panel, id=wx.ID_ANY, size=(50, -1),
             min=-50, max=50, initial=0)
             min=-50, max=50, initial=0)
-        self.yoffCtrl = wx.SpinCtrl(
+        self.yoffCtrl = SpinCtrl(
             panel, id=wx.ID_ANY, size=(50, -1),
             panel, id=wx.ID_ANY, size=(50, -1),
             min=-50, max=50, initial=0)
             min=-50, max=50, initial=0)
         self.xoffCtrl.SetValue(self.textDict['xoffset'])
         self.xoffCtrl.SetValue(self.textDict['xoffset'])
@@ -5486,7 +5487,7 @@ class TextDialog(PsmapDialog):
             panel,
             panel,
             id=wx.ID_ANY,
             id=wx.ID_ANY,
             label=_("rotate text (counterclockwise)"))
             label=_("rotate text (counterclockwise)"))
-        self.rotValue = wx.SpinCtrl(
+        self.rotValue = SpinCtrl(
             panel, wx.ID_ANY, size=(50, -1),
             panel, wx.ID_ANY, size=(50, -1),
             min=0, max=360, initial=0)
             min=0, max=360, initial=0)
         if self.textDict['rotate']:
         if self.textDict['rotate']:
@@ -5886,7 +5887,7 @@ class ImageDialog(PsmapDialog):
             panel.image['rotate'].SetFormat("%f")
             panel.image['rotate'].SetFormat("%f")
             panel.image['rotate'].SetDigits(1)
             panel.image['rotate'].SetDigits(1)
         else:
         else:
-            panel.image['rotate'] = wx.SpinCtrl(
+            panel.image['rotate'] = SpinCtrl(
                 parent=panel,
                 parent=panel,
                 id=wx.ID_ANY,
                 id=wx.ID_ANY,
                 size=self.spinCtrlSize,
                 size=self.spinCtrlSize,
@@ -6444,7 +6445,7 @@ class PointDialog(PsmapDialog):
             parent=panel,
             parent=panel,
             id=wx.ID_ANY,
             id=wx.ID_ANY,
             label=_("Size (pt):"))
             label=_("Size (pt):"))
-        self.sizeCtrl = wx.SpinCtrl(
+        self.sizeCtrl = SpinCtrl(
             panel, id=wx.ID_ANY, size=self.spinCtrlSize)
             panel, id=wx.ID_ANY, size=self.spinCtrlSize)
         self.sizeCtrl.SetToolTipString(_("Symbol size in points"))
         self.sizeCtrl.SetToolTipString(_("Symbol size in points"))
         self.sizeCtrl.SetValue(self.pointDict['size'])
         self.sizeCtrl.SetValue(self.pointDict['size'])
@@ -6474,7 +6475,7 @@ class PointDialog(PsmapDialog):
             self.rotCtrl.SetFormat("%f")
             self.rotCtrl.SetFormat("%f")
             self.rotCtrl.SetDigits(1)
             self.rotCtrl.SetDigits(1)
         else:
         else:
-            self.rotCtrl = wx.SpinCtrl(
+            self.rotCtrl = SpinCtrl(
                 parent=panel,
                 parent=panel,
                 id=wx.ID_ANY,
                 id=wx.ID_ANY,
                 size=self.spinCtrlSize,
                 size=self.spinCtrlSize,
@@ -6810,7 +6811,7 @@ class RectangleDialog(PsmapDialog):
             self.widthCtrl.SetFormat("%f")
             self.widthCtrl.SetFormat("%f")
             self.widthCtrl.SetDigits(1)
             self.widthCtrl.SetDigits(1)
         else:
         else:
-            self.widthCtrl = wx.SpinCtrl(
+            self.widthCtrl = SpinCtrl(
                 parent=panel,
                 parent=panel,
                 id=wx.ID_ANY,
                 id=wx.ID_ANY,
                 size=self.spinCtrlSize,
                 size=self.spinCtrlSize,

+ 4 - 3
gui/wxpython/vdigit/dialogs.py

@@ -28,6 +28,7 @@ from core.gcmd import RunCommand, GError
 from core.debug import Debug
 from core.debug import Debug
 from core.settings import UserSettings
 from core.settings import UserSettings
 from core.utils import _
 from core.utils import _
+from gui_core.wrap import GSpinCtrl as SpinCtrl
 
 
 
 
 class VDigitCategoryDialog(wx.Dialog, listmix.ColumnSorterMixin):
 class VDigitCategoryDialog(wx.Dialog, listmix.ColumnSorterMixin):
@@ -125,7 +126,7 @@ class VDigitCategoryDialog(wx.Dialog, listmix.ColumnSorterMixin):
             newCat = max(self.cats[self.fid][1]) + 1
             newCat = max(self.cats[self.fid][1]) + 1
         except KeyError:
         except KeyError:
             newCat = 1
             newCat = 1
-        self.catNew = wx.SpinCtrl(parent=self, id=wx.ID_ANY, size=(75, -1),
+        self.catNew = SpinCtrl(parent=self, id=wx.ID_ANY, size=(75, -1),
                                   initial=newCat, min=0, max=1e9)
                                   initial=newCat, min=0, max=1e9)
         btnAddCat = wx.Button(self, wx.ID_ADD)
         btnAddCat = wx.Button(self, wx.ID_ADD)
         flexSizer.Add(item=layerNewTxt, proportion=0,
         flexSizer.Add(item=layerNewTxt, proportion=0,
@@ -634,7 +635,7 @@ class VDigitZBulkDialog(wx.Dialog):
         # starting value
         # starting value
         txt = wx.StaticText(parent=self,
         txt = wx.StaticText(parent=self,
                             label=_("Starting value"))
                             label=_("Starting value"))
-        self.value = wx.SpinCtrl(parent=self, id=wx.ID_ANY, size=(150, -1),
+        self.value = SpinCtrl(parent=self, id=wx.ID_ANY, size=(150, -1),
                                  initial=0,
                                  initial=0,
                                  min=-1e6, max=1e6)
                                  min=-1e6, max=1e6)
         flexSizer.Add(txt, proportion=0, flag=wx.ALIGN_CENTER_VERTICAL)
         flexSizer.Add(txt, proportion=0, flag=wx.ALIGN_CENTER_VERTICAL)
@@ -646,7 +647,7 @@ class VDigitZBulkDialog(wx.Dialog):
         # step
         # step
         txt = wx.StaticText(parent=self,
         txt = wx.StaticText(parent=self,
                             label=_("Step"))
                             label=_("Step"))
-        self.step = wx.SpinCtrl(parent=self, id=wx.ID_ANY, size=(150, -1),
+        self.step = SpinCtrl(parent=self, id=wx.ID_ANY, size=(150, -1),
                                 initial=0,
                                 initial=0,
                                 min=0, max=1e6)
                                 min=0, max=1e6)
         flexSizer.Add(txt, proportion=0, flag=wx.ALIGN_CENTER_VERTICAL)
         flexSizer.Add(txt, proportion=0, flag=wx.ALIGN_CENTER_VERTICAL)

+ 8 - 7
gui/wxpython/vdigit/preferences.py

@@ -25,6 +25,7 @@ from gui_core.gselect import ColumnSelect
 from core.units import Units
 from core.units import Units
 from core.settings import UserSettings
 from core.settings import UserSettings
 from core.utils import _
 from core.utils import _
+from gui_core.wrap import GSpinCtrl as SpinCtrl
 
 
 
 
 class VDigitSettingsDialog(wx.Dialog):
 class VDigitSettingsDialog(wx.Dialog):
@@ -163,7 +164,7 @@ class VDigitSettingsDialog(wx.Dialog):
         flexSizer.AddGrowableCol(0)
         flexSizer.AddGrowableCol(0)
         # line width
         # line width
         text = wx.StaticText(parent=panel, id=wx.ID_ANY, label=_("Line width"))
         text = wx.StaticText(parent=panel, id=wx.ID_ANY, label=_("Line width"))
-        self.lineWidthValue = wx.SpinCtrl(
+        self.lineWidthValue = SpinCtrl(
             parent=panel, id=wx.ID_ANY, size=(75, -1),
             parent=panel, id=wx.ID_ANY, size=(75, -1),
             initial=UserSettings.Get(
             initial=UserSettings.Get(
                 group='vdigit', key="lineWidth", subkey='value'),
                 group='vdigit', key="lineWidth", subkey='value'),
@@ -208,7 +209,7 @@ class VDigitSettingsDialog(wx.Dialog):
             parent=panel,
             parent=panel,
             id=wx.ID_ANY,
             id=wx.ID_ANY,
             label=_("Snapping threshold"))
             label=_("Snapping threshold"))
-        self.snappingValue = wx.SpinCtrl(
+        self.snappingValue = SpinCtrl(
             parent=panel, id=wx.ID_ANY, size=(75, -1),
             parent=panel, id=wx.ID_ANY, size=(75, -1),
             initial=UserSettings.Get(
             initial=UserSettings.Get(
                 group='vdigit', key="snapping", subkey='value'),
                 group='vdigit', key="snapping", subkey='value'),
@@ -285,7 +286,7 @@ class VDigitSettingsDialog(wx.Dialog):
             parent=panel,
             parent=panel,
             id=wx.ID_ANY,
             id=wx.ID_ANY,
             label=_("Select threshold"))
             label=_("Select threshold"))
-        self.selectThreshValue = wx.SpinCtrl(
+        self.selectThreshValue = SpinCtrl(
             parent=panel, id=wx.ID_ANY, size=(75, -1),
             parent=panel, id=wx.ID_ANY, size=(75, -1),
             initial=UserSettings.Get(
             initial=UserSettings.Get(
                 group='vdigit', key="selectThresh", subkey='value'),
                 group='vdigit', key="selectThresh", subkey='value'),
@@ -477,7 +478,7 @@ class VDigitSettingsDialog(wx.Dialog):
                 group='vdigit',
                 group='vdigit',
                 key="queryLength",
                 key="queryLength",
                 subkey='than-selection'))
                 subkey='than-selection'))
-        self.queryLengthValue = wx.SpinCtrl(
+        self.queryLengthValue = SpinCtrl(
             parent=panel, id=wx.ID_ANY, size=(
             parent=panel, id=wx.ID_ANY, size=(
                 100, -1), initial=1, min=0, max=1e6)
                 100, -1), initial=1, min=0, max=1e6)
         self.queryLengthValue.SetValue(
         self.queryLengthValue.SetValue(
@@ -531,7 +532,7 @@ class VDigitSettingsDialog(wx.Dialog):
                 group='vdigit',
                 group='vdigit',
                 key="queryDangle",
                 key="queryDangle",
                 subkey='than-selection'))
                 subkey='than-selection'))
-        self.queryDangleValue = wx.SpinCtrl(
+        self.queryDangleValue = SpinCtrl(
             parent=panel, id=wx.ID_ANY, size=(
             parent=panel, id=wx.ID_ANY, size=(
                 100, -1), initial=1, min=0, max=1e6)
                 100, -1), initial=1, min=0, max=1e6)
         self.queryDangleValue.SetValue(
         self.queryDangleValue.SetValue(
@@ -612,7 +613,7 @@ class VDigitSettingsDialog(wx.Dialog):
                     (_("Mode"), _("Next to use")))
                     (_("Mode"), _("Next to use")))
         # layer
         # layer
         text = wx.StaticText(parent=panel, id=wx.ID_ANY, label=_("Layer"))
         text = wx.StaticText(parent=panel, id=wx.ID_ANY, label=_("Layer"))
-        self.layer = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(125, -1),
+        self.layer = SpinCtrl(parent=panel, id=wx.ID_ANY, size=(125, -1),
                                  min=1, max=1e3)
                                  min=1, max=1e3)
         self.layer.SetValue(int(UserSettings.Get(
         self.layer.SetValue(int(UserSettings.Get(
             group='vdigit', key="layer", subkey='value')))
             group='vdigit', key="layer", subkey='value')))
@@ -624,7 +625,7 @@ class VDigitSettingsDialog(wx.Dialog):
             parent=panel,
             parent=panel,
             id=wx.ID_ANY,
             id=wx.ID_ANY,
             label=_("Category number"))
             label=_("Category number"))
-        self.category = wx.SpinCtrl(
+        self.category = SpinCtrl(
             parent=panel, id=wx.ID_ANY, size=(125, -1),
             parent=panel, id=wx.ID_ANY, size=(125, -1),
             initial=UserSettings.Get(
             initial=UserSettings.Get(
                 group='vdigit', key="category", subkey='value'),
                 group='vdigit', key="category", subkey='value'),

+ 3 - 2
gui/wxpython/vnet/dialogs.py

@@ -49,6 +49,7 @@ from dbmgr.vinfo import VectorDBInfo
 from gui_core.widgets import GNotebook
 from gui_core.widgets import GNotebook
 from gui_core.goutput import GConsoleWindow
 from gui_core.goutput import GConsoleWindow
 from gui_core.gselect import Select, LayerSelect, ColumnSelect
 from gui_core.gselect import Select, LayerSelect, ColumnSelect
+from gui_core.wrap import GSpinCtrl as SpinCtrl
 
 
 from vnet.widgets import PointsList
 from vnet.widgets import PointsList
 from vnet.toolbars import MainToolbar, PointListToolbar, AnalysisToolbar
 from vnet.toolbars import MainToolbar, PointListToolbar, AnalysisToolbar
@@ -245,7 +246,7 @@ class VNETDialog(wx.Dialog):
         maxDistLabel = wx.StaticText(
         maxDistLabel = wx.StaticText(
             parent=maxDistPanel, id=wx.ID_ANY,
             parent=maxDistPanel, id=wx.ID_ANY,
             label=_("Maximum distance of point to the network:"))
             label=_("Maximum distance of point to the network:"))
-        self.anSettings["max_dist"] = wx.SpinCtrl(
+        self.anSettings["max_dist"] = SpinCtrl(
             parent=maxDistPanel, id=wx.ID_ANY, min=0, max=maxValue)
             parent=maxDistPanel, id=wx.ID_ANY, min=0, max=maxValue)
         self.anSettings["max_dist"].Bind(
         self.anSettings["max_dist"].Bind(
             wx.EVT_SPINCTRL, lambda event: self.MaxDist())
             wx.EVT_SPINCTRL, lambda event: self.MaxDist())
@@ -1285,7 +1286,7 @@ class SettingsDialog(wx.Dialog):
         for settKey, sett in self.sizeSetts.iteritems():
         for settKey, sett in self.sizeSetts.iteritems():
             settsLabels[settKey] = wx.StaticText(
             settsLabels[settKey] = wx.StaticText(
                 parent=self, id=wx.ID_ANY, label=sett[1])
                 parent=self, id=wx.ID_ANY, label=sett[1])
-            self.settings[settKey] = wx.SpinCtrl(
+            self.settings[settKey] = SpinCtrl(
                 parent=self, id=wx.ID_ANY, min=1, max=50)
                 parent=self, id=wx.ID_ANY, min=1, max=50)
             size = int(
             size = int(
                 UserSettings.Get(
                 UserSettings.Get(

+ 3 - 2
gui/wxpython/web_services/widgets.py

@@ -43,6 +43,7 @@ from web_services.cap_interface import WMSCapabilities, WMTSCapabilities, OnEart
 
 
 from gui_core.widgets import GNotebook
 from gui_core.widgets import GNotebook
 from gui_core.widgets import ManageSettingsWidget
 from gui_core.widgets import ManageSettingsWidget
+from gui_core.wrap import GSpinCtrl as SpinCtrl
 
 
 import grass.script as grass
 import grass.script as grass
 
 
@@ -274,13 +275,13 @@ class WSPanel(wx.Panel):
         labels['maxcols'] = wx.StaticText(
         labels['maxcols'] = wx.StaticText(
             parent=adv_setts_panel, id=wx.ID_ANY,
             parent=adv_setts_panel, id=wx.ID_ANY,
             label=_("Maximum columns to request from server at time:"))
             label=_("Maximum columns to request from server at time:"))
-        self.params['maxcols'] = wx.SpinCtrl(
+        self.params['maxcols'] = SpinCtrl(
             parent=adv_setts_panel, id=wx.ID_ANY, size=(100, -1))
             parent=adv_setts_panel, id=wx.ID_ANY, size=(100, -1))
 
 
         labels['maxrows'] = wx.StaticText(
         labels['maxrows'] = wx.StaticText(
             parent=adv_setts_panel, id=wx.ID_ANY,
             parent=adv_setts_panel, id=wx.ID_ANY,
             label=_("Maximum rows to request from server at time:"))
             label=_("Maximum rows to request from server at time:"))
-        self.params['maxrows'] = wx.SpinCtrl(
+        self.params['maxrows'] = SpinCtrl(
             parent=adv_setts_panel, id=wx.ID_ANY, size=(100, -1))
             parent=adv_setts_panel, id=wx.ID_ANY, size=(100, -1))
 
 
         min = 100
         min = 100

+ 9 - 8
gui/wxpython/wxplot/dialogs.py

@@ -30,6 +30,7 @@ from core.settings import UserSettings
 from core.globalvar import ICONDIR
 from core.globalvar import ICONDIR
 from core.utils import _
 from core.utils import _
 from gui_core.gselect import Select
 from gui_core.gselect import Select
+from gui_core.wrap import GSpinCtrl as SpinCtrl
 
 
 from grass.script import core as grass
 from grass.script import core as grass
 
 
@@ -194,7 +195,7 @@ class ScatterRasterDialog(wx.Dialog):
                               label=_("Number of bins (for FP maps)"))
                               label=_("Number of bins (for FP maps)"))
         box.Add(item=label,
         box.Add(item=label,
                 flag=wx.ALIGN_CENTER_VERTICAL, pos=(1, 0))
                 flag=wx.ALIGN_CENTER_VERTICAL, pos=(1, 0))
-        self.spinbins = wx.SpinCtrl(
+        self.spinbins = SpinCtrl(
             parent=self, id=wx.ID_ANY, value="", pos=(
             parent=self, id=wx.ID_ANY, value="", pos=(
                 30, 50), size=(
                 30, 50), size=(
                 100, -1), style=wx.SP_ARROW_KEYS)
                 100, -1), style=wx.SP_ARROW_KEYS)
@@ -501,7 +502,7 @@ class HistRasterDialog(wx.Dialog):
                               label=_("Number of bins (for FP maps)"))
                               label=_("Number of bins (for FP maps)"))
         box.Add(item=label,
         box.Add(item=label,
                 flag=wx.ALIGN_CENTER_VERTICAL, pos=(3, 0))
                 flag=wx.ALIGN_CENTER_VERTICAL, pos=(3, 0))
-        self.spinbins = wx.SpinCtrl(
+        self.spinbins = SpinCtrl(
             parent=self, id=wx.ID_ANY, value="", pos=(
             parent=self, id=wx.ID_ANY, value="", pos=(
                 30, 50), size=(
                 30, 50), size=(
                 100, -1), style=wx.SP_ARROW_KEYS)
                 100, -1), style=wx.SP_ARROW_KEYS)
@@ -686,7 +687,7 @@ class TextDialog(wx.Dialog):
             id=wx.ID_ANY,
             id=wx.ID_ANY,
             label=_("Title font size (pts):"))
             label=_("Title font size (pts):"))
         gridSizer.Add(item=tlabel, flag=wx.ALIGN_CENTER_VERTICAL, pos=(1, 0))
         gridSizer.Add(item=tlabel, flag=wx.ALIGN_CENTER_VERTICAL, pos=(1, 0))
-        self.ptitlesize = wx.SpinCtrl(
+        self.ptitlesize = SpinCtrl(
             parent=self, id=wx.ID_ANY, value="", pos=(
             parent=self, id=wx.ID_ANY, value="", pos=(
                 30, 50), size=(
                 30, 50), size=(
                 50, -1), style=wx.SP_ARROW_KEYS)
                 50, -1), style=wx.SP_ARROW_KEYS)
@@ -731,7 +732,7 @@ class TextDialog(wx.Dialog):
             id=wx.ID_ANY,
             id=wx.ID_ANY,
             label=_("Label font size (pts):"))
             label=_("Label font size (pts):"))
         gridSizer.Add(item=llabel, flag=wx.ALIGN_CENTER_VERTICAL, pos=(4, 0))
         gridSizer.Add(item=llabel, flag=wx.ALIGN_CENTER_VERTICAL, pos=(4, 0))
-        self.axislabelsize = wx.SpinCtrl(
+        self.axislabelsize = SpinCtrl(
             parent=self, id=wx.ID_ANY, value="", pos=(
             parent=self, id=wx.ID_ANY, value="", pos=(
                 30, 50), size=(
                 30, 50), size=(
                 50, -1), style=wx.SP_ARROW_KEYS)
                 50, -1), style=wx.SP_ARROW_KEYS)
@@ -1057,7 +1058,7 @@ class OptDialog(wx.Dialog):
                 pos=(
                 pos=(
                     row,
                     row,
                     0))
                     0))
-            width = wx.SpinCtrl(parent=self, id=wx.ID_ANY, value="",
+            width = SpinCtrl(parent=self, id=wx.ID_ANY, value="",
                                 size=(50, -1), style=wx.SP_ARROW_KEYS)
                                 size=(50, -1), style=wx.SP_ARROW_KEYS)
             width.SetRange(1, 10)
             width.SetRange(1, 10)
             width.SetValue(self.raster[self.map]['pwidth'])
             width.SetValue(self.raster[self.map]['pwidth'])
@@ -1126,7 +1127,7 @@ class OptDialog(wx.Dialog):
                 pos=(
                 pos=(
                     1,
                     1,
                     0))
                     0))
-            ptsize = wx.SpinCtrl(parent=self, id=wx.ID_ANY, value="",
+            ptsize = SpinCtrl(parent=self, id=wx.ID_ANY, value="",
                                  size=(50, -1), style=wx.SP_ARROW_KEYS)
                                  size=(50, -1), style=wx.SP_ARROW_KEYS)
             ptsize.SetRange(1, 10)
             ptsize.SetRange(1, 10)
             ptsize.SetValue(self.properties['marker']['size'])
             ptsize.SetValue(self.properties['marker']['size'])
@@ -1207,7 +1208,7 @@ class OptDialog(wx.Dialog):
                 pos=(
                 pos=(
                     1,
                     1,
                     0))
                     0))
-            ptsize = wx.SpinCtrl(parent=self, id=wx.ID_ANY, value="",
+            ptsize = SpinCtrl(parent=self, id=wx.ID_ANY, value="",
                                  size=(50, -1), style=wx.SP_ARROW_KEYS)
                                  size=(50, -1), style=wx.SP_ARROW_KEYS)
             ptsize.SetRange(1, 10)
             ptsize.SetRange(1, 10)
             ptsize.SetValue(self.raster[self.map]['psize'])
             ptsize.SetValue(self.raster[self.map]['psize'])
@@ -1381,7 +1382,7 @@ class OptDialog(wx.Dialog):
             id=wx.ID_ANY,
             id=wx.ID_ANY,
             label=_("Legend font size"))
             label=_("Legend font size"))
         gridSizer.Add(item=label, flag=wx.ALIGN_CENTER_VERTICAL, pos=(row, 0))
         gridSizer.Add(item=label, flag=wx.ALIGN_CENTER_VERTICAL, pos=(row, 0))
-        legendfontsize = wx.SpinCtrl(parent=self, id=wx.ID_ANY, value="",
+        legendfontsize = SpinCtrl(parent=self, id=wx.ID_ANY, value="",
                                      size=(50, -1), style=wx.SP_ARROW_KEYS)
                                      size=(50, -1), style=wx.SP_ARROW_KEYS)
         legendfontsize.SetRange(5, 100)
         legendfontsize.SetRange(5, 100)
         legendfontsize.SetValue(
         legendfontsize.SetValue(