Try loading the glade file from the source folder to allow running gvbam without installing it
This commit is contained in:
bgk 2008-08-29 19:02:29 +00:00
parent ccfed5c1c3
commit c71336cc3b
1 changed files with 9 additions and 1 deletions

View File

@ -91,10 +91,18 @@ int main(int argc, char * argv[])
Gtk::Window::set_default_icon_name("vbam");
// Use the glade file from the source folder if it exists
// to make gvbam runnable without installation
std::string sGladeFile = "src/gtk/vba.glade";
if (!Glib::file_test(sGladeFile, Glib::FILE_TEST_EXISTS))
{
sGladeFile = PKGDATADIR "/vba.glade";
}
Glib::RefPtr<Xml> poXml;
try
{
poXml = Xml::create(PKGDATADIR "/vba.glade", "MainWindow");
poXml = Xml::create(sGladeFile, "MainWindow");
}
catch (const Xml::Error & e)
{