[GRASS-SVN] r54568 - in grass/trunk: gui/wxpython/gui_core lib/python
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jan 8 00:35:25 PST 2013
Author: martinl
Date: 2013-01-08 00:35:23 -0800 (Tue, 08 Jan 2013)
New Revision: 54568
Modified:
grass/trunk/gui/wxpython/gui_core/forms.py
grass/trunk/lib/python/task.py
Log:
wxGUI: don't show extension on windows
Modified: grass/trunk/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/forms.py 2013-01-08 08:00:37 UTC (rev 54567)
+++ grass/trunk/gui/wxpython/gui_core/forms.py 2013-01-08 08:35:23 UTC (rev 54568)
@@ -397,10 +397,7 @@
self.modeler = None
# module name + keywords
- if self.task.name.split('.')[-1] in ('py', 'sh'):
- title = str(self.task.name.rsplit('.',1)[0])
- else:
- title = self.task.name
+ title = self.task.get_name()
try:
if self.task.keywords != ['']:
title += " [" + ', '.join(self.task.keywords) + "]"
Modified: grass/trunk/lib/python/task.py
===================================================================
--- grass/trunk/lib/python/task.py 2013-01-08 08:00:37 UTC (rev 54567)
+++ grass/trunk/lib/python/task.py 2013-01-08 08:35:23 UTC (rev 54568)
@@ -89,6 +89,13 @@
def get_name(self):
"""!Get task name
"""
+ if sys.platform == 'win32':
+ name, ext = os.path.splitext(self.name)
+ if ext in ('.py', '.sh'):
+ return name
+ else:
+ return self.name
+
return self.name
def get_description(self, full = True):
@@ -205,7 +212,7 @@
'@<required@>' is shown
@param ignoreDefault True to ignore parameters with default values
"""
- cmd = [self.name]
+ cmd = [self.get_name()]
suppress_required = False
for flag in self.flags:
More information about the grass-commit
mailing list