Commit graph

24353 commits

Author SHA1 Message Date
Tim Mayberry
addbc86874 Use PBD::to_string from pbd/string_convert.h in SoundFileBox class
Numeric formatting is equivalent.
2017-04-19 09:37:01 +10:00
Tim Mayberry
2889a44a33 Use PBD::to_string from pbd/string_convert.h in RouteTimeAxis
Numeric formatting is equivalent as LC_NUMERIC=C in global C++ locale
2017-04-19 09:37:01 +10:00
Tim Mayberry
99ee7d7b61 Use PBD::to_string from pbd/string_convert.h in MixerStrip class
The numeric formatting is equivalent. Even though this string is being used in
the UI as a label I think this is another case where we don't want a localized
numeric string, which would only be relevant with a track count >=1000.
2017-04-19 09:37:01 +10:00
Tim Mayberry
e157a84c2b Use PBD::to_string from pbd/string_convert.h in MeterStrip class
The numeric formatting is equivalent. The string is being used in a label so it
could be argued that we want localized numeric formatting in this case, but as
it is only relevant if we have >=1000 meter strip keep it the same for now.
2017-04-19 09:37:01 +10:00
Tim Mayberry
31a2957700 Use PBD::to_string from pbd/string_convert.h in ExportTimespanSelector
The C++ global locale is currently set to LC_NUMERIC=C by the first instance of
LocaleGuard so this change means numeric formatting is equivalent.

As the string is being used to construct a label, perhaps we do want to
generate localized numeric formatting in this case. Anyway keep it the same for
now.
2017-04-19 09:37:01 +10:00
Tim Mayberry
c149d7d64c Use PBD::to_string() from pbd/string_convert.h in ControlSlaveUI
The numeric formatting is equivalent.
2017-04-19 09:37:01 +10:00
Tim Mayberry
926a064744 Use PBD::to_string from pbd/string_convert.h in WaveView debug code 2017-04-19 09:37:01 +10:00
Tim Mayberry
aede5c85d5 Use PBD::to_string from pbd/string_convert.h in ARDOUR::VCAManager
The numeric formatting is equivalent to iostreams when global C++ locale is set
to "C" without the need for a LocaleGuard.

I'm not sure this would have been an issue as the number of VCA's may never get
high enough for digit grouping of the locale to affect numeric output, but now
it is not a possibility.
2017-04-19 09:37:00 +10:00
Tim Mayberry
2386dc7ede Use PBD::string_to/to_string in ARDOUR::user_config_directory_name()
The numeric formatting is equivalent without requiring a LocaleGuard or the
global C++ locale is "C".
2017-04-19 09:37:00 +10:00
Tim Mayberry
797fbfc5de Use PBD::to_string from pbd/string_convert.h in ARDOUR::ExportFilename
The numeric formatting is equivalent to using iostreams in the C locale without
having to use a LocaleGuard or set global C++ locale.
2017-04-19 09:37:00 +10:00
Tim Mayberry
0ae2985a21 Use XMLNode::get_property in ARDOUR::ElementImporter 2017-04-19 09:37:00 +10:00
Tim Mayberry
5c387b76b8 Use PBD::to_string/string_to in ARDOUR::ElementImporter class 2017-04-19 09:37:00 +10:00
Tim Mayberry
37d76e4104 Use PBD::to_string API from pbd/string_convert.h in AudioFileTagger
Use pbd/string_convert.h API instead of std::ostream for numeric formatting to
remain locale independent and not have to use a LocaleGuard. The formatting is
equivalent.
2017-04-19 09:37:00 +10:00
Tim Mayberry
0dbb9e6346 Use PBD::to_string API from pbd/string_convert.h in AudioTrackImporter
Use pbd/string_convert.h API instead of std::ostream for numeric formatting to
remain locale independent and not have to use a LocaleGuard. The formatting
is equivalent.

The code in this file has been disabled in the GUI for some time...and I doubt
it would now work correctly.
2017-04-19 09:37:00 +10:00
Tim Mayberry
0de5722fb1 Use PBD::to_string() from pbd/string_convert.h in ardour ALSA utils
Use pbd/string_convert.h API instead of std::ostream for numeric formatting to
remain locale independent and not have to use a LocaleGuard. The formatting is
equivalent
2017-04-19 09:37:00 +10:00
Tim Mayberry
bf5864aaca Use PBD::to_string() from pbd/string_convert.h in JACK utils
Use pbd/string_convert.h API instead of std::ostream for numeric formatting to
remain locale independent and not have to use a LocaleGuard.
2017-04-19 09:37:00 +10:00
Tim Mayberry
ca7bbea6d8 Use PBD::string_to/to_string when de/serializing in AutomationList class
This avoids requiring a LocaleGuard to get the correct numeric formatting and
saves/restores the automation data to the precision required for roundtrip
equality.
2017-04-19 09:37:00 +10:00
Tim Mayberry
c65f30b4b1 Remove unused header include in ARDOUR::Amp source file 2017-04-19 09:36:59 +10:00
Tim Mayberry
18011482bb Use PBD::string_to/to_string in IO::find_possible_bundle
Possible issue with numeric formatting using std::streams in locales with
grouping. Although I don't think it would be an issue in this case use locale
independant alternative for numeric formatting anyway.
2017-04-19 09:36:59 +10:00
Tim Mayberry
e15524cc64 Use PBD::to_string instead of std::ostream when setting up video server url
To avoid issues with locales that use grouping/thousands separators.
2017-04-19 09:36:59 +10:00
Tim Mayberry
ab30f45bba Use PBD::to_string to convert period count in EngineControl class
The functionality is the same so might as well use it.
2017-04-19 09:36:59 +10:00
Tim Mayberry
0739bada9e Use PBD::to_string to convert bufsize to string in EngineControl class
string_compose uses std::ostream/stringstream which will insert thousands
separators in some locales. This was not a problem when LocaleGuard set the
global C++ locale to "C"
2017-04-19 09:36:59 +10:00
Tim Mayberry
df2b0e33b9 Use PBD::string_to functions in VideoUtils::video_query_info
LocaleGuard is in use so float <=> string conversions must be expected in C
locale format
2017-04-19 09:36:59 +10:00
Tim Mayberry
e7a23eaaa8 Use snprintf instead of std::stringstream when converting color values to strings
std::ostream/stringstream will use the current locale to determine the numeric
formatting. If the locale uses grouping then thousands separators will be
inserted in the output which produces an invalid color string in
UIConfiguration::reset_gtk_theme() and when converting colors to strings in
UIConfiguration::store_color_theme()

This has not been a problem so far because it appears that LocaleGuard does not
reset the LC_NUMERIC value for the global C++ locale. So if a LocaleGuard is
created at any time before these functions are called(even if it goes out of
scope) the numeric formatting used by std::streams will use the "C" locale
formatting facets.
2017-04-19 09:36:59 +10:00
Tim Mayberry
0656d5ab1a Use XMLNode::get/set_property API in Faderport surface 2017-04-19 09:36:59 +10:00
Tim Mayberry
ac8b5192cd Remove now unused PBD::string_is_affirmative function
The equivalent function is now PBD::string_to<bool>
2017-04-19 09:36:59 +10:00
Tim Mayberry
71fc5b9e8b Use PBD::string_to<bool> in MidiTimeAxisView class
As the conversion was performed with PBD::to_string
2017-04-19 09:36:59 +10:00
Tim Mayberry
b540817b5b Use PBD::string_to<bool> in RouteTimeAxisView class
As they were converted from bool to string using PBD::to_string
2017-04-19 09:36:59 +10:00
Tim Mayberry
edb9868e76 Remove conditional checks that are always true in RouteTimeAxisView class 2017-04-19 09:36:59 +10:00
Tim Mayberry
23eb1fbf01 Use PBD::string_to<bool>() in GenericMidiControlProtocol class
Equivalent to PBD::string_is_affirmative()
2017-04-19 09:36:59 +10:00
Tim Mayberry
04a027a031 Use PBD::string_to<bool> in legacy ARDOUR::Route methods 2017-04-19 09:36:58 +10:00
Tim Mayberry
9ce1d7c357 Use PBD::string_to<bool> in ARDOUR::Processor class 2017-04-19 09:36:58 +10:00
Tim Mayberry
603d944530 Use PBD::string_to<bool> in AudioPlaylist class 2017-04-19 09:36:58 +10:00
Tim Mayberry
8e07e4bd68 Use AxisView::get/set_gui_property API in RouteTimeAxisView class 2017-04-19 09:36:58 +10:00
Tim Mayberry
634207dd6a Use AxisView::get/set_gui_property API in MixerStrip class 2017-04-19 09:36:58 +10:00
Tim Mayberry
13d2670e96 Use AxisView::get_gui_property API in AutomationTimeAxis class 2017-04-19 09:36:58 +10:00
Tim Mayberry
de80767c8c Use AxisView::get_gui_property in AudioRegionView class 2017-04-19 09:36:58 +10:00
Tim Mayberry
2c4e801183 Use AxisView::get_gui_property API in TimeAxisView class 2017-04-19 09:36:58 +10:00
Tim Mayberry
be59503364 Use AxisView::get_gui_property API in AxisView class 2017-04-19 09:36:58 +10:00
Tim Mayberry
9d2d0ddf00 Add AxisView::get_gui_property method, use PBD::string_to<T> for string conversion 2017-04-19 09:36:58 +10:00
Tim Mayberry
66004a5036 Use PBD::to_string to convert non-string types in AxisView::set_gui_property 2017-04-19 09:36:58 +10:00
Tim Mayberry
7fdbabcd79 Let AxisView::set_gui_property perform type conversion in TimeAxisView::set_height 2017-04-19 09:36:57 +10:00
Tim Mayberry
6e467153a0 Remove unused XMLNode::add_property methods
These are now unused and functionality is replaced by XMLNode::set_property

set_property is a better name as a node can only have properties with unique
names and the property will be set or reset(if it already exists). Changing the
name also makes it easier to transition and test the new API.
2017-04-19 09:36:57 +10:00
Tim Mayberry
e4b1ece143 Use XMLNode::set_property API in xml tests 2017-04-19 09:36:57 +10:00
Tim Mayberry
0c75813129 Use XMLNode::set_property API in copy-mixer Session utility 2017-04-19 09:36:57 +10:00
Tim Mayberry
a6d71df0d0 Use XMLNode::get_property in AudioClock class 2017-04-19 09:36:57 +10:00
Tim Mayberry
1534a2a4d1 Use XMLNode::get/set_property API in VideoTimeLine class 2017-04-19 09:36:57 +10:00
Tim Mayberry
47f1183a15 Use XMLNode::set_property API in VideoMonitor class 2017-04-19 09:36:57 +10:00
Tim Mayberry
b00b83f95a Use XMLNode::set_property API in UIConfiguration class 2017-04-19 09:36:57 +10:00
Tim Mayberry
3ba34e13b1 Use XMLNode::get/set_property API in SelectionMemento class 2017-04-19 09:36:57 +10:00