diff options
author | Robin Gareus <robin@gareus.org> | 2017-12-05 01:32:48 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-12-05 01:55:38 +0100 |
commit | f3be5bb421822aa7644b63eea2317f9849f31d57 (patch) | |
tree | 6bb5ef100b0617d5704bdd06903a3cc3f272e661 /gtk2_ardour/script_selector.cc | |
parent | bb5345614d6d4860c619e96fa174b3ffd4e8c262 (diff) |
Lua Script-Selector update
* register bindings for action_param
* honor pre-seeded value (don't ask)
* allow to pre-seed a script-name
* allow to cancel interactive script load at parameter-stage
Diffstat (limited to 'gtk2_ardour/script_selector.cc')
-rw-r--r-- | gtk2_ardour/script_selector.cc | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/gtk2_ardour/script_selector.cc b/gtk2_ardour/script_selector.cc index 794d57797a..94d6e67671 100644 --- a/gtk2_ardour/script_selector.cc +++ b/gtk2_ardour/script_selector.cc @@ -162,6 +162,13 @@ ScriptParameterDialog::ScriptParameterDialog (std::string title, t->set_spacings (6); _name_entry.set_text (spi->name); + + for (size_t i = 0; i < _lsp.size(); ++i) { + if (_lsp[i]->preseeded && _lsp[i]->name == "x-script-name" && !_lsp[i]->value.empty ()) { + _name_entry.set_text (_lsp[i]->value); + } + } + _name_entry.signal_changed().connect (sigc::mem_fun (*this, &ScriptParameterDialog::update_sensitivity)); int ty = 0; @@ -211,13 +218,15 @@ ScriptParameterDialog::ScriptParameterDialog (std::string title, bool ScriptParameterDialog::need_interation () const { - if (_lsp.size () > 0) { - return false; - } if (!parameters_ok ()) { - return false; + return true; } - return true; + for (size_t i = 0; i < _lsp.size(); ++i) { + if (!_lsp[i]->optional && !_lsp[i]->preseeded) { + return true; + } + } + return false; } bool |