Add session preferences dialog.

git-svn-id: svn://localhost/ardour2/branches/3.0@5082 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2009-05-16 01:22:43 +00:00
parent f4e6f8fec5
commit 29e8fe1698
24 changed files with 436 additions and 155 deletions

View file

@ -99,6 +99,35 @@ BoolOption::toggled ()
_set (_button->get_active ());
}
EntryOption::EntryOption (string const & i, string const & n, slot<string> g, slot<bool, string> s)
: Option (i, n),
_get (g),
_set (s)
{
_label = manage (new Label (n + ":"));
_label->set_alignment (1, 0.5);
_entry = manage (new Entry);
_entry->signal_activate().connect (mem_fun (*this, &EntryOption::activated));
}
void
EntryOption::add_to_page (OptionEditorPage* p)
{
add_widgets_to_page (p, _label, _entry);
}
void
EntryOption::set_state_from_config ()
{
_entry->set_text (_get ());
}
void
EntryOption::activated ()
{
_set (_entry->get_text ());
}
OptionEditorPage::OptionEditorPage (Gtk::Notebook& n, std::string const & t)
: table (1, 3)
{