projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prevent unsafe thread change of local settings using synfig::ChangeLocale class
[synfig.git]
/
synfig-studio
/
src
/
gui
/
app.cpp
diff --git
a/synfig-studio/src/gui/app.cpp
b/synfig-studio/src/gui/app.cpp
index
076b49e
..
0f8d3bd
100644
(file)
--- a/
synfig-studio/src/gui/app.cpp
+++ b/
synfig-studio/src/gui/app.cpp
@@
-500,7
+500,7
@@
public:
{
try
{
{
try
{
- SETTINGS_LOCALE_SAFE_AND_BACKUP
+ synfig::ChangeLocale change_locale(LC_NUMERIC, "C");
if(key=="gamma")
{
value=strprintf("%f %f %f %f",
if(key=="gamma")
{
value=strprintf("%f %f %f %f",
@@
-588,7
+588,6
@@
public:
value=strprintf("%s",App::predefined_fps.c_str());
return true;
}
value=strprintf("%s",App::predefined_fps.c_str());
return true;
}
- SETTINGS_LOCALE_RESTORE
}
catch(...)
{
}
catch(...)
{
@@
-601,7
+600,7
@@
public:
{
try
{
{
try
{
- SETTINGS_LOCALE_SAFE_AND_BACKUP
+ synfig::ChangeLocale change_locale(LC_NUMERIC, "C");
if(key=="gamma")
{
float r,g,b,blk;
if(key=="gamma")
{
float r,g,b,blk;
@@
-704,7
+703,6
@@
public:
App::predefined_fps=value;
return true;
}
App::predefined_fps=value;
return true;
}
- SETTINGS_LOCALE_RESTORE
}
catch(...)
{
}
catch(...)
{
@@
-1618,7
+1616,7
@@
App::save_settings()
{
try
{
{
try
{
- SETTINGS_LOCALE_SAFE_AND_BACKUP
+ synfig::ChangeLocale change_locale(LC_NUMERIC, "C");
{
std::string filename=get_config_file("accelrc");
Gtk::AccelMap::save(filename);
{
std::string filename=get_config_file("accelrc");
Gtk::AccelMap::save(filename);
@@
-1658,7
+1656,7
@@
App::save_settings()
}while(0);
std::string filename=get_config_file("settings");
synfigapp::Main::settings().save_to_file(filename);
}while(0);
std::string filename=get_config_file("settings");
synfigapp::Main::settings().save_to_file(filename);
- SETTINGS_LOCALE_RESTORE
+
}
catch(...)
{
}
catch(...)
{
@@
-1671,7
+1669,7
@@
App::load_settings()
{
try
{
{
try
{
- SETTINGS_LOCALE_SAFE_AND_BACKUP
+ synfig::ChangeLocale change_locale(LC_NUMERIC, "C");
{
std::string filename=get_config_file("accelrc");
Gtk::AccelMap::load(filename);
{
std::string filename=get_config_file("accelrc");
Gtk::AccelMap::load(filename);
@@
-1727,7
+1725,7
@@
App::load_settings()
reset_initial_window_configuration();
}
}
reset_initial_window_configuration();
}
}
- SETTINGS_LOCALE_RESTORE
+
}
catch(...)
{
}
catch(...)
{