diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2014-07-01 16:43:00 -0500 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2014-07-01 16:43:00 -0500 |
commit | 190542c1d0bc81b498229453e62e85b42bdf8246 (patch) | |
tree | 2383a7c8a395587b6659dc1097789ba3d181be33 | |
parent | 960e5a3c7cb2ed1f0f2a8be0c417c6ee61e78f27 (diff) |
splice mode is undefined, undocumented, and buggy. ripple does most of what we want. remove splice for now. leave code because it may be revived later
-rw-r--r-- | gtk2_ardour/editor.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/editor_actions.cc | 7 | ||||
-rw-r--r-- | libs/ardour/enums.cc | 5 | ||||
-rw-r--r-- | libs/pbd/enumwriter.cc | 34 |
4 files changed, 27 insertions, 23 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 6f8db99da0..69545de3ca 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -3040,7 +3040,7 @@ Editor::build_edit_mode_menu () using namespace Menu_Helpers; edit_mode_selector.AddMenuElem (MenuElem ( edit_mode_to_string(Slide), sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Slide))); - edit_mode_selector.AddMenuElem (MenuElem ( edit_mode_to_string(Splice), sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Splice))); +// edit_mode_selector.AddMenuElem (MenuElem ( edit_mode_to_string(Splice), sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Splice))); edit_mode_selector.AddMenuElem (MenuElem ( edit_mode_to_string(Ripple), sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Ripple))); edit_mode_selector.AddMenuElem (MenuElem ( edit_mode_to_string(Lock), sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Lock))); } @@ -3356,7 +3356,7 @@ Editor::cycle_edit_mode () Config->set_edit_mode (Ripple); } break; - case Splice: +// case Splice: case Ripple: Config->set_edit_mode (Lock); break; diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index 27fab388be..f49fd06906 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -480,10 +480,9 @@ Editor::register_actions () ActionManager::register_action (editor_actions, "cycle-edit-point", _("Change Edit Point"), sigc::bind (sigc::mem_fun (*this, &Editor::cycle_edit_point), false)); 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)); - if (!Profile->get_sae()) { - ActionManager::register_action (editor_actions, "set-edit-splice", _("Splice"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Splice)); - 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-splice", _("Splice"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Splice)); + 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-slide", _("Slide"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Slide)); ActionManager::register_action (editor_actions, "set-edit-lock", _("Lock"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Lock)); ActionManager::register_action (editor_actions, "toggle-edit-mode", _("Toggle Edit Mode"), sigc::mem_fun (*this, &Editor::cycle_edit_mode)); diff --git a/libs/ardour/enums.cc b/libs/ardour/enums.cc index 6f4158d5de..54f1e602be 100644 --- a/libs/ardour/enums.cc +++ b/libs/ardour/enums.cc @@ -238,6 +238,11 @@ setup_enum_writer () REGISTER_ENUM (Ripple); // XXX do the old enum values have to stay in order? REGISTER_ENUM (Lock); REGISTER (_EditMode); + /* + * Splice mode is undefined, undocumented, and basically fubar'ed + * perhaps someday we will make it work. but for now, avoid it + */ + enum_writer.add_to_hack_table ("Splice", "Slide"); REGISTER_ENUM (Start); REGISTER_ENUM (End); diff --git a/libs/pbd/enumwriter.cc b/libs/pbd/enumwriter.cc index 6d911b2dea..f67d305080 100644 --- a/libs/pbd/enumwriter.cc +++ b/libs/pbd/enumwriter.cc @@ -279,6 +279,23 @@ EnumWriter::read_distinct (EnumRegistration& er, string str) vector<int>::iterator i; vector<string>::iterator s; + /* first, check to see if there a hack for the name we're looking up */ + + map<string,string>::iterator x; + + if ((x = hack_table.find (str)) != hack_table.end()) { + + cerr << "found hack for " << str << " = " << x->second << endl; + + str = x->second; + + for (i = er.values.begin(), s = er.names.begin(); i != er.values.end(); ++i, ++s) { + if (str == (*s) || nocase_cmp (str, *s) == 0) { + return (*i); + } + } + } + /* catch old-style hex numerics */ if (str.length() > 2 && str[0] == '0' && str[1] == 'x') { @@ -299,23 +316,6 @@ EnumWriter::read_distinct (EnumRegistration& er, string str) } } - /* failed to find it as-is. check to see if there a hack for the name we're looking up */ - - map<string,string>::iterator x; - - if ((x = hack_table.find (str)) != hack_table.end()) { - - cerr << "found hack for " << str << " = " << x->second << endl; - - str = x->second; - - for (i = er.values.begin(), s = er.names.begin(); i != er.values.end(); ++i, ++s) { - if (str == (*s) || nocase_cmp (str, *s) == 0) { - return (*i); - } - } - } - throw unknown_enumeration(str); } |