diff options
author | Carl Hetherington <carl@carlh.net> | 2010-05-25 00:35:53 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-05-25 00:35:53 +0000 |
commit | e3b0cb086d2cec5f28a24fed16fd62e06080fe1a (patch) | |
tree | a72693675a3932bd3b586c14b4da02efe31b44e3 /gtk2_ardour/editor_actions.cc | |
parent | bd2cbe9e76b28d5cc3d9688c7df6c5206d6be771 (diff) |
Clean up snap-to code in various places. Fix a couple of typos. Should fix #3165 and #3172.
git-svn-id: svn://localhost/ardour2/branches/3.0@7152 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_actions.cc')
-rw-r--r-- | gtk2_ardour/editor_actions.cc | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index 56919e0399..eeb604c2e5 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -714,20 +714,20 @@ Editor::register_actions () ActionManager::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))); ActionManager::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))); - ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-twentyeighths"), _("Snap to Thirty Seconds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv28))); - ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-twentyfourths"), _("Snap to Thirty Seconds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv24))); - ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-twelfths"), _("Snap to Thirty Seconds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv14))); - ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-fourteenths"), _("Snap to Thirty Seconds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv12))); - ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-tenths"), _("Snap to Thirty Seconds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv10))); - ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-sevenths"), _("Snap to Thirty Seconds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv7))); - ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-sixths"), _("Snap to Thirty Seconds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv6))); - ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-fifths"), _("Snap to Thirty Seconds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv5))); - ActionManager::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))); - ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-asixteenthbeat"), _("Snap to A Sixteenth Beat"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv16))); + ActionManager::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))); + ActionManager::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))); + ActionManager::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))); + ActionManager::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))); + ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-twelfths"), _("Snap to Tweflths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv12))); + ActionManager::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))); ActionManager::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))); + ActionManager::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))); + ActionManager::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))); + ActionManager::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))); ActionManager::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))); ActionManager::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))); + ActionManager::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))); ActionManager::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))); ActionManager::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))); @@ -958,7 +958,6 @@ Editor::toggle_logo_visibility () RefPtr<RadioAction> Editor::snap_type_action (SnapType type) { - const char* action = 0; RefPtr<Action> act; @@ -981,12 +980,18 @@ Editor::snap_type_action (SnapType type) case Editing::SnapToMinutes: action = "snap-to-minutes"; break; + case Editing::SnapToBeatDiv32: + action = "snap-to-thirtyseconds"; + break; case Editing::SnapToBeatDiv28: action = "snap-to-twentyeighths"; break; case Editing::SnapToBeatDiv24: action = "snap-to-twentyfourths"; break; + case Editing::SnapToBeatDiv16: + action = "snap-to-asixteenthbeat"; + break; case Editing::SnapToBeatDiv14: action = "snap-to-fourteenths"; break; @@ -996,6 +1001,9 @@ Editor::snap_type_action (SnapType type) case Editing::SnapToBeatDiv10: action = "snap-to-tenths"; break; + case Editing::SnapToBeatDiv8: + action = "snap-to-eighths"; + break; case Editing::SnapToBeatDiv7: action = "snap-to-sevenths"; break; @@ -1005,21 +1013,15 @@ Editor::snap_type_action (SnapType type) case Editing::SnapToBeatDiv5: action = "snap-to-fifths"; break; - case Editing::SnapToBeatDiv32: - action = "snap-to-thirtyseconds"; - break; - case Editing::SnapToBeatDiv16: - action = "snap-to-asixteenthbeat"; - break; - case Editing::SnapToBeatDiv8: - action = "snap-to-eighths"; - break; case Editing::SnapToBeatDiv4: action = "snap-to-quarters"; break; case Editing::SnapToBeatDiv3: action = "snap-to-thirds"; break; + case Editing::SnapToBeatDiv2: + action = "snap-to-halves"; + break; case Editing::SnapToBeat: action = "snap-to-beat"; break; @@ -1117,6 +1119,9 @@ Editor::cycle_snap_choice() set_snap_to (Editing::SnapToBeatDiv3); break; case Editing::SnapToBeatDiv3: + set_snap_to (Editing::SnapToBeatDiv2); + break; + case Editing::SnapToBeatDiv2: set_snap_to (Editing::SnapToBeat); break; case Editing::SnapToBeat: |