Skip to content
Permalink
Browse files
[grass] fix guessing of doc folder for linux
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@115 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
julien.malik@gmail.com committed Apr 17, 2012
1 parent 3765365 commit 1c9ab96b25db178734c4885ce86f948b81cf2299
Showing with 14 additions and 4 deletions.
  1. +1 −1 src/sextante/grass/GrassAlgorithm.py
  2. +13 −3 src/sextante/grass/GrassUtils.py
@@ -39,7 +39,7 @@ def getIcon(self):
return QIcon(os.path.dirname(__file__) + "/../images/grass.png")

def helpFile(self):
folder = SextanteConfig.getSetting(GrassUtils.GRASS_HELP_FOLDER)
folder = GrassUtils.grassHelpPath()
if str(folder).strip() != "":
helpfile = str(folder) + os.sep + self.name + ".html"
return helpfile
@@ -38,6 +38,9 @@ def grassScriptFilename():

@staticmethod
def grassPath():
if not SextanteUtils.isWindows():
return ""

folder = SextanteConfig.getSetting(GrassUtils.GRASS_FOLDER)
if folder == None:
folder = plugin_installer.__file__
@@ -53,9 +56,16 @@ def grassPath():
@staticmethod
def grassHelpPath():
folder = SextanteConfig.getSetting(GrassUtils.GRASS_HELP_FOLDER)
if folder == None:
folder = os.path.join(GrassUtils.grassPath(), "docs", "html")

if folder is None:
if SextanteUtils.isWindows():
testfolders = os.path.join(GrassUtils.grassPath(), "docs", "html")
else:
testfolders = ['/usr/share/doc/grass-doc/html']
for f in testfolders:
if os.path.exists(f):
folder = f
break

return folder

@staticmethod

0 comments on commit 1c9ab96

Please sign in to comment.