mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
make Escape (cancel drag or selection) work in mixer as well as editor
This commit is contained in:
parent
791d0196d6
commit
4cd6d52013
8 changed files with 35 additions and 4 deletions
|
|
@ -269,7 +269,9 @@ This mode provides many different operations on both regions and control points,
|
||||||
@edit|Editor/editor-delete|Delete|delete
|
@edit|Editor/editor-delete|Delete|delete
|
||||||
@edit|Editor/alternate-editor-delete|BackSpace|backspace (delete)
|
@edit|Editor/alternate-editor-delete|BackSpace|backspace (delete)
|
||||||
|
|
||||||
@select|Editor/escape|Escape|break drag or deselect all
|
;; this one is super-global, so we put it in the session group but don't show
|
||||||
|
;; it on cheat sheets etc.
|
||||||
|
@-sess|Main/Escape|Escape|break drag or deselect all
|
||||||
|
|
||||||
;; keypad
|
;; keypad
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -202,6 +202,12 @@ public:
|
||||||
|
|
||||||
static ARDOUR_UI *instance () { return theArdourUI; }
|
static ARDOUR_UI *instance () { return theArdourUI; }
|
||||||
|
|
||||||
|
/* signal emitted when escape key is pressed. All UI components that
|
||||||
|
need to respond to Escape in some way (e.g. break drag, clear
|
||||||
|
selection, etc) should connect to and handle this.
|
||||||
|
*/
|
||||||
|
PBD::Signal0<void> Escape;
|
||||||
|
|
||||||
PublicEditor& the_editor() { return *editor;}
|
PublicEditor& the_editor() { return *editor;}
|
||||||
Mixer_UI* the_mixer() { return mixer; }
|
Mixer_UI* the_mixer() { return mixer; }
|
||||||
|
|
||||||
|
|
@ -877,6 +883,8 @@ private:
|
||||||
|
|
||||||
void step_up_through_tabs ();
|
void step_up_through_tabs ();
|
||||||
void step_down_through_tabs ();
|
void step_down_through_tabs ();
|
||||||
|
|
||||||
|
void escape ();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __ardour_gui_h__ */
|
#endif /* __ardour_gui_h__ */
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,12 @@ ARDOUR_UI::create_luawindow ()
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ARDOUR_UI::escape ()
|
||||||
|
{
|
||||||
|
Escape (); /* EMIT SIGNAL */
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::install_actions ()
|
ARDOUR_UI::install_actions ()
|
||||||
{
|
{
|
||||||
|
|
@ -115,6 +121,8 @@ ARDOUR_UI::install_actions ()
|
||||||
Glib::RefPtr<ActionGroup> main_menu_actions = global_actions.create_action_group (X_("Main_menu"));
|
Glib::RefPtr<ActionGroup> main_menu_actions = global_actions.create_action_group (X_("Main_menu"));
|
||||||
Glib::RefPtr<Action> act;
|
Glib::RefPtr<Action> act;
|
||||||
|
|
||||||
|
global_actions.register_action (main_actions, X_("Escape"), _("Escape"), sigc::mem_fun (*this, &ARDOUR_UI::escape));
|
||||||
|
|
||||||
/* menus + submenus that need action items */
|
/* menus + submenus that need action items */
|
||||||
|
|
||||||
global_actions.register_action (main_menu_actions, X_("Session"), _("Session"));
|
global_actions.register_action (main_menu_actions, X_("Session"), _("Session"));
|
||||||
|
|
|
||||||
|
|
@ -804,6 +804,10 @@ Editor::Editor ()
|
||||||
|
|
||||||
BasicUI::AccessAction.connect (*this, invalidator (*this), boost::bind (&Editor::access_action, this, _1, _2), gui_context());
|
BasicUI::AccessAction.connect (*this, invalidator (*this), boost::bind (&Editor::access_action, this, _1, _2), gui_context());
|
||||||
|
|
||||||
|
/* handle escape */
|
||||||
|
|
||||||
|
ARDOUR_UI::instance()->Escape.connect (*this, invalidator (*this), boost::bind (&Editor::escape, this), gui_context());
|
||||||
|
|
||||||
/* problematic: has to return a value and thus cannot be x-thread */
|
/* problematic: has to return a value and thus cannot be x-thread */
|
||||||
|
|
||||||
Session::AskAboutPlaylistDeletion.connect_same_thread (*this, boost::bind (&Editor::playlist_deletion_dialog, this, _1));
|
Session::AskAboutPlaylistDeletion.connect_same_thread (*this, boost::bind (&Editor::playlist_deletion_dialog, this, _1));
|
||||||
|
|
|
||||||
|
|
@ -153,8 +153,6 @@ Editor::register_actions ()
|
||||||
|
|
||||||
/* add named actions for the editor */
|
/* add named actions for the editor */
|
||||||
|
|
||||||
myactions.register_action (editor_actions, "escape", _("Break drag or deselect all"), sigc::mem_fun (*this, &Editor::escape));
|
|
||||||
|
|
||||||
/* We don't bother registering "unlock" because it would be insensitive
|
/* We don't bother registering "unlock" because it would be insensitive
|
||||||
when required. Editor::unlock() must be invoked directly.
|
when required. Editor::unlock() must be invoked directly.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,5 @@
|
||||||
<Binding key="Return" action="Mixer/toggle-processors"/>
|
<Binding key="Return" action="Mixer/toggle-processors"/>
|
||||||
<Binding key="Primary-a" action="Mixer/select-all-processors"/>
|
<Binding key="Primary-a" action="Mixer/select-all-processors"/>
|
||||||
<Binding key="slash" action="Mixer/ab-plugins"/>
|
<Binding key="slash" action="Mixer/ab-plugins"/>
|
||||||
<Binding key="Escape" action="Mixer/select-none"/>
|
|
||||||
</Press>
|
</Press>
|
||||||
</Bindings>
|
</Bindings>
|
||||||
|
|
|
||||||
|
|
@ -308,6 +308,10 @@ Mixer_UI::Mixer_UI ()
|
||||||
|
|
||||||
MixerStrip::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::remove_strip, this, _1), gui_context());
|
MixerStrip::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::remove_strip, this, _1), gui_context());
|
||||||
|
|
||||||
|
/* handle escape */
|
||||||
|
|
||||||
|
ARDOUR_UI::instance()->Escape.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::escape, this), gui_context());
|
||||||
|
|
||||||
#ifndef DEFER_PLUGIN_SELECTOR_LOAD
|
#ifndef DEFER_PLUGIN_SELECTOR_LOAD
|
||||||
_plugin_selector = new PluginSelector (PluginManager::instance ());
|
_plugin_selector = new PluginSelector (PluginManager::instance ());
|
||||||
#else
|
#else
|
||||||
|
|
@ -327,6 +331,12 @@ Mixer_UI::~Mixer_UI ()
|
||||||
delete _plugin_selector;
|
delete _plugin_selector;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Mixer_UI::escape ()
|
||||||
|
{
|
||||||
|
select_none ();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Mixer_UI::track_editor_selection ()
|
Mixer_UI::track_editor_selection ()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -374,6 +374,8 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p
|
||||||
bool _show_mixer_list;
|
bool _show_mixer_list;
|
||||||
|
|
||||||
mutable boost::weak_ptr<ARDOUR::VCA> spilled_vca;
|
mutable boost::weak_ptr<ARDOUR::VCA> spilled_vca;
|
||||||
|
|
||||||
|
void escape ();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __ardour_mixer_ui_h__ */
|
#endif /* __ardour_mixer_ui_h__ */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue