]> git.lyx.org Git - lyx.git/blobdiff - src/support/filetools.cpp
add debug function which prints the callstack to stderr, disabled by default
[lyx.git] / src / support / filetools.cpp
index 65e49765e9ea05e70c89260eb9722edabe5f2661..d31926556dea3b826f83b5fd41a83af1418b5bea 100644 (file)
@@ -21,6 +21,8 @@
 
 #include <config.h>
 
+#include "LyXRC.h"
+
 #include "support/filetools.h"
 
 #include "support/debug.h"
@@ -307,6 +309,21 @@ FileName const i18nLibFileSearch(string const & dir, string const & name,
 }
 
 
+FileName const imageLibFileSearch(string & dir, string const & name,
+                 string const & ext)
+{
+       if (!lyx::lyxrc.icon_set.empty()) {
+               string const imagedir = addPath(dir, lyx::lyxrc.icon_set);
+               FileName const fn = libFileSearch(imagedir, name, ext);
+               if (fn.exists()) {
+                       dir = imagedir;
+                       return fn;
+               }
+       }
+       return libFileSearch(dir, name, ext);
+}
+
+
 string const libScriptSearch(string const & command_in, quote_style style)
 {
        static string const token_scriptpath = "$$s/";