[GRASS-SVN] r52799 - in grass/branches/develbranch_6/gui/wxpython: gui_core psmap
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 21 01:02:02 PDT 2012
Author: annakrat
Date: 2012-08-21 01:02:01 -0700 (Tue, 21 Aug 2012)
New Revision: 52799
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_core/dialogs.py
grass/branches/develbranch_6/gui/wxpython/gui_core/forms.py
grass/branches/develbranch_6/gui/wxpython/psmap/dialogs.py
Log:
wxGUI: attempt to fix #1700 (merge from trunk, r52798)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_core/dialogs.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_core/dialogs.py 2012-08-21 07:50:36 UTC (rev 52798)
+++ grass/branches/develbranch_6/gui/wxpython/gui_core/dialogs.py 2012-08-21 08:02:01 UTC (rev 52799)
@@ -2387,13 +2387,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/branches/develbranch_6/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_core/forms.py 2012-08-21 07:50:36 UTC (rev 52798)
+++ grass/branches/develbranch_6/gui/wxpython/gui_core/forms.py 2012-08-21 08:02:01 UTC (rev 52799)
@@ -1719,8 +1719,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/branches/develbranch_6/gui/wxpython/psmap/dialogs.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/psmap/dialogs.py 2012-08-21 07:50:36 UTC (rev 52798)
+++ grass/branches/develbranch_6/gui/wxpython/psmap/dialogs.py 2012-08-21 08:02:01 UTC (rev 52799)
@@ -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