diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-11-09 06:03:51 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-11-09 06:03:51 +0000 |
commit | 5c6ba165f684fbd45be33c83d41083567d4dd88f (patch) | |
tree | b3108d53b3a82fb1ea522038fe4500e0c38349bb /gtk2_ardour/ardour_ui.cc | |
parent | d29f14bf33bc807be7b95015e4f011f4ad741cc6 (diff) |
initial pass at a missing file dialog and "relocatable" source files. lots more to do here
git-svn-id: svn://localhost/ardour2/branches/3.0@7983 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_ui.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 3c0e5b91fa..a14018e014 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -102,6 +102,7 @@ typedef uint64_t microseconds_t; #include "window_proxy.h" #include "global_port_matrix.h" #include "location_ui.h" +#include "missing_file_dialog.h" #include "i18n.h" @@ -264,6 +265,10 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[]) ARDOUR::Session::Quit.connect (forever_connections, MISSING_INVALIDATOR, ui_bind (&ARDOUR_UI::finish, this), gui_context ()); + /* handle requests to deal with missing files */ + + ARDOUR::Session::MissingFile.connect_same_thread (forever_connections, boost::bind (&ARDOUR_UI::missing_file, this, _1, _2, _3)); + /* lets get this party started */ try { @@ -3689,3 +3694,26 @@ ARDOUR_UI::remove_window_proxy (WindowProxyBase* p) { _window_proxies.remove (p); } + +int +ARDOUR_UI::missing_file (Session*s, std::string str, DataType type) +{ + MissingFileDialog dialog (s, str, type); + + dialog.show (); + dialog.present (); + + int result = dialog.run (); + dialog.hide (); + + switch (result) { + case RESPONSE_OK: + break; + default: + return 1; // quit entire session load + } + + result = dialog.get_action (); + + return result; +} |