3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Angus Leeming
8 * Full author contact details are available in file CREDITS.
17 #include "support/filetools.h"
18 #include "support/path_defines.h"
25 string const findGladeFile(string const & name)
27 // First, search in the installation directories.
29 string filename = lyx::support::LibFileSearch("glade", name, "glade");
31 if (!filename.empty())
34 // Second, search in the src tree.
36 lyx::support::AddPath(lyx::support::top_srcdir(),
37 "src/frontends/gtk/glade");
39 filename = lyx::support::ChangeExtension(name, ".glade");
40 filename = lyx::support::AddName(dir, filename);
42 if (!lyx::support::IsFileReadable(filename)) {
43 lyxerr << "Unable to find glade file \"" << name
44 << "\". libglade is going to crash..." << std::endl;
50 } // namespace frontend