Merge branch 'master' into windows
[ardour.git] / gtk2_ardour / missing_file_dialog.cc
index c7cb7f5edccf8a08902bde16c6b0a7f9d54de28c..37868d55728569b4bdf159633e9fb7527f031e9f 100644 (file)
@@ -19,6 +19,7 @@
 #include "pbd/compose.h"
 #include "pbd/replace_all.h"
 #include "pbd/strsplit.h"
+#include "pbd/search_path.h"
 
 #include "ardour/session.h"
 
@@ -56,14 +57,18 @@ MissingFileDialog::MissingFileDialog (Session* s, const std::string& path, DataT
                 break;
         }
 
-        string dirstr;
+       vector<string> source_dirs = s->source_search_path (type);
+       vector<string>::iterator i = source_dirs.begin();
+       ostringstream oss;
+       oss << *i << endl;
 
-        dirstr = s->source_search_path (type);
-        replace_all (dirstr, ":", "\n");
+       while (++i != source_dirs.end()) {
+               oss << *i << endl;
+       }
 
         msg.set_justify (JUSTIFY_CENTER);
         msg.set_markup (string_compose (_("%1 cannot find the %2 file\n\n<i>%3</i>\n\nin any of these folders:\n\n\
-<tt>%4</tt>\n\n"), PROGRAM_NAME, typestr, Glib::Markup::escape_text(path), Glib::Markup::escape_text (dirstr)));
+<tt>%4</tt>\n\n"), PROGRAM_NAME, typestr, Glib::Markup::escape_text(path), Glib::Markup::escape_text (oss.str())));
 
         HBox* hbox = manage (new HBox);
         hbox->pack_start (msg, false, true);