13
0

Remove more or less useless Mouse Audition Button

Audition action is very much preferred and also works with
multiple selection.
This commit is contained in:
Robin Gareus 2023-10-05 21:49:55 +02:00
parent e9bde1c638
commit 96c45b65ee
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
10 changed files with 4 additions and 89 deletions

View File

@ -66,7 +66,6 @@ MOUSEMODE(MouseRange)
MOUSEMODE(MouseCut)
MOUSEMODE(MouseTimeFX)
MOUSEMODE(MouseGrid)
MOUSEMODE(MouseAudition)
MOUSEMODE(MouseDraw)
MOUSEMODE(MouseContent)

View File

@ -3314,9 +3314,6 @@ Editor::setup_toolbar ()
mouse_mode_size_group->add_widget (mouse_select_button);
mouse_mode_size_group->add_widget (mouse_timefx_button);
mouse_mode_size_group->add_widget (mouse_grid_button);
if (!Profile->get_mixbus()) {
mouse_mode_size_group->add_widget (mouse_audition_button);
}
mouse_mode_size_group->add_widget (mouse_draw_button);
mouse_mode_size_group->add_widget (mouse_content_button);
@ -3356,10 +3353,6 @@ Editor::setup_toolbar ()
mouse_mode_hbox->pack_start (mouse_cut_button, false, false);
if (!ARDOUR::Profile->get_mixbus()) {
mouse_mode_hbox->pack_start (mouse_audition_button, false, false);
}
mouse_mode_hbox->pack_start (mouse_timefx_button, false, false);
mouse_mode_hbox->pack_start (mouse_grid_button, false, false);
mouse_mode_hbox->pack_start (mouse_draw_button, false, false);
@ -3696,7 +3689,6 @@ Editor::setup_tooltips ()
set_tooltip (mouse_grid_button, _("Grid Mode (edit tempo-map, drag/drop music-time grid)"));
set_tooltip (mouse_draw_button, _("Draw Mode (draw and edit gain/notes/automation)"));
set_tooltip (mouse_timefx_button, _("Stretch Mode (time-stretch audio and midi regions, preserving pitch)"));
set_tooltip (mouse_audition_button, _("Audition Mode (listen to regions)"));
set_tooltip (mouse_content_button, _("Internal Edit Mode (edit notes and automation points)"));
set_tooltip (*_group_tabs, _("Groups: click to (de)activate\nContext-click for other operations"));
set_tooltip (nudge_forward_button, _("Nudge Region/Selection Later"));

View File

@ -1975,7 +1975,6 @@ private:
ArdourWidgets::ArdourButton mouse_timefx_button;
ArdourWidgets::ArdourButton mouse_grid_button;
ArdourWidgets::ArdourButton mouse_content_button;
ArdourWidgets::ArdourButton mouse_audition_button;
ArdourWidgets::ArdourButton mouse_cut_button;
ArdourWidgets::ArdourButton smart_mode_button;

View File

@ -599,11 +599,6 @@ Editor::register_actions ()
mouse_draw_button.set_icon (ArdourWidgets::ArdourIcon::ToolDraw);
mouse_draw_button.set_name ("mouse mode button");
act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-audition", _("Audition Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseAudition));
mouse_audition_button.set_related_action (act);
mouse_audition_button.set_icon (ArdourWidgets::ArdourIcon::ToolAudition);
mouse_audition_button.set_name ("mouse mode button");
act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-timefx", _("Time FX Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseTimeFX));
mouse_timefx_button.set_related_action (act);
mouse_timefx_button.set_icon (ArdourWidgets::ArdourIcon::ToolStretch);

View File

@ -1281,10 +1281,6 @@ Editor::which_mode_cursor () const
case MouseTimeFX:
mode_cursor = _cursors->time_fx; // just use playhead
break;
case MouseAudition:
mode_cursor = _cursors->speaker;
break;
}
/* up-down cursor as a cue that automation can be dragged up and down when in join object/range mode */

View File

@ -274,8 +274,6 @@ Editor::get_mouse_mode_action(MouseMode m) const
return ActionManager::get_action (X_("MouseMode"), X_("set-mouse-mode-grid"));
case MouseContent:
return ActionManager::get_action (X_("MouseMode"), X_("set-mouse-mode-content"));
case MouseAudition:
return ActionManager::get_action (X_("MouseMode"), X_("set-mouse-mode-audition"));
}
return Glib::RefPtr<Action>();
}
@ -291,12 +289,6 @@ Editor::set_mouse_mode (MouseMode m, bool force)
return;
}
if (ARDOUR::Profile->get_mixbus()) {
if (m == MouseAudition) {
m = MouseRange;
}
}
Glib::RefPtr<Action> act = get_mouse_mode_action(m);
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
@ -310,12 +302,6 @@ Editor::set_mouse_mode (MouseMode m, bool force)
void
Editor::mouse_mode_toggled (MouseMode m)
{
if (ARDOUR::Profile->get_mixbus()) {
if (m == MouseAudition) {
m = MouseRange;
}
}
Glib::RefPtr<Action> act = get_mouse_mode_action(m);
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
@ -327,13 +313,6 @@ Editor::mouse_mode_toggled (MouseMode m)
return;
}
if (_session && mouse_mode == MouseAudition) {
/* stop transport and reset default speed to avoid oddness with
auditioning */
_session->request_stop ();
_session->reset_transport_speed ();
}
const bool was_internal = internal_editing();
mouse_mode = m;
@ -487,14 +466,6 @@ Editor::update_time_selection_display ()
selection->clear_tracks ();
break;
case MouseAudition:
/*Don't lose lines or points if no action in this mode */
selection->clear_regions ();
selection->clear_playlists ();
selection->clear_time ();
selection->clear_tracks ();
break;
case MouseGrid:
default:
/*Clear everything */
@ -562,7 +533,6 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
}
if (((mouse_mode != MouseObject) &&
(mouse_mode != MouseAudition || item_type != RegionItem) &&
(mouse_mode != MouseTimeFX || item_type != RegionItem) &&
(mouse_mode != MouseDraw) &&
(mouse_mode != MouseContent || item_type == RegionItem)) ||
@ -1416,15 +1386,6 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
}
break;
case MouseAudition:
_drags->set (new ScrubDrag (this, item), event, _cursors->transparent);
scrub_reversals = 0;
scrub_reverse_distance = 0;
last_scrub_x = event->button.x;
scrubbing_direction = 0;
return true;
break;
default:
break;
}
@ -1963,22 +1924,6 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
abort(); /*NOTREACHED*/
break;
case MouseAudition:
if (scrubbing_direction == 0) {
/* no drag, just a click */
switch (item_type) {
case RegionItem:
play_selected_region ();
break;
default:
break;
}
} else if (_session) {
/* make sure we stop */
_session->request_stop ();
}
break;
default:
break;

View File

@ -1735,13 +1735,10 @@ Editor::region_selection_changed ()
//... otherwise the user is confusingly left with selected regions that can't be manipulated.
if (!selection->regions.empty() && !internal_editing()) {
/* if in MouseAudition and there's just 1 region selected
/* if in TimeFX mode and there's just 1 region selected
* (i.e. we just clicked on it), leave things as they are
*
* Ditto for TimeFX mode
*/
if (selection->regions.size() > 1 || (mouse_mode != Editing::MouseAudition && mouse_mode != Editing::MouseTimeFX)) {
if (selection->regions.size() > 1 || mouse_mode != Editing::MouseTimeFX) {
set_mouse_mode (MouseObject, false);
}
}

View File

@ -132,6 +132,8 @@ setup_gtk_ardour_enums ()
/* GridTypePlayhead was not intended to get into the wild */
enum_writer.add_to_hack_table ("GridTypePlayhead", "GridTypeNone");
enum_writer.add_to_hack_table ("Editing", "MouseAudition");
REGISTER_ENUM (SnapOff);
REGISTER_ENUM (SnapNormal);
REGISTER_ENUM (SnapMagnetic);
@ -195,7 +197,6 @@ setup_gtk_ardour_enums ()
REGISTER_ENUM(MouseDraw);
REGISTER_ENUM(MouseTimeFX);
REGISTER_ENUM(MouseGrid);
REGISTER_ENUM(MouseAudition);
REGISTER_ENUM(MouseCut);
REGISTER_ENUM(MouseContent);
REGISTER (mouse_mode);

View File

@ -49,7 +49,6 @@ MouseCursors::MouseCursors ()
, zoom_out (0)
, time_fx (0)
, fader (0)
, speaker (0)
, midi_pencil (0)
, midi_select (0)
, midi_resize (0)
@ -98,7 +97,6 @@ MouseCursors::drop_all ()
delete zoom_out; zoom_out = 0;
delete time_fx; time_fx = 0;
delete fader; fader = 0;
delete speaker; speaker = 0;
delete midi_pencil; midi_pencil = 0;
delete midi_select; midi_select = 0;
delete midi_resize; midi_resize = 0;
@ -193,12 +191,6 @@ MouseCursors::set_cursor_set (const std::string& name)
fader = new Cursor (source, mask, ffg, fbg, fader_cursor_x_hot, fader_cursor_y_hot);
}
{
RefPtr<Bitmap> source = Bitmap::create ((char const *) speaker_cursor_bits, speaker_cursor_width, speaker_cursor_height);
RefPtr<Bitmap> mask = Bitmap::create ((char const *) speaker_cursor_mask_bits, speaker_cursor_width, speaker_cursor_height);
speaker = new Cursor (source, mask, ffg, fbg, speaker_cursor_width >> 1, speaker_cursor_height >> 1);
}
{
char pix[4] = { 0, 0, 0, 0 };
RefPtr<Bitmap> bits = Bitmap::create (pix, 2, 2);

View File

@ -53,7 +53,6 @@ public:
Gdk::Cursor* zoom_out;
Gdk::Cursor* time_fx;
Gdk::Cursor* fader;
Gdk::Cursor* speaker;
Gdk::Cursor* midi_pencil;
Gdk::Cursor* midi_select;
Gdk::Cursor* midi_resize;