mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
trigger_ui: remove redundant action bindings; rename trigger_scene to trigger_cue
This commit is contained in:
parent
2fdf54874a
commit
63912069f4
4 changed files with 9 additions and 48 deletions
|
|
@ -232,9 +232,6 @@ CueEntry::rec_state_changed ()
|
|||
set_default_colors ();
|
||||
}
|
||||
|
||||
Gtkmm2ext::Bindings* CueBoxUI::bindings = 0;
|
||||
Glib::RefPtr<Gtk::ActionGroup> CueBoxUI::trigger_actions;
|
||||
|
||||
CueBoxUI::CueBoxUI (ArdourCanvas::Item* parent)
|
||||
: ArdourCanvas::Rectangle (parent)
|
||||
, _context_menu (0)
|
||||
|
|
@ -413,35 +410,7 @@ CueBoxUI::set_all_quantization (Temporal::BBT_Offset const& q, uint64_t idx)
|
|||
}
|
||||
|
||||
void
|
||||
CueBoxUI::setup_actions_and_bindings ()
|
||||
{
|
||||
load_bindings ();
|
||||
register_actions ();
|
||||
}
|
||||
|
||||
void
|
||||
CueBoxUI::load_bindings ()
|
||||
{
|
||||
bindings = Bindings::get_bindings (X_("Triggers"));
|
||||
}
|
||||
|
||||
void
|
||||
CueBoxUI::register_actions ()
|
||||
{
|
||||
#if 0
|
||||
trigger_actions = ActionManager::create_action_group (bindings, X_("Triggers"));
|
||||
|
||||
for (int32_t n = 0; n < CueBox::default_triggers_per_box; ++n) {
|
||||
const std::string action_name = string_compose ("trigger-scene-%1", n);
|
||||
const std::string display_name = string_compose (_("Scene %1"), n);
|
||||
|
||||
ActionManager::register_toggle_action (trigger_actions, action_name.c_str(), display_name.c_str(), sigc::bind (sigc::ptr_fun (CueBoxUI::trigger_scene), n));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
CueBoxUI::trigger_scene (uint64_t n)
|
||||
CueBoxUI::trigger_cue (uint64_t n)
|
||||
{
|
||||
_session->cue_bang (n);
|
||||
}
|
||||
|
|
@ -496,7 +465,7 @@ CueBoxUI::event (GdkEvent* ev, uint64_t n)
|
|||
switch (ev->type) {
|
||||
case GDK_BUTTON_PRESS:
|
||||
if (ev->button.button==1) {
|
||||
trigger_scene (n);
|
||||
trigger_cue (n);
|
||||
}
|
||||
break;
|
||||
case GDK_2BUTTON_PRESS:
|
||||
|
|
|
|||
|
|
@ -76,10 +76,7 @@ public:
|
|||
CueBoxUI (ArdourCanvas::Item* parent);
|
||||
~CueBoxUI ();
|
||||
|
||||
void trigger_scene (uint64_t n);
|
||||
|
||||
static Glib::RefPtr<Gtk::ActionGroup> trigger_actions;
|
||||
static void setup_actions_and_bindings ();
|
||||
void trigger_cue (uint64_t n);
|
||||
|
||||
void _size_allocate (ArdourCanvas::Rect const&);
|
||||
|
||||
|
|
@ -100,11 +97,6 @@ private:
|
|||
Gtk::Menu* _context_menu;
|
||||
Gtk::ColorSelectionDialog _color_dialog;
|
||||
|
||||
static Gtkmm2ext::Bindings* bindings;
|
||||
|
||||
static void load_bindings ();
|
||||
static void register_actions ();
|
||||
|
||||
typedef std::vector<ArdourCanvas::Rectangle*> Slots;
|
||||
|
||||
Slots _slots;
|
||||
|
|
|
|||
|
|
@ -155,18 +155,18 @@ TriggerUI::load_bindings ()
|
|||
void
|
||||
TriggerUI::register_actions ()
|
||||
{
|
||||
trigger_actions = ActionManager::create_action_group (bindings, X_("Triggers"));
|
||||
trigger_actions = ActionManager::create_action_group (bindings, X_("Cues"));
|
||||
|
||||
for (int32_t n = 0; n < default_triggers_per_box; ++n) {
|
||||
const std::string action_name = string_compose ("trigger-scene-%1", n);
|
||||
const std::string display_name = string_compose (_("Scene %1"), n);
|
||||
const std::string action_name = string_compose ("trigger-cue-%1", n);
|
||||
const std::string display_name = string_compose (_("Trigger Cue %1"), n);
|
||||
|
||||
ActionManager::register_toggle_action (trigger_actions, action_name.c_str (), display_name.c_str (), sigc::bind (sigc::ptr_fun (TriggerUI::trigger_scene), n));
|
||||
ActionManager::register_toggle_action (trigger_actions, action_name.c_str (), display_name.c_str (), sigc::bind (sigc::ptr_fun (TriggerUI::trigger_cue), n));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
TriggerUI::trigger_scene (int32_t n)
|
||||
TriggerUI::trigger_cue (int32_t n)
|
||||
{
|
||||
Session* s = AudioEngine::instance()->session();
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ private:
|
|||
|
||||
/* Actions for Triggers: accessed via ardour_ui and shortcuts and lua */
|
||||
static Glib::RefPtr<Gtk::ActionGroup> trigger_actions;
|
||||
static void trigger_scene (int32_t);
|
||||
static void trigger_cue (int32_t);
|
||||
static Gtkmm2ext::Bindings* bindings;
|
||||
static void load_bindings ();
|
||||
static void register_actions ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue