diff options
author | Carl Hetherington <carl@carlh.net> | 2012-01-22 12:28:49 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-01-22 12:28:49 +0000 |
commit | e317386c5cde5741a8279bf480240293720d6788 (patch) | |
tree | b2a46c67c910e079a5bf94684ac108fc90a4a511 /gtk2_ardour/option_editor.cc | |
parent | 9080c672a531a05b9b2f72a85faa5725457653de (diff) |
For now, only use the multi-threaded process code if we are
using >1 processor for DSP; this involves making the DSP
use setting only take effect on a restart of Ardour.
git-svn-id: svn://localhost/ardour2/branches/3.0@11302 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/option_editor.cc')
-rw-r--r-- | gtk2_ardour/option_editor.cc | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc index dcae19ef77..f118566405 100644 --- a/gtk2_ardour/option_editor.cc +++ b/gtk2_ardour/option_editor.cc @@ -40,17 +40,47 @@ void OptionEditorComponent::add_widget_to_page (OptionEditorPage* p, Gtk::Widget* w) { int const n = p->table.property_n_rows(); - p->table.resize (n + 1, 3); + int m = n + 1; + if (!_note.empty ()) { + ++m; + } + + p->table.resize (m, 3); p->table.attach (*w, 1, 3, n, n + 1, FILL | EXPAND); + + maybe_add_note (p, n + 1); } void OptionEditorComponent::add_widgets_to_page (OptionEditorPage* p, Gtk::Widget* wa, Gtk::Widget* wb) { int const n = p->table.property_n_rows(); - p->table.resize (n + 1, 3); + int m = n + 1; + if (!_note.empty ()) { + ++m; + } + + p->table.resize (m, 3); p->table.attach (*wa, 1, 2, n, n + 1, FILL); p->table.attach (*wb, 2, 3, n, n + 1, FILL | EXPAND); + + maybe_add_note (p, n + 1); +} + +void +OptionEditorComponent::maybe_add_note (OptionEditorPage* p, int n) +{ + if (!_note.empty ()) { + Gtk::Label* l = manage (new Gtk::Label (string_compose (X_("<i>%1</i>"), _note))); + l->set_use_markup (true); + p->table.attach (*l, 1, 3, n, n + 1, FILL | EXPAND); + } +} + +void +OptionEditorComponent::set_note (string const & n) +{ + _note = n; } OptionEditorHeading::OptionEditorHeading (string const & h) |