diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-10-02 20:53:31 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-10-02 20:53:31 +0000 |
commit | e488378d42777b436c6a2708d9dff2def51a5271 (patch) | |
tree | cbbd17c9a23b947bbbbb4e815e86654e8e993073 /gtk2_ardour | |
parent | 342cdda32e03be82bb071afd15c26989f54bffb2 (diff) |
string_is_affirmative() fix for 3.0
git-svn-id: svn://localhost/ardour2/branches/3.0@5723 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/audio_region_view.cc | 8 | ||||
-rw-r--r-- | gtk2_ardour/editor.cc | 14 | ||||
-rw-r--r-- | gtk2_ardour/editor_rulers.cc | 20 | ||||
-rw-r--r-- | gtk2_ardour/mixer_ui.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/route_time_axis.cc | 4 |
5 files changed, 25 insertions, 25 deletions
diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc index 42f8fe6d7a..d688e9e629 100644 --- a/gtk2_ardour/audio_region_view.cc +++ b/gtk2_ardour/audio_region_view.cc @@ -1061,25 +1061,25 @@ AudioRegionView::set_flags (XMLNode* node) XMLProperty *prop; if ((prop = node->property ("waveform-visible")) != 0) { - if (prop->value() == "yes") { + if (string_is_affirmative (prop->value())) { _flags |= WaveformVisible; } } if ((prop = node->property ("envelope-visible")) != 0) { - if (prop->value() == "yes") { + if (string_is_affirmative (prop->value())) { _flags |= EnvelopeVisible; } } if ((prop = node->property ("waveform-rectified")) != 0) { - if (prop->value() == "yes") { + if (string_is_affirmative (prop->value())) { _flags |= WaveformRectified; } } if ((prop = node->property ("waveform-logscaled")) != 0) { - if (prop->value() == "yes") { + if (string_is_affirmative (prop->value())) { _flags |= WaveformLogScaled; } } diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 3a343f75b3..5aec06170e 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -2337,7 +2337,7 @@ Editor::set_state (const XMLNode& node) } if ((prop = node.property ("internal-edit"))) { - bool yn = (prop->value() == "yes"); + bool yn = string_is_affirmative (prop->value()); RefPtr<Action> act = ActionManager::get_action (X_("MouseMode"), X_("toggle-internal-edit")); if (act) { RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act); @@ -2351,7 +2351,7 @@ Editor::set_state (const XMLNode& node) } if ((prop = node.property ("show-waveforms-recording"))) { - bool yn = (prop->value() == "yes"); + bool yn = string_is_affirmative (prop->value()); _show_waveforms_recording = !yn; RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("ToggleWaveformsWhileRecording")); if (act) { @@ -2363,7 +2363,7 @@ Editor::set_state (const XMLNode& node) } if ((prop = node.property ("show-measures"))) { - bool yn = (prop->value() == "yes"); + bool yn = string_is_affirmative (prop->value()); _show_measures = !yn; RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("ToggleMeasureVisibility")); if (act) { @@ -2375,7 +2375,7 @@ Editor::set_state (const XMLNode& node) } if ((prop = node.property ("follow-playhead"))) { - bool yn = (prop->value() == "yes"); + bool yn = string_is_affirmative (prop->value()); set_follow_playhead (yn); RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-follow-playhead")); if (act) { @@ -2391,7 +2391,7 @@ Editor::set_state (const XMLNode& node) } if ((prop = node.property ("xfades-visible"))) { - bool yn = (prop->value() == "yes"); + bool yn = string_is_affirmative (prop->value()); _xfade_visibility = !yn; // set_xfade_visibility (yn); } @@ -2402,7 +2402,7 @@ Editor::set_state (const XMLNode& node) if (act) { Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act); - bool yn = (prop->value() == X_("yes")); + bool yn = string_is_affirmative (prop->value()); /* do it twice to force the change */ @@ -2418,7 +2418,7 @@ Editor::set_state (const XMLNode& node) if (act) { Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act); - bool yn = (prop->value() == X_("yes")); + bool yn = string_is_affirmative (prop->value()); /* do it twice to force the change */ diff --git a/gtk2_ardour/editor_rulers.cc b/gtk2_ardour/editor_rulers.cc index c37d7d68d1..3f1fc6a497 100644 --- a/gtk2_ardour/editor_rulers.cc +++ b/gtk2_ardour/editor_rulers.cc @@ -455,56 +455,56 @@ Editor::restore_ruler_visibility () if (node) { if ((prop = node->property ("smpte")) != 0) { - if (prop->value() == "yes") { + if (string_is_affirmative (prop->value())) { ruler_timecode_action->set_active (true); } else { ruler_timecode_action->set_active (false); } } if ((prop = node->property ("bbt")) != 0) { - if (prop->value() == "yes") { + if (string_is_affirmative (prop->value())) { ruler_bbt_action->set_active (true); } else { ruler_bbt_action->set_active (false); } } if ((prop = node->property ("frames")) != 0) { - if (prop->value() == "yes") { + if (string_is_affirmative (prop->value())) { ruler_samples_action->set_active (true); } else { ruler_samples_action->set_active (false); } } if ((prop = node->property ("minsec")) != 0) { - if (prop->value() == "yes") { + if (string_is_affirmative (prop->value())) { ruler_minsec_action->set_active (true); } else { ruler_minsec_action->set_active (false); } } if ((prop = node->property ("tempo")) != 0) { - if (prop->value() == "yes") { + if (string_is_affirmative (prop->value())) { ruler_tempo_action->set_active (true); } else { ruler_tempo_action->set_active (false); } } if ((prop = node->property ("meter")) != 0) { - if (prop->value() == "yes") { + if (string_is_affirmative (prop->value())) { ruler_meter_action->set_active (true); } else { ruler_meter_action->set_active (false); } } if ((prop = node->property ("marker")) != 0) { - if (prop->value() == "yes") { + if (string_is_affirmative (prop->value())) { ruler_marker_action->set_active (true); } else { ruler_marker_action->set_active (false); } } if ((prop = node->property ("rangemarker")) != 0) { - if (prop->value() == "yes") { + if (string_is_affirmative (prop->value())) { ruler_range_action->set_active (true); } else { ruler_range_action->set_active (false); @@ -512,7 +512,7 @@ Editor::restore_ruler_visibility () } if ((prop = node->property ("transportmarker")) != 0) { - if (prop->value() == "yes") { + if (string_is_affirmative (prop->value())) { ruler_loop_punch_action->set_active (true); } else { ruler_loop_punch_action->set_active (false); @@ -520,7 +520,7 @@ Editor::restore_ruler_visibility () } if ((prop = node->property ("cdmarker")) != 0) { - if (prop->value() == "yes") { + if (string_is_affirmative (prop->value())) { ruler_cd_marker_action->set_active (true); } else { ruler_cd_marker_action->set_active (false); diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index 2e9cfff614..aa4c4119c6 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -1329,7 +1329,7 @@ Mixer_UI::set_state (const XMLNode& node) set_window_pos_and_size (); if ((prop = node.property ("narrow-strips"))) { - if (prop->value() == "yes") { + if (string_is_affirmative (prop->value())) { set_strip_width (Narrow); } else { set_strip_width (Wide); @@ -1337,7 +1337,7 @@ Mixer_UI::set_state (const XMLNode& node) } if ((prop = node.property ("show-mixer"))) { - if (prop->value() == "yes") { + if (string_is_affirmative (prop->value())) { _visible = true; } } diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index cbd2bc5492..68ca7008c7 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -399,7 +399,7 @@ RouteTimeAxisView::set_state (const XMLNode& node) if ((prop = (*iter)->property ("automation-id")) != 0) { Evoral::Parameter param = ARDOUR::EventTypeMap::instance().new_parameter(prop->value()); - bool show = ((prop = (*iter)->property ("shown")) != 0) && prop->value() == "yes"; + bool show = ((prop = (*iter)->property ("shown")) != 0) && string_is_affirmative (prop->value()); create_automation_child(param, show); } else { warning << "Automation child has no ID" << endmsg; @@ -1965,7 +1965,7 @@ RouteTimeAxisView::add_automation_child(Evoral::Parameter param, boost::shared_p if ((node = track->get_state_node()) != 0) { if ((prop = node->property ("shown")) != 0) { - if (prop->value() == "yes") { + if (string_is_affirmative (prop->value())) { hideit = false; } } |