diff --git a/src/gtk/main.cpp b/src/gtk/main.cpp index 05f28394..57213b56 100644 --- a/src/gtk/main.cpp +++ b/src/gtk/main.cpp @@ -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 poXml; try { - poXml = Xml::create(PKGDATADIR "/vba.glade", "MainWindow"); + poXml = Xml::create(sGladeFile, "MainWindow"); } catch (const Xml::Error & e) {