summaryrefslogtreecommitdiff
path: root/gtk2_ardour/mixer_ui.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/mixer_ui.cc')
-rw-r--r--gtk2_ardour/mixer_ui.cc32
1 files changed, 23 insertions, 9 deletions
diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc
index 56b11bfc2f..b135764131 100644
--- a/gtk2_ardour/mixer_ui.cc
+++ b/gtk2_ardour/mixer_ui.cc
@@ -987,6 +987,9 @@ Mixer_UI::build_mix_group_context_menu ()
items.push_back (MenuElem (_("Activate All"), mem_fun(*this, &Mixer_UI::activate_all_mix_groups)));
items.push_back (MenuElem (_("Disable All"), mem_fun(*this, &Mixer_UI::disable_all_mix_groups)));
items.push_back (SeparatorElem());
+ items.push_back (MenuElem (_("Show All"), mem_fun(*this, &Mixer_UI::show_all_mix_groups)));
+ items.push_back (MenuElem (_("Hide All"), mem_fun(*this, &Mixer_UI::hide_all_mix_groups)));
+ items.push_back (SeparatorElem());
items.push_back (MenuElem (_("Add group"), mem_fun(*this, &Mixer_UI::new_mix_group)));
}
@@ -1068,6 +1071,8 @@ Mixer_UI::activate_all_mix_groups ()
}
}
+
+
void
Mixer_UI::disable_all_mix_groups ()
{
@@ -1078,6 +1083,24 @@ Mixer_UI::disable_all_mix_groups ()
}
void
+Mixer_UI::show_all_mix_groups ()
+{
+ Gtk::TreeModel::Children children = group_model->children();
+ for(Gtk::TreeModel::Children::iterator iter = children.begin(); iter != children.end(); ++iter) {
+ (*iter)[group_columns.visible] = true;
+ }
+}
+
+void
+Mixer_UI::hide_all_mix_groups ()
+{
+ Gtk::TreeModel::Children children = group_model->children();
+ for(Gtk::TreeModel::Children::iterator iter = children.begin(); iter != children.end(); ++iter) {
+ (*iter)[group_columns.visible] = false;
+ }
+}
+
+void
Mixer_UI::mix_groups_changed ()
{
ENSURE_GUI_THREAD (mem_fun (*this, &Mixer_UI::mix_groups_changed));
@@ -1086,15 +1109,6 @@ Mixer_UI::mix_groups_changed ()
group_model->clear ();
- {
- TreeModel::Row row;
- row = *(group_model->append());
- row[group_columns.active] = false;
- row[group_columns.visible] = true;
- row[group_columns.text] = (_("-all-"));
- row[group_columns.group] = 0;
- }
-
session->foreach_mix_group (mem_fun (*this, &Mixer_UI::add_mix_group));
}