- if (!find_file_in_search_path (spath, name, data_file_path)) {
- fatal << string_compose (_("cannot find icon image for %1 using %2"), name, spath.to_string()) << endmsg;
+ /* add "icons/icon_set" but .. not allowed to add both of these at once */
+ spath.add_subdirectory_to_paths ("icons");
+ spath.add_subdirectory_to_paths (icon_set);
+
+ find_file (spath, name, data_file_path);
+ } else {
+ spath.add_subdirectory_to_paths ("icons");
+ find_file (spath, name, data_file_path);
+ }
+
+ 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;
+ }
+
+ Searchpath def (ARDOUR::ardour_data_search_path());
+ def.add_subdirectory_to_paths ("icons");
+
+ if (!find_file (def, name, data_file_path)) {
+ fatal << string_compose (_("cannot find icon image for %1 using %2"), name, spath.to_string()) << endmsg;
+ abort(); /*NOTREACHED*/
+ }