diff options
author | Carl Hetherington <carl@carlh.net> | 2010-12-14 02:45:41 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-12-14 02:45:41 +0000 |
commit | eb5870781a5173b1cbfc2dd4e975be29e5d00a99 (patch) | |
tree | f0d68992e35c6ff7c93c12f176b6695d85d1233d /gtk2_ardour/ardour_ui.cc | |
parent | 1238f09478e8def7f4e2bc8df9951ed78ca3ccd1 (diff) |
Add dialogue to ask user about ambiguous source files. Fixes #3603.
git-svn-id: svn://localhost/ardour2/branches/3.0@8265 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_ui.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 6ca987c8ab..f07153ae36 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -107,6 +107,7 @@ typedef uint64_t microseconds_t; #include "location_ui.h" #include "missing_file_dialog.h" #include "missing_plugin_dialog.h" +#include "ambiguous_file_dialog.h" #include "i18n.h" @@ -274,6 +275,10 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[]) ARDOUR::Session::MissingFile.connect_same_thread (forever_connections, boost::bind (&ARDOUR_UI::missing_file, this, _1, _2, _3)); + /* and ambiguous files */ + + ARDOUR::FileSource::AmbiguousFileName.connect_same_thread (forever_connections, boost::bind (&ARDOUR_UI::ambiguous_file, this, _1, _2, _3)); + /* lets get this party started */ try { @@ -3733,3 +3738,15 @@ ARDOUR_UI::missing_file (Session*s, std::string str, DataType type) return result; } + +int +ARDOUR_UI::ambiguous_file (std::string file, std::string path, std::vector<std::string> hits) +{ + AmbiguousFileDialog dialog (file, hits); + + dialog.show (); + dialog.present (); + + dialog.run (); + return dialog.get_which (); +} |