extend API of key binding editor to allow for tab removal
This commit is contained in:
parent
89ba1c9edd
commit
f83a7f4131
@ -119,6 +119,24 @@ KeyEditor::add_tab (string const & name, Bindings& bindings)
|
|||||||
notebook.append_page (*t, name);
|
notebook.append_page (*t, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
KeyEditor::remove_tab (string const &name)
|
||||||
|
{
|
||||||
|
guint npages = notebook.get_n_pages ();
|
||||||
|
|
||||||
|
for (guint n = 0; n < npages; ++n) {
|
||||||
|
Widget* w = notebook.get_nth_page (n);
|
||||||
|
Tab* tab = dynamic_cast<Tab*> (w);
|
||||||
|
if (tab) {
|
||||||
|
if (tab->name == name) {
|
||||||
|
notebook.remove_page (*w);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
KeyEditor::unbind ()
|
KeyEditor::unbind ()
|
||||||
{
|
{
|
||||||
|
@ -41,6 +41,7 @@ class KeyEditor : public ArdourWindow
|
|||||||
KeyEditor ();
|
KeyEditor ();
|
||||||
|
|
||||||
void add_tab (std::string const &name, Gtkmm2ext::Bindings&);
|
void add_tab (std::string const &name, Gtkmm2ext::Bindings&);
|
||||||
|
void remove_tab (std::string const &name);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class Tab : public Gtk::VBox
|
class Tab : public Gtk::VBox
|
||||||
|
Loading…
Reference in New Issue
Block a user