+
+void
+MixerStrip::comment_editor_done_editing() {
+ string str = comment_area->get_buffer()->get_text();
+ if (_route->comment() != str) {
+ _route->set_comment (str, this);
+
+ switch (_width) {
+
+ case Wide:
+ if (! str.empty()) {
+ comment_button.modify_bg (STATE_NORMAL, color());
+ ((Gtk::Label*)comment_button.get_child())->set_text (_("*Comments*"));
+ } else {
+ comment_button.unset_bg (STATE_NORMAL);
+ ((Gtk::Label*)comment_button.get_child())->set_text (_("Comments"));
+ }
+ break;
+
+ case Narrow:
+ if (! str.empty()) {
+ comment_button.modify_bg (STATE_NORMAL, color());
+ ((Gtk::Label*)comment_button.get_child())->set_text (_("*Cmt*"));
+ } else {
+ comment_button.unset_bg (STATE_NORMAL);
+ ((Gtk::Label*)comment_button.get_child())->set_text (_("Cmt"));
+ }
+ break;
+ }
+
+ ARDOUR_UI::instance()->tooltips().set_tip (comment_button,
+ str.empty() ? _("Click to Add/Edit Comments") : str);
+ }
+
+}
+