diff options
-rw-r--r-- | src/libs/gui/App.cpp | 3 | ||||
-rw-r--r-- | src/libs/gui/GladeFactory.cpp | 8 | ||||
-rwxr-xr-x | src/set_dev_environment.sh | 2 |
3 files changed, 9 insertions, 4 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(); diff --git a/src/set_dev_environment.sh b/src/set_dev_environment.sh index b451daed..c06ed450 100755 --- a/src/set_dev_environment.sh +++ b/src/set_dev_environment.sh @@ -5,4 +5,4 @@ # executables can be run directly, or in gdb/valgrind/etc. export INGEN_MODULE_PATH="`pwd`/libs/engine/.libs:`pwd`/libs/serialisation/.libs:`pwd`/libs/gui/.libs:`pwd`/libs/client/.libs" - +export INGEN_GLADE_PATH="`pwd`/libs/gui/ingen_gui.glade" |