mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-17 05:05:14 +03:00
102 lines
3 KiB
Diff
102 lines
3 KiB
Diff
hotfix until fixed in libstdc++
|
|
--- a/include/ui_helpers.hpp
|
|
+++ b/include/ui_helpers.hpp
|
|
@@ -83,7 +83,7 @@
|
|
|
|
using namespace std::string_literals;
|
|
|
|
- auto text = fmt::format(std::locale(setlocale(LC_ALL, nullptr)), "{0:.{1}Lf}{2}", value, precision,
|
|
+ auto text = fmt::format(std::locale(), "{0:.{1}Lf}{2}", value, precision,
|
|
((unit != nullptr) ? " "s + unit : ""));
|
|
|
|
return g_strdup(text.c_str());
|
|
--- a/src/app_info.cpp
|
|
+++ b/src/app_info.cpp
|
|
@@ -37,7 +37,7 @@
|
|
|
|
std::unordered_map<uint, bool>* enabled_app_list;
|
|
|
|
- std::locale user_locale = std::locale(setlocale(LC_ALL, nullptr));
|
|
+ std::locale user_locale = std::locale();
|
|
};
|
|
|
|
struct _AppInfo {
|
|
--- a/src/autogain_ui.cpp
|
|
+++ b/src/autogain_ui.cpp
|
|
@@ -35,7 +35,7 @@
|
|
|
|
std::vector<gulong> gconnections;
|
|
|
|
- std::locale user_locale = std::locale(setlocale(LC_ALL, nullptr));
|
|
+ std::locale user_locale = std::locale();
|
|
};
|
|
|
|
struct _AutogainBox {
|
|
--- a/src/chart.cpp
|
|
+++ b/src/chart.cpp
|
|
@@ -49,7 +49,7 @@
|
|
|
|
std::vector<float> y_axis, x_axis, x_axis_log, objects_x;
|
|
|
|
- std::locale user_locale = std::locale(setlocale(LC_ALL, nullptr));
|
|
+ std::locale user_locale = std::locale();
|
|
};
|
|
|
|
struct _Chart {
|
|
--- a/src/effects_box.cpp
|
|
+++ b/src/effects_box.cpp
|
|
@@ -49,7 +49,7 @@
|
|
|
|
std::vector<gulong> gconnections_spectrum;
|
|
|
|
- std::locale user_locale = std::locale(setlocale(LC_ALL, nullptr));
|
|
+ std::locale user_locale = std::locale();
|
|
};
|
|
|
|
struct _EffectsBox {
|
|
--- a/src/equalizer_band_box.cpp
|
|
+++ b/src/equalizer_band_box.cpp
|
|
@@ -33,7 +33,7 @@
|
|
|
|
std::vector<gulong> gconnections;
|
|
|
|
- std::locale user_locale = std::locale(setlocale(LC_ALL, nullptr));
|
|
+ std::locale user_locale = std::locale();
|
|
};
|
|
|
|
struct _EqualizerBandBox {
|
|
--- a/src/pipe_manager_box.cpp
|
|
+++ b/src/pipe_manager_box.cpp
|
|
@@ -18,7 +18,7 @@
|
|
|
|
std::vector<gulong> gconnections_sie, gconnections_soe;
|
|
|
|
- std::locale user_locale = std::locale(setlocale(LC_ALL, nullptr));
|
|
+ std::locale user_locale = std::locale();
|
|
};
|
|
|
|
struct _PipeManagerBox {
|
|
--- a/src/ui_helpers.cpp
|
|
+++ b/src/ui_helpers.cpp
|
|
@@ -10,7 +10,7 @@
|
|
auto precision = gtk_spin_button_get_digits(button);
|
|
|
|
// format string: 0 = value, 1 = precision, 2 = unit
|
|
- auto text = fmt::format(std::locale(setlocale(LC_ALL, nullptr)), "{0:.{1}Lf}{2}", value, precision,
|
|
+ auto text = fmt::format(std::locale(), "{0:.{1}Lf}{2}", value, precision,
|
|
((unit != nullptr) ? " "s + unit : ""));
|
|
|
|
gtk_editable_set_text(GTK_EDITABLE(button), text.c_str());
|
|
@@ -21,11 +21,7 @@
|
|
auto parse_spinbutton_input(GtkSpinButton* button, double* new_value) -> int {
|
|
std::istringstream str(gtk_editable_get_text(GTK_EDITABLE(button)));
|
|
|
|
- try {
|
|
- str.imbue(std::locale("")); // User locale
|
|
- } catch (...) {
|
|
- str.imbue(std::locale()); // C locale if user locale not set
|
|
- }
|
|
+ str.imbue(std::locale());
|
|
|
|
if (auto min = 0.0, max = 0.0; str >> *new_value) {
|
|
gtk_spin_button_get_range(button, &min, &max);
|