From 657d2b6bfeafef0a8c3c9da5f7b7b61eea555ad0 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 15 Feb 2015 10:16:26 +0000 Subject: Fix about dialog logo on OSX. git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@5573 a436a847-0d15-0410-975c-d299462d15a1 --- src/Patchage.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/Patchage.cpp b/src/Patchage.cpp index 5ce8f5f..b8e65ad 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -24,6 +24,8 @@ #include #include +#include + #include #include #include @@ -177,12 +179,6 @@ Patchage::Patchage(int argc, char** argv) _about_win->property_program_name() = "Patchage"; _about_win->property_logo_icon_name() = "patchage"; gtk_window_set_default_icon_name("patchage"); -#ifdef __APPLE__ - // This doesn't seem to work after bundleification for some reason... - _about_win->set_logo( - Gdk::Pixbuf::create_from_file( - bundle_location() + "/Resources/Patchage.icns")); -#endif _main_scrolledwin->add(_canvas->widget()); @@ -297,6 +293,15 @@ Patchage::Patchage(int argc, char** argv) _legend->show_all(); _about_win->set_transient_for(*_main_win); +#ifdef __APPLE__ + try { + _about_win->set_logo( + Gdk::Pixbuf::create_from_file( + bundle_location() + "/Resources/Patchage.icns")); + } catch (const Glib::Exception& e) { + error_msg((boost::format("failed to set logo (%s)") % e.what()).str()); + } +#endif #if defined(PATCHAGE_LIBJACK) || defined(HAVE_JACK_DBUS) _jack_driver = new JackDriver(this); -- cgit v1.2.1