+ if (comma_decimal < 0) {
+ std::lconv* lc = std::localeconv();
+ if (strchr (lc->decimal_point, ',') != 0) {
+ comma_decimal = 1;
+ } else {
+ comma_decimal = 0;
+ }
+ }
+ break;
+ default:
+ break;
+ }
+
+ switch (keyval) {
+ case GDK_decimalpoint:
+ case GDK_KP_Separator:
+ return true;
+
+ case GDK_period:
+ if (comma_decimal) {
+ return false;
+ } else {
+ return true;
+ }
+ break;
+ case GDK_comma:
+ if (comma_decimal) {
+ return true;
+ } else {
+ return false;
+ }
+ break;
+ case GDK_minus:
+ case GDK_plus: