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"
22 string const findGladeFile(string const & name)
24 // First, search in the installation directories.
27 lyx::support::LibFileSearch("glade", name, "glade");
29 if (!filename.empty())
32 // Second, search in the src tree.
34 lyx::support::AddPath(lyx::support::top_srcdir(),
35 "src/frontends/gtk/glade");
37 filename = lyx::support::ChangeExtension(name, ".glade");
38 filename = lyx::support::AddName(dir, filename);
40 if (!lyx::support::IsFileReadable(filename)) {
41 lyxerr << "Unable to find glade file \"" << name
42 << "\". libglade is going to crash..." << std::endl;