X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Feditor_edit_groups.cc;h=3383e6bfe93d8095848d02aa43fafea2dff8697f;hb=862cb478a2b9dfa3822c581241396582050bfa44;hp=2ee1773646b78327812f95a0f0c4c900fa6a57a9;hpb=fd289ac9677d93f816038871440e52f20dd891fb;p=ardour.git diff --git a/gtk2_ardour/editor_edit_groups.cc b/gtk2_ardour/editor_edit_groups.cc index 2ee1773646..3383e6bfe9 100644 --- a/gtk2_ardour/editor_edit_groups.cc +++ b/gtk2_ardour/editor_edit_groups.cc @@ -15,7 +15,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id$ */ #include @@ -53,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 +77,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 () { @@ -141,6 +161,9 @@ Editor::edit_group_list_button_press_event (GdkEventButton* ev) if ((iter = group_model->get_iter (path))) { if ((group = (*iter)[group_columns.routegroup]) != 0) { // edit_route_group (group); +#ifdef GTKOSX + edit_group_display.queue_draw(); +#endif return true; } } @@ -152,6 +175,9 @@ Editor::edit_group_list_button_press_event (GdkEventButton* ev) if ((iter = group_model->get_iter (path))) { bool active = (*iter)[group_columns.is_active]; (*iter)[group_columns.is_active] = !active; +#ifdef GTKOSX + edit_group_display.queue_draw(); +#endif return true; } break; @@ -160,6 +186,9 @@ Editor::edit_group_list_button_press_event (GdkEventButton* ev) if ((iter = group_model->get_iter (path))) { bool visible = (*iter)[group_columns.is_visible]; (*iter)[group_columns.is_visible] = !visible; +#ifdef GTKOSX + edit_group_display.queue_draw(); +#endif return true; } break; @@ -200,7 +229,9 @@ Editor::edit_group_row_change (const Gtk::TreeModel::Path& path,const Gtk::TreeM bool active = (*iter)[group_columns.is_active]; group->set_active (active, this); - + + bool visible = (*iter)[group_columns.is_visible]; + group->set_hidden (!visible, this); string name = (*iter)[group_columns.text]; @@ -250,15 +281,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)); }