mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
add MIDI panic action (which has to be on a menu, sigh ... stupid GTK)
git-svn-id: svn://localhost/ardour2/branches/3.0@5658 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
93bc6e5b58
commit
265cf739b5
5 changed files with 20 additions and 24 deletions
|
|
@ -136,6 +136,7 @@
|
|||
<menuitem action='ToggleAutoReturn'/>
|
||||
<menuitem action='ToggleClick'/>
|
||||
<menuitem action='toggle-follow-playhead'/>
|
||||
<menuitem action='panic'/>
|
||||
<separator/>
|
||||
</menu>
|
||||
|
||||
|
|
|
|||
|
|
@ -470,8 +470,6 @@ Editor::Editor ()
|
|||
edit_hscrollbar.set_name ("EditorHScrollbar");
|
||||
|
||||
build_cursors ();
|
||||
setup_toolbar ();
|
||||
setup_midi_toolbar ();
|
||||
|
||||
edit_point_clock.ValueChanged.connect (mem_fun(*this, &Editor::edit_point_clock_changed));
|
||||
|
||||
|
|
@ -605,6 +603,9 @@ Editor::Editor ()
|
|||
|
||||
register_actions ();
|
||||
|
||||
setup_toolbar ();
|
||||
setup_midi_toolbar ();
|
||||
|
||||
snap_type = SnapToBeat;
|
||||
set_snap_to (snap_type);
|
||||
snap_mode = SnapOff;
|
||||
|
|
@ -2995,8 +2996,10 @@ Editor::setup_toolbar ()
|
|||
}
|
||||
|
||||
void
|
||||
Editor::midi_panic_button_pressed ()
|
||||
Editor::midi_panic ()
|
||||
{
|
||||
cerr << "MIDI panic\n";
|
||||
|
||||
if (session) {
|
||||
session->midi_panic();
|
||||
}
|
||||
|
|
@ -3005,26 +3008,8 @@ Editor::midi_panic_button_pressed ()
|
|||
void
|
||||
Editor::setup_midi_toolbar ()
|
||||
{
|
||||
#if 0
|
||||
midi_tool_pencil_button.add (*(manage (new Image (::get_icon("midi_tool_pencil")))));
|
||||
midi_tool_pencil_button.set_relief(Gtk::RELIEF_NONE);
|
||||
midi_tool_buttons.push_back (&midi_tool_pencil_button);
|
||||
midi_tool_select_button.add (*(manage (new Image (::get_icon("midi_tool_select")))));
|
||||
midi_tool_select_button.set_relief(Gtk::RELIEF_NONE);
|
||||
midi_tool_buttons.push_back (&midi_tool_select_button);
|
||||
midi_tool_resize_button.add (*(manage (new Image (::get_icon("strip_width")))));
|
||||
midi_tool_resize_button.set_relief(Gtk::RELIEF_NONE);
|
||||
midi_tool_buttons.push_back (&midi_tool_resize_button);
|
||||
midi_tool_erase_button.add (*(manage (new Image (::get_icon("midi_tool_erase")))));
|
||||
midi_tool_erase_button.set_relief(Gtk::RELIEF_NONE);
|
||||
midi_tool_buttons.push_back (&midi_tool_erase_button);
|
||||
RefPtr<Action> act;
|
||||
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (midi_tool_pencil_button, _("Add/Move/Stretch Notes"));
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (midi_tool_select_button, _("Select/Move Notes"));
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (midi_tool_resize_button, _("Resize Notes"));
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (midi_tool_erase_button, _("Erase Notes"));
|
||||
#endif
|
||||
|
||||
/* Midi sound notes */
|
||||
midi_sound_notes.add (*(manage (new Image (::get_icon("midi_sound_notes")))));
|
||||
midi_sound_notes.set_relief(Gtk::RELIEF_NONE);
|
||||
|
|
@ -3033,8 +3018,9 @@ Editor::setup_midi_toolbar ()
|
|||
|
||||
/* Panic */
|
||||
|
||||
act = ActionManager::get_action (X_("MIDI"), X_("panic"));
|
||||
midi_panic_button.set_name("MidiPanicButton");
|
||||
midi_panic_button.signal_pressed().connect (mem_fun(this, &Editor::midi_panic_button_pressed));
|
||||
act->connect_proxy (midi_panic_button);
|
||||
|
||||
panic_box.pack_start (midi_sound_notes , true, true);
|
||||
panic_box.pack_start (midi_panic_button, true, true);
|
||||
|
|
|
|||
|
|
@ -1598,7 +1598,7 @@ public:
|
|||
Gtk::HBox panic_box;
|
||||
Gtk::Button midi_panic_button;
|
||||
Gtk::ToggleButton midi_sound_notes;
|
||||
void midi_panic_button_pressed ();
|
||||
void midi_panic ();
|
||||
bool sound_notes () const { return midi_sound_notes.get_active(); }
|
||||
|
||||
void setup_midi_toolbar ();
|
||||
|
|
|
|||
|
|
@ -866,12 +866,18 @@ Editor::register_actions ()
|
|||
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||
tact->set_active (true);
|
||||
|
||||
/* MIDI */
|
||||
|
||||
Glib::RefPtr<ActionGroup> midi_actions = ActionGroup::create (X_("MIDI"));
|
||||
ActionManager::register_action (midi_actions, X_("panic"), _("Panic"), mem_fun(*this, &Editor::midi_panic));
|
||||
|
||||
ActionManager::add_action_group (rl_actions);
|
||||
ActionManager::add_action_group (ruler_actions);
|
||||
ActionManager::add_action_group (zoom_actions);
|
||||
ActionManager::add_action_group (mouse_mode_actions);
|
||||
ActionManager::add_action_group (snap_actions);
|
||||
ActionManager::add_action_group (editor_actions);
|
||||
ActionManager::add_action_group (midi_actions);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -84,6 +84,8 @@ This mode provides many different operations on both regions and control points,
|
|||
%mopsolo Mouse Ops on Solo Buttons only
|
||||
%mopsfader Mouse Ops on Faders \& Plugin Controls
|
||||
|
||||
%midi MIDI specific commands
|
||||
|
||||
;; END GROUP DEFINITIONS
|
||||
|
||||
;; punctuation
|
||||
|
|
@ -154,6 +156,7 @@ This mode provides many different operations on both regions and control points,
|
|||
@rop|Editor/naturalize-region|<@LEVEL4@>o|move to original position
|
||||
@trans|Editor/set-playhead|p|toggle auto-punch status
|
||||
@select|Editor/select-all-before-playhead|<@PRIMARY@>p|all before playhead
|
||||
@midi|MIDI/panic|<@SECONDARY@>p|MIDI panic (stop all notes etc)
|
||||
@select|Editor/select-all-after-playhead|<@TERTIARY@><@PRIMARY@>p|all after playhead
|
||||
|
||||
;; MIDDLE ROW
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue