[GRASS-SVN] r60015 - in grass/trunk/gui/wxpython: core gui_core psmap
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu May 1 09:42:06 PDT 2014
Author: martinl
Date: 2014-05-01 09:42:06 -0700 (Thu, 01 May 2014)
New Revision: 60015
Modified:
grass/trunk/gui/wxpython/core/globalvar.py
grass/trunk/gui/wxpython/gui_core/forms.py
grass/trunk/gui/wxpython/gui_core/preferences.py
grass/trunk/gui/wxpython/psmap/dialogs.py
Log:
wxGUI: fix symbol path
Modified: grass/trunk/gui/wxpython/core/globalvar.py
===================================================================
--- grass/trunk/gui/wxpython/core/globalvar.py 2014-05-01 16:36:13 UTC (rev 60014)
+++ grass/trunk/gui/wxpython/core/globalvar.py 2014-05-01 16:42:06 UTC (rev 60015)
@@ -21,9 +21,10 @@
# path to python scripts
ETCDIR = os.path.join(os.getenv("GISBASE"), "etc")
GUIDIR = os.path.join(os.getenv("GISBASE"), "gui")
-WXGUIDIR = os.path.join(os.getenv("GISBASE"), "gui", "wxpython")
+WXGUIDIR = os.path.join(GUIDIR, "wxpython")
ICONDIR = os.path.join(GUIDIR, "icons")
-IMGDIR = os.path.join(GUIDIR, "images")
+IMGDIR = os.path.join(GUIDIR, "images")
+SYMBDIR = os.path.join(IMGDIR, "symbols")
from core.debug import Debug
Modified: grass/trunk/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/forms.py 2014-05-01 16:36:13 UTC (rev 60014)
+++ grass/trunk/gui/wxpython/gui_core/forms.py 2014-05-01 16:42:06 UTC (rev 60015)
@@ -1049,7 +1049,7 @@
value = self._getValue(p)
if p['name'] == 'icon': # symbols
- bitmap = wx.Bitmap(os.path.join(globalvar.ETCSYMBOLDIR, value) + '.png')
+ bitmap = wx.Bitmap(os.path.join(globalvar.SYMBDIR, value) + '.png')
bb = wx.BitmapButton(parent = which_panel, id = wx.ID_ANY,
bitmap = bitmap)
iconLabel = wx.StaticText(parent = which_panel, id = wx.ID_ANY)
@@ -2142,7 +2142,7 @@
for p in self.task.params:
if 'wxId' in p and myId in p['wxId']:
from gui_core.dialogs import SymbolDialog
- dlg = SymbolDialog(self, symbolPath = globalvar.ETCSYMBOLDIR,
+ dlg = SymbolDialog(self, symbolPath = globalvar.SYMBDIR,
currentSymbol = p['value'])
if dlg.ShowModal() == wx.ID_OK:
img = dlg.GetSelectedSymbolPath()
Modified: grass/trunk/gui/wxpython/gui_core/preferences.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/preferences.py 2014-05-01 16:36:13 UTC (rev 60014)
+++ grass/trunk/gui/wxpython/gui_core/preferences.py 2014-05-01 16:42:06 UTC (rev 60015)
@@ -1032,7 +1032,7 @@
self.winId['vectorLayer:point:symbol'] = symbolLabel.GetId()
gridSizer.Add(item = symbolLabel, flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT, pos = (row, col + 1))
- bitmap = wx.Bitmap(os.path.join(globalvar.ETCSYMBOLDIR, symbolPath) + '.png')
+ bitmap = wx.Bitmap(os.path.join(globalvar.SYMBDIR, symbolPath) + '.png')
bb = wx.BitmapButton(parent = panel, id = wx.ID_ANY, bitmap = bitmap, name = "symbolButton")
bb.Bind(wx.EVT_BUTTON, self.OnSetSymbol)
gridSizer.Add(item = bb, pos = (row, col + 2))
@@ -1496,7 +1496,7 @@
winId = self.winId['vectorLayer:point:symbol']
label = self.FindWindowById(winId)
bb = self.FindWindowByName('symbolButton')
- dlg = SymbolDialog(self, symbolPath = globalvar.ETCSYMBOLDIR,
+ dlg = SymbolDialog(self, symbolPath = globalvar.SYMBDIR,
currentSymbol = label.GetLabel())
if dlg.ShowModal() == wx.ID_OK:
img = dlg.GetSelectedSymbolPath()
Modified: grass/trunk/gui/wxpython/psmap/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/psmap/dialogs.py 2014-05-01 16:36:13 UTC (rev 60014)
+++ grass/trunk/gui/wxpython/psmap/dialogs.py 2014-05-01 16:42:06 UTC (rev 60015)
@@ -1960,7 +1960,7 @@
self.symbolName = wx.StaticText(panel, id = wx.ID_ANY)
self.symbolName.SetLabel(self.vPropertiesDict['symbol'])
- bitmap = wx.Bitmap(os.path.join(globalvar.ETCSYMBOLDIR,
+ bitmap = wx.Bitmap(os.path.join(globalvar.SYMBDIR,
self.vPropertiesDict['symbol']) + '.png')
self.symbolButton = wx.BitmapButton(panel, id = wx.ID_ANY, bitmap = bitmap)
@@ -2258,7 +2258,7 @@
self.epsFileCtrl.Enable(not useSymbol)
def OnSymbolSelection(self, event):
- dlg = SymbolDialog(self, symbolPath = globalvar.ETCSYMBOLDIR,
+ dlg = SymbolDialog(self, symbolPath = globalvar.SYMBDIR,
currentSymbol = self.symbolName.GetLabel())
if dlg.ShowModal() == wx.ID_OK:
img = dlg.GetSelectedSymbolPath()
@@ -4573,7 +4573,7 @@
label = self.pointDict['symbol'])
gridSizer.Add(item = self.symbolLabel, pos = (0, 1),
flag = wx.ALIGN_CENTER_VERTICAL )
- bitmap = wx.Bitmap(os.path.join(globalvar.ETCSYMBOLDIR,
+ bitmap = wx.Bitmap(os.path.join(globalvar.SYMBDIR,
self.pointDict['symbol']) + '.png')
self.symbolButton = wx.BitmapButton(panel, id = wx.ID_ANY, bitmap = bitmap)
self.symbolButton.Bind(wx.EVT_BUTTON, self.OnSymbolSelection)
@@ -4715,7 +4715,7 @@
widget.GetWindow().Disable()
def OnSymbolSelection(self, event):
- dlg = SymbolDialog(self, symbolPath = globalvar.ETCSYMBOLDIR,
+ dlg = SymbolDialog(self, symbolPath = globalvar.SYMBDIR,
currentSymbol = self.symbolLabel.GetLabel())
if dlg.ShowModal() == wx.ID_OK:
img = dlg.GetSelectedSymbolPath()
More information about the grass-commit
mailing list