summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-07-03 23:00:45 +0000
committerDavid Robillard <d@drobilla.net>2007-07-03 23:00:45 +0000
commit7fbd6d61e2f6b498afd4880290f49dbbae27592f (patch)
tree2ff58185b70de07403281d1a301cada9c33d6bf5 /src/libs
parent0a4dfb16428463d10d12a821afaed866a701550d (diff)
downloadingen-7fbd6d61e2f6b498afd4880290f49dbbae27592f.tar.gz
ingen-7fbd6d61e2f6b498afd4880290f49dbbae27592f.tar.bz2
ingen-7fbd6d61e2f6b498afd4880290f49dbbae27592f.zip
Fix running from source tree when Ingen is not installed at all (with set_dev_environment.sh).
git-svn-id: http://svn.drobilla.net/lad/ingen@563 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/gui/App.cpp3
-rw-r--r--src/libs/gui/GladeFactory.cpp8
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();