diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2007-06-27 12:12:48 +0000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2007-06-27 12:12:48 +0000 |
commit | 606229cc79b2556654034b83ac999f5a3d8f68ce (patch) | |
tree | 4711d749b0f002e2f54d42c9a329063775f333b2 /gtk2_ardour | |
parent | a075a1c3cbb0b7fe5546ee1f92a6bde42b049a6d (diff) |
Use PBD::find_file_in_search_path and ardour/filesystem_paths.h to find icons
git-svn-id: svn://localhost/ardour2/trunk@2064 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/utils.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc index db93360984..e47be6a54b 100644 --- a/gtk2_ardour/utils.cc +++ b/gtk2_ardour/utils.cc @@ -516,14 +516,18 @@ get_icon (const char* cname) string name = cname; name += X_(".png"); - string path = ARDOUR::find_data_file (name, "icons"); + SearchPath spath(ARDOUR::ardour_search_path()); + spath += ARDOUR::system_data_search_path(); - if (path.empty()) { + spath.add_subdirectory_to_paths("icons"); + + sys::path data_file_path; + + if(!find_file_in_search_path (spath, name, data_file_path)) { fatal << string_compose (_("cannot find icon image for %1"), name) << endmsg; - /*NOTREACHED*/ } - return Gdk::Pixbuf::create_from_file (path); + return Gdk::Pixbuf::create_from_file (data_file_path.to_string()); } string |