diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-07-15 08:05:37 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-07-15 08:05:37 -0400 |
commit | 43f7813b248686bfa89600f91dccd83017dfe669 (patch) | |
tree | ad873e9f5c5a3a8ce1a18232d57df3cf96399b1f /gtk2_ardour/missing_file_dialog.cc | |
parent | f08d9591e6e16d81d71b8b81ff3c99d7f58c1f01 (diff) |
Fix portability of Session::source_search_path
Diffstat (limited to 'gtk2_ardour/missing_file_dialog.cc')
-rw-r--r-- | gtk2_ardour/missing_file_dialog.cc | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gtk2_ardour/missing_file_dialog.cc b/gtk2_ardour/missing_file_dialog.cc index c7cb7f5edc..b1e2081a1d 100644 --- a/gtk2_ardour/missing_file_dialog.cc +++ b/gtk2_ardour/missing_file_dialog.cc @@ -19,12 +19,17 @@ #include "pbd/compose.h" #include "pbd/replace_all.h" #include "pbd/strsplit.h" +#include "pbd/search_path.h" #include "ardour/session.h" #include "missing_file_dialog.h" #include "i18n.h" +#ifdef SearchPath +#undef SearchPath +#endif + using namespace Gtk; using namespace std; using namespace ARDOUR; @@ -56,14 +61,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); |