From: Nick Mainsbridge Date: Sat, 22 Apr 2006 16:49:51 +0000 (+0000) Subject: Set button labels sanely. X-Git-Tag: 2.0beta4~267 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;ds=sidebyside;h=d3a573bf3eb3541801fb48bb936af663332e142e;p=ardour.git Set button labels sanely. git-svn-id: svn://localhost/trunk/ardour2@464 d708f5d6-7413-0410-9779-e7cbd77b26cf --- diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc index 847b1b236b..4198e7db50 100644 --- a/gtk2_ardour/ardour_ui2.cc +++ b/gtk2_ardour/ardour_ui2.cc @@ -807,10 +807,10 @@ ARDOUR_UI::set_shuttle_units (ShuttleUnits u) { switch ((shuttle_units = u)) { case Percentage: - static_cast(shuttle_units_button.get_child())->set_text ("% "); + shuttle_units_button.set_label("% "); break; case Semitones: - static_cast(shuttle_units_button.get_child())->set_text (_("st")); + shuttle_units_button.set_label(_("st")); break; } } diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index 0c4a5fce5c..3831e253b4 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -209,7 +209,7 @@ AutomationTimeAxisView::automation_state_changed () switch (state & (Off|Play|Touch|Write)) { case Off: - static_cast(auto_button.get_child())->set_text (_("off")); + auto_button.set_label (_("off")); if (auto_off_item) { ignore_state_request = true; auto_off_item->set_active (true); @@ -220,7 +220,7 @@ AutomationTimeAxisView::automation_state_changed () } break; case Play: - static_cast(auto_button.get_child())->set_text (_("play")); + auto_button.set_label (_("play")); if (auto_play_item) { ignore_state_request = true; auto_play_item->set_active (true); @@ -231,7 +231,7 @@ AutomationTimeAxisView::automation_state_changed () } break; case Write: - static_cast(auto_button.get_child())->set_text (_("write")); + auto_button.set_label (_("write")); if (auto_write_item) { ignore_state_request = true; auto_write_item->set_active (true); @@ -242,7 +242,7 @@ AutomationTimeAxisView::automation_state_changed () } break; case Touch: - static_cast(auto_button.get_child())->set_text (_("touch")); + auto_button.set_label (_("touch")); if (auto_touch_item) { ignore_state_request = true; auto_touch_item->set_active (true); @@ -253,7 +253,7 @@ AutomationTimeAxisView::automation_state_changed () } break; default: - static_cast(auto_button.get_child())->set_text (_("???")); + auto_button.set_label (_("???")); break; } } diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 1a65a56eb8..ef04579c2d 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -928,10 +928,10 @@ MixerStrip::gain_automation_style_changed () { switch (_width) { case Wide: - static_cast (gain_automation_style_button.get_child())->set_text (astyle_string(_route.gain_automation_curve().automation_style())); + gain_automation_style_button.set_label (astyle_string(_route.gain_automation_curve().automation_style())); break; case Narrow: - static_cast (gain_automation_style_button.get_child())->set_text (short_astyle_string(_route.gain_automation_curve().automation_style())); + gain_automation_style_button.set_label (short_astyle_string(_route.gain_automation_curve().automation_style())); break; } } @@ -945,10 +945,10 @@ MixerStrip::gain_automation_state_changed () switch (_width) { case Wide: - static_cast (gain_automation_state_button.get_child())->set_text (astate_string(_route.gain_automation_curve().automation_state())); + gain_automation_state_button.set_label (astate_string(_route.gain_automation_curve().automation_state())); break; case Narrow: - static_cast (gain_automation_state_button.get_child())->set_text (short_astate_string(_route.gain_automation_curve().automation_state())); + gain_automation_state_button.set_label (short_astate_string(_route.gain_automation_curve().automation_state())); break; } @@ -978,10 +978,10 @@ MixerStrip::pan_automation_style_changed () switch (_width) { case Wide: - static_cast (pan_automation_style_button.get_child())->set_text (astyle_string(_route.panner().automation_style())); + pan_automation_style_button.set_label (astyle_string(_route.panner().automation_style())); break; case Narrow: - static_cast (pan_automation_style_button.get_child())->set_text (short_astyle_string(_route.panner().automation_style())); + pan_automation_style_button.set_label (short_astyle_string(_route.panner().automation_style())); break; } } @@ -995,10 +995,10 @@ MixerStrip::pan_automation_state_changed () switch (_width) { case Wide: - static_cast (pan_automation_state_button.get_child())->set_text (astate_string(_route.panner().automation_state())); + pan_automation_state_button.set_label (astate_string(_route.panner().automation_state())); break; case Narrow: - static_cast (pan_automation_state_button.get_child())->set_text (short_astate_string(_route.panner().automation_state())); + pan_automation_state_button.set_label (short_astate_string(_route.panner().automation_state())); break; } diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc index 9bd22ca590..b50b71f143 100644 --- a/gtk2_ardour/option_editor.cc +++ b/gtk2_ardour/option_editor.cc @@ -611,10 +611,10 @@ void OptionEditor::map_port_online (MIDI::Port* port, ToggleButton* tb) { if (port->input()->offline()) { - static_cast(tb->get_child())->set_text (_("offline")); + tb->set_label (_("offline")); tb->set_active (false); } else { - static_cast(tb->get_child())->set_text (_("online")); + tb->set_label (_("online")); tb->set_active (true); } } diff --git a/gtk2_ardour/panner_ui.cc b/gtk2_ardour/panner_ui.cc index 401d707b28..64cf7782c1 100644 --- a/gtk2_ardour/panner_ui.cc +++ b/gtk2_ardour/panner_ui.cc @@ -184,7 +184,7 @@ PannerUI::set_width (Width w) for (vector::iterator i = pan_bars.begin(); i != pan_bars.end(); ++i) { (*i)->set_size_request (61, 15); } - static_cast (panning_link_button.get_child())->set_text (_("link")); + panning_link_button.set_label (_("link")); break; case Narrow: panning_viewport.set_size_request (31, 61); @@ -194,7 +194,7 @@ PannerUI::set_width (Width w) for (vector::iterator i = pan_bars.begin(); i != pan_bars.end(); ++i) { (*i)->set_size_request (31, 15); } - static_cast (panning_link_button.get_child())->set_text (_("L")); + panning_link_button.set_label (_("L")); break; } diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc index 00b5ad2dc7..e0d22d8834 100644 --- a/gtk2_ardour/plugin_ui.cc +++ b/gtk2_ardour/plugin_ui.cc @@ -388,19 +388,19 @@ PluginUI::automation_state_changed (ControlUI* cui) switch (insert.get_port_automation_state (cui->port_index) & (Off|Play|Touch|Write)) { case Off: - static_cast(cui->automate_button.get_child())->set_text (_("off")); + cui->automate_button.set_label (_("off")); break; case Play: - static_cast(cui->automate_button.get_child())->set_text (_("play")); + cui->automate_button.set_label (_("play")); break; case Write: - static_cast(cui->automate_button.get_child())->set_text (_("write")); + cui->automate_button.set_label (_("write")); break; case Touch: - static_cast(cui->automate_button.get_child())->set_text (_("touch")); + cui->automate_button.set_label (_("touch")); break; default: - static_cast(cui->automate_button.get_child())->set_text (_("???")); + cui->automate_button.set_label (_("???")); break; } }