mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
more changes to Bindings, Keyboard APIs
This commit is contained in:
parent
67e19c177f
commit
949163f806
23 changed files with 615 additions and 467 deletions
|
|
@ -238,7 +238,6 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
|||
, secondary_clock (new MainClock (X_("secondary"), X_("secondary"), false))
|
||||
, big_clock (new AudioClock (X_("bigclock"), false, "big", true, true, false, false))
|
||||
, video_timeline(0)
|
||||
, global_bindings (0)
|
||||
, ignore_dual_punch (false)
|
||||
, editor (0)
|
||||
, mixer (0)
|
||||
|
|
@ -614,8 +613,6 @@ ARDOUR_UI::post_engine ()
|
|||
exit (0);
|
||||
}
|
||||
|
||||
Bindings::associate_all ();
|
||||
|
||||
/* this being a GUI and all, we want peakfiles */
|
||||
|
||||
AudioFileSource::set_build_peakfiles (true);
|
||||
|
|
@ -5179,8 +5176,6 @@ ARDOUR_UI::key_event_handler (GdkEventKey* ev, Gtk::Window* event_window)
|
|||
|
||||
if (w) {
|
||||
bindings = reinterpret_cast<Gtkmm2ext::Bindings*>(w->get_data ("ardour-bindings"));
|
||||
} else {
|
||||
bindings = global_bindings;
|
||||
}
|
||||
|
||||
DEBUG_TRACE (DEBUG::Accelerators, string_compose ("main window key event, bindings = %1, global = %2\n", bindings, &global_bindings));
|
||||
|
|
@ -5192,7 +5187,6 @@ ARDOUR_UI::key_event_handler (GdkEventKey* ev, Gtk::Window* event_window)
|
|||
/* see if window uses ardour binding system */
|
||||
|
||||
bindings = reinterpret_cast<Gtkmm2ext::Bindings*>(window->get_data ("ardour-bindings"));
|
||||
|
||||
}
|
||||
|
||||
/* An empty binding set is treated as if it doesn't exist */
|
||||
|
|
@ -5286,7 +5280,7 @@ ARDOUR_UI::key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey
|
|||
|
||||
if (bindings) {
|
||||
|
||||
DEBUG_TRACE (DEBUG::Accelerators, "\tusing Ardour bindings for this window\n");
|
||||
DEBUG_TRACE (DEBUG::Accelerators, string_compose ("\tusing Ardour bindings %1 for this event\n", bindings));
|
||||
|
||||
if (bindings->activate (k, Bindings::Press)) {
|
||||
DEBUG_TRACE (DEBUG::Accelerators, "\t\thandled\n");
|
||||
|
|
@ -5349,7 +5343,7 @@ ARDOUR_UI::key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey
|
|||
void
|
||||
ARDOUR_UI::load_bindings ()
|
||||
{
|
||||
if ((global_bindings = Bindings::get_bindings ("global")) == 0) {
|
||||
if ((global_bindings = Bindings::get_bindings ("global", global_actions)) == 0) {
|
||||
error << _("Global keybindings are missing") << endmsg;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -333,8 +333,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
bool tabbed_window_state_event_handler (GdkEventWindowState*, void* object);
|
||||
bool key_event_handler (GdkEventKey*, Gtk::Window* window);
|
||||
|
||||
Gtkmm2ext::Bindings* global_bindings;
|
||||
|
||||
protected:
|
||||
friend class PublicEditor;
|
||||
|
||||
|
|
@ -832,7 +830,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
bool idle_ask_about_quit ();
|
||||
|
||||
void load_bindings ();
|
||||
|
||||
|
||||
Gtkmm2ext::ActionMap global_actions;
|
||||
};
|
||||
|
||||
#endif /* __ardour_gui_h__ */
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@
|
|||
|
||||
#include "ardour/session.h"
|
||||
|
||||
#include "gtkmm2ext/bindings.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "ardour_ui.h"
|
||||
#include "public_editor.h"
|
||||
|
|
@ -62,6 +64,25 @@ ARDOUR_UI::we_have_dependents ()
|
|||
|
||||
ProcessorBox::register_actions ();
|
||||
|
||||
/* Global, editor, mixer, processor box actions are defined now. Link
|
||||
them with any bindings, so that GTK does not get a chance to define
|
||||
the GTK accel map entries first when we ask the GtkUIManager to
|
||||
create menus/widgets.
|
||||
|
||||
If GTK adds the actions to its accel map before we do, we lose our
|
||||
freedom to use any keys. More precisely, we can use any keys, but
|
||||
ones that GTK considers illegal as accelerators will not show up in
|
||||
menus.
|
||||
|
||||
There are other dynamic actions that can be created by a monitor
|
||||
section, by step entry dialogs. These need to be handled
|
||||
separately. They don't tend to use GTK-illegal bindings and more
|
||||
importantly they don't have menus showing the bindings, so it is
|
||||
less of an issue.
|
||||
*/
|
||||
|
||||
Gtkmm2ext::Bindings::associate_all ();
|
||||
|
||||
editor->setup_tooltips ();
|
||||
editor->UpdateAllTransportClocks.connect (sigc::mem_fun (*this, &ARDOUR_UI::update_transport_clocks));
|
||||
|
||||
|
|
|
|||
|
|
@ -95,44 +95,44 @@ ARDOUR_UI::create_editor ()
|
|||
void
|
||||
ARDOUR_UI::install_actions ()
|
||||
{
|
||||
Glib::RefPtr<ActionGroup> main_actions = Actions.create_action_group (X_("Main"));
|
||||
Glib::RefPtr<ActionGroup> main_menu_actions = Actions.create_action_group (X_("Main_menu"));
|
||||
Glib::RefPtr<ActionGroup> main_actions = global_actions.create_action_group (X_("Main"));
|
||||
Glib::RefPtr<ActionGroup> main_menu_actions = global_actions.create_action_group (X_("Main_menu"));
|
||||
Glib::RefPtr<Action> act;
|
||||
|
||||
/* menus + submenus that need action items */
|
||||
|
||||
Actions.register_action (main_menu_actions, X_("Session"), _("Session"));
|
||||
act = Actions.register_action (main_menu_actions, X_("Cleanup"), _("Clean-up"));
|
||||
global_actions.register_action (main_menu_actions, X_("Session"), _("Session"));
|
||||
act = global_actions.register_action (main_menu_actions, X_("Cleanup"), _("Clean-up"));
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
Actions.register_action (main_menu_actions, X_("Sync"), _("Sync"));
|
||||
Actions.register_action (main_menu_actions, X_("TransportOptions"), _("Options"));
|
||||
Actions.register_action (main_menu_actions, X_("WindowMenu"), _("Window"));
|
||||
Actions.register_action (main_menu_actions, X_("MixerMenu"), _("Mixer"));
|
||||
Actions.register_action (main_menu_actions, X_("EditorMenu"), _("Editor"));
|
||||
Actions.register_action (main_menu_actions, X_("PrefsMenu"), _("Preferences"));
|
||||
Actions.register_action (main_menu_actions, X_("DetachMenu"), _("Detach"));
|
||||
Actions.register_action (main_menu_actions, X_("Help"), _("Help"));
|
||||
Actions.register_action (main_menu_actions, X_("KeyMouseActions"), _("Misc. Shortcuts"));
|
||||
Actions.register_action (main_menu_actions, X_("AudioFileFormat"), _("Audio File Format"));
|
||||
Actions.register_action (main_menu_actions, X_("AudioFileFormatHeader"), _("File Type"));
|
||||
Actions.register_action (main_menu_actions, X_("AudioFileFormatData"), _("Sample Format"));
|
||||
Actions.register_action (main_menu_actions, X_("ControlSurfaces"), _("Control Surfaces"));
|
||||
Actions.register_action (main_menu_actions, X_("Plugins"), _("Plugins"));
|
||||
Actions.register_action (main_menu_actions, X_("Metering"), _("Metering"));
|
||||
Actions.register_action (main_menu_actions, X_("MeteringFallOffRate"), _("Fall Off Rate"));
|
||||
Actions.register_action (main_menu_actions, X_("MeteringHoldTime"), _("Hold Time"));
|
||||
Actions.register_action (main_menu_actions, X_("Denormals"), _("Denormal Handling"));
|
||||
global_actions.register_action (main_menu_actions, X_("Sync"), _("Sync"));
|
||||
global_actions.register_action (main_menu_actions, X_("TransportOptions"), _("Options"));
|
||||
global_actions.register_action (main_menu_actions, X_("WindowMenu"), _("Window"));
|
||||
global_actions.register_action (main_menu_actions, X_("MixerMenu"), _("Mixer"));
|
||||
global_actions.register_action (main_menu_actions, X_("EditorMenu"), _("Editor"));
|
||||
global_actions.register_action (main_menu_actions, X_("PrefsMenu"), _("Preferences"));
|
||||
global_actions.register_action (main_menu_actions, X_("DetachMenu"), _("Detach"));
|
||||
global_actions.register_action (main_menu_actions, X_("Help"), _("Help"));
|
||||
global_actions.register_action (main_menu_actions, X_("KeyMouseActions"), _("Misc. Shortcuts"));
|
||||
global_actions.register_action (main_menu_actions, X_("AudioFileFormat"), _("Audio File Format"));
|
||||
global_actions.register_action (main_menu_actions, X_("AudioFileFormatHeader"), _("File Type"));
|
||||
global_actions.register_action (main_menu_actions, X_("AudioFileFormatData"), _("Sample Format"));
|
||||
global_actions.register_action (main_menu_actions, X_("ControlSurfaces"), _("Control Surfaces"));
|
||||
global_actions.register_action (main_menu_actions, X_("Plugins"), _("Plugins"));
|
||||
global_actions.register_action (main_menu_actions, X_("Metering"), _("Metering"));
|
||||
global_actions.register_action (main_menu_actions, X_("MeteringFallOffRate"), _("Fall Off Rate"));
|
||||
global_actions.register_action (main_menu_actions, X_("MeteringHoldTime"), _("Hold Time"));
|
||||
global_actions.register_action (main_menu_actions, X_("Denormals"), _("Denormal Handling"));
|
||||
|
||||
/* the real actions */
|
||||
|
||||
act = Actions.register_action (main_actions, X_("New"), _("New..."), hide_return (sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::get_session_parameters), false, true, "")));
|
||||
act = global_actions.register_action (main_actions, X_("New"), _("New..."), hide_return (sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::get_session_parameters), false, true, "")));
|
||||
|
||||
Actions.register_action (main_actions, X_("Open"), _("Open..."), sigc::mem_fun(*this, &ARDOUR_UI::open_session));
|
||||
Actions.register_action (main_actions, X_("Recent"), _("Recent..."), sigc::mem_fun(*this, &ARDOUR_UI::open_recent_session));
|
||||
act = Actions.register_action (main_actions, X_("Close"), _("Close"), sigc::mem_fun(*this, &ARDOUR_UI::close_session));
|
||||
global_actions.register_action (main_actions, X_("Open"), _("Open..."), sigc::mem_fun(*this, &ARDOUR_UI::open_session));
|
||||
global_actions.register_action (main_actions, X_("Recent"), _("Recent..."), sigc::mem_fun(*this, &ARDOUR_UI::open_recent_session));
|
||||
act = global_actions.register_action (main_actions, X_("Close"), _("Close"), sigc::mem_fun(*this, &ARDOUR_UI::close_session));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (main_actions, X_("AddTrackBus"), _("Add Track or Bus..."),
|
||||
act = global_actions.register_action (main_actions, X_("AddTrackBus"), _("Add Track or Bus..."),
|
||||
sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::add_route), (Gtk::Window*) 0));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
|
|
@ -147,101 +147,100 @@ ARDOUR_UI::install_actions ()
|
|||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (main_actions, X_("OpenVideo"), _("Open Video"),
|
||||
sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::add_video), (Gtk::Window*) 0));
|
||||
act = global_actions.register_action (main_actions, X_("OpenVideo"), _("Open Video"),
|
||||
sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::add_video), (Gtk::Window*) 0));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (main_actions, X_("CloseVideo"), _("Remove Video"),
|
||||
act = global_actions.register_action (main_actions, X_("CloseVideo"), _("Remove Video"),
|
||||
sigc::mem_fun (*this, &ARDOUR_UI::remove_video));
|
||||
act->set_sensitive (false);
|
||||
|
||||
act = Actions.register_action (main_actions, X_("ExportVideo"), _("Export to Video File"),
|
||||
act = global_actions.register_action (main_actions, X_("ExportVideo"), _("Export to Video File"),
|
||||
hide_return (sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::export_video), false)));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (main_actions, X_("SnapshotStay"), _("Snapshot (& keep working on current version) ..."), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::snapshot_session), false));
|
||||
act = global_actions.register_action (main_actions, X_("SnapshotStay"), _("Snapshot (& keep working on current version) ..."), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::snapshot_session), false));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (main_actions, X_("SnapshotSwitch"), _("Snapshot (& switch to new version) ..."), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::snapshot_session), true));
|
||||
act = global_actions.register_action (main_actions, X_("SnapshotSwitch"), _("Snapshot (& switch to new version) ..."), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::snapshot_session), true));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions::register_action (main_actions, X_("QuickSnapshotStay"), _("Quick Snapshot(& keep working on current version) ..."), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::quick_snapshot_session), false));
|
||||
act = global_actions::register_action (main_actions, X_("QuickSnapshotStay"), _("Quick Snapshot(& keep working on current version) ..."), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::quick_snapshot_session), false));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions::register_action (main_actions, X_("QuickSnapshotSwitch"), _("Quick Snapshot (& switch to new version) ..."), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::quick_snapshot_session), true));
|
||||
act = global_actions::register_action (main_actions, X_("QuickSnapshotSwitch"), _("Quick Snapshot (& switch to new version) ..."), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::quick_snapshot_session), true));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (main_actions, X_("SaveAs"), _("Save As..."), sigc::mem_fun(*this, &ARDOUR_UI::save_session_as));
|
||||
act = global_actions.register_action (main_actions, X_("SaveAs"), _("Save As..."), sigc::mem_fun(*this, &ARDOUR_UI::save_session_as));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (main_actions, X_("Rename"), _("Rename..."), sigc::mem_fun(*this, &ARDOUR_UI::rename_session));
|
||||
act = global_actions.register_action (main_actions, X_("Rename"), _("Rename..."), sigc::mem_fun(*this, &ARDOUR_UI::rename_session));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (main_actions, X_("SaveTemplate"), _("Save Template..."), sigc::mem_fun(*this, &ARDOUR_UI::save_template));
|
||||
act = global_actions.register_action (main_actions, X_("SaveTemplate"), _("Save Template..."), sigc::mem_fun(*this, &ARDOUR_UI::save_template));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (main_actions, X_("Metadata"), _("Metadata"));
|
||||
act = global_actions.register_action (main_actions, X_("Metadata"), _("Metadata"));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (main_actions, X_("EditMetadata"), _("Edit Metadata..."), sigc::mem_fun(*this, &ARDOUR_UI::edit_metadata));
|
||||
act = global_actions.register_action (main_actions, X_("EditMetadata"), _("Edit Metadata..."), sigc::mem_fun(*this, &ARDOUR_UI::edit_metadata));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (main_actions, X_("ImportMetadata"), _("Import Metadata..."), sigc::mem_fun(*this, &ARDOUR_UI::import_metadata));
|
||||
act = global_actions.register_action (main_actions, X_("ImportMetadata"), _("Import Metadata..."), sigc::mem_fun(*this, &ARDOUR_UI::import_metadata));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (main_actions, X_("ExportAudio"), _("Export to Audio File(s)..."), sigc::mem_fun (*editor, &PublicEditor::export_audio));
|
||||
act = global_actions.register_action (main_actions, X_("ExportAudio"), _("Export to Audio File(s)..."), sigc::mem_fun (*editor, &PublicEditor::export_audio));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (main_actions, X_("StemExport"), _("Stem export..."), sigc::mem_fun (*editor, &PublicEditor::stem_export));
|
||||
act = global_actions.register_action (main_actions, X_("StemExport"), _("Stem export..."), sigc::mem_fun (*editor, &PublicEditor::stem_export));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (main_actions, X_("Export"), _("Export"));
|
||||
act = global_actions.register_action (main_actions, X_("Export"), _("Export"));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (main_actions, X_("CleanupUnused"), _("Clean-up Unused Sources..."), sigc::mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::cleanup));
|
||||
act = global_actions.register_action (main_actions, X_("CleanupUnused"), _("Clean-up Unused Sources..."), sigc::mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::cleanup));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (main_actions, X_("CleanupPeakFiles"), _("Reset Peak Files"), sigc::mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::cleanup_peakfiles));
|
||||
act = global_actions.register_action (main_actions, X_("CleanupPeakFiles"), _("Reset Peak Files"), sigc::mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::cleanup_peakfiles));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (main_actions, X_("FlushWastebasket"), _("Flush Wastebasket"), sigc::mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::flush_trash));
|
||||
act = global_actions.register_action (main_actions, X_("FlushWastebasket"), _("Flush Wastebasket"), sigc::mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::flush_trash));
|
||||
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
/* these actions are intended to be shared across all windows */
|
||||
|
||||
common_actions = Actions.create_action_group (X_("Common"));
|
||||
Actions.register_action (common_actions, X_("Quit"), _("Quit"), (hide_return (sigc::mem_fun(*this, &ARDOUR_UI::finish))));
|
||||
Actions.register_action (common_actions, X_("Hide"), _("Hide"), sigc::mem_fun (*this, &ARDOUR_UI::hide_application));
|
||||
common_actions = global_actions.create_action_group (X_("Common"));
|
||||
global_actions.register_action (common_actions, X_("Quit"), _("Quit"), (hide_return (sigc::mem_fun(*this, &ARDOUR_UI::finish))));
|
||||
global_actions.register_action (common_actions, X_("Hide"), _("Hide"), sigc::mem_fun (*this, &ARDOUR_UI::hide_application));
|
||||
|
||||
Actions.register_action (common_actions, X_("show-editor"), _("Show"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), editor));
|
||||
Actions.register_action (common_actions, X_("show-mixer"), _("Show"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), mixer));
|
||||
Actions.register_action (common_actions, X_("show-preferences"), _("Show"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), rc_option_editor));
|
||||
global_actions.register_action (common_actions, X_("show-editor"), _("Show"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), editor));
|
||||
global_actions.register_action (common_actions, X_("show-mixer"), _("Show"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), mixer));
|
||||
global_actions.register_action (common_actions, X_("show-preferences"), _("Show"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), rc_option_editor));
|
||||
|
||||
Actions.register_action (common_actions, X_("hide-editor"), _("Hide"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::hide_tabbable), editor));
|
||||
Actions.register_action (common_actions, X_("hide-mixer"), _("Hide"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::hide_tabbable), mixer));
|
||||
Actions.register_action (common_actions, X_("hide-preferences"), _("Hide"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::hide_tabbable), rc_option_editor));
|
||||
global_actions.register_action (common_actions, X_("hide-editor"), _("Hide"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::hide_tabbable), editor));
|
||||
global_actions.register_action (common_actions, X_("hide-mixer"), _("Hide"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::hide_tabbable), mixer));
|
||||
global_actions.register_action (common_actions, X_("hide-preferences"), _("Hide"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::hide_tabbable), rc_option_editor));
|
||||
|
||||
Actions.register_action (common_actions, X_("attach-editor"), _("Attach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::attach_tabbable), editor));
|
||||
Actions.register_action (common_actions, X_("attach-mixer"), _("Attach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::attach_tabbable), mixer));
|
||||
Actions.register_action (common_actions, X_("attach-preferences"), _("Attach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::attach_tabbable), rc_option_editor));
|
||||
global_actions.register_action (common_actions, X_("attach-editor"), _("Attach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::attach_tabbable), editor));
|
||||
global_actions.register_action (common_actions, X_("attach-mixer"), _("Attach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::attach_tabbable), mixer));
|
||||
global_actions.register_action (common_actions, X_("attach-preferences"), _("Attach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::attach_tabbable), rc_option_editor));
|
||||
|
||||
Actions.register_action (common_actions, X_("detach-editor"), _("Detach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::detach_tabbable), editor));
|
||||
Actions.register_action (common_actions, X_("detach-mixer"), _("Detach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::detach_tabbable), mixer));
|
||||
Actions.register_action (common_actions, X_("detach-preferences"), _("Detach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::detach_tabbable), rc_option_editor));
|
||||
global_actions.register_action (common_actions, X_("detach-editor"), _("Detach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::detach_tabbable), editor));
|
||||
global_actions.register_action (common_actions, X_("detach-mixer"), _("Detach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::detach_tabbable), mixer));
|
||||
global_actions.register_action (common_actions, X_("detach-preferences"), _("Detach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::detach_tabbable), rc_option_editor));
|
||||
|
||||
/* windows visibility actions */
|
||||
|
||||
Actions.register_toggle_action (common_actions, X_("ToggleMaximalEditor"), _("Maximise Editor Space"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_editing_space));
|
||||
Actions.register_toggle_action (common_actions, X_("ToggleMaximalMixer"), _("Maximise Mixer Space"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_mixer_space));
|
||||
global_actions.register_toggle_action (common_actions, X_("ToggleMaximalEditor"), _("Maximise Editor Space"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_editing_space));
|
||||
global_actions.register_toggle_action (common_actions, X_("ToggleMaximalMixer"), _("Maximise Mixer Space"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_mixer_space));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
act = ActionManager::register_toggle_action (common_actions, X_("ToggleMixerList"), _("Toggle Mixer List"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_mixer_list));
|
||||
|
|
@ -251,11 +250,11 @@ ARDOUR_UI::install_actions ()
|
|||
act->set_sensitive (false);
|
||||
|
||||
if (Profile->get_mixbus())
|
||||
Actions.register_action (common_actions, X_("show-ui-prefs"), _("Show more UI preferences"), sigc::mem_fun (*this, &ARDOUR_UI::show_ui_prefs));
|
||||
global_actions.register_action (common_actions, X_("show-ui-prefs"), _("Show more UI preferences"), sigc::mem_fun (*this, &ARDOUR_UI::show_ui_prefs));
|
||||
|
||||
Actions.register_action (common_actions, X_("toggle-meterbridge"), S_("Window|Meterbridge"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_meterbridge));
|
||||
global_actions.register_action (common_actions, X_("toggle-meterbridge"), S_("Window|Meterbridge"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_meterbridge));
|
||||
|
||||
act = Actions.register_action (common_actions, X_("NewMIDITracer"), _("MIDI Tracer"), sigc::mem_fun(*this, &ARDOUR_UI::new_midi_tracer_window));
|
||||
act = global_actions.register_action (common_actions, X_("NewMIDITracer"), _("MIDI Tracer"), sigc::mem_fun(*this, &ARDOUR_UI::new_midi_tracer_window));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
global_actions.register_action (common_actions, X_("chat"), _("Chat"), sigc::mem_fun(*this, &ARDOUR_UI::launch_chat));
|
||||
|
|
@ -269,37 +268,37 @@ if (Profile->get_mixbus())
|
|||
global_actions.register_action (common_actions, X_("forums"), _("User Forums"), mem_fun(*this, &ARDOUR_UI::launch_forums));
|
||||
global_actions.register_action (common_actions, X_("howto-report"), _("How to Report a Bug"), mem_fun(*this, &ARDOUR_UI::launch_howto_report));
|
||||
|
||||
act = Actions.register_action (common_actions, X_("Save"), _("Save"), sigc::hide_return (sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::save_state), string(""), false)));
|
||||
act = global_actions.register_action (common_actions, X_("Save"), _("Save"), sigc::hide_return (sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::save_state), string(""), false)));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
|
||||
Glib::RefPtr<ActionGroup> transport_actions = Actions.create_action_group (X_("Transport"));
|
||||
Glib::RefPtr<ActionGroup> transport_actions = global_actions.create_action_group (X_("Transport"));
|
||||
|
||||
/* do-nothing action for the "transport" menu bar item */
|
||||
|
||||
Actions.register_action (transport_actions, X_("Transport"), _("Transport"));
|
||||
global_actions.register_action (transport_actions, X_("Transport"), _("Transport"));
|
||||
|
||||
/* these two are not used by key bindings, instead use ToggleRoll for that. these two do show up in
|
||||
menus and via button proxies.
|
||||
*/
|
||||
|
||||
act = Actions.register_action (transport_actions, X_("Stop"), _("Stop"), sigc::mem_fun(*this, &ARDOUR_UI::transport_stop));
|
||||
act = global_actions.register_action (transport_actions, X_("Stop"), _("Stop"), sigc::mem_fun(*this, &ARDOUR_UI::transport_stop));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("Roll"), _("Roll"), sigc::mem_fun(*this, &ARDOUR_UI::transport_roll));
|
||||
act = global_actions.register_action (transport_actions, X_("Roll"), _("Roll"), sigc::mem_fun(*this, &ARDOUR_UI::transport_roll));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (transport_actions, X_("ToggleRoll"), _("Start/Stop"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::toggle_roll), false, false));
|
||||
act = global_actions.register_action (transport_actions, X_("ToggleRoll"), _("Start/Stop"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::toggle_roll), false, false));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("alternate-ToggleRoll"), _("Start/Stop"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::toggle_roll), false, false));
|
||||
act = global_actions.register_action (transport_actions, X_("alternate-ToggleRoll"), _("Start/Stop"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::toggle_roll), false, false));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("ToggleRollMaybe"), _("Start/Continue/Stop"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::toggle_roll), false, true));
|
||||
act = global_actions.register_action (transport_actions, X_("ToggleRollMaybe"), _("Start/Continue/Stop"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::toggle_roll), false, true));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("ToggleRollForgetCapture"), _("Stop and Forget Capture"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::toggle_roll), true, false));
|
||||
act = global_actions.register_action (transport_actions, X_("ToggleRollForgetCapture"), _("Stop and Forget Capture"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::toggle_roll), true, false));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
|
||||
|
|
@ -309,194 +308,194 @@ if (Profile->get_mixbus())
|
|||
- otherwise do nothing
|
||||
*/
|
||||
|
||||
act = Actions.register_action (transport_actions, X_("TransitionToRoll"), _("Transition to Roll"), sigc::bind (sigc::mem_fun (*editor, &PublicEditor::transition_to_rolling), true));
|
||||
act = global_actions.register_action (transport_actions, X_("TransitionToRoll"), _("Transition to Roll"), sigc::bind (sigc::mem_fun (*editor, &PublicEditor::transition_to_rolling), true));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (transport_actions, X_("TransitionToReverse"), _("Transition to Reverse"), sigc::bind (sigc::mem_fun (*editor, &PublicEditor::transition_to_rolling), false));
|
||||
act = global_actions.register_action (transport_actions, X_("TransitionToReverse"), _("Transition to Reverse"), sigc::bind (sigc::mem_fun (*editor, &PublicEditor::transition_to_rolling), false));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (transport_actions, X_("Loop"), _("Play Loop Range"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_session_auto_loop));
|
||||
act = global_actions.register_action (transport_actions, X_("Loop"), _("Play Loop Range"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_session_auto_loop));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("PlaySelection"), _("Play Selection"), sigc::mem_fun(*this, &ARDOUR_UI::transport_play_selection));
|
||||
act = global_actions.register_action (transport_actions, X_("PlaySelection"), _("Play Selection"), sigc::mem_fun(*this, &ARDOUR_UI::transport_play_selection));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("PlayPreroll"), _("Play Selection w/Preroll"), sigc::mem_fun(*this, &ARDOUR_UI::transport_play_preroll));
|
||||
act = global_actions.register_action (transport_actions, X_("PlayPreroll"), _("Play Selection w/Preroll"), sigc::mem_fun(*this, &ARDOUR_UI::transport_play_preroll));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (transport_actions, X_("Record"), _("Enable Record"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::transport_record), false));
|
||||
act = global_actions.register_action (transport_actions, X_("Record"), _("Enable Record"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::transport_record), false));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("record-roll"), _("Start Recording"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::transport_record), true));
|
||||
act = global_actions.register_action (transport_actions, X_("record-roll"), _("Start Recording"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::transport_record), true));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("alternate-record-roll"), _("Start Recording"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::transport_record), true));
|
||||
act = global_actions.register_action (transport_actions, X_("alternate-record-roll"), _("Start Recording"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::transport_record), true));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("Rewind"), _("Rewind"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::transport_rewind), 0));
|
||||
act = global_actions.register_action (transport_actions, X_("Rewind"), _("Rewind"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::transport_rewind), 0));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("RewindSlow"), _("Rewind (Slow)"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::transport_rewind), -1));
|
||||
act = global_actions.register_action (transport_actions, X_("RewindSlow"), _("Rewind (Slow)"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::transport_rewind), -1));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("RewindFast"), _("Rewind (Fast)"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::transport_rewind), 1));
|
||||
act = global_actions.register_action (transport_actions, X_("RewindFast"), _("Rewind (Fast)"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::transport_rewind), 1));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("Forward"), _("Forward"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::transport_forward), 0));
|
||||
act = global_actions.register_action (transport_actions, X_("Forward"), _("Forward"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::transport_forward), 0));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("ForwardSlow"), _("Forward (Slow)"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::transport_forward), -1));
|
||||
act = global_actions.register_action (transport_actions, X_("ForwardSlow"), _("Forward (Slow)"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::transport_forward), -1));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("ForwardFast"), _("Forward (Fast)"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::transport_forward), 1));
|
||||
act = global_actions.register_action (transport_actions, X_("ForwardFast"), _("Forward (Fast)"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::transport_forward), 1));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("GotoZero"), _("Go to Zero"), sigc::mem_fun(*this, &ARDOUR_UI::transport_goto_zero));
|
||||
act = global_actions.register_action (transport_actions, X_("GotoZero"), _("Go to Zero"), sigc::mem_fun(*this, &ARDOUR_UI::transport_goto_zero));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("GotoStart"), _("Go to Start"), sigc::mem_fun(*this, &ARDOUR_UI::transport_goto_start));
|
||||
act = global_actions.register_action (transport_actions, X_("GotoStart"), _("Go to Start"), sigc::mem_fun(*this, &ARDOUR_UI::transport_goto_start));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("alternate-GotoStart"), _("Go to Start"), sigc::mem_fun(*this, &ARDOUR_UI::transport_goto_start));
|
||||
act = global_actions.register_action (transport_actions, X_("alternate-GotoStart"), _("Go to Start"), sigc::mem_fun(*this, &ARDOUR_UI::transport_goto_start));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("GotoEnd"), _("Go to End"), sigc::mem_fun(*this, &ARDOUR_UI::transport_goto_end));
|
||||
act = global_actions.register_action (transport_actions, X_("GotoEnd"), _("Go to End"), sigc::mem_fun(*this, &ARDOUR_UI::transport_goto_end));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("GotoWallClock"), _("Go to Wall Clock"), sigc::mem_fun(*this, &ARDOUR_UI::transport_goto_wallclock));
|
||||
act = global_actions.register_action (transport_actions, X_("GotoWallClock"), _("Go to Wall Clock"), sigc::mem_fun(*this, &ARDOUR_UI::transport_goto_wallclock));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
|
||||
//these actions handle the numpad events, ProTools style
|
||||
act = Actions.register_action (transport_actions, X_("numpad-decimal"), _("Numpad Decimal"), mem_fun(*this, &ARDOUR_UI::transport_numpad_decimal));
|
||||
act = global_actions.register_action (transport_actions, X_("numpad-decimal"), _("Numpad Decimal"), mem_fun(*this, &ARDOUR_UI::transport_numpad_decimal));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("alternate-numpad-decimal"), _("Numpad Decimal"), mem_fun(*this, &ARDOUR_UI::transport_numpad_decimal));
|
||||
act = global_actions.register_action (transport_actions, X_("alternate-numpad-decimal"), _("Numpad Decimal"), mem_fun(*this, &ARDOUR_UI::transport_numpad_decimal));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("numpad-0"), _("Numpad 0"), bind (mem_fun(*this, &ARDOUR_UI::transport_numpad_event), 0));
|
||||
act = global_actions.register_action (transport_actions, X_("numpad-0"), _("Numpad 0"), bind (mem_fun(*this, &ARDOUR_UI::transport_numpad_event), 0));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("numpad-1"), _("Numpad 1"), bind (mem_fun(*this, &ARDOUR_UI::transport_numpad_event), 1));
|
||||
act = global_actions.register_action (transport_actions, X_("numpad-1"), _("Numpad 1"), bind (mem_fun(*this, &ARDOUR_UI::transport_numpad_event), 1));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("numpad-2"), _("Numpad 2"), bind (mem_fun(*this, &ARDOUR_UI::transport_numpad_event), 2));
|
||||
act = global_actions.register_action (transport_actions, X_("numpad-2"), _("Numpad 2"), bind (mem_fun(*this, &ARDOUR_UI::transport_numpad_event), 2));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("numpad-3"), _("Numpad 3"), bind (mem_fun(*this, &ARDOUR_UI::transport_numpad_event), 3));
|
||||
act = global_actions.register_action (transport_actions, X_("numpad-3"), _("Numpad 3"), bind (mem_fun(*this, &ARDOUR_UI::transport_numpad_event), 3));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("numpad-4"), _("Numpad 4"), bind (mem_fun(*this, &ARDOUR_UI::transport_numpad_event), 4));
|
||||
act = global_actions.register_action (transport_actions, X_("numpad-4"), _("Numpad 4"), bind (mem_fun(*this, &ARDOUR_UI::transport_numpad_event), 4));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("numpad-5"), _("Numpad 5"), bind (mem_fun(*this, &ARDOUR_UI::transport_numpad_event), 5));
|
||||
act = global_actions.register_action (transport_actions, X_("numpad-5"), _("Numpad 5"), bind (mem_fun(*this, &ARDOUR_UI::transport_numpad_event), 5));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("numpad-6"), _("Numpad 6"), bind (mem_fun(*this, &ARDOUR_UI::transport_numpad_event), 6));
|
||||
act = global_actions.register_action (transport_actions, X_("numpad-6"), _("Numpad 6"), bind (mem_fun(*this, &ARDOUR_UI::transport_numpad_event), 6));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("numpad-7"), _("Numpad 7"), bind (mem_fun(*this, &ARDOUR_UI::transport_numpad_event), 7));
|
||||
act = global_actions.register_action (transport_actions, X_("numpad-7"), _("Numpad 7"), bind (mem_fun(*this, &ARDOUR_UI::transport_numpad_event), 7));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("numpad-8"), _("Numpad 8"), bind (mem_fun(*this, &ARDOUR_UI::transport_numpad_event), 8));
|
||||
act = global_actions.register_action (transport_actions, X_("numpad-8"), _("Numpad 8"), bind (mem_fun(*this, &ARDOUR_UI::transport_numpad_event), 8));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("numpad-9"), _("Numpad 9"), bind (mem_fun(*this, &ARDOUR_UI::transport_numpad_event), 9));
|
||||
act = global_actions.register_action (transport_actions, X_("numpad-9"), _("Numpad 9"), bind (mem_fun(*this, &ARDOUR_UI::transport_numpad_event), 9));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (transport_actions, X_("focus-on-clock"), _("Focus On Clock"), sigc::mem_fun(*this, &ARDOUR_UI::focus_on_clock));
|
||||
act = global_actions.register_action (transport_actions, X_("focus-on-clock"), _("Focus On Clock"), sigc::mem_fun(*this, &ARDOUR_UI::focus_on_clock));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (transport_actions, X_("primary-clock-timecode"), _("Timecode"), sigc::bind (sigc::mem_fun(primary_clock, &AudioClock::set_mode), AudioClock::Timecode));
|
||||
act = global_actions.register_action (transport_actions, X_("primary-clock-timecode"), _("Timecode"), sigc::bind (sigc::mem_fun(primary_clock, &AudioClock::set_mode), AudioClock::Timecode));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("primary-clock-bbt"), _("Bars & Beats"), sigc::bind (sigc::mem_fun(primary_clock, &AudioClock::set_mode), AudioClock::BBT));
|
||||
act = global_actions.register_action (transport_actions, X_("primary-clock-bbt"), _("Bars & Beats"), sigc::bind (sigc::mem_fun(primary_clock, &AudioClock::set_mode), AudioClock::BBT));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("primary-clock-minsec"), _("Minutes & Seconds"), sigc::bind (sigc::mem_fun(primary_clock, &AudioClock::set_mode), AudioClock::MinSec));
|
||||
act = global_actions.register_action (transport_actions, X_("primary-clock-minsec"), _("Minutes & Seconds"), sigc::bind (sigc::mem_fun(primary_clock, &AudioClock::set_mode), AudioClock::MinSec));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("primary-clock-samples"), _("Samples"), sigc::bind (sigc::mem_fun(primary_clock, &AudioClock::set_mode), AudioClock::Frames));
|
||||
act = global_actions.register_action (transport_actions, X_("primary-clock-samples"), _("Samples"), sigc::bind (sigc::mem_fun(primary_clock, &AudioClock::set_mode), AudioClock::Frames));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (transport_actions, X_("secondary-clock-timecode"), _("Timecode"), sigc::bind (sigc::mem_fun(secondary_clock, &AudioClock::set_mode), AudioClock::Timecode));
|
||||
act = global_actions.register_action (transport_actions, X_("secondary-clock-timecode"), _("Timecode"), sigc::bind (sigc::mem_fun(secondary_clock, &AudioClock::set_mode), AudioClock::Timecode));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("secondary-clock-bbt"), _("Bars & Beats"), sigc::bind (sigc::mem_fun(secondary_clock, &AudioClock::set_mode), AudioClock::BBT));
|
||||
act = global_actions.register_action (transport_actions, X_("secondary-clock-bbt"), _("Bars & Beats"), sigc::bind (sigc::mem_fun(secondary_clock, &AudioClock::set_mode), AudioClock::BBT));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("secondary-clock-minsec"), _("Minutes & Seconds"), sigc::bind (sigc::mem_fun(secondary_clock, &AudioClock::set_mode), AudioClock::MinSec));
|
||||
act = global_actions.register_action (transport_actions, X_("secondary-clock-minsec"), _("Minutes & Seconds"), sigc::bind (sigc::mem_fun(secondary_clock, &AudioClock::set_mode), AudioClock::MinSec));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (transport_actions, X_("secondary-clock-samples"), _("Samples"), sigc::bind (sigc::mem_fun(secondary_clock, &AudioClock::set_mode), AudioClock::Frames));
|
||||
act = global_actions.register_action (transport_actions, X_("secondary-clock-samples"), _("Samples"), sigc::bind (sigc::mem_fun(secondary_clock, &AudioClock::set_mode), AudioClock::Frames));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_toggle_action (transport_actions, X_("TogglePunchIn"), _("Punch In"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_punch_in));
|
||||
act = global_actions.register_toggle_action (transport_actions, X_("TogglePunchIn"), _("Punch In"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_punch_in));
|
||||
act->set_short_label (_("In"));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_toggle_action (transport_actions, X_("TogglePunchOut"), _("Punch Out"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_punch_out));
|
||||
act = global_actions.register_toggle_action (transport_actions, X_("TogglePunchOut"), _("Punch Out"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_punch_out));
|
||||
act->set_short_label (_("Out"));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_toggle_action (transport_actions, X_("TogglePunch"), _("Punch In/Out"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_punch));
|
||||
act = global_actions.register_toggle_action (transport_actions, X_("TogglePunch"), _("Punch In/Out"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_punch));
|
||||
act->set_short_label (_("In/Out"));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_toggle_action (transport_actions, X_("ToggleClick"), _("Click"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_click));
|
||||
act = global_actions.register_toggle_action (transport_actions, X_("ToggleClick"), _("Click"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_click));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_toggle_action (transport_actions, X_("ToggleAutoInput"), _("Auto Input"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_auto_input));
|
||||
act = global_actions.register_toggle_action (transport_actions, X_("ToggleAutoInput"), _("Auto Input"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_auto_input));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_toggle_action (transport_actions, X_("ToggleAutoPlay"), _("Auto Play"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_auto_play));
|
||||
act = global_actions.register_toggle_action (transport_actions, X_("ToggleAutoPlay"), _("Auto Play"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_auto_play));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_toggle_action (transport_actions, X_("ToggleAutoReturn"), _("Auto Return"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_auto_return));
|
||||
act = global_actions.register_toggle_action (transport_actions, X_("ToggleAutoReturn"), _("Auto Return"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_auto_return));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = Actions.register_toggle_action (transport_actions, X_("ToggleFollowEdits"), _("Follow Edits"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_follow_edits));
|
||||
act = global_actions.register_toggle_action (transport_actions, X_("ToggleFollowEdits"), _("Follow Edits"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_follow_edits));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
|
||||
|
||||
act = Actions.register_toggle_action (transport_actions, X_("ToggleVideoSync"), _("Sync Startup to Video"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_video_sync));
|
||||
act = global_actions.register_toggle_action (transport_actions, X_("ToggleVideoSync"), _("Sync Startup to Video"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_video_sync));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = Actions.register_toggle_action (transport_actions, X_("ToggleTimeMaster"), _("Time Master"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_time_master));
|
||||
act = global_actions.register_toggle_action (transport_actions, X_("ToggleTimeMaster"), _("Time Master"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_time_master));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = Actions.register_toggle_action (transport_actions, X_("ToggleExternalSync"), _("Use External Positional Sync Source"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_external_sync));
|
||||
act = global_actions.register_toggle_action (transport_actions, X_("ToggleExternalSync"), _("Use External Positional Sync Source"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_external_sync));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
for (int i = 1; i <= 32; ++i) {
|
||||
string const a = string_compose (X_("ToggleRecordEnableTrack%1"), i);
|
||||
string const n = string_compose (_("Toggle Record Enable Track %1"), i);
|
||||
act = Actions.register_action (common_actions, a.c_str(), n.c_str(), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::toggle_record_enable), i - 1));
|
||||
act = global_actions.register_action (common_actions, a.c_str(), n.c_str(), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::toggle_record_enable), i - 1));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
}
|
||||
|
||||
Glib::RefPtr<ActionGroup> shuttle_actions = Actions.create_action_group ("ShuttleActions");
|
||||
Glib::RefPtr<ActionGroup> shuttle_actions = global_actions.create_action_group ("ShuttleActions");
|
||||
|
||||
shuttle_actions->add (Action::create (X_("SetShuttleUnitsPercentage"), _("Percentage")), hide_return (sigc::bind (sigc::mem_fun (*Config, &RCConfiguration::set_shuttle_units), Percentage)));
|
||||
shuttle_actions->add (Action::create (X_("SetShuttleUnitsSemitones"), _("Semitones")), hide_return (sigc::bind (sigc::mem_fun (*Config, &RCConfiguration::set_shuttle_units), Semitones)));
|
||||
|
||||
Glib::RefPtr<ActionGroup> option_actions = Actions.create_action_group ("options");
|
||||
Glib::RefPtr<ActionGroup> option_actions = global_actions.create_action_group ("options");
|
||||
|
||||
act = Actions.register_toggle_action (option_actions, X_("SendMTC"), _("Send MTC"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_send_mtc));
|
||||
act = global_actions.register_toggle_action (option_actions, X_("SendMTC"), _("Send MTC"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_send_mtc));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = Actions.register_toggle_action (option_actions, X_("SendMMC"), _("Send MMC"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_send_mmc));
|
||||
act = global_actions.register_toggle_action (option_actions, X_("SendMMC"), _("Send MMC"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_send_mmc));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = Actions.register_toggle_action (option_actions, X_("UseMMC"), _("Use MMC"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_use_mmc));
|
||||
act = global_actions.register_toggle_action (option_actions, X_("UseMMC"), _("Use MMC"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_use_mmc));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = Actions.register_toggle_action (option_actions, X_("SendMidiClock"), _("Send MIDI Clock"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_send_midi_clock));
|
||||
act = global_actions.register_toggle_action (option_actions, X_("SendMidiClock"), _("Send MIDI Clock"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_send_midi_clock));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = Actions.register_toggle_action (option_actions, X_("SendMIDIfeedback"), _("Send MIDI Feedback"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_send_midi_feedback));
|
||||
act = global_actions.register_toggle_action (option_actions, X_("SendMIDIfeedback"), _("Send MIDI Feedback"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_send_midi_feedback));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
/* MIDI */
|
||||
|
||||
Glib::RefPtr<ActionGroup> midi_actions = Actions.create_action_group (X_("MIDI"));
|
||||
Actions.register_action (midi_actions, X_("panic"), _("Panic"), sigc::mem_fun(*this, &ARDOUR_UI::midi_panic));
|
||||
Glib::RefPtr<ActionGroup> midi_actions = global_actions.create_action_group (X_("MIDI"));
|
||||
global_actions.register_action (midi_actions, X_("panic"), _("Panic"), sigc::mem_fun(*this, &ARDOUR_UI::midi_panic));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -471,8 +471,6 @@ Editor::Editor ()
|
|||
last_event_time.tv_sec = 0;
|
||||
last_event_time.tv_usec = 0;
|
||||
|
||||
global_hpacker.set_data ("ardour-bindings", &bindings);
|
||||
|
||||
selection_op_history.clear();
|
||||
before.clear();
|
||||
|
||||
|
|
@ -5862,7 +5860,7 @@ Editor::use_own_window (bool and_fill_it)
|
|||
|
||||
// win->signal_realize().connect (*this, &Editor::on_realize);
|
||||
win->signal_event().connect (sigc::mem_fun (*this, &Editor::generic_event_handler));
|
||||
win->set_data ("ardour-bindings", &bindings);
|
||||
win->set_data ("ardour-bindings", bindings);
|
||||
|
||||
update_title ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2237,6 +2237,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
void toggle_reg_sens (Glib::RefPtr<Gtk::ActionGroup> group, char const * name, char const * label, sigc::slot<void> slot);
|
||||
void radio_reg_sens (Glib::RefPtr<Gtk::ActionGroup> action_group, Gtk::RadioAction::Group& radio_group, char const * name, char const * label, sigc::slot<void> slot);
|
||||
|
||||
Gtkmm2ext::ActionMap myactions;
|
||||
|
||||
friend class Drag;
|
||||
friend class RegionDrag;
|
||||
friend class RegionMoveDrag;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@ using namespace ARDOUR_UI_UTILS;
|
|||
using namespace PBD;
|
||||
using namespace Editing;
|
||||
|
||||
using Gtkmm2ext::Actions;
|
||||
using Gtkmm2ext::Bindings;
|
||||
|
||||
/* Convenience functions to slightly reduce verbosity below */
|
||||
|
|
@ -63,7 +62,7 @@ using Gtkmm2ext::Bindings;
|
|||
RefPtr<Action>
|
||||
Editor::reg_sens (RefPtr<ActionGroup> group, char const * name, char const * label, sigc::slot<void> slot)
|
||||
{
|
||||
RefPtr<Action> act = Actions.register_action (group, name, label, slot);
|
||||
RefPtr<Action> act = myactions.register_action (group, name, label, slot);
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
return act;
|
||||
}
|
||||
|
|
@ -71,14 +70,14 @@ Editor::reg_sens (RefPtr<ActionGroup> group, char const * name, char const * lab
|
|||
void
|
||||
Editor::toggle_reg_sens (RefPtr<ActionGroup> group, char const * name, char const * label, sigc::slot<void> slot)
|
||||
{
|
||||
RefPtr<Action> act = Actions.register_toggle_action (group, name, label, slot);
|
||||
RefPtr<Action> act = myactions.register_toggle_action (group, name, label, slot);
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
}
|
||||
|
||||
void
|
||||
Editor::radio_reg_sens (RefPtr<ActionGroup> action_group, RadioAction::Group& radio_group, char const * name, char const * label, sigc::slot<void> slot)
|
||||
{
|
||||
RefPtr<Action> act = Actions.register_radio_action (action_group, radio_group, name, label, slot);
|
||||
RefPtr<Action> act = myactions.register_radio_action (action_group, radio_group, name, label, slot);
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
}
|
||||
|
||||
|
|
@ -87,78 +86,78 @@ Editor::register_actions ()
|
|||
{
|
||||
RefPtr<Action> act;
|
||||
|
||||
editor_actions = Actions.create_action_group (X_("Editor"));
|
||||
editor_menu_actions = Actions.create_action_group (X_("EditorMenu"));
|
||||
editor_actions = myactions.create_action_group (X_("Editor"));
|
||||
editor_menu_actions = myactions.create_action_group (X_("EditorMenu"));
|
||||
|
||||
/* non-operative menu items for menu bar */
|
||||
|
||||
Actions.register_action (editor_menu_actions, X_("AlignMenu"), _("Align"));
|
||||
Actions.register_action (editor_menu_actions, X_("Autoconnect"), _("Autoconnect"));
|
||||
Actions.register_action (editor_menu_actions, X_("Crossfades"), _("Crossfades"));
|
||||
Actions.register_action (editor_menu_actions, X_("Edit"), _("Edit"));
|
||||
Actions.register_action (editor_menu_actions, X_("EditCursorMovementOptions"), _("Move Selected Marker"));
|
||||
Actions.register_action (editor_menu_actions, X_("EditSelectRangeOptions"), _("Select Range Operations"));
|
||||
Actions.register_action (editor_menu_actions, X_("EditSelectRegionOptions"), _("Select Regions"));
|
||||
Actions.register_action (editor_menu_actions, X_("EditPointMenu"), _("Edit Point"));
|
||||
Actions.register_action (editor_menu_actions, X_("FadeMenu"), _("Fade"));
|
||||
Actions.register_action (editor_menu_actions, X_("LatchMenu"), _("Latch"));
|
||||
Actions.register_action (editor_menu_actions, X_("RegionMenu"), _("Region"));
|
||||
Actions.register_action (editor_menu_actions, X_("RegionMenuLayering"), _("Layering"));
|
||||
Actions.register_action (editor_menu_actions, X_("RegionMenuPosition"), _("Position"));
|
||||
Actions.register_action (editor_menu_actions, X_("RegionMenuEdit"), _("Edit"));
|
||||
Actions.register_action (editor_menu_actions, X_("RegionMenuTrim"), _("Trim"));
|
||||
Actions.register_action (editor_menu_actions, X_("RegionMenuGain"), _("Gain"));
|
||||
Actions.register_action (editor_menu_actions, X_("RegionMenuRanges"), _("Ranges"));
|
||||
Actions.register_action (editor_menu_actions, X_("RegionMenuFades"), _("Fades"));
|
||||
Actions.register_action (editor_menu_actions, X_("RegionMenuMIDI"), _("MIDI"));
|
||||
Actions.register_action (editor_menu_actions, X_("RegionMenuDuplicate"), _("Duplicate"));
|
||||
Actions.register_action (editor_menu_actions, X_("Link"), _("Link"));
|
||||
Actions.register_action (editor_menu_actions, X_("ZoomFocusMenu"), _("Zoom Focus"));
|
||||
Actions.register_action (editor_menu_actions, X_("LocateToMarker"), _("Locate to Markers"));
|
||||
Actions.register_action (editor_menu_actions, X_("MarkerMenu"), _("Markers"));
|
||||
Actions.register_action (editor_menu_actions, X_("MeterFalloff"), _("Meter falloff"));
|
||||
Actions.register_action (editor_menu_actions, X_("MeterHold"), _("Meter hold"));
|
||||
Actions.register_action (editor_menu_actions, X_("MIDI"), _("MIDI Options"));
|
||||
Actions.register_action (editor_menu_actions, X_("MiscOptions"), _("Misc Options"));
|
||||
Actions.register_action (editor_menu_actions, X_("Monitoring"), _("Monitoring"));
|
||||
Actions.register_action (editor_menu_actions, X_("MoveActiveMarkMenu"), _("Active Mark"));
|
||||
Actions.register_action (editor_menu_actions, X_("MovePlayHeadMenu"), _("Playhead"));
|
||||
Actions.register_action (editor_menu_actions, X_("PlayMenu"), _("Play"));
|
||||
Actions.register_action (editor_menu_actions, X_("PrimaryClockMenu"), _("Primary Clock"));
|
||||
Actions.register_action (editor_menu_actions, X_("Pullup"), _("Pullup / Pulldown"));
|
||||
Actions.register_action (editor_menu_actions, X_("RegionEditOps"), _("Region operations"));
|
||||
Actions.register_action (editor_menu_actions, X_("RegionGainMenu"), _("Gain"));
|
||||
Actions.register_action (editor_menu_actions, X_("RulerMenu"), _("Rulers"));
|
||||
Actions.register_action (editor_menu_actions, X_("SavedViewMenu"), _("Views"));
|
||||
Actions.register_action (editor_menu_actions, X_("ScrollMenu"), _("Scroll"));
|
||||
Actions.register_action (editor_menu_actions, X_("SecondaryClockMenu"), _("Secondary Clock"));
|
||||
Actions.register_action (editor_menu_actions, X_("Select"), _("Select"));
|
||||
Actions.register_action (editor_menu_actions, X_("SelectMenu"), _("Select"));
|
||||
Actions.register_action (editor_menu_actions, X_("SeparateMenu"), _("Separate"));
|
||||
Actions.register_action (editor_menu_actions, X_("SetLoopMenu"), _("Loop"));
|
||||
Actions.register_action (editor_menu_actions, X_("SetPunchMenu"), _("Punch"));
|
||||
Actions.register_action (editor_menu_actions, X_("Solo"), _("Solo"));
|
||||
Actions.register_action (editor_menu_actions, X_("Subframes"), _("Subframes"));
|
||||
Actions.register_action (editor_menu_actions, X_("SyncMenu"), _("Sync"));
|
||||
Actions.register_action (editor_menu_actions, X_("TempoMenu"), _("Tempo"));
|
||||
Actions.register_action (editor_menu_actions, X_("Timecode"), _("Timecode fps"));
|
||||
Actions.register_action (editor_menu_actions, X_("TrackHeightMenu"), _("Height"));
|
||||
Actions.register_action (editor_menu_actions, X_("TrackMenu"), _("Track"));
|
||||
Actions.register_action (editor_menu_actions, X_("Tools"), _("Tools"));
|
||||
Actions.register_action (editor_menu_actions, X_("View"), _("View"));
|
||||
Actions.register_action (editor_menu_actions, X_("ZoomFocus"), _("Zoom Focus"));
|
||||
Actions.register_action (editor_menu_actions, X_("ZoomMenu"), _("Zoom"));
|
||||
myactions.register_action (editor_menu_actions, X_("AlignMenu"), _("Align"));
|
||||
myactions.register_action (editor_menu_actions, X_("Autoconnect"), _("Autoconnect"));
|
||||
myactions.register_action (editor_menu_actions, X_("Crossfades"), _("Crossfades"));
|
||||
myactions.register_action (editor_menu_actions, X_("Edit"), _("Edit"));
|
||||
myactions.register_action (editor_menu_actions, X_("EditCursorMovementOptions"), _("Move Selected Marker"));
|
||||
myactions.register_action (editor_menu_actions, X_("EditSelectRangeOptions"), _("Select Range Operations"));
|
||||
myactions.register_action (editor_menu_actions, X_("EditSelectRegionOptions"), _("Select Regions"));
|
||||
myactions.register_action (editor_menu_actions, X_("EditPointMenu"), _("Edit Point"));
|
||||
myactions.register_action (editor_menu_actions, X_("FadeMenu"), _("Fade"));
|
||||
myactions.register_action (editor_menu_actions, X_("LatchMenu"), _("Latch"));
|
||||
myactions.register_action (editor_menu_actions, X_("RegionMenu"), _("Region"));
|
||||
myactions.register_action (editor_menu_actions, X_("RegionMenuLayering"), _("Layering"));
|
||||
myactions.register_action (editor_menu_actions, X_("RegionMenuPosition"), _("Position"));
|
||||
myactions.register_action (editor_menu_actions, X_("RegionMenuEdit"), _("Edit"));
|
||||
myactions.register_action (editor_menu_actions, X_("RegionMenuTrim"), _("Trim"));
|
||||
myactions.register_action (editor_menu_actions, X_("RegionMenuGain"), _("Gain"));
|
||||
myactions.register_action (editor_menu_actions, X_("RegionMenuRanges"), _("Ranges"));
|
||||
myactions.register_action (editor_menu_actions, X_("RegionMenuFades"), _("Fades"));
|
||||
myactions.register_action (editor_menu_actions, X_("RegionMenuMIDI"), _("MIDI"));
|
||||
myactions.register_action (editor_menu_actions, X_("RegionMenuDuplicate"), _("Duplicate"));
|
||||
myactions.register_action (editor_menu_actions, X_("Link"), _("Link"));
|
||||
myactions.register_action (editor_menu_actions, X_("ZoomFocusMenu"), _("Zoom Focus"));
|
||||
myactions.register_action (editor_menu_actions, X_("LocateToMarker"), _("Locate to Markers"));
|
||||
myactions.register_action (editor_menu_actions, X_("MarkerMenu"), _("Markers"));
|
||||
myactions.register_action (editor_menu_actions, X_("MeterFalloff"), _("Meter falloff"));
|
||||
myactions.register_action (editor_menu_actions, X_("MeterHold"), _("Meter hold"));
|
||||
myactions.register_action (editor_menu_actions, X_("MIDI"), _("MIDI Options"));
|
||||
myactions.register_action (editor_menu_actions, X_("MiscOptions"), _("Misc Options"));
|
||||
myactions.register_action (editor_menu_actions, X_("Monitoring"), _("Monitoring"));
|
||||
myactions.register_action (editor_menu_actions, X_("MoveActiveMarkMenu"), _("Active Mark"));
|
||||
myactions.register_action (editor_menu_actions, X_("MovePlayHeadMenu"), _("Playhead"));
|
||||
myactions.register_action (editor_menu_actions, X_("PlayMenu"), _("Play"));
|
||||
myactions.register_action (editor_menu_actions, X_("PrimaryClockMenu"), _("Primary Clock"));
|
||||
myactions.register_action (editor_menu_actions, X_("Pullup"), _("Pullup / Pulldown"));
|
||||
myactions.register_action (editor_menu_actions, X_("RegionEditOps"), _("Region operations"));
|
||||
myactions.register_action (editor_menu_actions, X_("RegionGainMenu"), _("Gain"));
|
||||
myactions.register_action (editor_menu_actions, X_("RulerMenu"), _("Rulers"));
|
||||
myactions.register_action (editor_menu_actions, X_("SavedViewMenu"), _("Views"));
|
||||
myactions.register_action (editor_menu_actions, X_("ScrollMenu"), _("Scroll"));
|
||||
myactions.register_action (editor_menu_actions, X_("SecondaryClockMenu"), _("Secondary Clock"));
|
||||
myactions.register_action (editor_menu_actions, X_("Select"), _("Select"));
|
||||
myactions.register_action (editor_menu_actions, X_("SelectMenu"), _("Select"));
|
||||
myactions.register_action (editor_menu_actions, X_("SeparateMenu"), _("Separate"));
|
||||
myactions.register_action (editor_menu_actions, X_("SetLoopMenu"), _("Loop"));
|
||||
myactions.register_action (editor_menu_actions, X_("SetPunchMenu"), _("Punch"));
|
||||
myactions.register_action (editor_menu_actions, X_("Solo"), _("Solo"));
|
||||
myactions.register_action (editor_menu_actions, X_("Subframes"), _("Subframes"));
|
||||
myactions.register_action (editor_menu_actions, X_("SyncMenu"), _("Sync"));
|
||||
myactions.register_action (editor_menu_actions, X_("TempoMenu"), _("Tempo"));
|
||||
myactions.register_action (editor_menu_actions, X_("Timecode"), _("Timecode fps"));
|
||||
myactions.register_action (editor_menu_actions, X_("TrackHeightMenu"), _("Height"));
|
||||
myactions.register_action (editor_menu_actions, X_("TrackMenu"), _("Track"));
|
||||
myactions.register_action (editor_menu_actions, X_("Tools"), _("Tools"));
|
||||
myactions.register_action (editor_menu_actions, X_("View"), _("View"));
|
||||
myactions.register_action (editor_menu_actions, X_("ZoomFocus"), _("Zoom Focus"));
|
||||
myactions.register_action (editor_menu_actions, X_("ZoomMenu"), _("Zoom"));
|
||||
|
||||
register_region_actions ();
|
||||
|
||||
/* add named actions for the editor */
|
||||
|
||||
Actions.register_action (editor_actions, "escape", _("Break drag or deselect all"), sigc::mem_fun (*this, &Editor::escape));
|
||||
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
|
||||
when required. Editor::unlock() must be invoked directly.
|
||||
*/
|
||||
Actions.register_action (editor_actions, "lock", S_("Session|Lock"), sigc::mem_fun (*this, &Editor::lock));
|
||||
myactions.register_action (editor_actions, "lock", S_("Session|Lock"), sigc::mem_fun (*this, &Editor::lock));
|
||||
|
||||
toggle_reg_sens (editor_actions, "show-editor-mixer", _("Show Editor Mixer"), sigc::mem_fun (*this, &Editor::editor_mixer_button_toggled));
|
||||
toggle_reg_sens (editor_actions, "show-editor-list", _("Show Editor List"), sigc::mem_fun (*this, &Editor::editor_list_button_toggled));
|
||||
|
|
@ -426,11 +425,11 @@ Editor::register_actions ()
|
|||
toggle_reg_sens (editor_actions, "toggle-follow-playhead", _("Follow Playhead"), (sigc::mem_fun(*this, &Editor::toggle_follow_playhead)));
|
||||
act = reg_sens (editor_actions, "remove-last-capture", _("Remove Last Capture"), (sigc::mem_fun(*this, &Editor::remove_last_capture)));
|
||||
|
||||
Actions.register_toggle_action (editor_actions, "toggle-stationary-playhead", _("Stationary Playhead"), (mem_fun(*this, &Editor::toggle_stationary_playhead)));
|
||||
myactions.register_toggle_action (editor_actions, "toggle-stationary-playhead", _("Stationary Playhead"), (mem_fun(*this, &Editor::toggle_stationary_playhead)));
|
||||
|
||||
act = reg_sens (editor_actions, "insert-time", _("Insert Time"), (sigc::mem_fun(*this, &Editor::do_insert_time)));
|
||||
ActionManager::track_selection_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (editor_actions, "remove-time", _("Remove Time"), (mem_fun(*this, &Editor::do_remove_time)));
|
||||
act = myactions.register_action (editor_actions, "remove-time", _("Remove Time"), (mem_fun(*this, &Editor::do_remove_time)));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::track_selection_sensitive_actions.push_back (act);
|
||||
|
||||
|
|
@ -462,7 +461,7 @@ Editor::register_actions ()
|
|||
|
||||
toggle_reg_sens (editor_actions, "sound-midi-notes", _("Sound Selected MIDI Notes"), sigc::mem_fun (*this, &Editor::toggle_sound_midi_notes));
|
||||
|
||||
Glib::RefPtr<ActionGroup> zoom_actions = Actions.create_action_group (X_("Zoom"));
|
||||
Glib::RefPtr<ActionGroup> zoom_actions = myactions.create_action_group (X_("Zoom"));
|
||||
RadioAction::Group zoom_group;
|
||||
|
||||
radio_reg_sens (zoom_actions, zoom_group, "zoom-focus-left", _("Zoom Focus Left"), sigc::bind (sigc::mem_fun(*this, &Editor::zoom_focus_chosen), Editing::ZoomFocusLeft));
|
||||
|
|
@ -472,148 +471,148 @@ Editor::register_actions ()
|
|||
radio_reg_sens (zoom_actions, zoom_group, "zoom-focus-mouse", _("Zoom Focus Mouse"), sigc::bind (sigc::mem_fun(*this, &Editor::zoom_focus_chosen), Editing::ZoomFocusMouse));
|
||||
radio_reg_sens (zoom_actions, zoom_group, "zoom-focus-edit", _("Zoom Focus Edit Point"), sigc::bind (sigc::mem_fun(*this, &Editor::zoom_focus_chosen), Editing::ZoomFocusEdit));
|
||||
|
||||
Actions.register_action (editor_actions, X_("cycle-zoom-focus"), _("Next Zoom Focus"), sigc::mem_fun (*this, &Editor::cycle_zoom_focus));
|
||||
myactions.register_action (editor_actions, X_("cycle-zoom-focus"), _("Next Zoom Focus"), sigc::mem_fun (*this, &Editor::cycle_zoom_focus));
|
||||
|
||||
|
||||
Glib::RefPtr<ActionGroup> mouse_mode_actions = Actions.create_action_group (X_("MouseMode"));
|
||||
Glib::RefPtr<ActionGroup> mouse_mode_actions = myactions.create_action_group (X_("MouseMode"));
|
||||
RadioAction::Group mouse_mode_group;
|
||||
|
||||
act = Actions.register_toggle_action (mouse_mode_actions, "set-mouse-mode-object-range", _("Smart Object Mode"), sigc::mem_fun (*this, &Editor::mouse_mode_object_range_toggled));
|
||||
act = myactions.register_toggle_action (mouse_mode_actions, "set-mouse-mode-object-range", _("Smart Object Mode"), sigc::mem_fun (*this, &Editor::mouse_mode_object_range_toggled));
|
||||
smart_mode_action = Glib::RefPtr<ToggleAction>::cast_static (act);
|
||||
smart_mode_button.set_related_action (smart_mode_action);
|
||||
smart_mode_button.set_text (_("Smart"));
|
||||
smart_mode_button.set_name ("mouse mode button");
|
||||
|
||||
act = Actions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-object", _("Object Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseObject));
|
||||
act = myactions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-object", _("Object Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseObject));
|
||||
mouse_move_button.set_related_action (act);
|
||||
mouse_move_button.set_icon (Gtkmm2ext::ArdourIcon::ToolGrab);
|
||||
mouse_move_button.set_name ("mouse mode button");
|
||||
|
||||
act = Actions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-range", _("Range Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseRange));
|
||||
act = myactions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-range", _("Range Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseRange));
|
||||
mouse_select_button.set_related_action (act);
|
||||
mouse_select_button.set_icon (Gtkmm2ext::ArdourIcon::ToolRange);
|
||||
mouse_select_button.set_name ("mouse mode button");
|
||||
|
||||
act = Actions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-draw", _("Note Drawing Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseDraw));
|
||||
act = myactions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-draw", _("Note Drawing Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseDraw));
|
||||
mouse_draw_button.set_related_action (act);
|
||||
mouse_draw_button.set_icon (Gtkmm2ext::ArdourIcon::ToolDraw);
|
||||
mouse_draw_button.set_name ("mouse mode button");
|
||||
|
||||
act = Actions.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));
|
||||
act = myactions.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 (Gtkmm2ext::ArdourIcon::ToolAudition);
|
||||
mouse_audition_button.set_name ("mouse mode button");
|
||||
|
||||
act = Actions.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));
|
||||
act = myactions.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 (Gtkmm2ext::ArdourIcon::ToolStretch);
|
||||
mouse_timefx_button.set_name ("mouse mode button");
|
||||
|
||||
act = Actions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-content", _("Content Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseContent));
|
||||
act = myactions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-content", _("Content Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseContent));
|
||||
mouse_content_button.set_related_action (act);
|
||||
mouse_content_button.set_icon (Gtkmm2ext::ArdourIcon::ToolContent);
|
||||
mouse_content_button.set_name ("mouse mode button");
|
||||
|
||||
if(!Profile->get_mixbus()) {
|
||||
act = Actions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-cut", _("Cut Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseCut));
|
||||
act = myactions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-cut", _("Cut Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseCut));
|
||||
mouse_cut_button.set_related_action (act);
|
||||
mouse_cut_button.set_icon (Gtkmm2ext::ArdourIcon::ToolCut);
|
||||
mouse_cut_button.set_name ("mouse mode button");
|
||||
}
|
||||
|
||||
Actions.register_action (editor_actions, "step-mouse-mode", _("Step Mouse Mode"), sigc::bind (sigc::mem_fun(*this, &Editor::step_mouse_mode), true));
|
||||
myactions.register_action (editor_actions, "step-mouse-mode", _("Step Mouse Mode"), sigc::bind (sigc::mem_fun(*this, &Editor::step_mouse_mode), true));
|
||||
|
||||
RadioAction::Group edit_point_group;
|
||||
Actions.register_radio_action (editor_actions, edit_point_group, X_("edit-at-playhead"), _("Playhead"), (sigc::bind (sigc::mem_fun(*this, &Editor::edit_point_chosen), Editing::EditAtPlayhead)));
|
||||
Actions.register_radio_action (editor_actions, edit_point_group, X_("edit-at-mouse"), _("Mouse"), (sigc::bind (sigc::mem_fun(*this, &Editor::edit_point_chosen), Editing::EditAtMouse)));
|
||||
Actions.register_radio_action (editor_actions, edit_point_group, X_("edit-at-selected-marker"), _("Marker"), (sigc::bind (sigc::mem_fun(*this, &Editor::edit_point_chosen), Editing::EditAtSelectedMarker)));
|
||||
myactions.register_radio_action (editor_actions, edit_point_group, X_("edit-at-playhead"), _("Playhead"), (sigc::bind (sigc::mem_fun(*this, &Editor::edit_point_chosen), Editing::EditAtPlayhead)));
|
||||
myactions.register_radio_action (editor_actions, edit_point_group, X_("edit-at-mouse"), _("Mouse"), (sigc::bind (sigc::mem_fun(*this, &Editor::edit_point_chosen), Editing::EditAtMouse)));
|
||||
myactions.register_radio_action (editor_actions, edit_point_group, X_("edit-at-selected-marker"), _("Marker"), (sigc::bind (sigc::mem_fun(*this, &Editor::edit_point_chosen), Editing::EditAtSelectedMarker)));
|
||||
|
||||
Actions.register_action (editor_actions, "cycle-edit-point", _("Change Edit Point"), sigc::bind (sigc::mem_fun (*this, &Editor::cycle_edit_point), false));
|
||||
Actions.register_action (editor_actions, "cycle-edit-point-with-marker", _("Change Edit Point Including Marker"), sigc::bind (sigc::mem_fun (*this, &Editor::cycle_edit_point), true));
|
||||
myactions.register_action (editor_actions, "cycle-edit-point", _("Change Edit Point"), sigc::bind (sigc::mem_fun (*this, &Editor::cycle_edit_point), false));
|
||||
myactions.register_action (editor_actions, "cycle-edit-point-with-marker", _("Change Edit Point Including Marker"), sigc::bind (sigc::mem_fun (*this, &Editor::cycle_edit_point), true));
|
||||
|
||||
// Actions.register_action (editor_actions, "set-edit-splice", _("Splice"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Splice));
|
||||
Actions.register_action (editor_actions, "set-edit-ripple", _("Ripple"), bind (mem_fun (*this, &Editor::set_edit_mode), Ripple));
|
||||
Actions.register_action (editor_actions, "set-edit-slide", _("Slide"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Slide));
|
||||
Actions.register_action (editor_actions, "set-edit-lock", S_("EditMode|Lock"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Lock));
|
||||
Actions.register_action (editor_actions, "cycle-edit-mode", _("Cycle Edit Mode"), sigc::mem_fun (*this, &Editor::cycle_edit_mode));
|
||||
// myactions.register_action (editor_actions, "set-edit-splice", _("Splice"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Splice));
|
||||
myactions.register_action (editor_actions, "set-edit-ripple", _("Ripple"), bind (mem_fun (*this, &Editor::set_edit_mode), Ripple));
|
||||
myactions.register_action (editor_actions, "set-edit-slide", _("Slide"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Slide));
|
||||
myactions.register_action (editor_actions, "set-edit-lock", S_("EditMode|Lock"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Lock));
|
||||
myactions.register_action (editor_actions, "cycle-edit-mode", _("Cycle Edit Mode"), sigc::mem_fun (*this, &Editor::cycle_edit_mode));
|
||||
|
||||
Actions.register_action (editor_actions, X_("SnapTo"), _("Snap to"));
|
||||
Actions.register_action (editor_actions, X_("SnapMode"), _("Snap Mode"));
|
||||
myactions.register_action (editor_actions, X_("SnapTo"), _("Snap to"));
|
||||
myactions.register_action (editor_actions, X_("SnapMode"), _("Snap Mode"));
|
||||
|
||||
RadioAction::Group snap_mode_group;
|
||||
Actions.register_radio_action (editor_actions, snap_mode_group, X_("snap-off"), _("No Grid"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_mode_chosen), Editing::SnapOff)));
|
||||
Actions.register_radio_action (editor_actions, snap_mode_group, X_("snap-normal"), _("Grid"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_mode_chosen), Editing::SnapNormal)));
|
||||
Actions.register_radio_action (editor_actions, snap_mode_group, X_("snap-magnetic"), _("Magnetic"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_mode_chosen), Editing::SnapMagnetic)));
|
||||
myactions.register_radio_action (editor_actions, snap_mode_group, X_("snap-off"), _("No Grid"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_mode_chosen), Editing::SnapOff)));
|
||||
myactions.register_radio_action (editor_actions, snap_mode_group, X_("snap-normal"), _("Grid"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_mode_chosen), Editing::SnapNormal)));
|
||||
myactions.register_radio_action (editor_actions, snap_mode_group, X_("snap-magnetic"), _("Magnetic"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_mode_chosen), Editing::SnapMagnetic)));
|
||||
|
||||
Actions.register_action (editor_actions, X_("cycle-snap-mode"), _("Next Snap Mode"), sigc::mem_fun (*this, &Editor::cycle_snap_mode));
|
||||
Actions.register_action (editor_actions, X_("next-snap-choice"), _("Next Snap Choice"), sigc::mem_fun (*this, &Editor::next_snap_choice));
|
||||
Actions.register_action (editor_actions, X_("next-snap-choice-music-only"), _("Next Musical Snap Choice"), sigc::mem_fun (*this, &Editor::next_snap_choice_music_only));
|
||||
Actions.register_action (editor_actions, X_("prev-snap-choice"), _("Previous Snap Choice"), sigc::mem_fun (*this, &Editor::prev_snap_choice));
|
||||
Actions.register_action (editor_actions, X_("prev-snap-choice-music-only"), _("Previous Musical Snap Choice"), sigc::mem_fun (*this, &Editor::prev_snap_choice_music_only));
|
||||
myactions.register_action (editor_actions, X_("cycle-snap-mode"), _("Next Snap Mode"), sigc::mem_fun (*this, &Editor::cycle_snap_mode));
|
||||
myactions.register_action (editor_actions, X_("next-snap-choice"), _("Next Snap Choice"), sigc::mem_fun (*this, &Editor::next_snap_choice));
|
||||
myactions.register_action (editor_actions, X_("next-snap-choice-music-only"), _("Next Musical Snap Choice"), sigc::mem_fun (*this, &Editor::next_snap_choice_music_only));
|
||||
myactions.register_action (editor_actions, X_("prev-snap-choice"), _("Previous Snap Choice"), sigc::mem_fun (*this, &Editor::prev_snap_choice));
|
||||
myactions.register_action (editor_actions, X_("prev-snap-choice-music-only"), _("Previous Musical Snap Choice"), sigc::mem_fun (*this, &Editor::prev_snap_choice_music_only));
|
||||
|
||||
Glib::RefPtr<ActionGroup> snap_actions = Actions.create_action_group (X_("Snap"));
|
||||
Glib::RefPtr<ActionGroup> snap_actions = myactions.create_action_group (X_("Snap"));
|
||||
RadioAction::Group snap_choice_group;
|
||||
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-cd-frame"), _("Snap to CD Frame"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToCDFrame)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-timecode-frame"), _("Snap to Timecode Frame"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToTimecodeFrame)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-timecode-seconds"), _("Snap to Timecode Seconds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToTimecodeSeconds)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-timecode-minutes"), _("Snap to Timecode Minutes"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToTimecodeMinutes)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-seconds"), _("Snap to Seconds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToSeconds)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-minutes"), _("Snap to Minutes"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToMinutes)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-cd-frame"), _("Snap to CD Frame"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToCDFrame)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-timecode-frame"), _("Snap to Timecode Frame"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToTimecodeFrame)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-timecode-seconds"), _("Snap to Timecode Seconds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToTimecodeSeconds)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-timecode-minutes"), _("Snap to Timecode Minutes"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToTimecodeMinutes)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-seconds"), _("Snap to Seconds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToSeconds)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-minutes"), _("Snap to Minutes"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToMinutes)));
|
||||
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-onetwentyeighths"), _("Snap to One Twenty Eighths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv128)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-sixtyfourths"), _("Snap to Sixty Fourths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv64)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-thirtyseconds"), _("Snap to Thirty Seconds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv32)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-twentyeighths"), _("Snap to Twenty Eighths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv28)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-twentyfourths"), _("Snap to Twenty Fourths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv24)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-twentieths"), _("Snap to Twentieths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv20)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-asixteenthbeat"), _("Snap to Sixteenths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv16)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-fourteenths"), _("Snap to Fourteenths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv14)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-twelfths"), _("Snap to Twelfths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv12)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-tenths"), _("Snap to Tenths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv10)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-eighths"), _("Snap to Eighths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv8)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-sevenths"), _("Snap to Sevenths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv7)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-sixths"), _("Snap to Sixths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv6)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-fifths"), _("Snap to Fifths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv5)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-quarters"), _("Snap to Quarters"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv4)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-thirds"), _("Snap to Thirds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv3)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-halves"), _("Snap to Halves"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv2)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-onetwentyeighths"), _("Snap to One Twenty Eighths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv128)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-sixtyfourths"), _("Snap to Sixty Fourths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv64)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-thirtyseconds"), _("Snap to Thirty Seconds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv32)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-twentyeighths"), _("Snap to Twenty Eighths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv28)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-twentyfourths"), _("Snap to Twenty Fourths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv24)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-twentieths"), _("Snap to Twentieths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv20)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-asixteenthbeat"), _("Snap to Sixteenths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv16)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-fourteenths"), _("Snap to Fourteenths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv14)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-twelfths"), _("Snap to Twelfths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv12)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-tenths"), _("Snap to Tenths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv10)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-eighths"), _("Snap to Eighths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv8)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-sevenths"), _("Snap to Sevenths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv7)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-sixths"), _("Snap to Sixths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv6)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-fifths"), _("Snap to Fifths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv5)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-quarters"), _("Snap to Quarters"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv4)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-thirds"), _("Snap to Thirds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv3)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-halves"), _("Snap to Halves"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv2)));
|
||||
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-beat"), _("Snap to Beat"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeat)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-bar"), _("Snap to Bar"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBar)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-mark"), _("Snap to Mark"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToMark)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-start"), _("Snap to Region Start"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToRegionStart)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-end"), _("Snap to Region End"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToRegionEnd)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-sync"), _("Snap to Region Sync"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToRegionSync)));
|
||||
Actions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-boundary"), _("Snap to Region Boundary"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToRegionBoundary)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-beat"), _("Snap to Beat"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeat)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-bar"), _("Snap to Bar"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBar)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-mark"), _("Snap to Mark"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToMark)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-start"), _("Snap to Region Start"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToRegionStart)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-end"), _("Snap to Region End"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToRegionEnd)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-sync"), _("Snap to Region Sync"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToRegionSync)));
|
||||
myactions.register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-boundary"), _("Snap to Region Boundary"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToRegionBoundary)));
|
||||
|
||||
Actions.register_toggle_action (editor_actions, X_("show-marker-lines"), _("Show Marker Lines"), sigc::mem_fun (*this, &Editor::toggle_marker_lines));
|
||||
myactions.register_toggle_action (editor_actions, X_("show-marker-lines"), _("Show Marker Lines"), sigc::mem_fun (*this, &Editor::toggle_marker_lines));
|
||||
|
||||
/* RULERS */
|
||||
|
||||
Glib::RefPtr<ActionGroup> ruler_actions = Actions.create_action_group (X_("Rulers"));
|
||||
ruler_tempo_action = Glib::RefPtr<ToggleAction>::cast_static (Actions.register_toggle_action (ruler_actions, X_("toggle-tempo-ruler"), _("Tempo"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_time_tempo)));
|
||||
ruler_meter_action = Glib::RefPtr<ToggleAction>::cast_static (Actions.register_toggle_action (ruler_actions, X_("toggle-meter-ruler"), _("Meter"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_time_meter)));
|
||||
ruler_range_action = Glib::RefPtr<ToggleAction>::cast_static (Actions.register_toggle_action (ruler_actions, X_("toggle-range-ruler"), _("Ranges"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_time_range_marker)));
|
||||
ruler_marker_action = Glib::RefPtr<ToggleAction>::cast_static (Actions.register_toggle_action (ruler_actions, X_("toggle-marker-ruler"), _("Markers"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_time_marker)));
|
||||
ruler_cd_marker_action = Glib::RefPtr<ToggleAction>::cast_static (Actions.register_toggle_action (ruler_actions, X_("toggle-cd-marker-ruler"), _("CD Markers"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_time_cd_marker)));
|
||||
ruler_loop_punch_action = Glib::RefPtr<ToggleAction>::cast_static (Actions.register_toggle_action (ruler_actions, X_("toggle-loop-punch-ruler"), _("Loop/Punch"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_time_transport_marker)));
|
||||
ruler_bbt_action = Glib::RefPtr<ToggleAction>::cast_static (Actions.register_toggle_action (ruler_actions, X_("toggle-bbt-ruler"), _("Bars & Beats"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_metric_bbt)));
|
||||
ruler_samples_action = Glib::RefPtr<ToggleAction>::cast_static (Actions.register_toggle_action (ruler_actions, X_("toggle-samples-ruler"), _("Samples"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_metric_samples)));
|
||||
ruler_timecode_action = Glib::RefPtr<ToggleAction>::cast_static (Actions.register_toggle_action (ruler_actions, X_("toggle-timecode-ruler"), _("Timecode"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_metric_timecode)));
|
||||
ruler_minsec_action = Glib::RefPtr<ToggleAction>::cast_static (Actions.register_toggle_action (ruler_actions, X_("toggle-minsec-ruler"), _("Min:Sec"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_metric_minsec)));
|
||||
Glib::RefPtr<ActionGroup> ruler_actions = myactions.create_action_group (X_("Rulers"));
|
||||
ruler_tempo_action = Glib::RefPtr<ToggleAction>::cast_static (myactions.register_toggle_action (ruler_actions, X_("toggle-tempo-ruler"), _("Tempo"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_time_tempo)));
|
||||
ruler_meter_action = Glib::RefPtr<ToggleAction>::cast_static (myactions.register_toggle_action (ruler_actions, X_("toggle-meter-ruler"), _("Meter"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_time_meter)));
|
||||
ruler_range_action = Glib::RefPtr<ToggleAction>::cast_static (myactions.register_toggle_action (ruler_actions, X_("toggle-range-ruler"), _("Ranges"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_time_range_marker)));
|
||||
ruler_marker_action = Glib::RefPtr<ToggleAction>::cast_static (myactions.register_toggle_action (ruler_actions, X_("toggle-marker-ruler"), _("Markers"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_time_marker)));
|
||||
ruler_cd_marker_action = Glib::RefPtr<ToggleAction>::cast_static (myactions.register_toggle_action (ruler_actions, X_("toggle-cd-marker-ruler"), _("CD Markers"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_time_cd_marker)));
|
||||
ruler_loop_punch_action = Glib::RefPtr<ToggleAction>::cast_static (myactions.register_toggle_action (ruler_actions, X_("toggle-loop-punch-ruler"), _("Loop/Punch"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_time_transport_marker)));
|
||||
ruler_bbt_action = Glib::RefPtr<ToggleAction>::cast_static (myactions.register_toggle_action (ruler_actions, X_("toggle-bbt-ruler"), _("Bars & Beats"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_metric_bbt)));
|
||||
ruler_samples_action = Glib::RefPtr<ToggleAction>::cast_static (myactions.register_toggle_action (ruler_actions, X_("toggle-samples-ruler"), _("Samples"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_metric_samples)));
|
||||
ruler_timecode_action = Glib::RefPtr<ToggleAction>::cast_static (myactions.register_toggle_action (ruler_actions, X_("toggle-timecode-ruler"), _("Timecode"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_metric_timecode)));
|
||||
ruler_minsec_action = Glib::RefPtr<ToggleAction>::cast_static (myactions.register_toggle_action (ruler_actions, X_("toggle-minsec-ruler"), _("Min:Sec"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_metric_minsec)));
|
||||
|
||||
Actions.register_action (editor_menu_actions, X_("VideoMonitorMenu"), _("Video Monitor"));
|
||||
myactions.register_action (editor_menu_actions, X_("VideoMonitorMenu"), _("Video Monitor"));
|
||||
|
||||
ruler_video_action = Glib::RefPtr<ToggleAction>::cast_static (Actions.register_toggle_action (ruler_actions, X_("toggle-video-ruler"), _("Video"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_video_timeline)));
|
||||
xjadeo_proc_action = Glib::RefPtr<ToggleAction>::cast_static (Actions.register_toggle_action (editor_actions, X_("ToggleJadeo"), _("Video Monitor"), sigc::mem_fun (*this, &Editor::set_xjadeo_proc)));
|
||||
ruler_video_action = Glib::RefPtr<ToggleAction>::cast_static (myactions.register_toggle_action (ruler_actions, X_("toggle-video-ruler"), _("Video"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_video_timeline)));
|
||||
xjadeo_proc_action = Glib::RefPtr<ToggleAction>::cast_static (myactions.register_toggle_action (editor_actions, X_("ToggleJadeo"), _("Video Monitor"), sigc::mem_fun (*this, &Editor::set_xjadeo_proc)));
|
||||
|
||||
xjadeo_ontop_action = Glib::RefPtr<ToggleAction>::cast_static (Actions.register_toggle_action (editor_actions, X_("toggle-vmon-ontop"), _("Always on Top"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 1)));
|
||||
xjadeo_timecode_action = Glib::RefPtr<ToggleAction>::cast_static (Actions.register_toggle_action (editor_actions, X_("toggle-vmon-timecode"), _("Timecode"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 2)));
|
||||
xjadeo_frame_action = Glib::RefPtr<ToggleAction>::cast_static (Actions.register_toggle_action (editor_actions, X_("toggle-vmon-frame"), _("Frame number"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 3)));
|
||||
xjadeo_osdbg_action = Glib::RefPtr<ToggleAction>::cast_static (Actions.register_toggle_action (editor_actions, X_("toggle-vmon-osdbg"), _("Timecode Background"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 4)));
|
||||
xjadeo_fullscreen_action = Glib::RefPtr<ToggleAction>::cast_static (Actions.register_toggle_action (editor_actions, X_("toggle-vmon-fullscreen"), _("Fullscreen"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 5)));
|
||||
xjadeo_letterbox_action = Glib::RefPtr<ToggleAction>::cast_static (Actions.register_toggle_action (editor_actions, X_("toggle-vmon-letterbox"), _("Letterbox"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 6)));
|
||||
xjadeo_ontop_action = Glib::RefPtr<ToggleAction>::cast_static (myactions.register_toggle_action (editor_actions, X_("toggle-vmon-ontop"), _("Always on Top"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 1)));
|
||||
xjadeo_timecode_action = Glib::RefPtr<ToggleAction>::cast_static (myactions.register_toggle_action (editor_actions, X_("toggle-vmon-timecode"), _("Timecode"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 2)));
|
||||
xjadeo_frame_action = Glib::RefPtr<ToggleAction>::cast_static (myactions.register_toggle_action (editor_actions, X_("toggle-vmon-frame"), _("Frame number"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 3)));
|
||||
xjadeo_osdbg_action = Glib::RefPtr<ToggleAction>::cast_static (myactions.register_toggle_action (editor_actions, X_("toggle-vmon-osdbg"), _("Timecode Background"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 4)));
|
||||
xjadeo_fullscreen_action = Glib::RefPtr<ToggleAction>::cast_static (myactions.register_toggle_action (editor_actions, X_("toggle-vmon-fullscreen"), _("Fullscreen"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 5)));
|
||||
xjadeo_letterbox_action = Glib::RefPtr<ToggleAction>::cast_static (myactions.register_toggle_action (editor_actions, X_("toggle-vmon-letterbox"), _("Letterbox"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 6)));
|
||||
xjadeo_zoom_100 = reg_sens (editor_actions, "zoom-vmon-100", _("Original Size"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 7));
|
||||
|
||||
/* set defaults here */
|
||||
|
|
@ -666,52 +665,52 @@ Editor::register_actions ()
|
|||
|
||||
/* REGION LIST */
|
||||
|
||||
Glib::RefPtr<ActionGroup> rl_actions = Actions.create_action_group (X_("RegionList"));
|
||||
Glib::RefPtr<ActionGroup> rl_actions = myactions.create_action_group (X_("RegionList"));
|
||||
RadioAction::Group sort_type_group;
|
||||
RadioAction::Group sort_order_group;
|
||||
|
||||
/* the region list popup menu */
|
||||
Actions.register_action (rl_actions, X_("RegionListSort"), _("Sort"));
|
||||
myactions.register_action (rl_actions, X_("RegionListSort"), _("Sort"));
|
||||
|
||||
act = Actions.register_action (rl_actions, X_("rlAudition"), _("Audition"), sigc::mem_fun(*this, &Editor::audition_region_from_region_list));
|
||||
act = myactions.register_action (rl_actions, X_("rlAudition"), _("Audition"), sigc::mem_fun(*this, &Editor::audition_region_from_region_list));
|
||||
ActionManager::region_list_selection_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (rl_actions, X_("rlHide"), _("Hide"), sigc::mem_fun(*this, &Editor::hide_region_from_region_list));
|
||||
act = myactions.register_action (rl_actions, X_("rlHide"), _("Hide"), sigc::mem_fun(*this, &Editor::hide_region_from_region_list));
|
||||
ActionManager::region_list_selection_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (rl_actions, X_("rlShow"), _("Show"), sigc::mem_fun(*this, &Editor::show_region_in_region_list));
|
||||
act = myactions.register_action (rl_actions, X_("rlShow"), _("Show"), sigc::mem_fun(*this, &Editor::show_region_in_region_list));
|
||||
ActionManager::region_list_selection_sensitive_actions.push_back (act);
|
||||
|
||||
Actions.register_toggle_action (rl_actions, X_("rlShowAll"), _("Show All"), sigc::mem_fun(*_regions, &EditorRegions::toggle_full));
|
||||
Actions.register_toggle_action (rl_actions, X_("rlShowAuto"), _("Show Automatic Regions"), sigc::mem_fun (*_regions, &EditorRegions::toggle_show_auto_regions));
|
||||
myactions.register_toggle_action (rl_actions, X_("rlShowAll"), _("Show All"), sigc::mem_fun(*_regions, &EditorRegions::toggle_full));
|
||||
myactions.register_toggle_action (rl_actions, X_("rlShowAuto"), _("Show Automatic Regions"), sigc::mem_fun (*_regions, &EditorRegions::toggle_show_auto_regions));
|
||||
|
||||
Actions.register_radio_action (rl_actions, sort_order_group, X_("SortAscending"), _("Ascending"),
|
||||
myactions.register_radio_action (rl_actions, sort_order_group, X_("SortAscending"), _("Ascending"),
|
||||
sigc::bind (sigc::mem_fun (*_regions, &EditorRegions::reset_sort_direction), true));
|
||||
Actions.register_radio_action (rl_actions, sort_order_group, X_("SortDescending"), _("Descending"),
|
||||
myactions.register_radio_action (rl_actions, sort_order_group, X_("SortDescending"), _("Descending"),
|
||||
sigc::bind (sigc::mem_fun (*_regions, &EditorRegions::reset_sort_direction), false));
|
||||
|
||||
Actions.register_radio_action (rl_actions, sort_type_group, X_("SortByRegionName"), _("By Region Name"),
|
||||
myactions.register_radio_action (rl_actions, sort_type_group, X_("SortByRegionName"), _("By Region Name"),
|
||||
sigc::bind (sigc::mem_fun (*_regions, &EditorRegions::reset_sort_type), ByName, false));
|
||||
Actions.register_radio_action (rl_actions, sort_type_group, X_("SortByRegionLength"), _("By Region Length"),
|
||||
myactions.register_radio_action (rl_actions, sort_type_group, X_("SortByRegionLength"), _("By Region Length"),
|
||||
sigc::bind (sigc::mem_fun (*_regions, &EditorRegions::reset_sort_type), ByLength, false));
|
||||
Actions.register_radio_action (rl_actions, sort_type_group, X_("SortByRegionPosition"), _("By Region Position"),
|
||||
myactions.register_radio_action (rl_actions, sort_type_group, X_("SortByRegionPosition"), _("By Region Position"),
|
||||
sigc::bind (sigc::mem_fun (*_regions, &EditorRegions::reset_sort_type), ByPosition, false));
|
||||
Actions.register_radio_action (rl_actions, sort_type_group, X_("SortByRegionTimestamp"), _("By Region Timestamp"),
|
||||
myactions.register_radio_action (rl_actions, sort_type_group, X_("SortByRegionTimestamp"), _("By Region Timestamp"),
|
||||
sigc::bind (sigc::mem_fun (*_regions, &EditorRegions::reset_sort_type), ByTimestamp, false));
|
||||
Actions.register_radio_action (rl_actions, sort_type_group, X_("SortByRegionStartinFile"), _("By Region Start in File"),
|
||||
myactions.register_radio_action (rl_actions, sort_type_group, X_("SortByRegionStartinFile"), _("By Region Start in File"),
|
||||
sigc::bind (sigc::mem_fun (*_regions, &EditorRegions::reset_sort_type), ByStartInFile, false));
|
||||
Actions.register_radio_action (rl_actions, sort_type_group, X_("SortByRegionEndinFile"), _("By Region End in File"),
|
||||
myactions.register_radio_action (rl_actions, sort_type_group, X_("SortByRegionEndinFile"), _("By Region End in File"),
|
||||
sigc::bind (sigc::mem_fun (*_regions, &EditorRegions::reset_sort_type), ByEndInFile, false));
|
||||
Actions.register_radio_action (rl_actions, sort_type_group, X_("SortBySourceFileName"), _("By Source File Name"),
|
||||
myactions.register_radio_action (rl_actions, sort_type_group, X_("SortBySourceFileName"), _("By Source File Name"),
|
||||
sigc::bind (sigc::mem_fun (*_regions, &EditorRegions::reset_sort_type), BySourceFileName, false));
|
||||
Actions.register_radio_action (rl_actions, sort_type_group, X_("SortBySourceFileLength"), _("By Source File Length"),
|
||||
myactions.register_radio_action (rl_actions, sort_type_group, X_("SortBySourceFileLength"), _("By Source File Length"),
|
||||
sigc::bind (sigc::mem_fun (*_regions, &EditorRegions::reset_sort_type), BySourceFileLength, false));
|
||||
Actions.register_radio_action (rl_actions, sort_type_group, X_("SortBySourceFileCreationDate"), _("By Source File Creation Date"),
|
||||
myactions.register_radio_action (rl_actions, sort_type_group, X_("SortBySourceFileCreationDate"), _("By Source File Creation Date"),
|
||||
sigc::bind (sigc::mem_fun (*_regions, &EditorRegions::reset_sort_type), BySourceFileCreationDate, false));
|
||||
Actions.register_radio_action (rl_actions, sort_type_group, X_("SortBySourceFilesystem"), _("By Source Filesystem"),
|
||||
myactions.register_radio_action (rl_actions, sort_type_group, X_("SortBySourceFilesystem"), _("By Source Filesystem"),
|
||||
sigc::bind (sigc::mem_fun (*_regions, &EditorRegions::reset_sort_type), BySourceFileFS, false));
|
||||
|
||||
Actions.register_action (rl_actions, X_("removeUnusedRegions"), _("Remove Unused"), sigc::mem_fun (*_regions, &EditorRegions::remove_unused_regions));
|
||||
myactions.register_action (rl_actions, X_("removeUnusedRegions"), _("Remove Unused"), sigc::mem_fun (*_regions, &EditorRegions::remove_unused_regions));
|
||||
|
||||
act = reg_sens (editor_actions, X_("addExistingPTFiles"), _("Import PT session"), sigc::mem_fun (*this, &Editor::external_pt_dialog));
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
|
|
@ -724,33 +723,34 @@ Editor::register_actions ()
|
|||
act = reg_sens (editor_actions, X_("addExternalAudioToRegionList"), _("Import to Region List..."), sigc::bind (sigc::mem_fun(*this, &Editor::add_external_audio_action), ImportAsRegion));
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
|
||||
act = Actions.register_action (editor_actions, X_("importFromSession"), _("Import from Session"), sigc::mem_fun(*this, &Editor::session_import_dialog));
|
||||
act = myactions.register_action (editor_actions, X_("importFromSession"), _("Import from Session"), sigc::mem_fun(*this, &Editor::session_import_dialog));
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
|
||||
|
||||
act = Actions.register_action (editor_actions, X_("bring-into-session"), _("Bring all media into session folder"), sigc::mem_fun(*this, &Editor::bring_all_sources_into_session));
|
||||
act = myactions.register_action (editor_actions, X_("bring-into-session"), _("Bring all media into session folder"), sigc::mem_fun(*this, &Editor::bring_all_sources_into_session));
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
|
||||
Actions.register_toggle_action (editor_actions, X_("ToggleSummary"), _("Show Summary"), sigc::mem_fun (*this, &Editor::set_summary));
|
||||
myactions.register_toggle_action (editor_actions, X_("ToggleSummary"), _("Show Summary"), sigc::mem_fun (*this, &Editor::set_summary));
|
||||
|
||||
Actions.register_toggle_action (editor_actions, X_("ToggleGroupTabs"), _("Show Group Tabs"), sigc::mem_fun (*this, &Editor::set_group_tabs));
|
||||
myactions.register_toggle_action (editor_actions, X_("ToggleGroupTabs"), _("Show Group Tabs"), sigc::mem_fun (*this, &Editor::set_group_tabs));
|
||||
|
||||
Actions.register_toggle_action (editor_actions, X_("ToggleMeasureVisibility"), _("Show Measure Lines"), sigc::mem_fun (*this, &Editor::toggle_measure_visibility));
|
||||
myactions.register_toggle_action (editor_actions, X_("ToggleMeasureVisibility"), _("Show Measure Lines"), sigc::mem_fun (*this, &Editor::toggle_measure_visibility));
|
||||
|
||||
/* if there is a logo in the editor canvas, its always visible at startup */
|
||||
|
||||
act = Actions.register_toggle_action (editor_actions, X_("ToggleLogoVisibility"), _("Show Logo"), sigc::mem_fun (*this, &Editor::toggle_logo_visibility));
|
||||
act = myactions.register_toggle_action (editor_actions, X_("ToggleLogoVisibility"), _("Show Logo"), sigc::mem_fun (*this, &Editor::toggle_logo_visibility));
|
||||
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||
tact->set_active (true);
|
||||
|
||||
Actions.register_action (editor_actions, X_("toggle-midi-input-active"), _("Toggle MIDI Input Active for Editor-Selected Tracks/Busses"),
|
||||
myactions.register_action (editor_actions, X_("toggle-midi-input-active"), _("Toggle MIDI Input Active for Editor-Selected Tracks/Busses"),
|
||||
sigc::bind (sigc::mem_fun (*this, &Editor::toggle_midi_input_active), false));
|
||||
}
|
||||
|
||||
void
|
||||
Editor::load_bindings ()
|
||||
{
|
||||
bindings = Bindings::get_bindings (X_("editor"));
|
||||
bindings = Bindings::get_bindings (X_("editor"), myactions);
|
||||
global_hpacker.set_data ("ardour-bindings", bindings);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1774,7 +1774,7 @@ Editor::reset_canvas_action_sensitivity (bool onoff)
|
|||
void
|
||||
Editor::register_region_actions ()
|
||||
{
|
||||
_region_actions = Actions.create_action_group (X_("Region"));
|
||||
_region_actions = myactions.create_action_group (X_("Region"));
|
||||
|
||||
/* PART 1: actions that operate on the selection, and for which the edit point type and location is irrelevant */
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
using namespace ARDOUR;
|
||||
using namespace Gtk;
|
||||
using namespace PBD;
|
||||
using Gtkmm2ext::Actions;
|
||||
|
||||
using Gtkmm2ext::Bindings;
|
||||
|
||||
MixerActor::MixerActor ()
|
||||
|
|
@ -56,36 +56,36 @@ MixerActor::~MixerActor ()
|
|||
void
|
||||
MixerActor::register_actions ()
|
||||
{
|
||||
Glib::RefPtr<ActionGroup> group = Actions.create_action_group (X_("Mixer"));
|
||||
Glib::RefPtr<ActionGroup> group = myactions.create_action_group (X_("Mixer"));
|
||||
|
||||
Actions.register_action (group, "solo", _("Toggle Solo on Mixer-Selected Tracks/Busses"), sigc::mem_fun (*this, &MixerActor::solo_action));
|
||||
Actions.register_action (group, "mute", _("Toggle Mute on Mixer-Selected Tracks/Busses"), sigc::mem_fun (*this, &MixerActor::mute_action));
|
||||
Actions.register_action (group, "recenable", _("Toggle Rec-enable on Mixer-Selected Tracks/Busses"), sigc::mem_fun (*this, &MixerActor::rec_enable_action));
|
||||
Actions.register_action (group, "increment-gain", _("Decrease Gain on Mixer-Selected Tracks/Busses"), sigc::mem_fun (*this, &MixerActor::step_gain_up_action));
|
||||
Actions.register_action (group, "decrement-gain", _("Increase Gain on Mixer-Selected Tracks/Busses"), sigc::mem_fun (*this, &MixerActor::step_gain_down_action));
|
||||
Actions.register_action (group, "unity-gain", _("Set Gain to 0dB on Mixer-Selected Tracks/Busses"), sigc::mem_fun (*this, &MixerActor::unity_gain_action));
|
||||
myactions.register_action (group, "solo", _("Toggle Solo on Mixer-Selected Tracks/Busses"), sigc::mem_fun (*this, &MixerActor::solo_action));
|
||||
myactions.register_action (group, "mute", _("Toggle Mute on Mixer-Selected Tracks/Busses"), sigc::mem_fun (*this, &MixerActor::mute_action));
|
||||
myactions.register_action (group, "recenable", _("Toggle Rec-enable on Mixer-Selected Tracks/Busses"), sigc::mem_fun (*this, &MixerActor::rec_enable_action));
|
||||
myactions.register_action (group, "increment-gain", _("Decrease Gain on Mixer-Selected Tracks/Busses"), sigc::mem_fun (*this, &MixerActor::step_gain_up_action));
|
||||
myactions.register_action (group, "decrement-gain", _("Increase Gain on Mixer-Selected Tracks/Busses"), sigc::mem_fun (*this, &MixerActor::step_gain_down_action));
|
||||
myactions.register_action (group, "unity-gain", _("Set Gain to 0dB on Mixer-Selected Tracks/Busses"), sigc::mem_fun (*this, &MixerActor::unity_gain_action));
|
||||
|
||||
|
||||
Actions.register_action (group, "copy-processors", _("Copy Selected Processors"), sigc::mem_fun (*this, &MixerActor::copy_processors));
|
||||
Actions.register_action (group, "cut-processors", _("Cut Selected Processors"), sigc::mem_fun (*this, &MixerActor::cut_processors));
|
||||
Actions.register_action (group, "paste-processors", _("Paste Selected Processors"), sigc::mem_fun (*this, &MixerActor::paste_processors));
|
||||
Actions.register_action (group, "delete-processors", _("Delete Selected Processors"), sigc::mem_fun (*this, &MixerActor::delete_processors));
|
||||
Actions.register_action (group, "select-all-processors", _("Select All (visible) Processors"), sigc::mem_fun (*this, &MixerActor::select_all_processors));
|
||||
Actions.register_action (group, "toggle-processors", _("Toggle Selected Processors"), sigc::mem_fun (*this, &MixerActor::toggle_processors));
|
||||
Actions.register_action (group, "ab-plugins", _("Toggle Selected Plugins"), sigc::mem_fun (*this, &MixerActor::ab_plugins));
|
||||
Actions.register_action (group, "select-none", _("Deselect all strips and processors"), sigc::mem_fun (*this, &MixerActor::select_none));
|
||||
myactions.register_action (group, "copy-processors", _("Copy Selected Processors"), sigc::mem_fun (*this, &MixerActor::copy_processors));
|
||||
myactions.register_action (group, "cut-processors", _("Cut Selected Processors"), sigc::mem_fun (*this, &MixerActor::cut_processors));
|
||||
myactions.register_action (group, "paste-processors", _("Paste Selected Processors"), sigc::mem_fun (*this, &MixerActor::paste_processors));
|
||||
myactions.register_action (group, "delete-processors", _("Delete Selected Processors"), sigc::mem_fun (*this, &MixerActor::delete_processors));
|
||||
myactions.register_action (group, "select-all-processors", _("Select All (visible) Processors"), sigc::mem_fun (*this, &MixerActor::select_all_processors));
|
||||
myactions.register_action (group, "toggle-processors", _("Toggle Selected Processors"), sigc::mem_fun (*this, &MixerActor::toggle_processors));
|
||||
myactions.register_action (group, "ab-plugins", _("Toggle Selected Plugins"), sigc::mem_fun (*this, &MixerActor::ab_plugins));
|
||||
myactions.register_action (group, "select-none", _("Deselect all strips and processors"), sigc::mem_fun (*this, &MixerActor::select_none));
|
||||
|
||||
Actions.register_action (group, "scroll-left", _("Scroll Mixer Window to the left"), sigc::mem_fun (*this, &MixerActor::scroll_left));
|
||||
Actions.register_action (group, "scroll-right", _("Scroll Mixer Window to the left"), sigc::mem_fun (*this, &MixerActor::scroll_right));
|
||||
myactions.register_action (group, "scroll-left", _("Scroll Mixer Window to the left"), sigc::mem_fun (*this, &MixerActor::scroll_left));
|
||||
myactions.register_action (group, "scroll-right", _("Scroll Mixer Window to the left"), sigc::mem_fun (*this, &MixerActor::scroll_right));
|
||||
|
||||
Actions.register_action (group, "toggle-midi-input-active", _("Toggle MIDI Input Active for Mixer-Selected Tracks/Busses"),
|
||||
myactions.register_action (group, "toggle-midi-input-active", _("Toggle MIDI Input Active for Mixer-Selected Tracks/Busses"),
|
||||
sigc::bind (sigc::mem_fun (*this, &MixerActor::toggle_midi_input_active), false));
|
||||
}
|
||||
|
||||
void
|
||||
MixerActor::load_bindings ()
|
||||
{
|
||||
bindings = Bindings::get_bindings (X_("mixer"));
|
||||
bindings = Bindings::get_bindings (X_("mixer"), myactions);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -42,9 +42,10 @@ class MixerActor : virtual public sigc::trackable
|
|||
Gtkmm2ext::Bindings* bindings;
|
||||
|
||||
protected:
|
||||
Gtkmm2ext::ActionMap myactions;
|
||||
RouteProcessorSelection _selection;
|
||||
RouteUISelection _route_targets;
|
||||
|
||||
|
||||
virtual void set_route_targets_for_operation () = 0;
|
||||
|
||||
void solo_action ();
|
||||
|
|
|
|||
|
|
@ -105,7 +105,9 @@ Mixer_UI::Mixer_UI ()
|
|||
{
|
||||
Route::SyncOrderKeys.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::sync_treeview_from_order_keys, this), gui_context());
|
||||
|
||||
_content.set_data ("ardour-bindings", &bindings);
|
||||
/* bindings was already set in MixerActor constructor */
|
||||
|
||||
_content.set_data ("ardour-bindings", bindings);
|
||||
|
||||
scroller.set_can_default (true);
|
||||
// set_default (scroller);
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ MonitorSection::MonitorSection (Session* s)
|
|||
, toggle_processorbox_button (ArdourButton::default_elements)
|
||||
, _inhibit_solo_model_update (false)
|
||||
, _ui_initialized (false)
|
||||
, bindings (0)
|
||||
{
|
||||
|
||||
using namespace Menu_Helpers;
|
||||
|
|
@ -91,8 +92,7 @@ MonitorSection::MonitorSection (Session* s)
|
|||
|
||||
if (!monitor_actions) {
|
||||
register_actions ();
|
||||
} else {
|
||||
connect_actions ();
|
||||
load_bindings ();
|
||||
}
|
||||
|
||||
_plugin_selector = new PluginSelector (PluginManager::instance());
|
||||
|
|
@ -852,24 +852,24 @@ MonitorSection::register_actions ()
|
|||
string action_descr;
|
||||
Glib::RefPtr<Action> act;
|
||||
|
||||
monitor_actions = Actions.create_action_group (X_("Monitor"));
|
||||
monitor_actions = myactions.create_action_group (X_("Monitor"));
|
||||
|
||||
Actions.register_toggle_action (monitor_actions, "monitor-mono", _("Switch monitor to mono"),
|
||||
myactions.register_toggle_action (monitor_actions, "monitor-mono", _("Switch monitor to mono"),
|
||||
sigc::mem_fun (*this, &MonitorSection::mono));
|
||||
|
||||
Actions.register_toggle_action (monitor_actions, "monitor-cut-all", _("Cut monitor"),
|
||||
myactions.register_toggle_action (monitor_actions, "monitor-cut-all", _("Cut monitor"),
|
||||
sigc::mem_fun (*this, &MonitorSection::cut_all));
|
||||
|
||||
Actions.register_toggle_action (monitor_actions, "monitor-dim-all", _("Dim monitor"),
|
||||
myactions.register_toggle_action (monitor_actions, "monitor-dim-all", _("Dim monitor"),
|
||||
sigc::mem_fun (*this, &MonitorSection::dim_all));
|
||||
|
||||
act = Actions.register_toggle_action (monitor_actions, "toggle-exclusive-solo", _("Toggle exclusive solo mode"),
|
||||
act = myactions.register_toggle_action (monitor_actions, "toggle-exclusive-solo", _("Toggle exclusive solo mode"),
|
||||
sigc::mem_fun (*this, &MonitorSection::toggle_exclusive_solo));
|
||||
|
||||
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||
tact->set_active (Config->get_exclusive_solo());
|
||||
|
||||
act = Actions.register_toggle_action (monitor_actions, "toggle-mute-overrides-solo", _("Toggle mute overrides solo mode"),
|
||||
act = myactions.register_toggle_action (monitor_actions, "toggle-mute-overrides-solo", _("Toggle mute overrides solo mode"),
|
||||
sigc::mem_fun (*this, &MonitorSection::toggle_mute_overrides_solo));
|
||||
|
||||
tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||
|
|
@ -879,35 +879,35 @@ MonitorSection::register_actions ()
|
|||
|
||||
action_name = string_compose (X_("monitor-cut-%1"), chn);
|
||||
action_descr = string_compose (_("Cut monitor channel %1"), chn);
|
||||
Actions.register_toggle_action (monitor_actions, action_name.c_str(), action_descr.c_str(),
|
||||
myactions.register_toggle_action (monitor_actions, action_name.c_str(), action_descr.c_str(),
|
||||
sigc::bind (sigc::mem_fun (*this, &MonitorSection::cut_channel), chn));
|
||||
|
||||
action_name = string_compose (X_("monitor-dim-%1"), chn);
|
||||
action_descr = string_compose (_("Dim monitor channel %1"), chn);
|
||||
Actions.register_toggle_action (monitor_actions, action_name.c_str(), action_descr.c_str(),
|
||||
myactions.register_toggle_action (monitor_actions, action_name.c_str(), action_descr.c_str(),
|
||||
sigc::bind (sigc::mem_fun (*this, &MonitorSection::dim_channel), chn));
|
||||
|
||||
action_name = string_compose (X_("monitor-solo-%1"), chn);
|
||||
action_descr = string_compose (_("Solo monitor channel %1"), chn);
|
||||
Actions.register_toggle_action (monitor_actions, action_name.c_str(), action_descr.c_str(),
|
||||
myactions.register_toggle_action (monitor_actions, action_name.c_str(), action_descr.c_str(),
|
||||
sigc::bind (sigc::mem_fun (*this, &MonitorSection::solo_channel), chn));
|
||||
|
||||
action_name = string_compose (X_("monitor-invert-%1"), chn);
|
||||
action_descr = string_compose (_("Invert monitor channel %1"), chn);
|
||||
Actions.register_toggle_action (monitor_actions, action_name.c_str(), action_descr.c_str(),
|
||||
myactions.register_toggle_action (monitor_actions, action_name.c_str(), action_descr.c_str(),
|
||||
sigc::bind (sigc::mem_fun (*this, &MonitorSection::invert_channel), chn));
|
||||
|
||||
}
|
||||
|
||||
|
||||
Glib::RefPtr<ActionGroup> solo_actions = Actions.create_action_group (X_("Solo"));
|
||||
Glib::RefPtr<ActionGroup> solo_actions = myactions.create_action_group (X_("Solo"));
|
||||
RadioAction::Group solo_group;
|
||||
|
||||
Actions.register_radio_action (solo_actions, solo_group, "solo-use-in-place", _("In-place solo"),
|
||||
myactions.register_radio_action (solo_actions, solo_group, "solo-use-in-place", _("In-place solo"),
|
||||
sigc::mem_fun (*this, &MonitorSection::solo_use_in_place));
|
||||
Actions.register_radio_action (solo_actions, solo_group, "solo-use-afl", _("After Fade Listen (AFL) solo"),
|
||||
myactions.register_radio_action (solo_actions, solo_group, "solo-use-afl", _("After Fade Listen (AFL) solo"),
|
||||
sigc::mem_fun (*this, &MonitorSection::solo_use_afl));
|
||||
Actions.register_radio_action (solo_actions, solo_group, "solo-use-pfl", _("Pre Fade Listen (PFL) solo"),
|
||||
myactions.register_radio_action (solo_actions, solo_group, "solo-use-pfl", _("Pre Fade Listen (PFL) solo"),
|
||||
sigc::mem_fun (*this, &MonitorSection::solo_use_pfl));
|
||||
}
|
||||
|
||||
|
|
@ -1624,6 +1624,12 @@ MonitorSection::port_connected_or_disconnected (boost::weak_ptr<Port> wa, boost:
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
MonitorSection::load_bindings ()
|
||||
{
|
||||
bindings = Bindings::get_bindings (X_("monitor-section"), myactions);
|
||||
}
|
||||
|
||||
void
|
||||
MonitorSection::help_count_processors (boost::weak_ptr<Processor> p, uint32_t* cnt) const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -179,4 +179,7 @@ class MonitorSection : public RouteUI
|
|||
|
||||
private:
|
||||
Gtkmm2ext::ActionMap myactions;
|
||||
Gtkmm2ext::Bindings* bindings;
|
||||
|
||||
void load_bindings ();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ using namespace Gtk;
|
|||
using namespace Glib;
|
||||
using namespace Gtkmm2ext;
|
||||
|
||||
ProcessorBox* ProcessorBox::_current_processor_box = 0;
|
||||
ProcessorBox* ProcessorBox::_current_processor_box = 0;
|
||||
RefPtr<Action> ProcessorBox::paste_action;
|
||||
RefPtr<Action> ProcessorBox::cut_action;
|
||||
RefPtr<Action> ProcessorBox::copy_action;
|
||||
|
|
@ -102,6 +102,7 @@ RefPtr<Action> ProcessorBox::rename_action;
|
|||
RefPtr<Action> ProcessorBox::delete_action;
|
||||
RefPtr<Action> ProcessorBox::edit_action;
|
||||
RefPtr<Action> ProcessorBox::edit_generic_action;
|
||||
ActionMap ProcessorBox::processor_box_actions;
|
||||
|
||||
static const uint32_t audio_port_color = 0x4A8A0EFF; // Green
|
||||
static const uint32_t midi_port_color = 0x960909FF; //Red
|
||||
|
|
@ -2800,30 +2801,30 @@ ProcessorBox::get_generic_editor_window (boost::shared_ptr<Processor> processor)
|
|||
void
|
||||
ProcessorBox::register_actions ()
|
||||
{
|
||||
Glib::RefPtr<Gtk::ActionGroup> popup_act_grp = Actions.create_action_group (X_("ProcessorMenu"));
|
||||
Glib::RefPtr<Gtk::ActionGroup> popup_act_grp = processor_box_actions.create_action_group (X_("ProcessorMenu"));
|
||||
Glib::RefPtr<Action> act;
|
||||
|
||||
/* new stuff */
|
||||
Actions.register_action (popup_act_grp, X_("newplugin"), _("New Plugin"),
|
||||
processor_box_actions.register_action (popup_act_grp, X_("newplugin"), _("New Plugin"),
|
||||
sigc::ptr_fun (ProcessorBox::rb_choose_plugin));
|
||||
|
||||
act = Actions.register_action (popup_act_grp, X_("newinsert"), _("New Insert"),
|
||||
act = processor_box_actions.register_action (popup_act_grp, X_("newinsert"), _("New Insert"),
|
||||
sigc::ptr_fun (ProcessorBox::rb_choose_insert));
|
||||
ActionManager::engine_sensitive_actions.push_back (act);
|
||||
act = Actions.register_action (popup_act_grp, X_("newsend"), _("New External Send ..."),
|
||||
act = processor_box_actions.register_action (popup_act_grp, X_("newsend"), _("New External Send ..."),
|
||||
sigc::ptr_fun (ProcessorBox::rb_choose_send));
|
||||
ActionManager::engine_sensitive_actions.push_back (act);
|
||||
|
||||
Actions.register_action (popup_act_grp, X_("newaux"), _("New Aux Send ..."));
|
||||
processor_box_actions.register_action (popup_act_grp, X_("newaux"), _("New Aux Send ..."));
|
||||
|
||||
Actions.register_action (popup_act_grp, X_("controls"), _("Controls"));
|
||||
Actions.register_action (popup_act_grp, X_("send_options"), _("Send Options"));
|
||||
processor_box_actions.register_action (popup_act_grp, X_("controls"), _("Controls"));
|
||||
processor_box_actions.register_action (popup_act_grp, X_("send_options"), _("Send Options"));
|
||||
|
||||
Actions.register_action (popup_act_grp, X_("clear"), _("Clear (all)"),
|
||||
processor_box_actions.register_action (popup_act_grp, X_("clear"), _("Clear (all)"),
|
||||
sigc::ptr_fun (ProcessorBox::rb_clear));
|
||||
Actions.register_action (popup_act_grp, X_("clear_pre"), _("Clear (pre-fader)"),
|
||||
processor_box_actions.register_action (popup_act_grp, X_("clear_pre"), _("Clear (pre-fader)"),
|
||||
sigc::ptr_fun (ProcessorBox::rb_clear_pre));
|
||||
Actions.register_action (popup_act_grp, X_("clear_post"), _("Clear (post-fader)"),
|
||||
processor_box_actions.register_action (popup_act_grp, X_("clear_post"), _("Clear (post-fader)"),
|
||||
sigc::ptr_fun (ProcessorBox::rb_clear_post));
|
||||
|
||||
/* standard editing stuff */
|
||||
|
|
@ -2841,28 +2842,28 @@ ProcessorBox::register_actions ()
|
|||
|
||||
paste_action = processor_box_actions.register_action (popup_act_grp, X_("paste"), _("Paste"),
|
||||
sigc::ptr_fun (ProcessorBox::rb_paste));
|
||||
rename_action = Actions.register_action (popup_act_grp, X_("rename"), _("Rename"),
|
||||
rename_action = processor_box_actions.register_action (popup_act_grp, X_("rename"), _("Rename"),
|
||||
sigc::ptr_fun (ProcessorBox::rb_rename));
|
||||
Actions.register_action (popup_act_grp, X_("selectall"), _("Select All"),
|
||||
processor_box_actions.register_action (popup_act_grp, X_("selectall"), _("Select All"),
|
||||
sigc::ptr_fun (ProcessorBox::rb_select_all));
|
||||
Actions.register_action (popup_act_grp, X_("deselectall"), _("Deselect All"),
|
||||
processor_box_actions.register_action (popup_act_grp, X_("deselectall"), _("Deselect All"),
|
||||
sigc::ptr_fun (ProcessorBox::rb_deselect_all));
|
||||
|
||||
/* activation etc. */
|
||||
|
||||
Actions.register_action (popup_act_grp, X_("activate_all"), _("Activate All"),
|
||||
processor_box_actions.register_action (popup_act_grp, X_("activate_all"), _("Activate All"),
|
||||
sigc::ptr_fun (ProcessorBox::rb_activate_all));
|
||||
Actions.register_action (popup_act_grp, X_("deactivate_all"), _("Deactivate All"),
|
||||
processor_box_actions.register_action (popup_act_grp, X_("deactivate_all"), _("Deactivate All"),
|
||||
sigc::ptr_fun (ProcessorBox::rb_deactivate_all));
|
||||
Actions.register_action (popup_act_grp, X_("ab_plugins"), _("A/B Plugins"),
|
||||
processor_box_actions.register_action (popup_act_grp, X_("ab_plugins"), _("A/B Plugins"),
|
||||
sigc::ptr_fun (ProcessorBox::rb_ab_plugins));
|
||||
|
||||
/* show editors */
|
||||
edit_action = Actions.register_action (
|
||||
edit_action = processor_box_actions.register_action (
|
||||
popup_act_grp, X_("edit"), _("Edit..."),
|
||||
sigc::ptr_fun (ProcessorBox::rb_edit));
|
||||
|
||||
edit_generic_action = Actions.register_action (
|
||||
edit_generic_action = processor_box_actions.register_action (
|
||||
popup_act_grp, X_("edit-generic"), _("Edit with generic controls..."),
|
||||
sigc::ptr_fun (ProcessorBox::rb_edit_generic));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -473,6 +473,8 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
|
|||
|
||||
XMLNode* entry_gui_object_state (ProcessorEntry *);
|
||||
PBD::ScopedConnection amp_config_connection;
|
||||
|
||||
static Gtkmm2ext::ActionMap processor_box_actions;
|
||||
};
|
||||
|
||||
#endif /* __ardour_gtk_processor_box__ */
|
||||
|
|
|
|||
|
|
@ -701,8 +701,7 @@ StepEntry::register_actions ()
|
|||
void
|
||||
StepEntry::load_bindings ()
|
||||
{
|
||||
bindings = Bindings::get_bindings (X_("step-editing"));
|
||||
bindings->set_action_map (myactions);
|
||||
bindings = Bindings::get_bindings (X_("step-editing"), myactions);
|
||||
set_data ("ardour-bindings", bindings);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,12 +66,12 @@ Manager::register_window (ProxyBase* info)
|
|||
if (!info->menu_name().empty()) {
|
||||
|
||||
if (!window_actions) {
|
||||
window_actions = Gtkmm2ext::Actions.create_action_group (X_("Window"));
|
||||
window_actions = window_action_map.create_action_group (X_("Window"));
|
||||
}
|
||||
|
||||
info->set_action (Gtkmm2ext::Actions.register_toggle_action (window_actions,
|
||||
info->action_name().c_str(), info->menu_name().c_str(),
|
||||
sigc::bind (sigc::mem_fun (*this, &Manager::toggle_window), info)));
|
||||
info->set_action (window_action_map.register_toggle_action (window_actions,
|
||||
info->action_name().c_str(), info->menu_name().c_str(),
|
||||
sigc::bind (sigc::mem_fun (*this, &Manager::toggle_window), info)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -90,7 +90,7 @@ void
|
|||
Manager::toggle_window (ProxyBase* proxy)
|
||||
{
|
||||
|
||||
Glib::RefPtr<Gtk::Action> act = Gtkmm2ext::Actions.find_action (string_compose ("%1/%2", window_actions->get_name(), proxy->action_name()));
|
||||
Glib::RefPtr<Gtk::Action> act = window_action_map.find_action (string_compose ("%1/%2", window_actions->get_name(), proxy->action_name()));
|
||||
if (!act) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#include <glibmm/refptr.h>
|
||||
#include <sigc++/trackable.h>
|
||||
|
||||
#include "gtkmm2ext/bindings.h"
|
||||
#include "gtkmm2ext/window_proxy.h"
|
||||
|
||||
class XMLNode;
|
||||
|
|
@ -37,12 +38,12 @@ class Action;
|
|||
}
|
||||
|
||||
namespace Gtkmm2ext {
|
||||
class VisibilityTracker;
|
||||
class VisibilityTracker;
|
||||
}
|
||||
|
||||
namespace ARDOUR {
|
||||
class Session;
|
||||
class SessionHandlePtr;
|
||||
class Session;
|
||||
class SessionHandlePtr;
|
||||
}
|
||||
|
||||
namespace WM {
|
||||
|
|
@ -70,7 +71,8 @@ class Manager : public ARDOUR::SessionHandlePtr
|
|||
Windows _windows;
|
||||
Glib::RefPtr<Gtk::ActionGroup> window_actions;
|
||||
Gtk::Window* current_transient_parent;
|
||||
|
||||
Gtkmm2ext::ActionMap window_action_map;
|
||||
|
||||
Manager();
|
||||
~Manager();
|
||||
|
||||
|
|
|
|||
|
|
@ -42,9 +42,10 @@ using namespace Gtk;
|
|||
using namespace Gtkmm2ext;
|
||||
using namespace PBD;
|
||||
|
||||
ActionMap Gtkmm2ext::Actions; /* global. Gulp */
|
||||
list<Bindings*> Bindings::bindings; /* global. Gulp */
|
||||
uint32_t Bindings::_ignored_state = 0;
|
||||
list<ActionMap*> ActionMap::action_maps; /* global. Gulp */
|
||||
PBD::Signal1<void,Bindings*> Bindings::BindingsChanged;
|
||||
|
||||
MouseButton::MouseButton (uint32_t state, uint32_t keycode)
|
||||
{
|
||||
|
|
@ -142,8 +143,21 @@ KeyboardKey::KeyboardKey (uint32_t state, uint32_t keycode)
|
|||
_val = (state & ~ignore);
|
||||
_val <<= 32;
|
||||
_val |= keycode;
|
||||
};
|
||||
}
|
||||
|
||||
string
|
||||
KeyboardKey::display_label () const
|
||||
{
|
||||
if (key() == 0) {
|
||||
return string();
|
||||
}
|
||||
|
||||
/* This magically returns a string that will display the right thing
|
||||
* on all platforms, notably the command key on OS X.
|
||||
*/
|
||||
|
||||
return gtk_accelerator_get_label (key(), (GdkModifierType) state());
|
||||
}
|
||||
|
||||
string
|
||||
KeyboardKey::name () const
|
||||
|
|
@ -231,7 +245,7 @@ KeyboardKey::make_key (const string& str, KeyboardKey& k)
|
|||
|
||||
Bindings::Bindings (std::string const& name)
|
||||
: _name (name)
|
||||
, _action_map (Actions)
|
||||
, _action_map (0)
|
||||
{
|
||||
bindings.push_back (this);
|
||||
}
|
||||
|
|
@ -241,10 +255,67 @@ Bindings::~Bindings()
|
|||
bindings.remove (this);
|
||||
}
|
||||
|
||||
string
|
||||
Bindings::ardour_action_name (RefPtr<Action> action)
|
||||
{
|
||||
/* Skip "<Actions>/" */
|
||||
return action->get_accel_path ().substr (10);
|
||||
}
|
||||
|
||||
KeyboardKey
|
||||
Bindings::get_binding_for_action (RefPtr<Action> action, Operation& op)
|
||||
{
|
||||
const string action_name = ardour_action_name (action);
|
||||
|
||||
for (KeybindingMap::iterator k = press_bindings.begin(); k != press_bindings.end(); ++k) {
|
||||
|
||||
/* option one: action has already been associated with the
|
||||
* binding
|
||||
*/
|
||||
|
||||
if (k->second.action == action) {
|
||||
return k->first;
|
||||
}
|
||||
|
||||
/* option two: action name matches, so lookup the action,
|
||||
* setup the association while we're here, and return the binding.
|
||||
*/
|
||||
|
||||
if (_action_map && k->second.action_name == action_name) {
|
||||
k->second.action = _action_map->find_action (action_name);
|
||||
return k->first;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (KeybindingMap::iterator k = release_bindings.begin(); k != release_bindings.end(); ++k) {
|
||||
|
||||
/* option one: action has already been associated with the
|
||||
* binding
|
||||
*/
|
||||
|
||||
if (k->second.action == action) {
|
||||
return k->first;
|
||||
}
|
||||
|
||||
/* option two: action name matches, so lookup the action,
|
||||
* setup the association while we're here, and return the binding.
|
||||
*/
|
||||
|
||||
if (_action_map && k->second.action_name == action_name) {
|
||||
k->second.action = _action_map->find_action (action_name);
|
||||
return k->first;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return KeyboardKey::null_key();
|
||||
}
|
||||
|
||||
void
|
||||
Bindings::set_action_map (ActionMap& actions)
|
||||
{
|
||||
_action_map = actions;
|
||||
_action_map = &actions;
|
||||
dissociate ();
|
||||
associate ();
|
||||
}
|
||||
|
|
@ -291,8 +362,12 @@ Bindings::activate (KeyboardKey kb, Operation op)
|
|||
|
||||
RefPtr<Action> action;
|
||||
|
||||
if (!k->second.action) {
|
||||
action = _action_map.find_action (k->second.action_name);
|
||||
if (k->second.action) {
|
||||
action = k->second.action;
|
||||
} else {
|
||||
if (_action_map) {
|
||||
action = _action_map->find_action (k->second.action_name);
|
||||
}
|
||||
}
|
||||
|
||||
if (action) {
|
||||
|
|
@ -311,26 +386,33 @@ Bindings::associate ()
|
|||
{
|
||||
KeybindingMap::iterator k;
|
||||
|
||||
if (!_action_map) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (k = press_bindings.begin(); k != press_bindings.end(); ++k) {
|
||||
k->second.action = _action_map.find_action (k->second.action_name);
|
||||
k->second.action = _action_map->find_action (k->second.action_name);
|
||||
if (k->second.action) {
|
||||
cerr << "push to GTK " << k->first << ' ' << k->second.action_name << endl;
|
||||
push_to_gtk (k->first, k->second.action);
|
||||
} else {
|
||||
cerr << "didn't find " << k->second.action_name << endl;
|
||||
}
|
||||
}
|
||||
|
||||
for (k = release_bindings.begin(); k != release_bindings.end(); ++k) {
|
||||
k->second.action = _action_map.find_action (k->second.action_name);
|
||||
k->second.action = _action_map->find_action (k->second.action_name);
|
||||
/* no working support in GTK for release bindings */
|
||||
}
|
||||
|
||||
MouseButtonBindingMap::iterator b;
|
||||
|
||||
for (b = button_press_bindings.begin(); b != button_press_bindings.end(); ++b) {
|
||||
b->second.action = _action_map.find_action (b->second.action_name);
|
||||
b->second.action = _action_map->find_action (b->second.action_name);
|
||||
}
|
||||
|
||||
for (b = button_release_bindings.begin(); b != button_release_bindings.end(); ++b) {
|
||||
b->second.action = _action_map.find_action (b->second.action_name);
|
||||
b->second.action = _action_map->find_action (b->second.action_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -358,22 +440,14 @@ Bindings::push_to_gtk (KeyboardKey kb, RefPtr<Action> what)
|
|||
* up with all bindings/actions.
|
||||
*/
|
||||
|
||||
Gtk::AccelKey gtk_key;
|
||||
uint32_t gtk_legal_keyval = kb.key();
|
||||
possibly_translate_keyval_to_make_legal_accelerator (gtk_legal_keyval);
|
||||
KeyboardKey gtk_binding (kb.state(), gtk_legal_keyval);
|
||||
Gtk::AccelKey gtk_key;
|
||||
|
||||
bool entry_exists = Gtk::AccelMap::lookup_entry (what->get_accel_path(), gtk_key);
|
||||
|
||||
/* tweak the modifier used in the binding so that GTK will accept it
|
||||
* and display something acceptable. The actual keyval should display
|
||||
* correctly even if it involves a key that GTK would not allow
|
||||
* as an accelerator.
|
||||
*/
|
||||
|
||||
uint32_t gtk_legal_keyval = kb.key();
|
||||
possibly_translate_keyval_to_make_legal_accelerator (gtk_legal_keyval);
|
||||
KeyboardKey gtk_binding (kb.state(), gtk_legal_keyval);
|
||||
|
||||
|
||||
bool entry_exists = Gtk::AccelMap::lookup_entry (what->get_accel_path(), gtk_key);
|
||||
|
||||
if (!entry_exists || gtk_key.get_key() == 0) {
|
||||
if (!entry_exists) {
|
||||
|
||||
/* there is a trick happening here. It turns out that
|
||||
* gtk_accel_map_add_entry() performs no validation checks on
|
||||
|
|
@ -386,21 +460,17 @@ Bindings::push_to_gtk (KeyboardKey kb, RefPtr<Action> what)
|
|||
* happens.
|
||||
*/
|
||||
|
||||
Gtk::AccelMap::add_entry (what->get_accel_path(),
|
||||
gtk_binding.key(),
|
||||
(Gdk::ModifierType) gtk_binding.state());
|
||||
} else {
|
||||
warning << string_compose (_("There is more than one key binding defined for %1. Both will work, but only the first will be visible in menus"), what->get_accel_path()) << endmsg;
|
||||
}
|
||||
|
||||
if (!Gtk::AccelMap::lookup_entry (what->get_accel_path(), gtk_key) || gtk_key.get_key() == 0) {
|
||||
cerr << "GTK binding using " << gtk_binding << " failed for " << what->get_accel_path() << " existing = " << gtk_key.get_key() << " + " << gtk_key.get_mod() << endl;
|
||||
Gtk::AccelMap::add_entry (what->get_accel_path(), gtk_binding.key(), (Gdk::ModifierType) gtk_binding.state());
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
Bindings::replace (KeyboardKey kb, Operation op, string const & action_name, bool can_save)
|
||||
{
|
||||
if (!_action_map) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* We have to search the existing binding map by both action and
|
||||
* keybinding, because the following are possible:
|
||||
*
|
||||
|
|
@ -410,7 +480,7 @@ Bindings::replace (KeyboardKey kb, Operation op, string const & action_name, boo
|
|||
* - action is not bound
|
||||
*/
|
||||
|
||||
RefPtr<Action> action = Actions.find_action (action_name);
|
||||
RefPtr<Action> action = _action_map->find_action (action_name);
|
||||
|
||||
if (!action) {
|
||||
return false;
|
||||
|
|
@ -475,6 +545,8 @@ Bindings::add (KeyboardKey kb, Operation op, string const& action_name, bool can
|
|||
if (can_save) {
|
||||
Keyboard::keybindings_changed ();
|
||||
}
|
||||
|
||||
BindingsChanged (this); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -500,6 +572,8 @@ Bindings::remove (KeyboardKey kb, Operation op, bool can_save)
|
|||
if (can_save) {
|
||||
Keyboard::keybindings_changed ();
|
||||
}
|
||||
|
||||
BindingsChanged (this); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -526,6 +600,8 @@ Bindings::remove (RefPtr<Action> action, Operation op, bool can_save)
|
|||
if (can_save) {
|
||||
Keyboard::keybindings_changed ();
|
||||
}
|
||||
|
||||
BindingsChanged (this); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
@ -551,17 +627,22 @@ Bindings::activate (MouseButton bb, Operation op)
|
|||
|
||||
RefPtr<Action> action;
|
||||
|
||||
if (!b->second.action) {
|
||||
action = _action_map.find_action (b->second.action_name);
|
||||
if (b->second.action) {
|
||||
action = b->second.action;
|
||||
} else {
|
||||
if (_action_map) {
|
||||
action = _action_map->find_action (b->second.action_name);
|
||||
}
|
||||
}
|
||||
|
||||
if (action) {
|
||||
/* lets do it ... */
|
||||
DEBUG_TRACE (DEBUG::Bindings, string_compose ("activating action %1\n", ardour_action_name (action)));
|
||||
action->activate ();
|
||||
}
|
||||
|
||||
/* return true even if the action could not be found */
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -726,6 +807,10 @@ Bindings::get_all_actions (std::vector<std::string>& paths,
|
|||
std::vector<std::string>& keys,
|
||||
std::vector<RefPtr<Action> >& actions)
|
||||
{
|
||||
if (!_action_map) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* build a reverse map from actions to bindings */
|
||||
|
||||
typedef map<Glib::RefPtr<Gtk::Action>,KeyboardKey> ReverseMap;
|
||||
|
|
@ -738,7 +823,7 @@ Bindings::get_all_actions (std::vector<std::string>& paths,
|
|||
/* get a list of all actions */
|
||||
|
||||
ActionMap::Actions all_actions;
|
||||
_action_map.get_actions (all_actions);
|
||||
_action_map->get_actions (all_actions);
|
||||
|
||||
for (ActionMap::Actions::const_iterator act = all_actions.begin(); act != all_actions.end(); ++act) {
|
||||
|
||||
|
|
@ -749,7 +834,7 @@ Bindings::get_all_actions (std::vector<std::string>& paths,
|
|||
ReverseMap::iterator r = rmap.find (*act);
|
||||
|
||||
if (r != rmap.end()) {
|
||||
keys.push_back (gtk_accelerator_get_label (r->second.key(), (GdkModifierType) r->second.state()));
|
||||
keys.push_back (r->second.display_label());
|
||||
} else {
|
||||
keys.push_back (string());
|
||||
}
|
||||
|
|
@ -763,6 +848,10 @@ Bindings::get_all_actions (std::vector<std::string>& names,
|
|||
std::vector<std::string>& paths,
|
||||
std::vector<std::string>& keys)
|
||||
{
|
||||
if (!_action_map) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* build a reverse map from actions to bindings */
|
||||
|
||||
typedef map<Glib::RefPtr<Gtk::Action>,KeyboardKey> ReverseMap;
|
||||
|
|
@ -775,7 +864,7 @@ Bindings::get_all_actions (std::vector<std::string>& names,
|
|||
/* get a list of all actions */
|
||||
|
||||
ActionMap::Actions all_actions;
|
||||
_action_map.get_actions (all_actions);
|
||||
_action_map->get_actions (all_actions);
|
||||
|
||||
for (ActionMap::Actions::const_iterator act = all_actions.begin(); act != all_actions.end(); ++act) {
|
||||
|
||||
|
|
@ -784,7 +873,7 @@ Bindings::get_all_actions (std::vector<std::string>& names,
|
|||
|
||||
ReverseMap::iterator r = rmap.find (*act);
|
||||
if (r != rmap.end()) {
|
||||
keys.push_back (gtk_accelerator_get_label (r->second.key(), (GdkModifierType) r->second.state()));
|
||||
keys.push_back (r->second.display_label());
|
||||
} else {
|
||||
keys.push_back (string());
|
||||
}
|
||||
|
|
@ -792,10 +881,11 @@ Bindings::get_all_actions (std::vector<std::string>& names,
|
|||
}
|
||||
|
||||
Bindings*
|
||||
Bindings::get_bindings (string const& name)
|
||||
Bindings::get_bindings (string const& name, ActionMap& map)
|
||||
{
|
||||
for (list<Bindings*>::iterator b = bindings.begin(); b != bindings.end(); b++) {
|
||||
if ((*b)->name() == name) {
|
||||
(*b)->set_action_map (map);
|
||||
return *b;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
#include "pbd/replace_all.h"
|
||||
|
||||
#include "gtkmm2ext/application.h"
|
||||
#include "gtkmm2ext/bindings.h"
|
||||
#include "gtkmm2ext/gtk_ui.h"
|
||||
#include "gtkmm2ext/textviewer.h"
|
||||
#include "gtkmm2ext/popup.h"
|
||||
|
|
@ -71,8 +72,8 @@ template class AbstractUI<Gtkmm2ext::UIRequest>;
|
|||
UI::UI (string application_name, string thread_name, int *argc, char ***argv)
|
||||
: AbstractUI<UIRequest> (thread_name)
|
||||
, _receiver (*this)
|
||||
, global_bindings (0)
|
||||
, errors (0)
|
||||
|
||||
{
|
||||
theMain = new Main (argc, argv);
|
||||
|
||||
|
|
@ -365,11 +366,22 @@ UI::set_tip (Widget *w, const gchar *tip, const gchar *hlp)
|
|||
}
|
||||
|
||||
if (action) {
|
||||
#warning Paul fix this before you think tabbed is done
|
||||
Gtk::AccelKey key;
|
||||
ustring ap = action->get_accel_path();
|
||||
if (!ap.empty()) {
|
||||
string shortcut = string(); // ActionManager::get_key_representation (ap, key);
|
||||
Bindings* bindings = (Bindings*) w->get_data ("ardour-bindings");
|
||||
if (!bindings) {
|
||||
Gtk::Window* win = (Gtk::Window*) w->get_toplevel();
|
||||
if (win) {
|
||||
bindings = (Bindings*) win->get_data ("ardour-bindings");
|
||||
}
|
||||
}
|
||||
|
||||
if (!bindings) {
|
||||
bindings = global_bindings;
|
||||
}
|
||||
|
||||
if (bindings) {
|
||||
Bindings::Operation op;
|
||||
KeyboardKey kb = bindings->get_binding_for_action (action, op);
|
||||
string shortcut = kb.display_label ();
|
||||
if (!shortcut.empty()) {
|
||||
replace_all (shortcut, "<", "");
|
||||
replace_all (shortcut, ">", "-");
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
#include <gtkmm/radioaction.h>
|
||||
#include <gtkmm/toggleaction.h>
|
||||
|
||||
#include "pbd/signals.h"
|
||||
|
||||
#include "gtkmm2ext/visibility.h"
|
||||
|
||||
class XMLNode;
|
||||
|
|
@ -43,6 +45,8 @@ class LIBGTKMM2EXT_API KeyboardKey
|
|||
std::string name() const;
|
||||
static bool make_key (const std::string&, KeyboardKey&);
|
||||
|
||||
std::string display_label() const;
|
||||
|
||||
private:
|
||||
uint64_t _val;
|
||||
};
|
||||
|
|
@ -99,6 +103,8 @@ class LIBGTKMM2EXT_API ActionMap {
|
|||
typedef std::vector<Glib::RefPtr<Gtk::Action> > Actions;
|
||||
void get_actions (Actions&);
|
||||
|
||||
static std::list<ActionMap*> action_maps;
|
||||
|
||||
private:
|
||||
<<<<<<< HEAD
|
||||
typedef std::map<std::string, Glib::RefPtr<Gtk::Action> > _ActionMap;
|
||||
|
|
@ -112,15 +118,6 @@ class LIBGTKMM2EXT_API ActionMap {
|
|||
};
|
||||
>>>>>>> radically change Keyboard/Binding API design to disconnect Gtk::Action lookup from binding definition
|
||||
|
||||
/* single global action map for entire application.
|
||||
*
|
||||
* Actions are name-spaced by group, and it makes things
|
||||
* much easier if there is a single place to look up
|
||||
* any action.
|
||||
*/
|
||||
|
||||
LIBGTKMM2EXT_API extern ActionMap Actions;
|
||||
|
||||
class LIBGTKMM2EXT_API Bindings {
|
||||
public:
|
||||
enum Operation {
|
||||
|
|
@ -162,6 +159,8 @@ class LIBGTKMM2EXT_API Bindings {
|
|||
void remove (MouseButton, Operation);
|
||||
bool activate (MouseButton, Operation);
|
||||
|
||||
KeyboardKey get_binding_for_action (Glib::RefPtr<Gtk::Action>, Operation& op);
|
||||
|
||||
bool load (XMLNode const& node);
|
||||
void load_operation (XMLNode const& node);
|
||||
void save (XMLNode& root);
|
||||
|
|
@ -171,11 +170,31 @@ class LIBGTKMM2EXT_API Bindings {
|
|||
=======
|
||||
>>>>>>> radically change Keyboard/Binding API design to disconnect Gtk::Action lookup from binding definition
|
||||
|
||||
/* There are modifiers that we just don't care about
|
||||
when it comes to defining bindings. This sets the modifiers
|
||||
that will be ignored when comparing a key event with
|
||||
existing bindings.
|
||||
*/
|
||||
static void set_ignored_state (int mask) {
|
||||
_ignored_state = mask;
|
||||
}
|
||||
static uint32_t ignored_state() { return _ignored_state; }
|
||||
|
||||
/* GTK has the following position a Gtk::Action:
|
||||
*
|
||||
* accel_path: <Actions>/GroupName/ActionName
|
||||
* name: ActionName
|
||||
*
|
||||
* We want proper namespacing and we're not interested in
|
||||
* the silly <Actions> "extra" namespace. So in Ardour:
|
||||
*
|
||||
* accel_path: <Actions>/GroupName/ActionName
|
||||
* name: GroupName/ActionName
|
||||
*
|
||||
* This (static) method returns the "ardour" name for the action.
|
||||
*/
|
||||
static std::string ardour_action_name (Glib::RefPtr<Gtk::Action>);
|
||||
|
||||
void set_action_map (ActionMap&);
|
||||
|
||||
/* used to list all actions */
|
||||
|
|
@ -192,14 +211,16 @@ class LIBGTKMM2EXT_API Bindings {
|
|||
|
||||
/* all bindings currently in existence, as grouped into Bindings */
|
||||
static std::list<Bindings*> bindings;
|
||||
static Bindings* get_bindings (std::string const& name);
|
||||
static Bindings* get_bindings (std::string const& name, ActionMap&);
|
||||
static void associate_all ();
|
||||
|
||||
static PBD::Signal1<void,Bindings*> BindingsChanged;
|
||||
|
||||
private:
|
||||
typedef std::map<KeyboardKey,ActionInfo> KeybindingMap;
|
||||
|
||||
std::string _name;
|
||||
ActionMap& _action_map;
|
||||
ActionMap* _action_map;
|
||||
KeybindingMap press_bindings;
|
||||
KeybindingMap release_bindings;
|
||||
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ class Touchable;
|
|||
namespace Gtkmm2ext {
|
||||
|
||||
class TextViewer;
|
||||
class Bindings;
|
||||
|
||||
extern BaseUI::RequestType NullMessage;
|
||||
extern BaseUI::RequestType ErrorMessage;
|
||||
|
|
@ -169,6 +170,8 @@ class LIBGTKMM2EXT_API UI : public AbstractUI<UIRequest>
|
|||
static bool just_hide_it (GdkEventAny *, Gtk::Window *);
|
||||
static float ui_scale;
|
||||
|
||||
Gtkmm2ext::Bindings* global_bindings;
|
||||
|
||||
protected:
|
||||
virtual void handle_fatal (const char *);
|
||||
virtual void display_message (const char *prefix, gint prefix_len,
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include <sigc++/signal.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <gtkmm/accelkey.h>
|
||||
|
||||
|
|
@ -40,6 +39,7 @@ namespace Gtk {
|
|||
namespace Gtkmm2ext {
|
||||
|
||||
class Bindings;
|
||||
class ActionMap;
|
||||
|
||||
class LIBGTKMM2EXT_API Keyboard : public sigc::trackable, PBD::Stateful
|
||||
{
|
||||
|
|
@ -177,10 +177,6 @@ class LIBGTKMM2EXT_API Keyboard : public sigc::trackable, PBD::Stateful
|
|||
|
||||
sigc::signal0<void> ZoomVerticalModifierReleased;
|
||||
|
||||
static std::vector<Bindings*> bindings;
|
||||
static Bindings* get_bindings (std::string const& name);
|
||||
static PBD::Signal0<void> BindingsChanged;
|
||||
|
||||
protected:
|
||||
static Keyboard* _the_keyboard;
|
||||
|
||||
|
|
|
|||
|
|
@ -111,8 +111,6 @@ bool Keyboard::can_save_keybindings = false;
|
|||
bool Keyboard::bindings_changed_after_save_became_legal = false;
|
||||
map<string,string> Keyboard::binding_files;
|
||||
string Keyboard::_current_binding_name;
|
||||
Gtk::Window* Keyboard::pre_dialog_active_window = 0;
|
||||
PBD::Signal0<void> Keyboard::BindingsChanged;
|
||||
|
||||
/* set this to initially contain the modifiers we care about, then track changes in ::set_edit_modifier() etc. */
|
||||
GdkModifierType Keyboard::RelevantModifierKeyMask;
|
||||
|
|
@ -643,7 +641,6 @@ Keyboard::keybindings_changed ()
|
|||
}
|
||||
|
||||
Keyboard::save_keybindings ();
|
||||
BindingsChanged (); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue