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
This commit is contained in:
Nick Mainsbridge 2006-11-08 12:08:46 +00:00
parent 1c9d8ed39d
commit 20cf901da9
4 changed files with 14 additions and 20 deletions

View file

@ -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

View file

@ -153,7 +153,6 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
Gtk::TextView* comment_area;
Gtk::Button comment_button;
void comment_button_refresh();
void comment_editor_done_editing();
void setup_comment_editor ();
void comment_button_clicked ();

View file

@ -119,7 +119,7 @@ RouteUI::mute_press(GdkEventButton* ev)
build_mute_menu();
}
mute_menu->popup(0,0);
mute_menu->popup(0,ev->time);
} else {
@ -194,7 +194,7 @@ RouteUI::solo_press(GdkEventButton* ev)
build_solo_menu ();
}
solo_menu->popup (1, 0);
solo_menu->popup (1, ev->time);
} else {
@ -494,7 +494,7 @@ RouteUI::build_solo_menu (void)
items.push_back (CheckMenuElem(*check));
check->show_all();
items.push_back (SeparatorElem());
//items.push_back (SeparatorElem());
// items.push_back (MenuElem (_("MIDI Bind"), mem_fun (*mute_button, &BindableToggleButton::midi_learn)));
}
@ -537,7 +537,7 @@ RouteUI::build_mute_menu(void)
items.push_back (CheckMenuElem(*check));
check->show_all();
items.push_back (SeparatorElem());
//items.push_back (SeparatorElem());
// items.push_back (MenuElem (_("MIDI Bind"), mem_fun (*mute_button, &BindableToggleButton::midi_learn)));
}

View file

@ -377,12 +377,12 @@ SoundFileOmega::SoundFileOmega (string title, ARDOUR::Session* s)
ARDOUR_UI::instance()->tooltips().set_tip(*btn,
_("Link to an external file"));
add_button (Gtk::Stock::CLOSE, Gtk::RESPONSE_CLOSE);
btn = add_button (_("Import"), ResponseImport);
ARDOUR_UI::instance()->tooltips().set_tip(*btn,
_("Copy a file to the session folder"));
add_button (Gtk::Stock::CLOSE, Gtk::RESPONSE_CLOSE);
Gtk::HBox *box = manage (new Gtk::HBox());
Gtkmm2ext::set_popdown_strings (mode_combo, mode_strings);