summaryrefslogtreecommitdiff
path: root/gtk2_ardour/route_group_dialog.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-08-30 09:48:53 +0000
committerCarl Hetherington <carl@carlh.net>2011-08-30 09:48:53 +0000
commit7d32cf3813b7145b98c86b59867092e04aa2621a (patch)
treedbb2d319f55e2c287b51a7071a236dadd6d83ca3 /gtk2_ardour/route_group_dialog.cc
parent9b7ae4cccc8507bc3e74e909b738a5b87a2b717b (diff)
Give route groups their own colour, settable from the route
group dialogue. Americanise spelling of color in a few places to avoid confusion. Fixes #4224. Addresses parts of #2650 and #4064. git-svn-id: svn://localhost/ardour2/branches/3.0@10030 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/route_group_dialog.cc')
-rw-r--r--gtk2_ardour/route_group_dialog.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/gtk2_ardour/route_group_dialog.cc b/gtk2_ardour/route_group_dialog.cc
index 9d58ea816c..acc4eefbcc 100644
--- a/gtk2_ardour/route_group_dialog.cc
+++ b/gtk2_ardour/route_group_dialog.cc
@@ -23,6 +23,7 @@
#include "ardour/route_group.h"
#include "ardour/session.h"
#include "route_group_dialog.h"
+#include "group_tabs.h"
#include "i18n.h"
#include <iostream>
@@ -94,6 +95,7 @@ RouteGroupDialog::RouteGroupDialog (RouteGroup* g, bool creating_new)
_select.set_active (_group->is_select());
_edit.set_active (_group->is_edit());
_route_active.set_active (_group->is_route_active());
+ _color.set_color (GroupTabs::group_color (_group));
_name.signal_changed().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
_active.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
@@ -105,10 +107,11 @@ RouteGroupDialog::RouteGroupDialog (RouteGroup* g, bool creating_new)
_select.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
_edit.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
_route_active.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
+ _color.signal_color_set().connect (sigc::mem_fun (*this, &RouteGroupDialog::update));
gain_toggled ();
- Table* table = manage (new Table (8, 3, false));
+ Table* table = manage (new Table (11, 4, false));
table->set_row_spacings (6);
l = manage (new Label ("", Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false));
@@ -129,6 +132,12 @@ RouteGroupDialog::RouteGroupDialog (RouteGroup* g, bool creating_new)
table->attach (_edit, 1, 3, 7, 8, Gtk::FILL, Gtk::FILL, 0, 0);
table->attach (_route_active, 1, 3, 8, 9, Gtk::FILL, Gtk::FILL, 0, 0);
+ HBox* b = manage (new HBox);
+ l = manage (new Label (_("Color"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false));
+ b->pack_start (*l, Gtk::SHRINK, Gtk::SHRINK);
+ b->pack_start (_color, Gtk::FILL, Gtk::FILL);
+ table->attach (*b, 1, 3, 10, 11, Gtk::FILL, Gtk::FILL, 0, 0);
+
options_box->pack_start (*table, false, true);
main_vbox->pack_start (*options_box, false, true);
@@ -196,6 +205,8 @@ RouteGroupDialog::update ()
plist.add (Properties::active, _active.get_active());
plist.add (Properties::name, string (_name.get_text()));
+ GroupTabs::set_group_color (_group, _color.get_color ());
+
_group->apply_changes (plist);
}