mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
ripple (gui part): when Ripple is selected, RippleMode widget appears
This commit is contained in:
parent
01ef5a5b24
commit
b0276fd524
3 changed files with 47 additions and 8 deletions
|
|
@ -213,11 +213,17 @@ static const gchar *_edit_point_strings[] = {
|
||||||
static const gchar *_edit_mode_strings[] = {
|
static const gchar *_edit_mode_strings[] = {
|
||||||
N_("Slide"),
|
N_("Slide"),
|
||||||
N_("Ripple"),
|
N_("Ripple"),
|
||||||
N_("Ripple All"),
|
|
||||||
N_("Lock"),
|
N_("Lock"),
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const gchar *_ripple_mode_strings[] = {
|
||||||
|
N_("Selected"),
|
||||||
|
N_("All"),
|
||||||
|
N_("Interview"),
|
||||||
|
0
|
||||||
|
};
|
||||||
|
|
||||||
static const gchar *_zoom_focus_strings[] = {
|
static const gchar *_zoom_focus_strings[] = {
|
||||||
N_("Left"),
|
N_("Left"),
|
||||||
N_("Right"),
|
N_("Right"),
|
||||||
|
|
@ -482,6 +488,7 @@ Editor::Editor ()
|
||||||
grid_type_strings = I18N (_grid_type_strings);
|
grid_type_strings = I18N (_grid_type_strings);
|
||||||
zoom_focus_strings = I18N (_zoom_focus_strings);
|
zoom_focus_strings = I18N (_zoom_focus_strings);
|
||||||
edit_mode_strings = I18N (_edit_mode_strings);
|
edit_mode_strings = I18N (_edit_mode_strings);
|
||||||
|
ripple_mode_strings = I18N (_ripple_mode_strings);
|
||||||
edit_point_strings = I18N (_edit_point_strings);
|
edit_point_strings = I18N (_edit_point_strings);
|
||||||
#ifdef USE_RUBBERBAND
|
#ifdef USE_RUBBERBAND
|
||||||
rb_opt_strings = I18N (_rb_opt_strings);
|
rb_opt_strings = I18N (_rb_opt_strings);
|
||||||
|
|
@ -3182,6 +3189,7 @@ Editor::setup_toolbar ()
|
||||||
|
|
||||||
mouse_mode_size_group->add_widget (edit_point_selector);
|
mouse_mode_size_group->add_widget (edit_point_selector);
|
||||||
mouse_mode_size_group->add_widget (edit_mode_selector);
|
mouse_mode_size_group->add_widget (edit_mode_selector);
|
||||||
|
mouse_mode_size_group->add_widget (ripple_mode_selector);
|
||||||
|
|
||||||
mouse_mode_size_group->add_widget (*nudge_clock);
|
mouse_mode_size_group->add_widget (*nudge_clock);
|
||||||
mouse_mode_size_group->add_widget (nudge_forward_button);
|
mouse_mode_size_group->add_widget (nudge_forward_button);
|
||||||
|
|
@ -3210,9 +3218,11 @@ Editor::setup_toolbar ()
|
||||||
|
|
||||||
mouse_mode_box->pack_start (*mouse_mode_align, false, false);
|
mouse_mode_box->pack_start (*mouse_mode_align, false, false);
|
||||||
|
|
||||||
|
ripple_mode_selector.set_name ("mouse mode button");
|
||||||
edit_mode_selector.set_name ("mouse mode button");
|
edit_mode_selector.set_name ("mouse mode button");
|
||||||
|
|
||||||
mode_box->pack_start (edit_mode_selector, false, false);
|
mode_box->pack_start (edit_mode_selector, false, false);
|
||||||
|
mode_box->pack_start (ripple_mode_selector, false, false);
|
||||||
mode_box->pack_start (*(manage (new ArdourVSpacer ())), false, false, 3);
|
mode_box->pack_start (*(manage (new ArdourVSpacer ())), false, false, 3);
|
||||||
mode_box->pack_start (edit_point_selector, false, false);
|
mode_box->pack_start (edit_point_selector, false, false);
|
||||||
mode_box->pack_start (*(manage (new ArdourVSpacer ())), false, false, 3);
|
mode_box->pack_start (*(manage (new ArdourVSpacer ())), false, false, 3);
|
||||||
|
|
@ -3404,11 +3414,16 @@ Editor::build_edit_mode_menu ()
|
||||||
|
|
||||||
edit_mode_selector.AddMenuElem (MenuElem (edit_mode_strings[(int)Slide], sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Slide)));
|
edit_mode_selector.AddMenuElem (MenuElem (edit_mode_strings[(int)Slide], sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Slide)));
|
||||||
edit_mode_selector.AddMenuElem (MenuElem (edit_mode_strings[(int)Ripple], sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Ripple)));
|
edit_mode_selector.AddMenuElem (MenuElem (edit_mode_strings[(int)Ripple], sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Ripple)));
|
||||||
edit_mode_selector.AddMenuElem (MenuElem (edit_mode_strings[(int)RippleAll], sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) RippleAll)));
|
|
||||||
edit_mode_selector.AddMenuElem (MenuElem (edit_mode_strings[(int)Lock], sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Lock)));
|
edit_mode_selector.AddMenuElem (MenuElem (edit_mode_strings[(int)Lock], sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Lock)));
|
||||||
/* Note: Splice was removed */
|
/* Note: Splice was removed */
|
||||||
|
|
||||||
set_size_request_to_display_given_text (edit_mode_selector, edit_mode_strings, COMBO_TRIANGLE_WIDTH, 2);
|
set_size_request_to_display_given_text (edit_mode_selector, edit_mode_strings, COMBO_TRIANGLE_WIDTH, 2);
|
||||||
|
|
||||||
|
ripple_mode_selector.AddMenuElem (MenuElem (ripple_mode_strings[(int)RippleSelected], sigc::bind (sigc::mem_fun(*this, &Editor::ripple_mode_selection_done), (RippleMode) RippleSelected)));
|
||||||
|
ripple_mode_selector.AddMenuElem (MenuElem (ripple_mode_strings[(int)RippleAll], sigc::bind (sigc::mem_fun(*this, &Editor::ripple_mode_selection_done), (RippleMode) RippleAll)));
|
||||||
|
ripple_mode_selector.AddMenuElem (MenuElem (ripple_mode_strings[(int)RippleInterview], sigc::bind (sigc::mem_fun(*this, &Editor::ripple_mode_selection_done), (RippleMode) RippleInterview)));
|
||||||
|
|
||||||
|
set_size_request_to_display_given_text (ripple_mode_selector, ripple_mode_strings, COMBO_TRIANGLE_WIDTH, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -3799,7 +3814,13 @@ Editor::duplicate_range (bool with_dialog)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::set_edit_mode (EditMode m)
|
Editor::set_ripple_mode (RippleMode m) /* redundant with selection_done ? */
|
||||||
|
{
|
||||||
|
Config->set_ripple_mode (m);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Editor::set_edit_mode (EditMode m) /* redundant with selection_done ? */
|
||||||
{
|
{
|
||||||
Config->set_edit_mode (m);
|
Config->set_edit_mode (m);
|
||||||
}
|
}
|
||||||
|
|
@ -3812,9 +3833,6 @@ Editor::cycle_edit_mode ()
|
||||||
Config->set_edit_mode (Ripple);
|
Config->set_edit_mode (Ripple);
|
||||||
break;
|
break;
|
||||||
case Ripple:
|
case Ripple:
|
||||||
Config->set_edit_mode (RippleAll);
|
|
||||||
break;
|
|
||||||
case RippleAll:
|
|
||||||
Config->set_edit_mode (Lock);
|
Config->set_edit_mode (Lock);
|
||||||
break;
|
break;
|
||||||
case Lock:
|
case Lock:
|
||||||
|
|
@ -3829,6 +3847,12 @@ Editor::edit_mode_selection_done (EditMode m)
|
||||||
Config->set_edit_mode (m);
|
Config->set_edit_mode (m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Editor::ripple_mode_selection_done (RippleMode m)
|
||||||
|
{
|
||||||
|
Config->set_ripple_mode (m);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::grid_type_selection_done (GridType gridtype)
|
Editor::grid_type_selection_done (GridType gridtype)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1927,11 +1927,15 @@ private:
|
||||||
Gtk::Button automation_mode_button;
|
Gtk::Button automation_mode_button;
|
||||||
|
|
||||||
//edit mode menu stuff
|
//edit mode menu stuff
|
||||||
|
ArdourWidgets::ArdourDropdown ripple_mode_selector;
|
||||||
ArdourWidgets::ArdourDropdown edit_mode_selector;
|
ArdourWidgets::ArdourDropdown edit_mode_selector;
|
||||||
void edit_mode_selection_done (ARDOUR::EditMode);
|
void edit_mode_selection_done (ARDOUR::EditMode);
|
||||||
|
void ripple_mode_selection_done (ARDOUR::RippleMode);
|
||||||
void build_edit_mode_menu ();
|
void build_edit_mode_menu ();
|
||||||
Gtk::VBox edit_mode_box;
|
Gtk::VBox edit_mode_box;
|
||||||
|
|
||||||
|
void set_ripple_mode (ARDOUR::RippleMode);
|
||||||
|
|
||||||
void set_edit_mode (ARDOUR::EditMode);
|
void set_edit_mode (ARDOUR::EditMode);
|
||||||
void cycle_edit_mode ();
|
void cycle_edit_mode ();
|
||||||
|
|
||||||
|
|
@ -2310,6 +2314,7 @@ private:
|
||||||
Glib::RefPtr<Gtk::RadioAction> edit_point_action (Editing::EditPoint);
|
Glib::RefPtr<Gtk::RadioAction> edit_point_action (Editing::EditPoint);
|
||||||
std::vector<std::string> edit_point_strings;
|
std::vector<std::string> edit_point_strings;
|
||||||
std::vector<std::string> edit_mode_strings;
|
std::vector<std::string> edit_mode_strings;
|
||||||
|
std::vector<std::string> ripple_mode_strings;
|
||||||
|
|
||||||
void selected_marker_moved (ARDOUR::Location*);
|
void selected_marker_moved (ARDOUR::Location*);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -582,11 +582,14 @@ Editor::register_actions ()
|
||||||
ActionManager::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));
|
ActionManager::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));
|
||||||
|
|
||||||
ActionManager::register_action (editor_actions, "set-edit-ripple", _("Ripple"), bind (mem_fun (*this, &Editor::set_edit_mode), Ripple));
|
ActionManager::register_action (editor_actions, "set-edit-ripple", _("Ripple"), bind (mem_fun (*this, &Editor::set_edit_mode), Ripple));
|
||||||
ActionManager::register_action (editor_actions, "set-edit-ripple-all", _("Ripple All"), bind (mem_fun (*this, &Editor::set_edit_mode), RippleAll));
|
|
||||||
ActionManager::register_action (editor_actions, "set-edit-slide", _("Slide"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Slide));
|
ActionManager::register_action (editor_actions, "set-edit-slide", _("Slide"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Slide));
|
||||||
ActionManager::register_action (editor_actions, "set-edit-lock", S_("EditMode|Lock"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Lock));
|
ActionManager::register_action (editor_actions, "set-edit-lock", S_("EditMode|Lock"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Lock));
|
||||||
ActionManager::register_action (editor_actions, "cycle-edit-mode", _("Cycle Edit Mode"), sigc::mem_fun (*this, &Editor::cycle_edit_mode));
|
ActionManager::register_action (editor_actions, "cycle-edit-mode", _("Cycle Edit Mode"), sigc::mem_fun (*this, &Editor::cycle_edit_mode));
|
||||||
|
|
||||||
|
ActionManager::register_action (editor_actions, "set-ripple-selected", _("Selected"), bind (mem_fun (*this, &Editor::set_ripple_mode), RippleSelected));
|
||||||
|
ActionManager::register_action (editor_actions, "set-ripple-all", _("All"), sigc::bind (sigc::mem_fun (*this, &Editor::set_ripple_mode), RippleAll));
|
||||||
|
ActionManager::register_action (editor_actions, "set-ripple-interview", S_("Interview"), sigc::bind (sigc::mem_fun (*this, &Editor::set_ripple_mode), RippleInterview));
|
||||||
|
|
||||||
ActionManager::register_action (editor_actions, X_("GridChoice"), _("Snap & Grid"));
|
ActionManager::register_action (editor_actions, X_("GridChoice"), _("Snap & Grid"));
|
||||||
|
|
||||||
RadioAction::Group snap_mode_group;
|
RadioAction::Group snap_mode_group;
|
||||||
|
|
@ -1666,8 +1669,15 @@ Editor::parameter_changed (std::string p)
|
||||||
update_just_timecode ();
|
update_just_timecode ();
|
||||||
} else if (p == "show-region-fades") {
|
} else if (p == "show-region-fades") {
|
||||||
update_region_fade_visibility ();
|
update_region_fade_visibility ();
|
||||||
|
} else if (p == "ripple-mode") {
|
||||||
|
ripple_mode_selector.set_text (ripple_mode_strings [Config->get_ripple_mode()]);
|
||||||
} else if (p == "edit-mode") {
|
} else if (p == "edit-mode") {
|
||||||
edit_mode_selector.set_text (edit_mode_to_string (Config->get_edit_mode()));
|
edit_mode_selector.set_text (edit_mode_strings [Config->get_edit_mode()]);
|
||||||
|
if (Config->get_edit_mode()==Ripple) {
|
||||||
|
ripple_mode_selector.show();
|
||||||
|
} else {
|
||||||
|
ripple_mode_selector.hide();
|
||||||
|
}
|
||||||
} else if (p == "show-track-meters") {
|
} else if (p == "show-track-meters") {
|
||||||
toggle_meter_updating();
|
toggle_meter_updating();
|
||||||
} else if (p == "show-summary") {
|
} else if (p == "show-summary") {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue