summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Loftis <ben@glw.com>2009-09-16 14:30:35 +0000
committerBen Loftis <ben@glw.com>2009-09-16 14:30:35 +0000
commit5cfbd2f7c0a2c87cd7db1eec1f164d696418ee3b (patch)
tree3ae5a8bf0e77bed82c31fabbe22374ea1a396265
parent5bf6193fe96d5c43aa10c4f7b5497424b692c749 (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
-rw-r--r--gtk2_ardour/editor.h2
-rw-r--r--gtk2_ardour/editor_edit_groups.cc30
-rw-r--r--gtk2_ardour/mixer_ui.cc32
-rw-r--r--gtk2_ardour/mixer_ui.h2
4 files changed, 48 insertions, 18 deletions
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index 234680ebbc..c1077b4f1b 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -1819,6 +1819,8 @@ public:
void build_edit_group_list_menu ();
void activate_all_edit_groups ();
void disable_all_edit_groups ();
+ void show_all_edit_groups ();
+ void hide_all_edit_groups ();
bool in_edit_group_row_change;
void edit_group_row_change (const Gtk::TreeModel::Path&,const Gtk::TreeModel::iterator&);
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));
}
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));
}
diff --git a/gtk2_ardour/mixer_ui.h b/gtk2_ardour/mixer_ui.h
index 99a2682f2a..1c5ecda850 100644
--- a/gtk2_ardour/mixer_ui.h
+++ b/gtk2_ardour/mixer_ui.h
@@ -184,6 +184,8 @@ class Mixer_UI : public Gtk::Window
void build_mix_group_context_menu ();
void activate_all_mix_groups ();
void disable_all_mix_groups ();
+ void show_all_mix_groups ();
+ void hide_all_mix_groups ();
void add_mix_group (ARDOUR::RouteGroup *);
void mix_groups_changed ();
void mix_group_name_edit (const Glib::ustring&, const Glib::ustring&);