mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
Use a label for required script instance parameters
This commit is contained in:
parent
9cc068756b
commit
ac46fb2700
1 changed files with 11 additions and 7 deletions
|
|
@ -176,17 +176,21 @@ ScriptParameterDialog::ScriptParameterDialog (std::string title,
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < _lsp.size (); ++i) {
|
for (size_t i = 0; i < _lsp.size (); ++i) {
|
||||||
CheckButton* c = manage (new CheckButton (_lsp[i]->title));
|
|
||||||
Entry* e = manage (new Entry());
|
Entry* e = manage (new Entry());
|
||||||
c->set_active (!_lsp[i]->optional); // also if default ??
|
if (_lsp[i]->optional) {
|
||||||
c->set_sensitive (_lsp[i]->optional);
|
CheckButton* c = manage (new CheckButton (_lsp[i]->title));
|
||||||
e->set_text (_lsp[i]->dflt);
|
c->set_active (!_lsp[i]->dflt.empty());
|
||||||
e->set_sensitive (c->get_active ());
|
|
||||||
|
|
||||||
c->signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &ScriptParameterDialog::active_changed), i, c, e));
|
c->signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &ScriptParameterDialog::active_changed), i, c, e));
|
||||||
|
t->attach (*c, 0, 1, ty, ty+1);
|
||||||
|
} else {
|
||||||
|
Label* l = manage (new Label (_lsp[i]->title, Gtk::ALIGN_LEFT));
|
||||||
|
t->attach (*l, 0, 1, ty, ty+1);
|
||||||
|
}
|
||||||
|
|
||||||
|
e->set_text (_lsp[i]->dflt);
|
||||||
|
e->set_sensitive (!_lsp[i]->dflt.empty());
|
||||||
e->signal_changed().connect (sigc::bind (sigc::mem_fun (*this, &ScriptParameterDialog::value_changed), i, e));
|
e->signal_changed().connect (sigc::bind (sigc::mem_fun (*this, &ScriptParameterDialog::value_changed), i, e));
|
||||||
|
|
||||||
t->attach (*c, 0, 1, ty, ty+1);
|
|
||||||
t->attach (*e, 1, 2, ty, ty+1);
|
t->attach (*e, 1, 2, ty, ty+1);
|
||||||
++ty;
|
++ty;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue