diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-09-10 19:39:15 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-09-10 19:39:15 -0400 |
commit | 233d2e8530fbb9ee5046e1ebcd3dbdfead772c9e (patch) | |
tree | 202d5730fbbd36226215fc2078173746e25e106a /gtk2_ardour/utils.cc | |
parent | 9b1cd13706cae80c3e03c1682b22c9ac2061a351 (diff) |
add extra (default-ed) argument to ::get_icon_path() to allow it to be used to look for icon-related but non-image files
Diffstat (limited to 'gtk2_ardour/utils.cc')
-rw-r--r-- | gtk2_ardour/utils.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc index d5b95b8a3e..8011f6abfd 100644 --- a/gtk2_ardour/utils.cc +++ b/gtk2_ardour/utils.cc @@ -676,11 +676,14 @@ ARDOUR_UI_UTILS::get_icon_sets () } std::string -ARDOUR_UI_UTILS::get_icon_path (const char* cname, string icon_set) +ARDOUR_UI_UTILS::get_icon_path (const char* cname, string icon_set, bool is_image) { std::string data_file_path; string name = cname; - name += X_(".png"); + + if (is_image) { + name += X_(".png"); + } Searchpath spath(ARDOUR::ardour_data_search_path()); @@ -693,7 +696,7 @@ ARDOUR_UI_UTILS::get_icon_path (const char* cname, string icon_set) find_file (spath, name, data_file_path); } - if (data_file_path.empty()) { + if (is_image && data_file_path.empty()) { if (!icon_set.empty() && icon_set != _("default")) { warning << string_compose (_("icon \"%1\" not found for icon set \"%2\", fallback to default"), cname, icon_set) << endmsg; |