Compare commits

...

37 Commits

Author SHA1 Message Date
Tim Mayberry 2767bc1107 Remove unnecessary LocaleGuards from VSTPlugin derived classes
VSTPlugin::set_state and VSTPlugin::add_state methods both already contain
LocaleGuard instances.
2017-06-16 21:20:56 +10:00
Tim Mayberry 22291b895d Remove unused ArdourCanvas::HSV constructor
Using stringstream for this is not locale independant. If this constructor is
needed at a later stage it should be reimplemented.
2017-06-16 21:20:56 +10:00
Tim Mayberry 5b19e311e3 Remove locale_guard.h from ardour/ardour.h header
Add to source files that use LocaleGuard

Results in far less recompiling when pbd/locale_guard.h changes
2017-06-16 21:20:56 +10:00
Tim Mayberry a7f8dd3f9e Remove unused pbd/locale_guard.h header from Gtkmm2ext::Barcontroller class 2017-06-16 21:20:56 +10:00
Tim Mayberry 05477e8ad2 Remove LocaleGuard from ARDOUR_UI::save_ardour_state method
All float <=> string conversions are now done using PBD::to_string/string_to()
in ConfigVariable class or via XMLNode::get/set_property()
2017-06-16 21:20:56 +10:00
Tim Mayberry a3a81296e2 Remove LocaleGuards from VideoTimeLine class
float <=> string conversion is done using PBD::string_to/to_string() via
XMLNode::get/set_property so the LocaleGuards are no longer necessary
2017-06-16 21:20:56 +10:00
Tim Mayberry d6a68981b9 Remove LocaleGuard from VideoUtils::video_query_info
PBD::string_to is now used for float <=> string conversions so a LocaleGuard is
no longer necessary.
2017-06-16 21:20:56 +10:00
Tim Mayberry eee9fdcb62 Remove LocaleGuards from UIConfiguration class
all float <=> string conversions are done via PBD::to_string/string_to. Either
via XMLNode::get/set_property or directly in HSV and SVAModifier classes
2017-06-16 21:20:56 +10:00
Tim Mayberry a40203c2f7 Remove LocaleGuard from MixerUI class
The float <=> string conversions that this guard was protecting are now using
PBD::to_string/string_to() via XMLNode::get/set_property()
2017-06-16 21:20:56 +10:00
Tim Mayberry 43a663948c Remove LocaleGuards from LuaInstance state methods
There are no float <=> string conversions in these methods and g_base64_encode
etc functions are not affected by locale.
2017-06-16 21:20:56 +10:00
Tim Mayberry 88cc2e951c Remove LocaleGuards from ExportVideoDialog class
All float <=> string conversion is now done using PBD::to_string/string_to()
via XMLNode::get/set_property()
2017-06-16 21:20:56 +10:00
Tim Mayberry 5c1bd26458 Remove LocaleGuards from Editor class
All float <=> string conversions are now done using locale independent
PBD::to_string/string_to() via XMLNode::get/set_property
2017-06-16 21:20:56 +10:00
Tim Mayberry 2e7e5f0139 Remove LocaleGuards from SVAModifier and HSV classes
float <=> string conversion now done using PBD::to_string/string_to so
LocaleGuards are no longer needed.
2017-06-16 21:20:56 +10:00
Tim Mayberry 2e0b5cf17c Remove LocaleGuard from ARDOUR::PannerShell
All Panner implementations using PBD::to_string/string_to for float <=> string
conversion and no longer require a LocaleGuard.
2017-06-16 21:20:56 +10:00
Tim Mayberry 97bf86457f Remove LocaleGuard from ARDOUR::Pannable class
string <=> float conversions are using PBD::to_string/string_to and no longer
require a LocaleGuard
2017-06-16 21:20:56 +10:00
Tim Mayberry 198b28cbad Remove LocaleGuards from ARDOUR::Tempo class
All float <=> string conversions are done for PBD::string_to/to_string and no
longer require a LocaleGuard.
2017-06-16 21:20:56 +10:00
Tim Mayberry 1848a6f7a3 Remove LocaleGuards from ARDOUR::Speakers class
float <=> string conversions are now using PBD::to_string/string_to via XMLNode
for locale independent conversion and these guards are not necessary.
2017-06-16 21:20:56 +10:00
Tim Mayberry c533bb8436 Remove LocaleGuards from ARDOUR::Session transport related methods
ARDOUR::AutomationList is no longer using LocaleGuards as float <=> string
conversion is using PBD::to_string/string_to so the reason for adding these
guards as per comment no longer applies.
2017-06-16 21:20:56 +10:00
Tim Mayberry 8ffc44bfdd Remove LocaleGuard from Session::load_options
PBD::ConfigVariable uses PBD::to_string/string_to methods so this LocaleGuard
is no longer necessary.
2017-06-16 21:20:56 +10:00
Tim Mayberry cf839c1277 Remove LocaleGuards from SessionConfiguration class
ConfigurationVariable is now using PBD::to_string/string_to for float <=>
string conversions so LocaleGuard is no longer necessary.
2017-06-16 21:20:56 +10:00
Tim Mayberry d4e7ebff8d Remove LocaleGuard from Session::immediately_post_engine method
I think this was only to protect the float <=> string conversion in
Session::setup_click_state related to click gain which is now using
PBD::to_string/string_to and so no longer necessary.
2017-06-16 21:20:56 +10:00
Tim Mayberry 7c63f720e4 Remove LocaleGuard from ARDOUR::Route class
Route and all members are now using locale independent string <=> float
conversions.
2017-06-16 21:20:56 +10:00
Tim Mayberry 908b27d94f Remove LocaleGuard from ARDOUR::MonitorProcessor state method
All float <=> string conversions are done using PBD::to_string/string_to via
XMLNode and LocaleGuard is not necessary.
2017-06-16 21:20:56 +10:00
Tim Mayberry a704260930 Remove LocaleGuard from ARDOUR::RCConfiguration class
This presumes that all ControlProtocol implementations either use
PBD::to_string/string_to for float <=> string conversions, which is now the
case.
2017-06-16 21:20:56 +10:00
Tim Mayberry 8fac6d57a2 Remove LocaleGuards from LuaProc class
All float <=> string conversions are done using PBD::to_string/string_to via
XMLNode so no LocaleGuard is necessary.
2017-06-16 21:20:56 +10:00
Tim Mayberry b617b9d1da Remove LocaleGuard from ARDOUR::MidiTrack class
There are no float <=> string conversions and they are all now performed using
PBD::to_string/string_to via XMLNode
2017-06-16 21:20:56 +10:00
Tim Mayberry 23b9afa520 Remove LocaleGuard from ARDOUR::MidiDiskstream class
There are no float <=> string conversions in MidiDiskstream state methods,
these guards must have been to protect conversions in Diskstream state methods
which are now using PBD::to_string/string_to via XMLNode so no longer need
guarding.
2017-06-16 21:20:56 +10:00
Tim Mayberry d6f5d750e5 Remove LocaleGuards from ARDOUR::ExportFormatSpecification state methods
All float <=> string conversions are performed by PBD::to_string/string_to via
XMLNode.
2017-06-16 21:20:56 +10:00
Tim Mayberry 706db9e041 Remove LocaleGuard from ARDOUR::Diskstream state method
The float conversion in Diskstream::get_state is now done using
PBD::to_string/string_to via XMLNode::set_property API.

There was no explicit LocaleGuard protecting the string -> float conversion to
remove so it was probably protected by the caller.
2017-06-16 21:20:56 +10:00
Tim Mayberry f6529c7bde Remove LocaleGuard from ARDOUR::AutomationList class
All float conversions are using PBD::to_string/string_to via
XMLNode::get/set_property API
2017-06-16 21:20:56 +10:00
Tim Mayberry 19356f73f5 Remove LocaleGuard from ARDOUR::Region class
Property conversions <=> string use PBD::to_string/string_to so float
conversions don't need to be protected by a LocaleGuard
2017-06-16 21:20:56 +10:00
Tim Mayberry 94179d3f23 Remove LocaleGuard from ARDOUR::AudioRegion state methods
float <=> string conversions are performed using PBD::to_string/string_to via
XMLNode
2017-06-16 21:20:56 +10:00
Tim Mayberry e4dcd3b820 Remove LocaleGuard from ARDOUR::AudioTrack class
The gain property float <=> string conversion is now performed using
PBD::to_string/string_to via XMLNode
2017-06-16 21:20:56 +10:00
Tim Mayberry d6e2457025 Remove LocaleGuard from AudioFileSource::get_state
Not necessary when using XMLNode::set_property API
2017-06-16 21:20:56 +10:00
Tim Mayberry 777bdeb8bf Remove LocaleGuard from ARDOUR::AudioDiskstream state methods
There are no float <=> string conversions and they are all now performed using
PBD::to_string/string_to via XMLNode
2017-06-16 21:20:56 +10:00
Tim Mayberry ecaadaf246 Remove LocaleGuard from ARDOUR::IO class state methods
There are no float <=> string conversions that require a LocaleGuard and all
conversions are performed using PBD::to_string/string_to via XMLNode
2017-06-16 21:20:56 +10:00
Tim Mayberry 93e3f981fa Remove LocaleGuard from PBD::Controllable state methods
These are no longer necessary as float <=> string conversion is handled by
locale independent PBD::to_string/string_to via XMLNode::get/set_property
2017-06-16 21:20:56 +10:00
43 changed files with 35 additions and 139 deletions

View File

@ -767,7 +767,6 @@ ARDOUR_UI::save_ardour_state ()
a different lifetime model from add_instant_xml().
*/
LocaleGuard lg; // one guard to rule them all
XMLNode* node = new XMLNode (keyboard->get_state());
Config->add_extra_xml (*node);

View File

@ -738,22 +738,17 @@ Editor::Editor ()
editor_summary_pane.set_drag_cursor (*_cursors->expand_up_down);
float fract;
{
LocaleGuard lg;
if (!settings || !settings->get_property ("edit-horizontal-pane-pos", fract) || fract > 1.0) {
/* initial allocation is 90% to canvas, 10% to notebook */
fract = 0.90;
}
edit_pane.set_divider (0, fract);
if (!settings || !settings->get_property ("edit-vertical-pane-pos", fract) || fract > 1.0) {
/* initial allocation is 90% to canvas, 10% to summary */
fract = 0.90;
}
editor_summary_pane.set_divider (0, fract);
if (!settings || !settings->get_property ("edit-horizontal-pane-pos", fract) || fract > 1.0) {
/* initial allocation is 90% to canvas, 10% to notebook */
fract = 0.90;
}
edit_pane.set_divider (0, fract);
if (!settings || !settings->get_property ("edit-vertical-pane-pos", fract) || fract > 1.0) {
/* initial allocation is 90% to canvas, 10% to summary */
fract = 0.90;
}
editor_summary_pane.set_divider (0, fract);
global_vpacker.set_spacing (2);
global_vpacker.set_border_width (0);
@ -2333,7 +2328,6 @@ Editor::set_state (const XMLNode& node, int version)
{
set_id (node);
PBD::Unwinder<bool> nsi (no_save_instant, true);
LocaleGuard lg;
bool yn;
Tabbable::set_state (node, version);
@ -2551,7 +2545,6 @@ XMLNode&
Editor::get_state ()
{
XMLNode* node = new XMLNode (X_("Editor"));
LocaleGuard lg;
node->set_property ("id", id().to_s ());

View File

@ -27,6 +27,7 @@
#include <gtkmm/messagedialog.h>
#include "pbd/error.h"
#include "pbd/locale_guard.h"
#include "pbd/xml++.h"
#include "pbd/unwind.h"
#include "pbd/failed_constructor.h"

View File

@ -366,8 +366,6 @@ ExportVideoDialog::apply_state (TimeSelection &tme, bool range)
float tcfps = _session->timecode_frames_per_second();
LocaleGuard lg;
XMLNode* node = _session->extra_xml (X_("Videotimeline"));
bool filenameset = false;
if (node) {
@ -503,7 +501,6 @@ ExportVideoDialog::apply_state (TimeSelection &tme, bool range)
XMLNode&
ExportVideoDialog::get_state ()
{
LocaleGuard lg;
XMLNode* node = new XMLNode (X_("Videoexport"));
node->set_property (X_("ChangeGeometry"), scale_checkbox.get_active());
node->set_property (X_("KeepAspect"), scale_aspect.get_active());

View File

@ -1143,7 +1143,6 @@ LuaInstance::every_point_one_seconds ()
int
LuaInstance::set_state (const XMLNode& node)
{
LocaleGuard lg;
XMLNode* child;
if ((child = find_named_node (node, "ActionScript"))) {
@ -1276,7 +1275,6 @@ LuaInstance::interactive_add (LuaScriptInfo::ScriptType type, int id)
XMLNode&
LuaInstance::get_action_state ()
{
LocaleGuard lg;
std::string saved;
{
luabridge::LuaRef savedstate ((*_lua_save)());

View File

@ -280,33 +280,28 @@ Mixer_UI::Mixer_UI ()
list_hpane.add (global_hpacker);
list_hpane.set_child_minsize (list_vpacker, 1);
XMLNode const * settings = ARDOUR_UI::instance()->mixer_settings();
float fract;
{
LocaleGuard lg;
if (!settings || !settings->get_property ("mixer-rhs-pane1-pos", fract) || fract > 1.0) {
fract = 0.6f;
}
rhs_pane1.set_divider (0, fract);
if (!settings || !settings->get_property ("mixer-rhs-pane2-pos", fract) || fract > 1.0) {
fract = 0.7f;
}
rhs_pane2.set_divider (0, fract);
if (!settings || !settings->get_property ("mixer-list-hpane-pos", fract) || fract > 1.0) {
fract = 0.2f;
}
list_hpane.set_divider (0, fract);
if (!settings || !settings->get_property ("mixer-inner-pane-pos", fract) || fract > 1.0) {
fract = 0.8f;
}
inner_pane.set_divider (0, fract);
if (!settings || !settings->get_property ("mixer-rhs-pane1-pos", fract) || fract > 1.0) {
fract = 0.6f;
}
rhs_pane1.set_divider (0, fract);
if (!settings || !settings->get_property ("mixer-rhs-pane2-pos", fract) || fract > 1.0) {
fract = 0.7f;
}
rhs_pane2.set_divider (0, fract);
if (!settings || !settings->get_property ("mixer-list-hpane-pos", fract) || fract > 1.0) {
fract = 0.2f;
}
list_hpane.set_divider (0, fract);
if (!settings || !settings->get_property ("mixer-inner-pane-pos", fract) || fract > 1.0) {
fract = 0.8f;
}
inner_pane.set_divider (0, fract);
rhs_pane1.set_drag_cursor (*PublicEditor::instance().cursors()->expand_up_down);
rhs_pane2.set_drag_cursor (*PublicEditor::instance().cursors()->expand_up_down);
@ -2103,7 +2098,6 @@ private:
int
Mixer_UI::set_state (const XMLNode& node, int version)
{
LocaleGuard lg;
bool yn;
Tabbable::set_state (node, version);
@ -2173,7 +2167,6 @@ XMLNode&
Mixer_UI::get_state ()
{
XMLNode* node = new XMLNode (X_("Mixer"));
LocaleGuard lg;
node->add_child_nocopy (Tabbable::get_state());

View File

@ -41,7 +41,6 @@
#include "pbd/failed_constructor.h"
#include "pbd/file_utils.h"
#include "pbd/gstdio_compat.h"
#include "pbd/locale_guard.h"
#include "pbd/unwind.h"
#include "pbd/xml++.h"
@ -137,7 +136,6 @@ UIConfiguration::parameter_changed (string param)
void
UIConfiguration::reset_gtk_theme ()
{
LocaleGuard lg;
std::string color_scheme_string("gtk_color_scheme = \"");
for (ColorAliases::iterator g = color_aliases.begin(); g != color_aliases.end(); ++g) {
@ -362,7 +360,6 @@ int
UIConfiguration::store_color_theme ()
{
XMLNode* root;
LocaleGuard lg;
root = new XMLNode("Ardour");
@ -409,7 +406,6 @@ UIConfiguration::store_color_theme ()
int
UIConfiguration::load_state ()
{
LocaleGuard lg; // a single guard for all 3 configs
bool found = false;
std::string rcfile;
@ -499,7 +495,6 @@ XMLNode&
UIConfiguration::get_state ()
{
XMLNode* root;
LocaleGuard lg;
root = new XMLNode("Ardour");
@ -517,7 +512,6 @@ XMLNode&
UIConfiguration::get_variables (std::string which_node)
{
XMLNode* node;
LocaleGuard lg;
node = new XMLNode (which_node);
@ -536,7 +530,6 @@ UIConfiguration::get_variables (std::string which_node)
int
UIConfiguration::set_state (const XMLNode& root, int /*version*/)
{
LocaleGuard lg;
/* this can load a generic UI configuration file or a colors file */
if (root.name() != "Ardour") {
@ -634,7 +627,6 @@ UIConfiguration::load_colors (XMLNode const & node)
void
UIConfiguration::load_modifiers (XMLNode const & node)
{
PBD::LocaleGuard lg;
XMLNodeList const nlist = node.children();
XMLNodeConstIterator niter;
XMLProperty const *name;

View File

@ -267,7 +267,6 @@ VideoUtils::video_query_info (
double &video_aspect_ratio
)
{
LocaleGuard lg;
char url[2048];
snprintf(url, sizeof(url), "%s%sinfo/?file=%s&format=csv"

View File

@ -87,8 +87,6 @@ VideoTimeLine::save_session ()
return;
}
LocaleGuard lg;
XMLNode* node = new XMLNode(X_("Videomonitor"));
if (!node) return;
node->set_property (X_("active"), (vmonitor && vmonitor->is_started()));
@ -145,7 +143,6 @@ VideoTimeLine::set_session (ARDOUR::Session *s)
if (!_session) { return ; }
_session->SessionSaveUnderway.connect_same_thread (sessionsave, boost::bind (&VideoTimeLine::save_session, this));
LocaleGuard lg;
XMLNode* node = _session->extra_xml (X_("Videotimeline"));
@ -220,7 +217,6 @@ VideoTimeLine::save_undo ()
int
VideoTimeLine::set_state (const XMLNode& node, int /*version*/)
{
LocaleGuard lg;
node.get_property (X_("VideoOffset"), video_offset);
ARDOUR_UI::instance()->flush_videotimeline_cache(true);
return 0;
@ -230,7 +226,6 @@ XMLNode&
VideoTimeLine::get_state ()
{
XMLNode* node = new XMLNode (X_("Videotimeline"));
LocaleGuard lg;
node->set_property (X_("VideoOffset"), video_offset_p);
return *node;
}

View File

@ -31,7 +31,6 @@
#include "pbd/error.h"
#include "pbd/failed_constructor.h"
#include "pbd/locale_guard.h"
#include "pbd/stateful.h"
#include "ardour/libardour_visibility.h"

View File

@ -1905,7 +1905,6 @@ XMLNode&
AudioDiskstream::get_state ()
{
XMLNode& node (Diskstream::get_state());
LocaleGuard lg;
boost::shared_ptr<ChannelList> c = channels.reader();
node.set_property ("channels", (uint32_t)c->size());
@ -1945,7 +1944,6 @@ AudioDiskstream::set_state (const XMLNode& node, int version)
XMLNodeList nlist = node.children();
XMLNodeIterator niter;
XMLNode* capture_pending_node = 0;
LocaleGuard lg;
/* prevent write sources from being created */

View File

@ -268,7 +268,6 @@ AudioTrack::set_state_part_two ()
{
XMLNode* fnode;
XMLProperty const * prop;
LocaleGuard lg;
/* This is called after all session state has been restored but before
have been made ports and connections are established.

View File

@ -207,7 +207,6 @@ AudioFileSource::get_soundfile_info (const string& path, SoundFileInfo& _info, s
XMLNode&
AudioFileSource::get_state ()
{
LocaleGuard lg;
XMLNode& root (AudioSource::get_state());
root.set_property (X_("channel"), _channel);
root.set_property (X_("origin"), _origin);

View File

@ -770,7 +770,6 @@ XMLNode&
AudioRegion::get_basic_state ()
{
XMLNode& node (Region::state ());
LocaleGuard lg;
node.set_property ("channels", (uint32_t)_sources.size());
@ -782,7 +781,6 @@ AudioRegion::state ()
{
XMLNode& node (get_basic_state());
XMLNode *child;
LocaleGuard lg;
child = node.add_child ("Envelope");
@ -838,7 +836,6 @@ int
AudioRegion::_set_state (const XMLNode& node, int version, PropertyChange& what_changed, bool send)
{
const XMLNodeList& nlist = node.children();
LocaleGuard lg;
boost::shared_ptr<Playlist> the_playlist (_playlist.lock());
suspend_property_changes ();

View File

@ -332,7 +332,6 @@ XMLNode&
AutomationList::state (bool full)
{
XMLNode* root = new XMLNode (X_("AutomationList"));
LocaleGuard lg;
root->set_property ("automation-id", EventTypeMap::instance().to_symbol(_parameter));
root->set_property ("id", id());
@ -444,7 +443,6 @@ AutomationList::deserialize_events (const XMLNode& node)
int
AutomationList::set_state (const XMLNode& node, int version)
{
LocaleGuard lg;
XMLNodeList nlist = node.children();
XMLNode* nsos;
XMLNodeIterator niter;

View File

@ -483,7 +483,6 @@ XMLNode&
Diskstream::get_state ()
{
XMLNode* node = new XMLNode ("Diskstream");
LocaleGuard lg;
node->set_property ("flags", _flags);
node->set_property ("playlist", _playlist->name());

View File

@ -251,7 +251,6 @@ ExportFormatSpecification::~ExportFormatSpecification ()
XMLNode &
ExportFormatSpecification::get_state ()
{
LocaleGuard lg;
XMLNode * node;
XMLNode * root = new XMLNode ("ExportFormatSpecification");
@ -321,7 +320,6 @@ ExportFormatSpecification::set_state (const XMLNode & root)
{
XMLNode const * child;
string str;
LocaleGuard lg;
root.get_property ("name", _name);

View File

@ -31,6 +31,7 @@
#include "pbd/replace_all.h"
#include "pbd/unknown_type.h"
#include "pbd/enumwriter.h"
#include "pbd/locale_guard.h"
#include "pbd/types_convert.h"
#include "ardour/audioengine.h"
@ -553,7 +554,6 @@ IO::state (bool /*full_state*/)
{
XMLNode* node = new XMLNode (state_node_name);
int n;
LocaleGuard lg;
Glib::Threads::Mutex::Lock lm (io_lock);
node->set_property ("name", name());
@ -616,9 +616,6 @@ IO::set_state (const XMLNode& node, int version)
*/
assert (version >= 3000);
XMLNodeConstIterator iter;
LocaleGuard lg;
/* force use of non-localized representation of decimal point,
since we use it a lot in XML files and so forth.
*/

View File

@ -41,6 +41,7 @@
#include "pbd/compose.h"
#include "pbd/error.h"
#include "pbd/locale_guard.h"
#include "pbd/xml++.h"
#include "pbd/stacktrace.h"

View File

@ -22,7 +22,6 @@
#include <glibmm/fileutils.h>
#include "pbd/gstdio_compat.h"
#include "pbd/locale_guard.h"
#include "pbd/pthread_utils.h"
#include "ardour/audio_buffer.h"
@ -759,7 +758,6 @@ void
LuaProc::add_state (XMLNode* root) const
{
XMLNode* child;
LocaleGuard lg;
gchar* b64 = g_base64_encode ((const guchar*)_script.c_str (), _script.size ());
std::string b64s (b64);
@ -828,7 +826,6 @@ LuaProc::set_state (const XMLNode& node, int version)
XMLNodeConstIterator iter;
XMLNode *child;
#endif
LocaleGuard lg;
if (_script.empty ()) {
if (set_script_from_state (node)) {
@ -1131,7 +1128,6 @@ LuaProc::load_preset (PresetRecord r)
!(*j)->get_property (X_("value"), value)) {
assert (false);
}
LocaleGuard lg;
set_parameter (index, value);
PresetPortSetValue (index, value); /* EMIT SIGNAL */
}

View File

@ -36,6 +36,7 @@
#include "pbd/stl_delete.h"
#include "pbd/compose.h"
#include "pbd/error.h"
#include "pbd/locale_guard.h"
#include "pbd/replace_all.h"
#include "pbd/xml++.h"

View File

@ -59,7 +59,6 @@ LXVSTPlugin::LXVSTPlugin (const LXVSTPlugin &other)
Session::vst_current_loading_id = 0;
XMLNode* root = new XMLNode (other.state_node_name ());
LocaleGuard lg;
other.add_state (root);
set_state (*root, Stateful::loading_state_version);
delete root;

View File

@ -59,7 +59,6 @@ MacVSTPlugin::MacVSTPlugin (const MacVSTPlugin &other)
Session::vst_current_loading_id = 0;
XMLNode* root = new XMLNode (other.state_node_name ());
LocaleGuard lg;
other.add_state (root);
set_state (*root, Stateful::loading_state_version);
delete root;

View File

@ -1227,7 +1227,6 @@ XMLNode&
MidiDiskstream::get_state ()
{
XMLNode& node (Diskstream::get_state());
LocaleGuard lg;
if (_write_source && _session.get_record_enabled()) {
@ -1262,7 +1261,6 @@ MidiDiskstream::set_state (const XMLNode& node, int version)
XMLNodeList nlist = node.children();
XMLNodeIterator niter;
XMLNode* capture_pending_node = 0;
LocaleGuard lg;
/* prevent write sources from being created */

View File

@ -279,7 +279,6 @@ void
MidiTrack::set_state_part_two ()
{
XMLNode* fnode;
LocaleGuard lg;
/* This is called after all session state has been restored but before
have been made ports and connections are established.

View File

@ -18,7 +18,6 @@
*/
#include "pbd/error.h"
#include "pbd/locale_guard.h"
#include "pbd/xml++.h"
#include "ardour/amp.h"
@ -221,7 +220,6 @@ MonitorProcessor::set_state (const XMLNode& node, int version)
XMLNode&
MonitorProcessor::state (bool full)
{
LocaleGuard lg;
XMLNode& node(Processor::state(full));
/* this replaces any existing "type" property */

View File

@ -193,7 +193,6 @@ Pannable::get_state ()
XMLNode&
Pannable::state (bool /*full*/)
{
LocaleGuard lg;
XMLNode* node = new XMLNode (X_("Pannable"));
node->add_child_nocopy (pan_azimuth_control->get_state());

View File

@ -173,7 +173,6 @@ PannerShell::set_state (const XMLNode& node, int version)
XMLNodeConstIterator niter;
bool yn;
std::string str;
LocaleGuard lg;
if (node.get_property (X_("bypassed"), yn)) {
set_bypassed (yn);

View File

@ -40,6 +40,7 @@
#include "pbd/compose.h"
#include "pbd/error.h"
#include "pbd/locale_guard.h"
#include "pbd/xml++.h"
#include "ardour/buffer_set.h"

View File

@ -173,7 +173,6 @@ XMLNode&
RCConfiguration::get_state ()
{
XMLNode* root;
LocaleGuard lg;
root = new XMLNode("Ardour");
@ -194,7 +193,6 @@ XMLNode&
RCConfiguration::get_variables ()
{
XMLNode* node;
LocaleGuard lg;
node = new XMLNode ("Config");
@ -221,7 +219,6 @@ RCConfiguration::set_state (const XMLNode& root, int version)
XMLNodeList nlist = root.children();
XMLNodeConstIterator niter;
XMLNode *node;
LocaleGuard lg;
Stateful::save_extra_xml (root);

View File

@ -1258,7 +1258,6 @@ Region::state ()
{
XMLNode *node = new XMLNode ("Region");
char buf2[64];
LocaleGuard lg;
/* custom version of 'add_properties (*node);'
* skip values that have have dedicated save functions

View File

@ -30,6 +30,7 @@
#include "pbd/xml++.h"
#include "pbd/enumwriter.h"
#include "pbd/locale_guard.h"
#include "pbd/memento_command.h"
#include "pbd/stacktrace.h"
#include "pbd/types_convert.h"
@ -2309,7 +2310,6 @@ Route::get_template()
XMLNode&
Route::state(bool full_state)
{
LocaleGuard lg;
if (!_session._template_state_dir.empty()) {
foreach_processor (sigc::bind (sigc::mem_fun (*this, &Route::set_plugin_state_dir), _session._template_state_dir));
}

View File

@ -583,7 +583,6 @@ Session::immediately_post_engine ()
}
try {
LocaleGuard lg;
BootMessage (_("Set up LTC"));
setup_ltc ();
BootMessage (_("Set up Click"));

View File

@ -23,7 +23,6 @@
#include "pbd/error.h"
#include "pbd/file_utils.h"
#include "pbd/locale_guard.h"
#include "pbd/pathexpand.h"
#include "ardour/types.h"
@ -55,7 +54,6 @@ XMLNode&
SessionConfiguration::get_state ()
{
XMLNode* root;
LocaleGuard lg;
root = new XMLNode ("Ardour");
root->add_child_nocopy (get_variables ());
@ -68,7 +66,6 @@ XMLNode&
SessionConfiguration::get_variables ()
{
XMLNode* node;
LocaleGuard lg;
node = new XMLNode ("Config");
@ -160,7 +157,6 @@ SessionConfiguration::load_state ()
XMLNode* node;
if (((node = find_named_node (root, X_("Config"))) != 0)) {
LocaleGuard lg;
set_variables(*node);
info << _("Loaded custom session defaults.") << endmsg;
} else {

View File

@ -50,6 +50,7 @@
#include <glib.h>
#include "pbd/gstdio_compat.h"
#include "pbd/locale_guard.h"
#include <glibmm.h>
#include <glibmm/threads.h>
@ -1023,7 +1024,6 @@ Session::load_state (string snapshot_name)
int
Session::load_options (const XMLNode& node)
{
LocaleGuard lg;
config.set_variables (node);
return 0;
}

View File

@ -444,12 +444,6 @@ Session::butler_transport_work ()
}
if (ptw & PostTransportAdjustPlaybackBuffering) {
/* non_realtime_locate() calls Automatable::transport_located()
* for every route. This eventually calls
* ARDOUR::AutomationList::state () which has a LocaleGuard,
* and would switch locales forth/back every time.
*/
LocaleGuard lg;
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
if (tr) {
@ -498,7 +492,6 @@ Session::butler_transport_work ()
/* don't seek if locate will take care of that in non_realtime_stop() */
if (!(ptw & PostTransportLocate)) {
LocaleGuard lg; // see note for non_realtime_locate() above
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
(*i)->non_realtime_locate (_transport_frame);
@ -608,7 +601,6 @@ Session::non_realtime_locate ()
{
LocaleGuard lg; // see note for non_realtime_locate() above
boost::shared_ptr<RouteList> rl = routes.reader();
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
(*i)->non_realtime_locate (_transport_frame);
@ -875,7 +867,6 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
/* this for() block can be put inside the previous if() and has the effect of ... ??? what */
{
LocaleGuard lg; // see note for non_realtime_locate() above
DEBUG_TRACE (DEBUG::Transport, X_("Butler PTW: locate\n"));
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
DEBUG_TRACE (DEBUG::Transport, string_compose ("Butler PTW: locate on %1\n", (*i)->name()));

View File

@ -17,7 +17,6 @@
*/
#include "pbd/error.h"
#include "pbd/locale_guard.h"
#include "ardour/speaker.h"
#include "ardour/speakers.h"
@ -243,7 +242,6 @@ XMLNode&
Speakers::get_state ()
{
XMLNode* node = new XMLNode (X_("Speakers"));
LocaleGuard lg;
for (vector<Speaker>::const_iterator i = _speakers.begin(); i != _speakers.end(); ++i) {
XMLNode* speaker = new XMLNode (X_("Speaker"));
@ -262,7 +260,6 @@ int
Speakers::set_state (const XMLNode& node, int /*version*/)
{
XMLNodeConstIterator i;
LocaleGuard lg;
_speakers.clear ();

View File

@ -159,8 +159,6 @@ TempoSection::TempoSection (const XMLNode& node, framecnt_t sample_rate)
, _locked_to_meter (false)
, _clamped (false)
{
LocaleGuard lg;
_legacy_bbt = BBT_Time (0, 0, 0);
BBT_Time bbt;
@ -242,7 +240,6 @@ XMLNode&
TempoSection::get_state() const
{
XMLNode *root = new XMLNode (xml_state_node_name);
LocaleGuard lg;
MetricSection::add_state_to_node (*root);
@ -553,7 +550,6 @@ const string MeterSection::xml_state_node_name = "Meter";
MeterSection::MeterSection (const XMLNode& node, const framecnt_t sample_rate)
: MetricSection (0.0, 0, MusicTime, false, sample_rate), Meter (TempoMap::default_meter())
{
LocaleGuard lg;
pair<double, BBT_Time> start;
start.first = 0.0;
@ -612,7 +608,6 @@ XMLNode&
MeterSection::get_state() const
{
XMLNode *root = new XMLNode (xml_state_node_name);
LocaleGuard lg;
MetricSection::add_state_to_node (*root);

View File

@ -58,7 +58,6 @@ WindowsVSTPlugin::WindowsVSTPlugin (const WindowsVSTPlugin &other)
Session::vst_current_loading_id = 0;
XMLNode* root = new XMLNode (other.state_node_name ());
LocaleGuard lg;
other.add_state (root);
set_state (*root, Stateful::loading_state_version);
delete root;

View File

@ -77,7 +77,6 @@ struct LIBCANVAS_API HSV
HSV ();
HSV (double h, double s, double v, double a = 1.0);
HSV (Color);
HSV (const std::string&);
double h;
double s;

View File

@ -23,7 +23,6 @@
#include <cfloat>
#include "pbd/failed_constructor.h"
#include "pbd/locale_guard.h"
#include "pbd/string_convert.h"
#include "canvas/colors.h"
@ -247,19 +246,9 @@ HSV::HSV (Color c)
color_to_hsva (c, h, s, v, a);
}
HSV::HSV (const std::string& str)
{
stringstream ss (str);
ss >> h;
ss >> s;
ss >> v;
ss >> a;
}
string
HSV::to_string () const
{
PBD::LocaleGuard lg;
stringstream ss;
ss << PBD::to_string(h) << ' ';
ss << PBD::to_string(s) << ' ';
@ -597,7 +586,6 @@ SVAModifier::from_string (string const & str)
string
SVAModifier::to_string () const
{
PBD::LocaleGuard lg;
stringstream ss;
switch (type) {

View File

@ -23,7 +23,6 @@
#include <algorithm>
#include <pbd/controllable.h>
#include <pbd/locale_guard.h>
#include "gtkmm2ext/gtk_ui.h"
#include "gtkmm2ext/utils.h"

View File

@ -21,7 +21,6 @@
#include "pbd/enumwriter.h"
#include "pbd/xml++.h"
#include "pbd/error.h"
#include "pbd/locale_guard.h"
#include "pbd/types_convert.h"
#include "pbd/string_convert.h"
@ -109,7 +108,6 @@ XMLNode&
Controllable::get_state ()
{
XMLNode* node = new XMLNode (xml_node_name);
LocaleGuard lg;
/* Waves' "Pressure3" has a parameter called "µ-iness"
* which causes a parser error : Input is not proper UTF-8, indicate encoding !
@ -135,8 +133,6 @@ Controllable::get_state ()
int
Controllable::set_state (const XMLNode& node, int /*version*/)
{
LocaleGuard lg;
Stateful::save_extra_xml (node);
set_id (node);