gdk/x11/gdkkeys-x11.c (get_direction): Don't call g_strcasecmp on NULL strings. (#59058)

This commit is contained in:
Matthias Clasen 2001-09-07 11:43:20 +00:00
parent 9fccd2cca4
commit d8e3d58d42
8 changed files with 47 additions and 8 deletions

View File

@ -1,3 +1,8 @@
Fri Sep 7 12:48:56 2001 Matthias Clasen <matthiasc@poet.de>
* gdk/x11/gdkkeys-x11.c (get_direction): Don't call
g_strcasecmp on NULL strings. (#59058)
2001-09-06 Alex Larsson <alexl@redhat.com>
* gtk/gtkbin.c:

View File

@ -1,3 +1,8 @@
Fri Sep 7 12:48:56 2001 Matthias Clasen <matthiasc@poet.de>
* gdk/x11/gdkkeys-x11.c (get_direction): Don't call
g_strcasecmp on NULL strings. (#59058)
2001-09-06 Alex Larsson <alexl@redhat.com>
* gtk/gtkbin.c:

View File

@ -1,3 +1,8 @@
Fri Sep 7 12:48:56 2001 Matthias Clasen <matthiasc@poet.de>
* gdk/x11/gdkkeys-x11.c (get_direction): Don't call
g_strcasecmp on NULL strings. (#59058)
2001-09-06 Alex Larsson <alexl@redhat.com>
* gtk/gtkbin.c:

View File

@ -1,3 +1,8 @@
Fri Sep 7 12:48:56 2001 Matthias Clasen <matthiasc@poet.de>
* gdk/x11/gdkkeys-x11.c (get_direction): Don't call
g_strcasecmp on NULL strings. (#59058)
2001-09-06 Alex Larsson <alexl@redhat.com>
* gtk/gtkbin.c:

View File

@ -1,3 +1,8 @@
Fri Sep 7 12:48:56 2001 Matthias Clasen <matthiasc@poet.de>
* gdk/x11/gdkkeys-x11.c (get_direction): Don't call
g_strcasecmp on NULL strings. (#59058)
2001-09-06 Alex Larsson <alexl@redhat.com>
* gtk/gtkbin.c:

View File

@ -1,3 +1,8 @@
Fri Sep 7 12:48:56 2001 Matthias Clasen <matthiasc@poet.de>
* gdk/x11/gdkkeys-x11.c (get_direction): Don't call
g_strcasecmp on NULL strings. (#59058)
2001-09-06 Alex Larsson <alexl@redhat.com>
* gtk/gtkbin.c:

View File

@ -1,3 +1,8 @@
Fri Sep 7 12:48:56 2001 Matthias Clasen <matthiasc@poet.de>
* gdk/x11/gdkkeys-x11.c (get_direction): Don't call
g_strcasecmp on NULL strings. (#59058)
2001-09-06 Alex Larsson <alexl@redhat.com>
* gtk/gtkbin.c:

View File

@ -204,16 +204,20 @@ get_direction (void)
XkbGetState (gdk_display, XkbUseCoreKbd, &state_rec);
name = gdk_atom_name (xkb->names->groups[state_rec.locked_group]);
if (g_strcasecmp (name, "arabic") == 0 ||
g_strcasecmp (name, "hebrew") == 0 ||
g_strcasecmp (name, "israelian") == 0)
result = PANGO_DIRECTION_RTL;
else
if (xkb->names->groups[state_rec.locked_group] == None)
result = PANGO_DIRECTION_LTR;
else
{
name = gdk_atom_name (xkb->names->groups[state_rec.locked_group]);
if (g_strcasecmp (name, "arabic") == 0 ||
g_strcasecmp (name, "hebrew") == 0 ||
g_strcasecmp (name, "israelian") == 0)
result = PANGO_DIRECTION_RTL;
else
result = PANGO_DIRECTION_LTR;
g_free (name);
}
g_free (name);
return result;
}