diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-02-13 16:20:11 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-02-13 16:20:11 +0000 |
commit | ab2ffc65aeb5d1a5314002204fe84b37b28ff0f2 (patch) | |
tree | ce436c9a9f1e53287c12e022d2777bdcbb472e66 /gtk2_ardour/mixer_strip.cc | |
parent | d405df54ec37ef039d1044b727044e109b110ffa (diff) |
give mixer (R|M|S) buttons back their special status
git-svn-id: svn://localhost/ardour2/trunk@1452 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/mixer_strip.cc')
-rw-r--r-- | gtk2_ardour/mixer_strip.cc | 60 |
1 files changed, 29 insertions, 31 deletions
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 21eb495066..41e5734628 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -157,12 +157,8 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, boost::shared_ptr<Route> rt hide_button.set_events (hide_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK)); - width_button.unset_flags (Gtk::CAN_FOCUS); - hide_button.unset_flags (Gtk::CAN_FOCUS); - input_button.unset_flags (Gtk::CAN_FOCUS); - output_button.unset_flags (Gtk::CAN_FOCUS); - solo_button->unset_flags (Gtk::CAN_FOCUS); - mute_button->unset_flags (Gtk::CAN_FOCUS); + mute_button->set_name ("MixerMuteButton"); + solo_button->set_name ("MixerSoloButton"); button_table.set_homogeneous (true); button_table.set_spacings (0); @@ -184,6 +180,8 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, boost::shared_ptr<Route> rt rec_enable_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::rec_enable_press)); rec_enable_button->signal_button_release_event().connect (mem_fun(*this, &RouteUI::rec_enable_release)); + rec_enable_button->set_name ("MixerRecordEnableButton"); + AudioTrack* at = audio_track(); at->FreezeChange.connect (mem_fun(*this, &MixerStrip::map_frozen)); @@ -415,30 +413,30 @@ MixerStrip::set_width (Width w) ensure_xml_node (); _width = w; - + switch (w) { case Wide: set_size_request (-1, -1); xml_node->add_property ("strip_width", "wide"); - - if (rec_enable_button) { - rec_enable_button->set_label (_("record")); + + if (rec_enable_button) { + ((Gtk::Label*)rec_enable_button->get_child())->set_text (_("record")); } - mute_button->set_label (_("Mute")); - solo_button->set_label (_("Solo")); + ((Gtk::Label*)mute_button->get_child())->set_text (_("Mute")); + ((Gtk::Label*)solo_button->get_child())->set_text (_("Solo")); if (_route->comment() == "") { comment_button.unset_bg (STATE_NORMAL); - comment_button.set_label (_("comments")); + ((Gtk::Label*)comment_button.get_child())->set_text (_("comments")); } else { comment_button.modify_bg (STATE_NORMAL, color()); - comment_button.set_label (_("*comments*")); + ((Gtk::Label*)comment_button.get_child())->set_text (_("*comments*")); } - gpm.gain_automation_style_button.set_label (gpm.astyle_string(_route->gain_automation_curve().automation_style())); - gpm.gain_automation_state_button.set_label (gpm.astate_string(_route->gain_automation_curve().automation_state())); - panners.pan_automation_style_button.set_label (panners.astyle_string(_route->panner().automation_style())); - panners.pan_automation_state_button.set_label (panners.astate_string(_route->panner().automation_state())); + ((Gtk::Label*)gpm.gain_automation_style_button.get_child())->set_text (gpm.astyle_string(_route->gain_automation_curve().automation_style())); + ((Gtk::Label*)gpm.gain_automation_state_button.get_child())->set_text (gpm.astate_string(_route->gain_automation_curve().automation_state())); + ((Gtk::Label*)panners.pan_automation_style_button.get_child())->set_text (panners.astyle_string(_route->panner().automation_style())); + ((Gtk::Label*)panners.pan_automation_state_button.get_child())->set_text (panners.astate_string(_route->panner().automation_state())); Gtkmm2ext::set_size_request_to_display_given_text (name_button, "long", 2, 2); break; @@ -447,23 +445,23 @@ MixerStrip::set_width (Width w) xml_node->add_property ("strip_width", "narrow"); if (rec_enable_button) { - rec_enable_button->set_label (_("Rec")); + ((Gtk::Label*)rec_enable_button->get_child())->set_text (_("Rec")); } - mute_button->set_label (_("M")); - solo_button->set_label (_("S")); + ((Gtk::Label*)mute_button->get_child())->set_text (_("M")); + ((Gtk::Label*)solo_button->get_child())->set_text (_("S")); if (_route->comment() == "") { comment_button.unset_bg (STATE_NORMAL); - comment_button.set_label (_("Cmt")); + ((Gtk::Label*)comment_button.get_child())->set_text (_("Cmt")); } else { comment_button.modify_bg (STATE_NORMAL, color()); - comment_button.set_label (_("*Cmt*")); + ((Gtk::Label*)comment_button.get_child())->set_text (_("*Cmt*")); } - gpm.gain_automation_style_button.set_label (gpm.short_astyle_string(_route->gain_automation_curve().automation_style())); - gpm.gain_automation_state_button.set_label (gpm.short_astate_string(_route->gain_automation_curve().automation_state())); - panners.pan_automation_style_button.set_label (panners.short_astyle_string(_route->panner().automation_style())); - panners.pan_automation_state_button.set_label (panners.short_astate_string(_route->panner().automation_state())); + ((Gtk::Label*)gpm.gain_automation_style_button.get_child())->set_text (gpm.short_astyle_string(_route->gain_automation_curve().automation_style())); + ((Gtk::Label*)gpm.gain_automation_state_button.get_child())->set_text (gpm.short_astate_string(_route->gain_automation_curve().automation_state())); + ((Gtk::Label*)panners.pan_automation_style_button.get_child())->set_text (panners.short_astyle_string(_route->panner().automation_style())); + ((Gtk::Label*)panners.pan_automation_state_button.get_child())->set_text (panners.short_astate_string(_route->panner().automation_state())); Gtkmm2ext::set_size_request_to_display_given_text (name_button, "longest label", 2, 2); break; } @@ -785,20 +783,20 @@ MixerStrip::comment_editor_done_editing() { case Wide: if (! str.empty()) { comment_button.modify_bg (STATE_NORMAL, color()); - comment_button.set_label (_("*Comments*")); + ((Gtk::Label*)comment_button.get_child())->set_text (_("*Comments*")); } else { comment_button.unset_bg (STATE_NORMAL); - comment_button.set_label (_("Comments")); + ((Gtk::Label*)comment_button.get_child())->set_text (_("Comments")); } break; case Narrow: if (! str.empty()) { comment_button.modify_bg (STATE_NORMAL, color()); - comment_button.set_label (_("*Cmt*")); + ((Gtk::Label*)comment_button.get_child())->set_text (_("*Cmt*")); } else { comment_button.unset_bg (STATE_NORMAL); - comment_button.set_label (_("Cmt")); + ((Gtk::Label*)comment_button.get_child())->set_text (_("Cmt")); } break; } |