summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-07-15 00:10:26 +0000
committerDavid Robillard <d@drobilla.net>2007-07-15 00:10:26 +0000
commit7d6ce966a79e88e0ed14b9495b7e2e5a94f9007b (patch)
treecb5e4892d03bc1aca649b65f449989b5967ee8e4 /src
parent79ed913acd35d995a5481814cea1615d8cbe8103 (diff)
downloadingen-7d6ce966a79e88e0ed14b9495b7e2e5a94f9007b.tar.gz
ingen-7d6ce966a79e88e0ed14b9495b7e2e5a94f9007b.tar.bz2
ingen-7d6ce966a79e88e0ed14b9495b7e2e5a94f9007b.zip
Gracefully handle inability to load window icon (SVG).
git-svn-id: http://svn.drobilla.net/lad/ingen@588 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/libs/gui/App.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libs/gui/App.cpp b/src/libs/gui/App.cpp
index befca9d3..5ea42d92 100644
--- a/src/libs/gui/App.cpp
+++ b/src/libs/gui/App.cpp
@@ -109,8 +109,13 @@ App::run(int argc, char** argv,
_instance->configuration()->load_settings();
_instance->configuration()->apply_settings();
- if (Glib::file_test(PKGDATADIR "/ingen.svg", Glib::FILE_TEST_EXISTS))
- Gtk::Window::set_default_icon_from_file(PKGDATADIR "/ingen.svg");
+ const Glib::ustring icon_path = PKGDATADIR "/ingen.svg";
+ try {
+ if (Glib::file_test(icon_path, Glib::FILE_TEST_EXISTS))
+ Gtk::Window::set_default_icon_from_file(icon_path);
+ } catch (Gdk::PixbufError err) {
+ cerr << "Unable to load window icon " << icon_path << ": " << err.what() << endl;
+ }
App::instance().connect_window()->start(engine, interface);