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; diff --git a/gtk2_ardour/utils.h b/gtk2_ardour/utils.h index a99246632e..7f0b285945 100644 --- a/gtk2_ardour/utils.h +++ b/gtk2_ardour/utils.h @@ -80,7 +80,7 @@ bool emulate_key_event (Gtk::Widget*, unsigned int); Glib::RefPtr get_xpm (std::string); std::vector get_icon_sets (); -std::string get_icon_path (const char*, std::string icon_set = std::string()); +std::string get_icon_path (const char*, std::string icon_set = std::string(), bool is_image = true); Glib::RefPtr get_icon (const char*, std::string icon_set = std::string()); static std::map > xpm_map; const char* const *get_xpm_data (std::string path);