diff options
author | Nick Mainsbridge <beatroute@iprimus.com.au> | 2006-11-08 12:08:46 +0000 |
---|---|---|
committer | Nick Mainsbridge <beatroute@iprimus.com.au> | 2006-11-08 12:08:46 +0000 |
commit | 20cf901da98d7306e4f65c806a60d70fa1465b0b (patch) | |
tree | 2086d365cc2d46195bf435da3be45a1564cc2ea8 | |
parent | 1c9d8ed39d9d0dc459c5b6d443ba8b57493e10fc (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
-rw-r--r-- | gtk2_ardour/mixer_strip.cc | 21 | ||||
-rw-r--r-- | gtk2_ardour/mixer_strip.h | 1 | ||||
-rw-r--r-- | gtk2_ardour/route_ui.cc | 8 | ||||
-rw-r--r-- | gtk2_ardour/sfdb_ui.cc | 4 |
4 files changed, 14 insertions, 20 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 diff --git a/gtk2_ardour/mixer_strip.h b/gtk2_ardour/mixer_strip.h index 88115c6063..5472778c17 100644 --- a/gtk2_ardour/mixer_strip.h +++ b/gtk2_ardour/mixer_strip.h @@ -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 (); diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index 109926c4c6..c228a52d8b 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -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))); } diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc index a81189c71f..ab12356989 100644 --- a/gtk2_ardour/sfdb_ui.cc +++ b/gtk2_ardour/sfdb_ui.cc @@ -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); |