diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-03-15 19:46:28 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-03-15 19:46:28 -0400 |
commit | a06a5ecfd6cce641bca67c9927f44207a91ffc42 (patch) | |
tree | f1cdd1392b7b33d36e7fe9a172cf42f9fc46a892 /gtk2_ardour/keyeditor.cc | |
parent | 694c7254e19fd0fbabe1ad25020fc0785216eb96 (diff) |
change the way the key editor gets populated; drop binding sets with no actions
Diffstat (limited to 'gtk2_ardour/keyeditor.cc')
-rw-r--r-- | gtk2_ardour/keyeditor.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gtk2_ardour/keyeditor.cc b/gtk2_ardour/keyeditor.cc index 794e2e258c..8c4aaa1911 100644 --- a/gtk2_ardour/keyeditor.cc +++ b/gtk2_ardour/keyeditor.cc @@ -114,7 +114,13 @@ void KeyEditor::add_tab (string const & name, Bindings& bindings) { Tab* t = new Tab (*this, name, &bindings); - t->populate (); + + if (t->populate () == 0) { + /* no bindings */ + delete t; + return; + } + t->show_all (); notebook.append_page (*t, name); } @@ -135,6 +141,7 @@ KeyEditor::remove_tab (string const &name) } } } + cerr << "Removed " << name << endl; } void @@ -305,7 +312,7 @@ KeyEditor::Tab::bind (GdkEventKey* release_event, guint pressed_key) } } -void +uint32_t KeyEditor::Tab::populate () { vector<string> paths; @@ -395,6 +402,8 @@ KeyEditor::Tab::populate () } row[columns.action] = *a; } + + return data_model->children().size(); } void |