diff options
Diffstat (limited to 'gtk2_ardour/editor_edit_groups.cc')
-rw-r--r-- | gtk2_ardour/editor_edit_groups.cc | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/gtk2_ardour/editor_edit_groups.cc b/gtk2_ardour/editor_edit_groups.cc index 151d8043a6..3b21caca6c 100644 --- a/gtk2_ardour/editor_edit_groups.cc +++ b/gtk2_ardour/editor_edit_groups.cc @@ -52,6 +52,9 @@ Editor::build_edit_group_list_menu () items.push_back (MenuElem (_("Activate All"), mem_fun(*this, &Editor::activate_all_edit_groups))); items.push_back (MenuElem (_("Disable All"), mem_fun(*this, &Editor::disable_all_edit_groups))); items.push_back (SeparatorElem()); + items.push_back (MenuElem (_("Show All"), mem_fun(*this, &Editor::show_all_edit_groups))); + items.push_back (MenuElem (_("Hide All"), mem_fun(*this, &Editor::hide_all_edit_groups))); + items.push_back (SeparatorElem()); items.push_back (MenuElem (_("Add group"), mem_fun(*this, &Editor::new_edit_group))); } @@ -75,6 +78,24 @@ Editor::disable_all_edit_groups () } void +Editor::show_all_edit_groups () +{ + Gtk::TreeModel::Children children = group_model->children(); + for(Gtk::TreeModel::Children::iterator iter = children.begin(); iter != children.end(); ++iter) { + (*iter)[group_columns.is_visible] = true; + } +} + +void +Editor::hide_all_edit_groups () +{ + Gtk::TreeModel::Children children = group_model->children(); + for(Gtk::TreeModel::Children::iterator iter = children.begin(); iter != children.end(); ++iter) { + (*iter)[group_columns.is_visible] = false; + } +} + +void Editor::new_edit_group () { session->add_edit_group (""); @@ -258,15 +279,6 @@ Editor::edit_groups_changed () group_model->clear (); - { - TreeModel::Row row; - row = *(group_model->append()); - row[group_columns.is_active] = false; - row[group_columns.is_visible] = true; - row[group_columns.text] = (_("-all-")); - row[group_columns.routegroup] = 0; - } - session->foreach_edit_group (mem_fun (*this, &Editor::add_edit_group)); } |