]> git.lyx.org Git - lyx.git/blobdiff - src/Thesaurus.cpp
GuiBox.cpp: fix this issue: horizontal box alignment is only possible without inner...
[lyx.git] / src / Thesaurus.cpp
index 3c7d6fd8047c18ae2400cf6d436bb170f321fc11..83eed55ea0133963468f4c9c1e4fc68688f2f35e 100644 (file)
@@ -42,10 +42,6 @@ typedef std::map<docstring, MyThes *> Thesauri;
 
 } // namespace anon
 
-#ifndef THESAURUS_LOCATION
-# define THESAURUS_LOCATION "thes"
-#endif
-
 struct Thesaurus::Private
 {
        ~Private()
@@ -77,6 +73,11 @@ struct Thesaurus::Private
 
        /// the thesauri
        Thesauri thes_;
+
+       /// the location below system/user directory
+       /// there the data+idx files lookup will happen
+       const string dataDirectory(void) { return "thes"; }
+
 };
 
 
@@ -125,11 +126,11 @@ pair<string,string> Thesaurus::Private::getThesaurus(docstring const & lang)
                result = getThesaurus(thes_path, lang);
        }
        if (result.first.empty() || result.second.empty()) {
-               string const sys_path = external_path(addName(lyx::support::package().system_support().absFileName(),THESAURUS_LOCATION)) ;
+               string const sys_path = external_path(addName(lyx::support::package().system_support().absFileName(),dataDirectory())) ;
                result = getThesaurus(sys_path, lang);
        }
        if (result.first.empty() || result.second.empty()) {
-               string const user_path = external_path(addName(lyx::support::package().user_support().absFileName(),THESAURUS_LOCATION)) ;
+               string const user_path = external_path(addName(lyx::support::package().user_support().absFileName(),dataDirectory())) ;
                result = getThesaurus(user_path, lang);
        }
        return result;