mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
Fix "Shortcut" special-case in the script-selector.
The Script-selector is used in various places, not just for Action-scripts. Also add a "--" prefix for the separator to avoid name conflicts with actual script names.
This commit is contained in:
parent
2fa6314fb4
commit
ecb6e7fcfe
1 changed files with 6 additions and 4 deletions
|
|
@ -88,7 +88,7 @@ ScriptSelector::script_separator (const Glib::RefPtr<Gtk::TreeModel> &, const Gt
|
|||
{
|
||||
_script_combo.set_active (i);
|
||||
|
||||
return _script_combo.get_active_text () == "separator";
|
||||
return _script_combo.get_active_text () == "--separator--";
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -98,7 +98,7 @@ ScriptSelector::setup_list ()
|
|||
|
||||
vector<string> script_names;
|
||||
for (LuaScriptList::const_iterator s = _scripts.begin(); s != _scripts.end(); ++s) {
|
||||
if ((*s)->name != "Shortcut") {
|
||||
if ((*s)->name != "Shortcut" || _script_type != LuaScriptInfo::EditorAction) {
|
||||
script_names.push_back ((*s)->name);
|
||||
}
|
||||
}
|
||||
|
|
@ -106,8 +106,10 @@ ScriptSelector::setup_list ()
|
|||
_script_combo.clear();
|
||||
_script_combo.set_row_separator_func (sigc::mem_fun (*this, &ScriptSelector::script_separator));
|
||||
|
||||
_script_combo.append_text ("Shortcut");
|
||||
_script_combo.append_text ("separator");
|
||||
if (_script_type == LuaScriptInfo::EditorAction) {
|
||||
_script_combo.append_text ("Shortcut");
|
||||
_script_combo.append_text ("--separator--");
|
||||
}
|
||||
|
||||
vector<string>::const_iterator i;
|
||||
for (i = script_names.begin(); i != script_names.end(); ++i) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue