Relative Snap -make it activated by the tertiary modifier during drag.
[ardour.git] / gtk2_ardour / route_ui.cc
index fc2472ed3738c6700d3d0e19df833edb4ca96438..9b6e8000721ef77192f2330b6b1437a9c76181df 100644 (file)
@@ -148,7 +148,8 @@ RouteUI::init ()
 
        rec_enable_button = manage (new ArdourButton);
        rec_enable_button->set_name ("record enable button");
-       rec_enable_button->set_elements ((ArdourButton::Element)(ArdourButton::Edge|ArdourButton::Body|ArdourButton::RecButton));
+       rec_enable_button->set_elements ((ArdourButton::Element)(ArdourButton::Edge|ArdourButton::Body|ArdourButton::VectorIcon));
+       rec_enable_button->set_icon (ArdourButton::RecButton);
        UI::instance()->set_tip (rec_enable_button, _("Enable recording on this track"), "");
 
        if (ARDOUR_UI::config()->get_blink_rec_arm()) {
@@ -1534,66 +1535,6 @@ RouteUI::set_color_from_route ()
        return 0;
 }
 
-void
-RouteUI::remove_this_route (bool apply_to_selection)
-{
-       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 (_(
-"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;
-
-               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\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));
-               }
-       }
-}
-
-gint
-RouteUI::idle_remove_this_route (RouteUI *rui)
-{
-       DisplaySuspender ds;
-       rui->_session->remove_route (rui->route());
-       return false;
-}
-
 /** @return true if this name should be used for the route, otherwise false */
 bool
 RouteUI::verify_new_route_name (const std::string& name)
@@ -2181,10 +2122,10 @@ RouteUI::track_mode_changed (void)
        switch (track()->mode()) {
                case ARDOUR::NonLayered:
                case ARDOUR::Normal:
-                       rec_enable_button->set_elements ((ArdourButton::Element)(ArdourButton::Edge|ArdourButton::Body|ArdourButton::RecButton));
+                       rec_enable_button->set_icon (ArdourButton::RecButton);
                        break;
                case ARDOUR::Destructive:
-                       rec_enable_button->set_elements ((ArdourButton::Element)(ArdourButton::Edge|ArdourButton::Body|ArdourButton::RecButton|ArdourButton::RecTapeMode));
+                       rec_enable_button->set_icon (ArdourButton::RecTapeMode);
                        break;
        }
        rec_enable_button->queue_draw();