summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-01-22 12:28:49 +0000
committerCarl Hetherington <carl@carlh.net>2012-01-22 12:28:49 +0000
commite317386c5cde5741a8279bf480240293720d6788 (patch)
treeb2a46c67c910e079a5bf94684ac108fc90a4a511 /gtk2_ardour
parent9080c672a531a05b9b2f72a85faa5725457653de (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')
-rw-r--r--gtk2_ardour/option_editor.cc34
-rw-r--r--gtk2_ardour/option_editor.h7
-rw-r--r--gtk2_ardour/rc_option_editor.cc2
3 files changed, 41 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)
diff --git a/gtk2_ardour/option_editor.h b/gtk2_ardour/option_editor.h
index df1f531a77..dd34b85057 100644
--- a/gtk2_ardour/option_editor.h
+++ b/gtk2_ardour/option_editor.h
@@ -71,6 +71,13 @@ public:
void add_widget_to_page (OptionEditorPage*, Gtk::Widget*);
void add_widgets_to_page (OptionEditorPage*, Gtk::Widget*, Gtk::Widget*);
+
+ void set_note (std::string const &);
+
+private:
+ void maybe_add_note (OptionEditorPage *, int);
+
+ std::string _note;
};
/** A component which provides a subheading within the dialog */
diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc
index 5c67005386..472faf484c 100644
--- a/gtk2_ardour/rc_option_editor.cc
+++ b/gtk2_ardour/rc_option_editor.cc
@@ -877,6 +877,8 @@ RCOptionEditor::RCOptionEditor ()
procs->add (i, string_compose (_("%1 processors"), i));
}
+ procs->set_note (_("This setting will only take effect when Ardour is restarted."));
+
add_option (_("Misc"), procs);
}