diff options
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/gui/App.cpp | 3 | ||||
-rw-r--r-- | src/libs/gui/GladeFactory.cpp | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/libs/gui/App.cpp b/src/libs/gui/App.cpp index 628a4adf..befca9d3 100644 --- a/src/libs/gui/App.cpp +++ b/src/libs/gui/App.cpp @@ -109,7 +109,8 @@ App::run(int argc, char** argv, _instance->configuration()->load_settings(); _instance->configuration()->apply_settings(); - Gtk::Window::set_default_icon_from_file(PKGDATADIR "/ingen.svg"); + if (Glib::file_test(PKGDATADIR "/ingen.svg", Glib::FILE_TEST_EXISTS)) + Gtk::Window::set_default_icon_from_file(PKGDATADIR "/ingen.svg"); App::instance().connect_window()->start(engine, interface); diff --git a/src/libs/gui/GladeFactory.cpp b/src/libs/gui/GladeFactory.cpp index b3d24eb2..8b1f1e1f 100644 --- a/src/libs/gui/GladeFactory.cpp +++ b/src/libs/gui/GladeFactory.cpp @@ -31,8 +31,12 @@ Glib::ustring GladeFactory::glade_filename = ""; void GladeFactory::find_glade_file() { - // Check for the .glade file in current directory - glade_filename = "./ingen_gui.glade"; + char* env_path = getenv("INGEN_GLADE_PATH"); + if (env_path) + glade_filename = env_path; + else + glade_filename = "./ingen_gui.glade"; + ifstream fs(glade_filename.c_str()); if (fs.fail()) { // didn't find it, check PKGDATADIR fs.clear(); |