diff options
author | Ben Loftis <ben@glw.com> | 2009-09-16 14:30:35 +0000 |
---|---|---|
committer | Ben Loftis <ben@glw.com> | 2009-09-16 14:30:35 +0000 |
commit | 5cfbd2f7c0a2c87cd7db1eec1f164d696418ee3b (patch) | |
tree | 3ae5a8bf0e77bed82c31fabbe22374ea1a396265 /gtk2_ardour/editor_edit_groups.cc | |
parent | 5bf6193fe96d5c43aa10c4f7b5497424b692c749 (diff) |
use rt-click context menu instead of the -all- group, which was orphaned
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@5666 d708f5d6-7413-0410-9779-e7cbd77b26cf
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)); } |