[GRASS-SVN] r52798 - in grass/trunk/gui/wxpython: gui_core psmap
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 21 00:50:36 PDT 2012
Author: annakrat
Date: 2012-08-21 00:50:36 -0700 (Tue, 21 Aug 2012)
New Revision: 52798
Modified:
grass/trunk/gui/wxpython/gui_core/dialogs.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: attempt to fix #1700
Modified: grass/trunk/gui/wxpython/gui_core/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/dialogs.py 2012-08-21 07:47:40 UTC (rev 52797)
+++ grass/trunk/gui/wxpython/gui_core/dialogs.py 2012-08-21 07:50:36 UTC (rev 52798)
@@ -2653,13 +2653,13 @@
self.infoLabel.SetLabel(event.name)
- def GetSelectedSymbol(self, fullPath = False):
- """!Returns currently selected symbol.
-
- @param fullPath true to return absolute path to symbol,
- otherwise returns e.g. 'basic/x'
+ def GetSelectedSymbolName(self):
+ """!Returns currently selected symbol name (e.g. 'basic/x').
+ """
+ # separator must be '/' and not dependent on OS
+ return self.selectedDir + '/' + self.selected
+
+ def GetSelectedSymbolPath(self):
+ """!Returns currently selected symbol full path.
"""
- if fullPath:
- return os.path.join(self.symbolPath, self.selectedDir, self.selected)
-
- return os.path.join(self.selectedDir, self.selected)
+ return os.path.join(self.symbolPath, self.selectedDir, self.selected)
Modified: grass/trunk/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/forms.py 2012-08-21 07:47:40 UTC (rev 52797)
+++ grass/trunk/gui/wxpython/gui_core/forms.py 2012-08-21 07:50:36 UTC (rev 52798)
@@ -1890,8 +1890,8 @@
dlg = SymbolDialog(self, symbolPath = globalvar.ETCSYMBOLDIR,
currentSymbol = p['value'])
if dlg.ShowModal() == wx.ID_OK:
- img = dlg.GetSelectedSymbol(fullPath = True)
- p['value'] = dlg.GetSelectedSymbol(fullPath = False)
+ img = dlg.GetSelectedSymbolPath()
+ p['value'] = dlg.GetSelectedSymbolName()
bitmapButton = wx.FindWindowById(p['wxId'][0])
label = wx.FindWindowById(p['wxId'][1])
Modified: grass/trunk/gui/wxpython/gui_core/preferences.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/preferences.py 2012-08-21 07:47:40 UTC (rev 52797)
+++ grass/trunk/gui/wxpython/gui_core/preferences.py 2012-08-21 07:50:36 UTC (rev 52798)
@@ -1447,8 +1447,8 @@
dlg = SymbolDialog(self, symbolPath = globalvar.ETCSYMBOLDIR,
currentSymbol = label.GetLabel())
if dlg.ShowModal() == wx.ID_OK:
- img = dlg.GetSelectedSymbol(fullPath = True)
- label.SetLabel(dlg.GetSelectedSymbol(fullPath = False))
+ img = dlg.GetSelectedSymbolPath()
+ label.SetLabel(dlg.GetSelectedSymbolName())
bb.SetBitmapLabel(wx.Bitmap(img + '.png'))
def OnEnableWheelZoom(self, event):
Modified: grass/trunk/gui/wxpython/psmap/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/psmap/dialogs.py 2012-08-21 07:47:40 UTC (rev 52797)
+++ grass/trunk/gui/wxpython/psmap/dialogs.py 2012-08-21 07:50:36 UTC (rev 52798)
@@ -2260,8 +2260,8 @@
dlg = SymbolDialog(self, symbolPath = globalvar.ETCSYMBOLDIR,
currentSymbol = self.symbolName.GetLabel())
if dlg.ShowModal() == wx.ID_OK:
- img = dlg.GetSelectedSymbol(fullPath = True)
- name = dlg.GetSelectedSymbol(fullPath = False)
+ img = dlg.GetSelectedSymbolPath()
+ name = dlg.GetSelectedSymbolName()
self.symbolButton.SetBitmapLabel(wx.Bitmap(img + '.png'))
self.symbolName.SetLabel(name)
@@ -4714,8 +4714,8 @@
dlg = SymbolDialog(self, symbolPath = globalvar.ETCSYMBOLDIR,
currentSymbol = self.symbolLabel.GetLabel())
if dlg.ShowModal() == wx.ID_OK:
- img = dlg.GetSelectedSymbol(fullPath = True)
- name = dlg.GetSelectedSymbol(fullPath = False)
+ img = dlg.GetSelectedSymbolPath()
+ name = dlg.GetSelectedSymbolName()
self.symbolButton.SetBitmapLabel(wx.Bitmap(img + '.png'))
self.symbolLabel.SetLabel(name)
More information about the grass-commit
mailing list