[GRASS-SVN] r69791 - in grass/branches/releasebranch_7_2/gui/wxpython: animation core dbmgr gcp gmodeler gui_core iscatt location_wizard mapswipe modules nviz psmap vdigit vnet web_services wxplot
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Nov 8 10:48:12 PST 2016
Author: annakrat
Date: 2016-11-08 10:48:11 -0800 (Tue, 08 Nov 2016)
New Revision: 69791
Added:
grass/branches/releasebranch_7_2/gui/wxpython/gui_core/wrap.py
Modified:
grass/branches/releasebranch_7_2/gui/wxpython/animation/dialogs.py
grass/branches/releasebranch_7_2/gui/wxpython/core/globalvar.py
grass/branches/releasebranch_7_2/gui/wxpython/dbmgr/base.py
grass/branches/releasebranch_7_2/gui/wxpython/dbmgr/dialogs.py
grass/branches/releasebranch_7_2/gui/wxpython/gcp/manager.py
grass/branches/releasebranch_7_2/gui/wxpython/gcp/statusbar.py
grass/branches/releasebranch_7_2/gui/wxpython/gmodeler/preferences.py
grass/branches/releasebranch_7_2/gui/wxpython/gui_core/dialogs.py
grass/branches/releasebranch_7_2/gui/wxpython/gui_core/forms.py
grass/branches/releasebranch_7_2/gui/wxpython/gui_core/preferences.py
grass/branches/releasebranch_7_2/gui/wxpython/iscatt/dialogs.py
grass/branches/releasebranch_7_2/gui/wxpython/location_wizard/wizard.py
grass/branches/releasebranch_7_2/gui/wxpython/mapswipe/dialogs.py
grass/branches/releasebranch_7_2/gui/wxpython/modules/colorrules.py
grass/branches/releasebranch_7_2/gui/wxpython/modules/vkrige.py
grass/branches/releasebranch_7_2/gui/wxpython/nviz/preferences.py
grass/branches/releasebranch_7_2/gui/wxpython/nviz/tools.py
grass/branches/releasebranch_7_2/gui/wxpython/psmap/dialogs.py
grass/branches/releasebranch_7_2/gui/wxpython/vdigit/dialogs.py
grass/branches/releasebranch_7_2/gui/wxpython/vdigit/preferences.py
grass/branches/releasebranch_7_2/gui/wxpython/vnet/dialogs.py
grass/branches/releasebranch_7_2/gui/wxpython/web_services/widgets.py
grass/branches/releasebranch_7_2/gui/wxpython/wxplot/dialogs.py
Log:
wxGUI: change size of wx.SpinCtrl for gtk3, see #3201 (merge from trunk, r69790)
Modified: grass/branches/releasebranch_7_2/gui/wxpython/animation/dialogs.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/animation/dialogs.py 2016-11-08 18:37:25 UTC (rev 69790)
+++ grass/branches/releasebranch_7_2/gui/wxpython/animation/dialogs.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -36,6 +36,7 @@
from core.utils import _
from gui_core.gselect import Select
from gui_core.widgets import FloatValidator
+from gui_core.wrap import GSpinCtrl as SpinCtrl
from animation.utils import TemporalMode, getRegisteredMaps, getNameAndLayer, getCpuCount
from animation.data import AnimationData, AnimLayer
@@ -103,7 +104,7 @@
labelDuration = wx.StaticText(
self, id=wx.ID_ANY, label=_("Frame duration:"))
labelUnits = wx.StaticText(self, id=wx.ID_ANY, label=_("ms"))
- self.spinDuration = wx.SpinCtrl(
+ self.spinDuration = SpinCtrl(
self,
id=wx.ID_ANY,
min=self.minimumDuration,
@@ -144,7 +145,7 @@
labelDuration = wx.StaticText(
self, id=wx.ID_ANY, label=_("Duration of time unit:"))
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,
initial=self.defaultSpeed)
self.choiceUnits = wx.Choice(self, id=wx.ID_ANY)
@@ -1115,9 +1116,9 @@
"Placement as percentage of"
" screen coordinates (X: 0, Y: 0 is top left):"))
label.Wrap(400)
- self.spinX = wx.SpinCtrl(
+ self.spinX = SpinCtrl(
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)
self.spinX.Bind(
wx.EVT_SPINCTRL,
@@ -1895,7 +1896,7 @@
key='nprocs',
subkey='value',
value=getCpuCount())
- nprocs = wx.SpinCtrl(
+ nprocs = SpinCtrl(
parent=panel,
initial=UserSettings.Get(
group='animation',
Modified: grass/branches/releasebranch_7_2/gui/wxpython/core/globalvar.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/core/globalvar.py 2016-11-08 18:37:25 UTC (rev 69790)
+++ grass/branches/releasebranch_7_2/gui/wxpython/core/globalvar.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -217,6 +217,8 @@
hasAgw = CheckWxVersion([2, 8, 11, 0])
wxPython3 = CheckWxVersion([3, 0, 0, 0])
+gtk3 = True if 'gtk3' in wx.PlatformInfo else False
+
"""@Add GUIDIR/scripts into path"""
os.environ['PATH'] = os.path.join(
GUIDIR, 'scripts') + os.pathsep + os.environ['PATH']
Modified: grass/branches/releasebranch_7_2/gui/wxpython/dbmgr/base.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/dbmgr/base.py 2016-11-08 18:37:25 UTC (rev 69790)
+++ grass/branches/releasebranch_7_2/gui/wxpython/dbmgr/base.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -53,6 +53,7 @@
from core.debug import Debug
from dbmgr.dialogs import ModifyTableRecord, AddColumnDialog
from core.settings import UserSettings
+from gui_core.wrap import GSpinCtrl as SpinCtrl
class Log:
@@ -2326,7 +2327,7 @@
flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT,
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,
min=1, max=1e6)
length.Enable(False)
@@ -3055,7 +3056,7 @@
self.addLayerWidgets = {'layer':
(wx.StaticText(parent=self.addPanel, id=wx.ID_ANY,
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,
min=1, max=1e6)),
'driver':
Modified: grass/branches/releasebranch_7_2/gui/wxpython/dbmgr/dialogs.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/dbmgr/dialogs.py 2016-11-08 18:37:25 UTC (rev 69790)
+++ grass/branches/releasebranch_7_2/gui/wxpython/dbmgr/dialogs.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -30,6 +30,7 @@
from core.settings import UserSettings
from dbmgr.vinfo import VectorDBInfo, GetUnicodeValue
from gui_core.widgets import IntegerValidator, FloatValidator
+from gui_core.wrap import GSpinCtrl as SpinCtrl
class DisplayAttributesDialog(wx.Dialog):
@@ -642,7 +643,7 @@
cId += 1
continue
else:
- valueWin = wx.SpinCtrl(
+ valueWin = SpinCtrl(
parent=self.dataPanel, id=wx.ID_ANY, value=value,
min=-1e9, max=1e9, size=(250, -1))
else:
@@ -763,7 +764,7 @@
self.data['addColType'].SetSelection(0)
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=(
65, -1), initial=250, min=1, max=1e6)
self.data['addColLength'].Enable(False)
Modified: grass/branches/releasebranch_7_2/gui/wxpython/gcp/manager.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/gcp/manager.py 2016-11-08 18:37:25 UTC (rev 69790)
+++ grass/branches/releasebranch_7_2/gui/wxpython/gcp/manager.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -49,6 +49,7 @@
from core.settings import UserSettings
from gcp.mapdisplay import MapFrame
from core.giface import Notification
+from gui_core.wrap import GSpinCtrl as SpinCtrl
from location_wizard.wizard import TitledPage as TitledPage
@@ -2793,7 +2794,7 @@
group='gcpman',
key='symbol',
subkey='size'))
- sizeWin = wx.SpinCtrl(parent=panel, id=wx.ID_ANY,
+ sizeWin = SpinCtrl(parent=panel, id=wx.ID_ANY,
min=1, max=20)
sizeWin.SetValue(symsize)
self.symbol['size'] = sizeWin.GetId()
@@ -2815,7 +2816,7 @@
group='gcpman',
key='symbol',
subkey='width'))
- widWin = wx.SpinCtrl(parent=panel, id=wx.ID_ANY,
+ widWin = SpinCtrl(parent=panel, id=wx.ID_ANY,
min=1, max=10)
widWin.SetValue(width)
self.symbol['width'] = widWin.GetId()
Modified: grass/branches/releasebranch_7_2/gui/wxpython/gcp/statusbar.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/gcp/statusbar.py 2016-11-08 18:37:25 UTC (rev 69790)
+++ grass/branches/releasebranch_7_2/gui/wxpython/gcp/statusbar.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -22,6 +22,7 @@
from core.gcmd import GMessage
from core.utils import _
from mapdisp.statusbar import SbItem, SbTextItem
+from gui_core.wrap import GSpinCtrl as SpinCtrl
class SbGoToGCP(SbItem):
@@ -36,7 +37,7 @@
self.name = 'gotoGCP'
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)
self.widget.Hide()
Modified: grass/branches/releasebranch_7_2/gui/wxpython/gmodeler/preferences.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/gmodeler/preferences.py 2016-11-08 18:37:25 UTC (rev 69790)
+++ grass/branches/releasebranch_7_2/gui/wxpython/gmodeler/preferences.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -22,6 +22,7 @@
from gui_core.preferences import PreferencesBaseDialog
from core.settings import UserSettings
from core.utils import _
+from gui_core.wrap import GSpinCtrl as SpinCtrl
class PreferencesDialog(PreferencesBaseDialog):
@@ -185,7 +186,7 @@
wx.ALIGN_CENTER_VERTICAL,
pos=(row, 0))
- width = wx.SpinCtrl(
+ width = SpinCtrl(
parent=panel,
id=wx.ID_ANY,
min=0,
@@ -211,7 +212,7 @@
wx.ALIGN_CENTER_VERTICAL,
pos=(row, 0))
- height = wx.SpinCtrl(
+ height = SpinCtrl(
parent=panel,
id=wx.ID_ANY,
min=0,
@@ -351,7 +352,7 @@
wx.ALIGN_CENTER_VERTICAL,
pos=(row, 0))
- width = wx.SpinCtrl(
+ width = SpinCtrl(
parent=panel,
id=wx.ID_ANY,
min=0,
@@ -377,7 +378,7 @@
wx.ALIGN_CENTER_VERTICAL,
pos=(row, 0))
- height = wx.SpinCtrl(
+ height = SpinCtrl(
parent=panel,
id=wx.ID_ANY,
min=0,
@@ -463,7 +464,7 @@
wx.ALIGN_CENTER_VERTICAL,
pos=(row, 0))
- width = wx.SpinCtrl(
+ width = SpinCtrl(
parent=panel,
id=wx.ID_ANY,
min=0,
@@ -489,7 +490,7 @@
wx.ALIGN_CENTER_VERTICAL,
pos=(row, 0))
- height = wx.SpinCtrl(
+ height = SpinCtrl(
parent=panel,
id=wx.ID_ANY,
min=0,
@@ -579,7 +580,7 @@
wx.ALIGN_CENTER_VERTICAL,
pos=(row, 0))
- width = wx.SpinCtrl(
+ width = SpinCtrl(
parent=panel,
id=wx.ID_ANY,
min=0,
@@ -605,7 +606,7 @@
wx.ALIGN_CENTER_VERTICAL,
pos=(row, 0))
- height = wx.SpinCtrl(
+ height = SpinCtrl(
parent=panel,
id=wx.ID_ANY,
min=0,
Modified: grass/branches/releasebranch_7_2/gui/wxpython/gui_core/dialogs.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/gui_core/dialogs.py 2016-11-08 18:37:25 UTC (rev 69790)
+++ grass/branches/releasebranch_7_2/gui/wxpython/gui_core/dialogs.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -47,6 +47,7 @@
from core.utils import _
from core.settings import UserSettings
from core.debug import Debug
+from gui_core.wrap import GSpinCtrl as SpinCtrl
class SimpleDialog(wx.Dialog):
@@ -1893,12 +1894,12 @@
label=' % s' % _("Image size"))
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)
self.width.SetRange(20, 1e6)
self.width.SetValue(size.width)
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)
self.height.SetRange(20, 1e6)
self.height.SetValue(size.height)
@@ -2472,7 +2473,7 @@
flag=wx.ALIGN_CENTER_VERTICAL,
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:
self.spin.SetValue(int(self.fontsize))
self.spin.Bind(wx.EVT_SPINCTRL, self.OnSizeSpin)
Modified: grass/branches/releasebranch_7_2/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/gui_core/forms.py 2016-11-08 18:37:25 UTC (rev 69790)
+++ grass/branches/releasebranch_7_2/gui/wxpython/gui_core/forms.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -97,6 +97,7 @@
from gui_core.widgets import FloatValidator, GNotebook, FormNotebook, FormListbook
from core.giface import Notification
from gui_core.widgets import LayersList
+from gui_core.wrap import GSpinCtrl as SpinCtrl
wxUpdateDialog, EVT_DIALOG_UPDATE = NewEvent()
@@ -1199,7 +1200,7 @@
except ValueError:
minValue = -1e6
maxValue = 1e6
- txt2 = wx.SpinCtrl(
+ txt2 = SpinCtrl(
parent=which_panel,
id=wx.ID_ANY,
size=globalvar.DIALOG_SPIN_SIZE,
@@ -1215,7 +1216,7 @@
value = self._getValue(p)
# parameter previously set
if value:
- if isinstance(txt2, wx.SpinCtrl):
+ if isinstance(txt2, SpinCtrl):
txt2.SetValue(int(value))
else:
txt2.SetValue(value)
@@ -1316,7 +1317,7 @@
maxValue = 1e9
value = self._getValue(p)
- win = wx.SpinCtrl(
+ win = SpinCtrl(
parent=which_panel,
value=p.get(
'default',
@@ -1619,7 +1620,7 @@
win.SetValue(
str(value)) # default or previously set value
else:
- win = wx.SpinCtrl(
+ win = SpinCtrl(
parent=which_panel, id=wx.ID_ANY, min=1,
max=100, initial=int(p['default']))
win.Bind(wx.EVT_SPINCTRL, self.OnSetValue)
@@ -2596,7 +2597,7 @@
if pLayer:
pLayer['value'] = ''
else:
- if isinstance(me, wx.SpinCtrl):
+ if isinstance(me, SpinCtrl):
porf['value'] = str(me.GetValue())
elif isinstance(me, wx.ComboBox):
porf['value'] = me.GetValue()
Modified: grass/branches/releasebranch_7_2/gui/wxpython/gui_core/preferences.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/gui_core/preferences.py 2016-11-08 18:37:25 UTC (rev 69790)
+++ grass/branches/releasebranch_7_2/gui/wxpython/gui_core/preferences.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -50,6 +50,7 @@
from gui_core.dialogs import SymbolDialog, DefaultFontDialog
from gui_core.widgets import IntegerValidator, ColorTablesComboBox
from core.debug import Debug
+from gui_core.wrap import GSpinCtrl as SpinCtrl
class PreferencesBaseDialog(wx.Dialog):
@@ -647,7 +648,7 @@
key='gSelectPopupHeight',
subkey='value')
- popupHeightSpin = wx.SpinCtrl(
+ popupHeightSpin = SpinCtrl(
parent=panel, id=wx.ID_ANY, size=(100, -1))
popupHeightSpin.SetRange(min, max)
popupHeightSpin.SetValue(value)
@@ -1362,7 +1363,7 @@
gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
label=_("Line width:")),
flag=wx.ALIGN_CENTER_VERTICAL, pos=(row, col))
- hlWidth = wx.SpinCtrl(
+ hlWidth = SpinCtrl(
parent=panel, id=wx.ID_ANY, size=(50, -1),
initial=self.settings.Get(
group='vectorLayer', key='line', subkey='width'),
@@ -1379,7 +1380,7 @@
gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
label=_("Symbol size:")),
flag=wx.ALIGN_CENTER_VERTICAL, pos=(row, col))
- ptSize = wx.SpinCtrl(
+ ptSize = SpinCtrl(
parent=panel, id=wx.ID_ANY, size=(50, -1),
initial=self.settings.Get(
group='vectorLayer', key='point', subkey='size'),
@@ -1473,7 +1474,7 @@
parent=panel,
id=wx.ID_ANY,
label=_("Line width (in pixels):"))
- hlWidth = wx.SpinCtrl(
+ hlWidth = SpinCtrl(
parent=panel, id=wx.ID_ANY, size=(50, -1),
initial=self.settings.Get(
group='atm', key='highlight', subkey='width'),
@@ -1757,7 +1758,7 @@
ll.SetSelection(1)
# precision
- precision = wx.SpinCtrl(parent=panel, id=wx.ID_ANY,
+ precision = SpinCtrl(parent=panel, id=wx.ID_ANY,
min=0, max=12,
name="GetValue")
precision.SetValue(int(self.settings.Get(
Copied: grass/branches/releasebranch_7_2/gui/wxpython/gui_core/wrap.py (from rev 69790, grass/trunk/gui/wxpython/gui_core/wrap.py)
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/gui_core/wrap.py (rev 0)
+++ grass/branches/releasebranch_7_2/gui/wxpython/gui_core/wrap.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -0,0 +1,36 @@
+"""
+ at package gui_core.wrap
+
+ at 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.
+
+ at 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)
\ No newline at end of file
Modified: grass/branches/releasebranch_7_2/gui/wxpython/iscatt/dialogs.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/iscatt/dialogs.py 2016-11-08 18:37:25 UTC (rev 69790)
+++ grass/branches/releasebranch_7_2/gui/wxpython/iscatt/dialogs.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -31,6 +31,7 @@
from core.gcmd import GMessage
from core.settings import UserSettings
from gui_core.dialogs import SimpleDialog
+from gui_core.wrap import GSpinCtrl as SpinCtrl
class AddScattPlotDialog(wx.Dialog):
@@ -375,7 +376,7 @@
for settKey, sett in self.sizeSetts.iteritems():
settsLabels[settKey] = wx.StaticText(
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)
size = int(
UserSettings.Get(
Modified: grass/branches/releasebranch_7_2/gui/wxpython/location_wizard/wizard.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/location_wizard/wizard.py 2016-11-08 18:37:25 UTC (rev 69790)
+++ grass/branches/releasebranch_7_2/gui/wxpython/location_wizard/wizard.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -46,6 +46,7 @@
from core.utils import _
from core.gcmd import RunCommand, GError, GMessage, GWarning
from gui_core.widgets import GenericValidator
+from gui_core.wrap import GSpinCtrl as SpinCtrl
from location_wizard.base import BaseClass
from location_wizard.dialogs import SelectTransformDialog
@@ -860,7 +861,7 @@
win.SetSelection(param['value'])
win.Bind(wx.EVT_CHOICE, self.OnParamEntry)
elif param['type'] == 'zone':
- win = wx.SpinCtrl(parent=self.panel, id=id,
+ win = SpinCtrl(parent=self.panel, id=id,
size=(100, -1),
style=wx.SP_ARROW_KEYS | wx.SP_WRAP,
min=1, max=60)
Modified: grass/branches/releasebranch_7_2/gui/wxpython/mapswipe/dialogs.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/mapswipe/dialogs.py 2016-11-08 18:37:25 UTC (rev 69790)
+++ grass/branches/releasebranch_7_2/gui/wxpython/mapswipe/dialogs.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -27,6 +27,7 @@
from core.gcmd import GMessage
from core.layerlist import LayerList
from core.settings import UserSettings
+from gui_core.wrap import GSpinCtrl as SpinCtrl
from gui_core.simplelmgr import SimpleLayerManager, SIMPLE_LMGR_RASTER, \
SIMPLE_LMGR_VECTOR, SIMPLE_LMGR_RGB, SIMPLE_LMGR_TB_LEFT, SIMPLE_LMGR_TB_RIGHT
@@ -328,7 +329,7 @@
pos=(
row,
0))
- width = wx.SpinCtrl(
+ width = SpinCtrl(
parent=panel,
min=1,
max=10,
@@ -351,7 +352,7 @@
pos=(
row,
0))
- size = wx.SpinCtrl(
+ size = SpinCtrl(
parent=panel,
min=4,
max=50,
Modified: grass/branches/releasebranch_7_2/gui/wxpython/modules/colorrules.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/modules/colorrules.py 2016-11-08 18:37:25 UTC (rev 69790)
+++ grass/branches/releasebranch_7_2/gui/wxpython/modules/colorrules.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -45,6 +45,7 @@
from core.debug import Debug as Debug
from core.settings import UserSettings
from gui_core.widgets import ColorTablesComboBox
+from gui_core.wrap import GSpinCtrl as SpinCtrl
class RulesPanel:
@@ -80,7 +81,7 @@
# clear button
self.clearAll = wx.Button(parent, id=wx.ID_ANY, label=_("Clear all"))
# 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)
# add rules
self.btnAdd = wx.Button(parent, id=wx.ID_ADD)
@@ -154,7 +155,7 @@
init = 2
if self.attributeType == 'size':
init = 100
- columnCtrl = wx.SpinCtrl(self.mainPanel, id=2000 + num,
+ columnCtrl = SpinCtrl(self.mainPanel, id=2000 + num,
size=(50, -1), min=1, max=1e4,
initial=init)
columnCtrl.Bind(wx.EVT_SPINCTRL, self.OnRuleSize)
Modified: grass/branches/releasebranch_7_2/gui/wxpython/modules/vkrige.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/modules/vkrige.py 2016-11-08 18:37:25 UTC (rev 69790)
+++ grass/branches/releasebranch_7_2/gui/wxpython/modules/vkrige.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -39,6 +39,7 @@
from core.settings import UserSettings
from gui_core.widgets import GNotebook
from core.giface import Notification
+from gui_core.wrap import GSpinCtrl as SpinCtrl
#import help
import wx
@@ -502,7 +503,7 @@
setattr(
self,
n + "Ctrl",
- (wx.SpinCtrl(
+ (SpinCtrl(
self,
id=wx.ID_ANY,
min=MinValues[
@@ -550,7 +551,7 @@
# block kriging parameters. Size.
BlockSizer = wx.BoxSizer(wx.HORIZONTAL)
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
self.BlockSpinBox.Enable(False)
BlockSizer.Add(
Modified: grass/branches/releasebranch_7_2/gui/wxpython/nviz/preferences.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/nviz/preferences.py 2016-11-08 18:37:25 UTC (rev 69790)
+++ grass/branches/releasebranch_7_2/gui/wxpython/nviz/preferences.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -26,6 +26,7 @@
from core.settings import UserSettings
from core.utils import _
from gui_core.preferences import PreferencesBaseDialog
+from gui_core.wrap import GSpinCtrl as SpinCtrl
class NvizPreferencesDialog(PreferencesBaseDialog):
@@ -89,7 +90,7 @@
parent=panel, id=wx.ID_ANY, label=_("value:")), pos=(
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'],
min=ipvals['min'],
max=ipvals['max'])
@@ -102,7 +103,7 @@
parent=panel, id=wx.ID_ANY, label=_("step:")), pos=(
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'],
min=ipvals['min'],
max=ipvals['max'] - 1)
@@ -121,7 +122,7 @@
parent=panel, id=wx.ID_ANY, label=_("x:")), pos=(
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,
min=0,
max=100)
@@ -134,7 +135,7 @@
parent=panel, id=wx.ID_ANY, label="y:"), pos=(
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,
min=0,
max=100)
@@ -160,7 +161,7 @@
parent=panel, id=wx.ID_ANY, label=_("value:")), pos=(
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'],
min=itvals['min'],
max=itvals['max'])
@@ -179,7 +180,7 @@
parent=panel, id=wx.ID_ANY, label=_("value:")), pos=(
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'],
min=-1e6,
max=1e6)
@@ -246,7 +247,7 @@
label=_("Move exag:")),
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(
group='nviz', key='fly', subkey=[
'exag', 'move']), size=(
@@ -259,7 +260,7 @@
label=_("Turn exag:")),
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(
group='nviz', key='fly', subkey=[
'exag', 'turn']), size=(
@@ -303,7 +304,7 @@
parent=panel, id=wx.ID_ANY, label=_("x:")), pos=(
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,
min=-100,
max=100)
@@ -316,7 +317,7 @@
parent=panel, id=wx.ID_ANY, label="y:"), pos=(
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,
min=-100,
max=100)
@@ -329,7 +330,7 @@
parent=panel, id=wx.ID_ANY, label=_("z:")), pos=(
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'],
min=0,
max=100)
@@ -344,7 +345,7 @@
label=_("Brightness:")),
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,
min=0,
max=100)
@@ -358,7 +359,7 @@
label=_("Ambient:")),
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,
min=0,
max=100)
@@ -448,7 +449,7 @@
pos=(
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,
min=1,
max=100)
@@ -479,7 +480,7 @@
pos=(
2,
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,
min=1,
max=100)
@@ -558,7 +559,7 @@
label=_("Width:")),
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,
min=1,
max=100)
@@ -598,7 +599,7 @@
label=_("Size:")),
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,
min=1,
max=1e6)
Modified: grass/branches/releasebranch_7_2/gui/wxpython/nviz/tools.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/nviz/tools.py 2016-11-08 18:37:25 UTC (rev 69790)
+++ grass/branches/releasebranch_7_2/gui/wxpython/nviz/tools.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -53,6 +53,7 @@
from core.settings import UserSettings
from gui_core.widgets import ScrolledPanel, NumTextCtrl, FloatSlider, SymbolButton
from gui_core.gselect import Select
+from gui_core.wrap import GSpinCtrl as SpinCtrl
from core.debug import Debug
try:
from nviz.mapwindow import wxUpdateProperties, wxUpdateView,\
@@ -548,7 +549,7 @@
parent=panel,
id=wx.ID_ANY,
label=_("Frame rate (FPS):"))
- fps = wx.SpinCtrl(
+ fps = SpinCtrl(
parent=panel, id=wx.ID_ANY, size=(65, -1),
initial=UserSettings.Get(
group='nviz', key='animation', subkey='fps'),
@@ -897,7 +898,7 @@
gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
label=_("resolution:")),
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,
min=1,
max=100)
@@ -943,7 +944,7 @@
gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
label=_("resolution:")),
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,
min=1,
max=100)
@@ -1018,7 +1019,7 @@
elif code == 'mask':
value = None
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)
value.SetRange(minVal=0, maxVal=100)
value.Bind(wx.EVT_TEXT, self.OnSurfaceMap)
@@ -1383,7 +1384,7 @@
gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
label=_("Fine resolution:")),
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,
min=1,
max=100)
@@ -1398,7 +1399,7 @@
label=_("Value:")), pos=(1, 0),
flag=wx.ALIGN_CENTER_VERTICAL)
- value = wx.SpinCtrl(panel, id=wx.ID_ANY,
+ value = SpinCtrl(panel, id=wx.ID_ANY,
min=-1e9, max=1e9,
size=(65, -1))
self.win['constant']['value'] = value.GetId()
@@ -1410,7 +1411,7 @@
label=_("Transparency:")), pos=(2, 0),
flag=wx.ALIGN_CENTER_VERTICAL)
- transp = wx.SpinCtrl(panel, id=wx.ID_ANY,
+ transp = SpinCtrl(panel, id=wx.ID_ANY,
min=0, max=100,
size=(65, -1))
self.win['constant']['transp'] = transp.GetId()
@@ -1496,7 +1497,7 @@
pos=(0, 1), flag=wx.ALIGN_CENTER_VERTICAL |
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,
min=1,
max=100)
@@ -1667,7 +1668,7 @@
isize.SetDigits(1)
isize.Bind(fs.EVT_FLOATSPIN, self.OnVectorPoints)
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,
min=1,
max=1e6)
@@ -1921,7 +1922,7 @@
gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
label=_("Resolution:")),
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,
min=1,
max=100)
@@ -2279,7 +2280,7 @@
label=_("Elevation of fringe from bottom:")),
pos=(0, 0),
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)
spin.SetValue(
UserSettings.Get(
@@ -2886,7 +2887,7 @@
## value.Bind(wx.EVT_TEXT, self.OnVolumeIsosurfMap)
else:
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)
if code == 'topo':
value.SetRange(minVal=-1e9, maxVal=1e9)
@@ -3029,7 +3030,7 @@
hSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
label=_("Transparency:")), proportion=0,
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)
spin.Bind(wx.EVT_SPINCTRL, self.OnSliceTransparency)
self.win['volume']['slice']['transp'] = spin.GetId()
Modified: grass/branches/releasebranch_7_2/gui/wxpython/psmap/dialogs.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/psmap/dialogs.py 2016-11-08 18:37:25 UTC (rev 69790)
+++ grass/branches/releasebranch_7_2/gui/wxpython/psmap/dialogs.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -57,6 +57,7 @@
from gui_core.gselect import Select
from core.gcmd import RunCommand, GError, GMessage
from gui_core.dialogs import SymbolDialog
+from gui_core.wrap import GSpinCtrl as SpinCtrl
from psmap.utils import *
from psmap.instructions import *
@@ -401,7 +402,7 @@
parent.font['fontCtrl'].SetStringSelection(dialogDict['font'])
else:
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.font['fontSizeCtrl'].SetValue(dialogDict['fontsize'])
@@ -1046,7 +1047,7 @@
resolutionText = wx.StaticText(
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)
flexSizer.Add(
@@ -1099,7 +1100,7 @@
self.borderWidthText = wx.StaticText(
self, id=wx.ID_ANY, label=_("border width (pts):"))
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)
if self.mapFrameDict['border'] == 'y':
@@ -2346,7 +2347,7 @@
self.widthSpin.SetFormat("%f")
self.widthSpin.SetDigits(2)
else:
- self.widthSpin = wx.SpinCtrl(
+ self.widthSpin = SpinCtrl(
panel, id=wx.ID_ANY, min=1, max=25, initial=1,
size=self.spinCtrlSize)
@@ -2510,7 +2511,7 @@
self.outWidthSpin.SetFormat("%f")
self.outWidthSpin.SetDigits(1)
else:
- self.outWidthSpin = wx.SpinCtrl(
+ self.outWidthSpin = SpinCtrl(
panel, id=wx.ID_ANY, min=1, max=30, initial=1,
size=self.spinCtrlSize)
@@ -2720,13 +2721,13 @@
self.sizeRadio = wx.RadioButton(
panel, id=wx.ID_ANY, label=_("size:"),
style=wx.RB_GROUP)
- self.sizeSpin = wx.SpinCtrl(
+ self.sizeSpin = SpinCtrl(
panel, id=wx.ID_ANY, min=1, max=50, initial=1)
self.sizecolumnRadio = wx.RadioButton(
panel, id=wx.ID_ANY, label=_("size from map table column:"))
self.sizeColChoice = self.getColsChoice(panel)
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)
self.sizeRadio.SetValue(self.vPropertiesDict['size'] is not None)
@@ -2798,7 +2799,7 @@
panel, id=wx.ID_ANY, label=_("rotate symbols:"))
self.rotateRadio = wx.RadioButton(panel, id=wx.ID_ANY, label=_(
"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)
self.rotatecolumnRadio = wx.RadioButton(
panel, id=wx.ID_ANY, label=_("from map table column:"))
@@ -2889,7 +2890,7 @@
self.widthSpin.SetFormat("%f")
self.widthSpin.SetDigits(1)
else:
- self.widthSpin = wx.SpinCtrl(
+ self.widthSpin = SpinCtrl(
panel, id=wx.ID_ANY, min=1, max=30, initial=1)
self.cwidthCheck = wx.CheckBox(
@@ -3012,11 +3013,11 @@
fileMode=wx.FD_OPEN)
self.patWidthText = wx.StaticText(
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)
self.patScaleText = wx.StaticText(
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)
self.patternCheck.SetValue(bool(self.vPropertiesDict['pat']))
@@ -3872,7 +3873,7 @@
minVect = 1
maxVect = min(10, len(self.instruction[self.vectorId]['list']))
cols = wx.StaticText(panel, id=wx.ID_ANY, label=_("Columns:"))
- panel.colsCtrl = wx.SpinCtrl(
+ panel.colsCtrl = SpinCtrl(
panel,
id=wx.ID_ANY,
value="",
@@ -4037,7 +4038,7 @@
self.panelRaster.heightOrColumnsCtrl.Destroy()
if self.discrete.GetValue():
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,
initial=self.rLegendDict['cols'])
self.panelRaster.heightOrColumnsCtrl.Enable(enabledSize)
@@ -4949,21 +4950,21 @@
sbSegmentsText = wx.StaticText(
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)
self.sbSegmentsCtrl.SetValue(self.scalebarDict['segment'])
sbLabelsText1 = wx.StaticText(
panel, id=wx.ID_ANY, label=_("Label every "))
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)
self.sbLabelsCtrl.SetValue(self.scalebarDict['numbers'])
# font
fontsizeText = wx.StaticText(
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)
self.fontsizeCtrl.SetValue(self.scalebarDict['fontsize'])
@@ -5265,7 +5266,7 @@
panel, id=wx.ID_ANY, label=_("highlight"))
self.effect['highlightColor'] = wx.ColourPickerCtrl(
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)
self.effect['highlightWidthLabel'] = wx.StaticText(
panel, id=wx.ID_ANY, label=_("Width (pts):"))
@@ -5273,7 +5274,7 @@
self.effect['borderCtrl'] = wx.CheckBox(
panel, id=wx.ID_ANY, label=_("text border"))
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)
self.effect['borderWidthLabel'] = wx.StaticText(
panel, id=wx.ID_ANY, label=_("Width (pts):"))
@@ -5387,10 +5388,10 @@
panel, id=wx.ID_ANY, label=_("horizontal (pts):"))
self.yoffLabel = wx.StaticText(
panel, id=wx.ID_ANY, label=_("vertical (pts):"))
- self.xoffCtrl = wx.SpinCtrl(
+ self.xoffCtrl = SpinCtrl(
panel, id=wx.ID_ANY, size=(50, -1),
min=-50, max=50, initial=0)
- self.yoffCtrl = wx.SpinCtrl(
+ self.yoffCtrl = SpinCtrl(
panel, id=wx.ID_ANY, size=(50, -1),
min=-50, max=50, initial=0)
self.xoffCtrl.SetValue(self.textDict['xoffset'])
@@ -5486,7 +5487,7 @@
panel,
id=wx.ID_ANY,
label=_("rotate text (counterclockwise)"))
- self.rotValue = wx.SpinCtrl(
+ self.rotValue = SpinCtrl(
panel, wx.ID_ANY, size=(50, -1),
min=0, max=360, initial=0)
if self.textDict['rotate']:
@@ -5886,7 +5887,7 @@
panel.image['rotate'].SetFormat("%f")
panel.image['rotate'].SetDigits(1)
else:
- panel.image['rotate'] = wx.SpinCtrl(
+ panel.image['rotate'] = SpinCtrl(
parent=panel,
id=wx.ID_ANY,
size=self.spinCtrlSize,
@@ -6444,7 +6445,7 @@
parent=panel,
id=wx.ID_ANY,
label=_("Size (pt):"))
- self.sizeCtrl = wx.SpinCtrl(
+ self.sizeCtrl = SpinCtrl(
panel, id=wx.ID_ANY, size=self.spinCtrlSize)
self.sizeCtrl.SetToolTipString(_("Symbol size in points"))
self.sizeCtrl.SetValue(self.pointDict['size'])
@@ -6474,7 +6475,7 @@
self.rotCtrl.SetFormat("%f")
self.rotCtrl.SetDigits(1)
else:
- self.rotCtrl = wx.SpinCtrl(
+ self.rotCtrl = SpinCtrl(
parent=panel,
id=wx.ID_ANY,
size=self.spinCtrlSize,
@@ -6810,7 +6811,7 @@
self.widthCtrl.SetFormat("%f")
self.widthCtrl.SetDigits(1)
else:
- self.widthCtrl = wx.SpinCtrl(
+ self.widthCtrl = SpinCtrl(
parent=panel,
id=wx.ID_ANY,
size=self.spinCtrlSize,
Modified: grass/branches/releasebranch_7_2/gui/wxpython/vdigit/dialogs.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/vdigit/dialogs.py 2016-11-08 18:37:25 UTC (rev 69790)
+++ grass/branches/releasebranch_7_2/gui/wxpython/vdigit/dialogs.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -28,6 +28,7 @@
from core.debug import Debug
from core.settings import UserSettings
from core.utils import _
+from gui_core.wrap import GSpinCtrl as SpinCtrl
class VDigitCategoryDialog(wx.Dialog, listmix.ColumnSorterMixin):
@@ -125,7 +126,7 @@
newCat = max(self.cats[self.fid][1]) + 1
except KeyError:
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)
btnAddCat = wx.Button(self, wx.ID_ADD)
flexSizer.Add(item=layerNewTxt, proportion=0,
@@ -634,7 +635,7 @@
# starting value
txt = wx.StaticText(parent=self,
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,
min=-1e6, max=1e6)
flexSizer.Add(txt, proportion=0, flag=wx.ALIGN_CENTER_VERTICAL)
@@ -646,7 +647,7 @@
# step
txt = wx.StaticText(parent=self,
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,
min=0, max=1e6)
flexSizer.Add(txt, proportion=0, flag=wx.ALIGN_CENTER_VERTICAL)
Modified: grass/branches/releasebranch_7_2/gui/wxpython/vdigit/preferences.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/vdigit/preferences.py 2016-11-08 18:37:25 UTC (rev 69790)
+++ grass/branches/releasebranch_7_2/gui/wxpython/vdigit/preferences.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -25,6 +25,7 @@
from core.units import Units
from core.settings import UserSettings
from core.utils import _
+from gui_core.wrap import GSpinCtrl as SpinCtrl
class VDigitSettingsDialog(wx.Dialog):
@@ -163,7 +164,7 @@
flexSizer.AddGrowableCol(0)
# 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),
initial=UserSettings.Get(
group='vdigit', key="lineWidth", subkey='value'),
@@ -208,7 +209,7 @@
parent=panel,
id=wx.ID_ANY,
label=_("Snapping threshold"))
- self.snappingValue = wx.SpinCtrl(
+ self.snappingValue = SpinCtrl(
parent=panel, id=wx.ID_ANY, size=(75, -1),
initial=UserSettings.Get(
group='vdigit', key="snapping", subkey='value'),
@@ -285,7 +286,7 @@
parent=panel,
id=wx.ID_ANY,
label=_("Select threshold"))
- self.selectThreshValue = wx.SpinCtrl(
+ self.selectThreshValue = SpinCtrl(
parent=panel, id=wx.ID_ANY, size=(75, -1),
initial=UserSettings.Get(
group='vdigit', key="selectThresh", subkey='value'),
@@ -477,7 +478,7 @@
group='vdigit',
key="queryLength",
subkey='than-selection'))
- self.queryLengthValue = wx.SpinCtrl(
+ self.queryLengthValue = SpinCtrl(
parent=panel, id=wx.ID_ANY, size=(
100, -1), initial=1, min=0, max=1e6)
self.queryLengthValue.SetValue(
@@ -531,7 +532,7 @@
group='vdigit',
key="queryDangle",
subkey='than-selection'))
- self.queryDangleValue = wx.SpinCtrl(
+ self.queryDangleValue = SpinCtrl(
parent=panel, id=wx.ID_ANY, size=(
100, -1), initial=1, min=0, max=1e6)
self.queryDangleValue.SetValue(
@@ -612,7 +613,7 @@
(_("Mode"), _("Next to use")))
# 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)
self.layer.SetValue(int(UserSettings.Get(
group='vdigit', key="layer", subkey='value')))
@@ -624,7 +625,7 @@
parent=panel,
id=wx.ID_ANY,
label=_("Category number"))
- self.category = wx.SpinCtrl(
+ self.category = SpinCtrl(
parent=panel, id=wx.ID_ANY, size=(125, -1),
initial=UserSettings.Get(
group='vdigit', key="category", subkey='value'),
Modified: grass/branches/releasebranch_7_2/gui/wxpython/vnet/dialogs.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/vnet/dialogs.py 2016-11-08 18:37:25 UTC (rev 69790)
+++ grass/branches/releasebranch_7_2/gui/wxpython/vnet/dialogs.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -49,6 +49,7 @@
from gui_core.widgets import GNotebook
from gui_core.goutput import GConsoleWindow
from gui_core.gselect import Select, LayerSelect, ColumnSelect
+from gui_core.wrap import GSpinCtrl as SpinCtrl
from vnet.widgets import PointsList
from vnet.toolbars import MainToolbar, PointListToolbar, AnalysisToolbar
@@ -245,7 +246,7 @@
maxDistLabel = wx.StaticText(
parent=maxDistPanel, id=wx.ID_ANY,
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)
self.anSettings["max_dist"].Bind(
wx.EVT_SPINCTRL, lambda event: self.MaxDist())
@@ -1285,7 +1286,7 @@
for settKey, sett in self.sizeSetts.iteritems():
settsLabels[settKey] = wx.StaticText(
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)
size = int(
UserSettings.Get(
Modified: grass/branches/releasebranch_7_2/gui/wxpython/web_services/widgets.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/web_services/widgets.py 2016-11-08 18:37:25 UTC (rev 69790)
+++ grass/branches/releasebranch_7_2/gui/wxpython/web_services/widgets.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -43,6 +43,7 @@
from gui_core.widgets import GNotebook
from gui_core.widgets import ManageSettingsWidget
+from gui_core.wrap import GSpinCtrl as SpinCtrl
import grass.script as grass
@@ -274,13 +275,13 @@
labels['maxcols'] = wx.StaticText(
parent=adv_setts_panel, id=wx.ID_ANY,
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))
labels['maxrows'] = wx.StaticText(
parent=adv_setts_panel, id=wx.ID_ANY,
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))
min = 100
Modified: grass/branches/releasebranch_7_2/gui/wxpython/wxplot/dialogs.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/wxplot/dialogs.py 2016-11-08 18:37:25 UTC (rev 69790)
+++ grass/branches/releasebranch_7_2/gui/wxpython/wxplot/dialogs.py 2016-11-08 18:48:11 UTC (rev 69791)
@@ -30,6 +30,7 @@
from core.globalvar import ICONDIR
from core.utils import _
from gui_core.gselect import Select
+from gui_core.wrap import GSpinCtrl as SpinCtrl
from grass.script import core as grass
@@ -194,7 +195,7 @@
label=_("Number of bins (for FP maps)"))
box.Add(item=label,
flag=wx.ALIGN_CENTER_VERTICAL, pos=(1, 0))
- self.spinbins = wx.SpinCtrl(
+ self.spinbins = SpinCtrl(
parent=self, id=wx.ID_ANY, value="", pos=(
30, 50), size=(
100, -1), style=wx.SP_ARROW_KEYS)
@@ -501,7 +502,7 @@
label=_("Number of bins (for FP maps)"))
box.Add(item=label,
flag=wx.ALIGN_CENTER_VERTICAL, pos=(3, 0))
- self.spinbins = wx.SpinCtrl(
+ self.spinbins = SpinCtrl(
parent=self, id=wx.ID_ANY, value="", pos=(
30, 50), size=(
100, -1), style=wx.SP_ARROW_KEYS)
@@ -686,7 +687,7 @@
id=wx.ID_ANY,
label=_("Title font size (pts):"))
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=(
30, 50), size=(
50, -1), style=wx.SP_ARROW_KEYS)
@@ -731,7 +732,7 @@
id=wx.ID_ANY,
label=_("Label font size (pts):"))
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=(
30, 50), size=(
50, -1), style=wx.SP_ARROW_KEYS)
@@ -1057,7 +1058,7 @@
pos=(
row,
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)
width.SetRange(1, 10)
width.SetValue(self.raster[self.map]['pwidth'])
@@ -1126,7 +1127,7 @@
pos=(
1,
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)
ptsize.SetRange(1, 10)
ptsize.SetValue(self.properties['marker']['size'])
@@ -1207,7 +1208,7 @@
pos=(
1,
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)
ptsize.SetRange(1, 10)
ptsize.SetValue(self.raster[self.map]['psize'])
@@ -1381,7 +1382,7 @@
id=wx.ID_ANY,
label=_("Legend font size"))
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)
legendfontsize.SetRange(5, 100)
legendfontsize.SetValue(
More information about the grass-commit
mailing list