From bf84f3e11e615a9c3c944bd8db021b626581dcaa Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Wed, 27 Jun 2007 12:12:52 +0000 Subject: [PATCH] Use PBD::find_file_in_search_path and ardour/filesystem_paths.h to find splash image in About dialog git-svn-id: svn://localhost/ardour2/trunk@2067 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/about.cc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/gtk2_ardour/about.cc b/gtk2_ardour/about.cc index ccd4de1c0c..06845cccd2 100644 --- a/gtk2_ardour/about.cc +++ b/gtk2_ardour/about.cc @@ -25,8 +25,11 @@ #include #include +#include + #include #include +#include #include "utils.h" #include "version.h" @@ -179,11 +182,16 @@ About::About () string path; string t; - path = find_data_file ("splash.png"); + sys::path splash_file; - Glib::RefPtr pixbuf = Gdk::Pixbuf::create_from_file (path); + SearchPath spath(ardour_search_path() + system_data_search_path()); + + if (find_file_in_search_path (spath, "splash.png", splash_file)) { + set_logo (Gdk::Pixbuf::create_from_file (splash_file.to_string())); + } else { + error << "Could not find splash file" << endmsg; + } - set_logo (Gdk::Pixbuf::create_from_file (path)); set_authors (authors); for (int n = 0; translators[n]; ++n) {