summaryrefslogtreecommitdiff
path: root/gtk2_ardour/route_ui.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-03-07 13:05:45 +0000
committerCarl Hetherington <carl@carlh.net>2011-03-07 13:05:45 +0000
commiteabe5b31f88fc2723980cb812e836c02b296b80f (patch)
tree664a044f268ced2ec44768d56a89565ebcb8e3c2 /gtk2_ardour/route_ui.cc
parent8f45604f277f07cbde4c73a6fe3aeb802df19eab (diff)
Hide/Remove to apply to the track selection.
git-svn-id: svn://localhost/ardour2/branches/3.0@9090 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/route_ui.cc')
-rw-r--r--gtk2_ardour/route_ui.cc74
1 files changed, 39 insertions, 35 deletions
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc
index 3df8e74d49..9ad84290b5 100644
--- a/gtk2_ardour/route_ui.cc
+++ b/gtk2_ardour/route_ui.cc
@@ -1373,15 +1373,18 @@ RouteUI::set_color_from_route ()
}
void
-RouteUI::remove_this_route ()
+RouteUI::remove_this_route (bool apply_to_selection)
{
- if ((route()->is_master() || route()->is_monitor()) &&
- !Config->get_allow_special_bus_removal()) {
- MessageDialog msg (_("That would be bad news ...."),
- false,
- Gtk::MESSAGE_INFO,
+ if (apply_to_selection) {
+ ARDOUR_UI::instance()->the_editor().get_selection().tracks.foreach_route_ui (boost::bind (&RouteUI::remove_this_route, _1, false));
+ } else {
+ 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 (_(
+ 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\
@@ -1389,34 +1392,35 @@ 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;
-
- if (is_track()) {
- prompt = string_compose (_("Do you really want to remove track \"%1\" ?\n\nYou may also lose the playlist used by this track.\n\n(This action cannot be undone, and the session file will be overwritten)"), _route->name());
- } else {
- prompt = string_compose (_("Do you really want to remove bus \"%1\" ?\n\nYou may also lose the playlist used by this track.\n\n(This action cannot be undone, and the session file will be overwritten)"), _route->name());
- }
-
- choices.push_back (_("No, do nothing."));
- choices.push_back (_("Yes, remove it."));
-
- string title;
- if (is_track()) {
- title = _("Remove track");
- } else {
- title = _("Remove bus");
- }
-
- Choice prompter (title, prompt, choices);
-
- if (prompter.run () == 1) {
- Glib::signal_idle().connect (sigc::bind (sigc::ptr_fun (&RouteUI::idle_remove_this_route), this));
+ msg.present ();
+ msg.run ();
+ return;
+ }
+
+ vector<string> choices;
+ string prompt;
+
+ if (is_track()) {
+ prompt = string_compose (_("Do you really want to remove track \"%1\" ?\n\nYou may also lose the playlist used by this track.\n\n(This action cannot be undone, and the session file will be overwritten)"), _route->name());
+ } else {
+ prompt = string_compose (_("Do you really want to remove bus \"%1\" ?\n\nYou may also lose the playlist used by this track.\n\n(This action cannot be undone, and the session file will be overwritten)"), _route->name());
+ }
+
+ choices.push_back (_("No, do nothing."));
+ choices.push_back (_("Yes, remove it."));
+
+ string title;
+ if (is_track()) {
+ title = _("Remove track");
+ } else {
+ title = _("Remove bus");
+ }
+
+ Choice prompter (title, prompt, choices);
+
+ if (prompter.run () == 1) {
+ Glib::signal_idle().connect (sigc::bind (sigc::ptr_fun (&RouteUI::idle_remove_this_route), this));
+ }
}
}