From be8d06f848914a6383e3c3053a2608dfe8aa7142 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 12 Oct 2013 11:58:22 -0400 Subject: [PATCH] post a dialog about a session being opened in read-only mode (if it happens) --- gtk2_ardour/ardour_ui.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 050bccd052..18cba7af9b 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -2851,6 +2851,22 @@ ARDOUR_UI::load_session (const std::string& path, const std::string& snap_name, } } + if (!new_session->writable()) { + MessageDialog msg (_("This session has been opened in read-only mode.\n\nYou will not be able to record or save."), + true, + Gtk::MESSAGE_INFO, + BUTTONS_OK); + + msg.set_keep_above (true); + msg.set_title (_("Read-only Session")); + msg.set_position (Gtk::WIN_POS_CENTER); + pop_back_splash (msg); + msg.present (); + (void) msg.run (); + msg.hide (); + } + + /* Now the session been created, add the transport controls */ new_session->add_controllable(roll_controllable); new_session->add_controllable(stop_controllable);