summaryrefslogtreecommitdiff
path: root/gtk2_ardour/mixer_strip.cc
diff options
context:
space:
mode:
authorNick Mainsbridge <beatroute@iprimus.com.au>2006-11-08 12:08:46 +0000
committerNick Mainsbridge <beatroute@iprimus.com.au>2006-11-08 12:08:46 +0000
commit20cf901da98d7306e4f65c806a60d70fa1465b0b (patch)
tree2086d365cc2d46195bf435da3be45a1564cc2ea8 /gtk2_ardour/mixer_strip.cc
parent1c9d8ed39d9d0dc459c5b6d443ba8b57493e10fc (diff)
use track colour to set comment button background rather than use active button state, mut and solo right-click action is now consistent with the rest of the ui, reorder sfdb dialog buttons
git-svn-id: svn://localhost/ardour2/trunk@1096 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/mixer_strip.cc')
-rw-r--r--gtk2_ardour/mixer_strip.cc21
1 files changed, 8 insertions, 13 deletions
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc
index c84bdad4e5..7d5700eeba 100644
--- a/gtk2_ardour/mixer_strip.cc
+++ b/gtk2_ardour/mixer_strip.cc
@@ -232,8 +232,6 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, boost::shared_ptr<Route> rt
_route->comment());
comment_button.signal_clicked().connect (mem_fun(*this, &MixerStrip::comment_button_clicked));
- comment_button.signal_enter().connect (mem_fun(*this, &MixerStrip::comment_button_refresh));
- comment_button.signal_leave().connect (mem_fun(*this, &MixerStrip::comment_button_refresh));
global_vpacker.set_border_width (0);
global_vpacker.set_spacing (0);
@@ -420,8 +418,10 @@ MixerStrip::set_width (Width w)
solo_button->set_label (_("solo"));
if (_route->comment() == "") {
+ comment_button.unset_bg (STATE_NORMAL);
comment_button.set_label (_("comments"));
} else {
+ comment_button.modify_bg (STATE_NORMAL, color());
comment_button.set_label (_("*comments*"));
}
@@ -443,8 +443,10 @@ MixerStrip::set_width (Width w)
solo_button->set_label (_("S"));
if (_route->comment() == "") {
+ comment_button.unset_bg (STATE_NORMAL);
comment_button.set_label (_("Cmt"));
} else {
+ comment_button.modify_bg (STATE_NORMAL, color());
comment_button.set_label (_("*Cmt*"));
}
@@ -761,12 +763,6 @@ MixerStrip::output_changed (IOChange change, void *src)
Gtkmm2ext::UI::instance()->call_slot (mem_fun(*this, &MixerStrip::update_output_display));
}
-void
-MixerStrip::comment_button_refresh() {
- if (! _route->comment().empty()) {
- comment_button.set_state (Gtk::STATE_ACTIVE);
- }
-}
void
MixerStrip::comment_editor_done_editing() {
@@ -778,16 +774,20 @@ MixerStrip::comment_editor_done_editing() {
case Wide:
if (! str.empty()) {
+ comment_button.modify_bg (STATE_NORMAL, color());
comment_button.set_label (_("*Comments*"));
} else {
+ comment_button.unset_bg (STATE_NORMAL);
comment_button.set_label (_("Comments"));
}
break;
case Narrow:
if (! str.empty()) {
+ comment_button.modify_bg (STATE_NORMAL, color());
comment_button.set_label (_("*Cmt*"));
} else {
+ comment_button.unset_bg (STATE_NORMAL);
comment_button.set_label (_("Cmt"));
}
break;
@@ -797,11 +797,6 @@ MixerStrip::comment_editor_done_editing() {
str.empty() ? _("Click to Add/Edit Comments") : str);
}
- if (! _route->comment().empty()) {
- comment_button.set_state (Gtk::STATE_ACTIVE);
- } else {
- comment_button.set_state (Gtk::STATE_NORMAL);
- }
}
void