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.
16 #include "lengthcommon.h"
18 #include "support/filetools.h"
19 #include "support/path_defines.h"
27 vector<string> const buildLengthUnitList()
29 vector<string> data(unit_name_gui, unit_name_gui + num_units);
35 string const findGladeFile(string const & name)
37 // First, search in the installation directories.
39 string filename = lyx::support::LibFileSearch("glade", name, "glade");
41 if (!filename.empty())
44 // Second, search in the src tree.
46 lyx::support::AddPath(lyx::support::top_srcdir(),
47 "src/frontends/gtk/glade");
49 filename = lyx::support::ChangeExtension(name, ".glade");
50 filename = lyx::support::AddName(dir, filename);
52 if (!lyx::support::IsFileReadable(filename)) {
53 lyxerr << "Unable to find glade file \"" << name
54 << "\". libglade is going to crash..." << std::endl;
60 } // namespace frontend