summaryrefslogtreecommitdiff
path: root/gtk2_ardour/option_editor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/option_editor.cc')
-rw-r--r--gtk2_ardour/option_editor.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc
index 137d6b98c8..aa975b6b94 100644
--- a/gtk2_ardour/option_editor.cc
+++ b/gtk2_ardour/option_editor.cc
@@ -445,6 +445,21 @@ OptionEditor::add_option (std::string const & pn, OptionEditorComponent* o)
o->set_state_from_config ();
}
+/** Add a new page
+ * @param pn Page name (will be created if it doesn't already exist)
+ * @param w widget that fills the page
+ */
+void
+OptionEditor::add_page (std::string const & pn, Gtk::Widget& w)
+{
+ if (_pages.find (pn) == _pages.end()) {
+ _pages[pn] = new OptionEditorPage (_notebook, pn);
+ }
+
+ OptionEditorPage* p = _pages[pn];
+ p->box.pack_start (w, true, true);
+}
+
void
OptionEditor::set_current_page (string const & p)
{