diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-06-16 16:59:20 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-06-16 16:59:20 +0000 |
commit | 2e644fe91fd30743527010dd799bf11db1af7313 (patch) | |
tree | 15dffcccc06df9786972d49a39b256f62be7e7bf /gtk2_ardour/route_ui.cc | |
parent | a668964d5c07c8edf6fc0036fd927eb74f4b1546 (diff) |
prevent removal of master/monitor busses without explicit (and hard to set) approval
git-svn-id: svn://localhost/ardour2/branches/3.0@7265 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/route_ui.cc')
-rw-r--r-- | gtk2_ardour/route_ui.cc | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index f87614b613..71d38360d5 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -1226,6 +1226,25 @@ RouteUI::set_color_from_route () void RouteUI::remove_this_route () { + if ((route()->is_master() || route()->is_monitor()) && + !Config->get_allow_special_bus_removal()) { + MessageDialog msg (_("That would be bad news ...."), + false, + Gtk::MESSAGE_INFO, + Gtk::BUTTONS_OK); + msg.set_secondary_text (string_compose (_( +"Removing the master or monitor bus is such a bad idea\n\ +that %1 is not going to allow it.\n\ +\n\ +If you really want to do this sort of thing\n\ +edit your ardour.rc file to set the\n\ +\"allow-special-bus-removal\" option to be \"yes\""), PROGRAM_NAME)); + + msg.present (); + msg.run (); + return; + } + vector<string> choices; string prompt; @@ -1255,7 +1274,7 @@ RouteUI::remove_this_route () gint RouteUI::idle_remove_this_route (RouteUI *rui) { - rui->_session->remove_route (rui->_route); + rui->_session->remove_route (rui->route()); return false; } |