summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-02-15 10:16:26 +0000
committerDavid Robillard <d@drobilla.net>2015-02-15 10:16:26 +0000
commit657d2b6bfeafef0a8c3c9da5f7b7b61eea555ad0 (patch)
tree812ddeacd3540425a7b88a6923e28448aabb2097
parentefe3ae86ac7ff4f4d264732e58f003c745d51e88 (diff)
downloadpatchage-657d2b6bfeafef0a8c3c9da5f7b7b61eea555ad0.tar.gz
patchage-657d2b6bfeafef0a8c3c9da5f7b7b61eea555ad0.tar.bz2
patchage-657d2b6bfeafef0a8c3c9da5f7b7b61eea555ad0.zip
Fix about dialog logo on OSX.
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@5573 a436a847-0d15-0410-975c-d299462d15a1
-rwxr-xr-xosx/bundleify.sh1
-rw-r--r--src/Patchage.cpp17
2 files changed, 12 insertions, 6 deletions
diff --git a/osx/bundleify.sh b/osx/bundleify.sh
index 102cf2a..a9a6cf1 100755
--- a/osx/bundleify.sh
+++ b/osx/bundleify.sh
@@ -24,6 +24,7 @@ cp $prefix/lib/gtk-2.0/2.10.0/engines/libquartz.so $bundle/Contents/lib/gtk-2.0
cp $prefix/lib/pango/1.8.0/modules/*basic*.so $bundle/Contents/lib/modules
# Copy GdkPixbuf loaders
+mkdir -p $bundle/Contents/lib/gdk-pixbuf-2.0/2.10.0/loaders/
for fmt in icns png; do
cp $prefix/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-$fmt.so \
$bundle/Contents/lib/gdk-pixbuf-2.0/2.10.0/loaders/;
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 <glib/gstdio.h>
#include <gtk/gtkwindow.h>
+#include <boost/format.hpp>
+
#include <gtkmm/button.h>
#include <gtkmm/filechooserdialog.h>
#include <gtkmm/messagedialog.h>
@@ -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);