mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-14 06:10:21 +00:00
Revert "Translate GDK_KEY_KP_Decimal according to locale"
This reverts commit 7c7fde136e
.
Too much controversy for this minor improvement.
See https://bugzilla.gnome.org/show_bug.cgi?id=756751
This commit is contained in:
parent
d72e061bb9
commit
4eb333801b
@ -27,7 +27,6 @@
|
|||||||
#include "gdkkeys.h"
|
#include "gdkkeys.h"
|
||||||
#include "gdktypes.h"
|
#include "gdktypes.h"
|
||||||
|
|
||||||
#include <locale.h>
|
|
||||||
|
|
||||||
/* Thanks to Markus G. Kuhn <mkuhn@acm.org> for the ksysym<->Unicode
|
/* Thanks to Markus G. Kuhn <mkuhn@acm.org> for the ksysym<->Unicode
|
||||||
* mapping functions, from the xterm sources.
|
* mapping functions, from the xterm sources.
|
||||||
@ -873,23 +872,6 @@ static const struct {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
static gunichar
|
|
||||||
get_decimal_point (void)
|
|
||||||
{
|
|
||||||
struct lconv *locale_data;
|
|
||||||
const gchar *decimal_point;
|
|
||||||
gunichar ret;
|
|
||||||
|
|
||||||
locale_data = localeconv ();
|
|
||||||
decimal_point = locale_data->decimal_point;
|
|
||||||
|
|
||||||
ret = g_utf8_get_char_validated (decimal_point, -1);
|
|
||||||
if (ret != (gunichar)-2 && ret != (gunichar)-1)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
return (gunichar) '.';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gdk_keyval_to_unicode:
|
* gdk_keyval_to_unicode:
|
||||||
* @keyval: a GDK key symbol
|
* @keyval: a GDK key symbol
|
||||||
@ -917,9 +899,6 @@ gdk_keyval_to_unicode (guint keyval)
|
|||||||
if ((keyval & 0xff000000) == 0x01000000)
|
if ((keyval & 0xff000000) == 0x01000000)
|
||||||
return keyval & 0x00ffffff;
|
return keyval & 0x00ffffff;
|
||||||
|
|
||||||
if (keyval == 0xffae)
|
|
||||||
return (guint32) get_decimal_point ();
|
|
||||||
|
|
||||||
/* binary search in table */
|
/* binary search in table */
|
||||||
while (max >= min) {
|
while (max >= min) {
|
||||||
mid = (min + max) / 2;
|
mid = (min + max) / 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user