forked from AuroraMiddleware/gtk
immodule: Accept 'simple' and 'none'
Everybody (including myself) gets this wrong, so accept 'simple' and 'none' as shorthands for the official IDs 'gtk-im-context-simple' and 'gtk-im-context-none'.
This commit is contained in:
parent
9af8c6fb25
commit
1f97714293
@ -66,8 +66,10 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#define SIMPLE_ID "gtk-im-context-simple"
|
||||
#define NONE_ID "gtk-im-context-none"
|
||||
#define SIMPLE_ID "gtk-im-context-simple"
|
||||
#define ALT_SIMPLE_ID "simple"
|
||||
#define NONE_ID "gtk-im-context-none"
|
||||
#define ALT_NONE_ID "none"
|
||||
|
||||
/**
|
||||
* _gtk_im_module_create:
|
||||
@ -151,9 +153,11 @@ lookup_immodule (GdkDisplay *display,
|
||||
if (!match_backend (display, immodules_list[i]))
|
||||
continue;
|
||||
|
||||
if (g_strcmp0 (immodules_list[i], SIMPLE_ID) == 0)
|
||||
if (g_strcmp0 (immodules_list[i], SIMPLE_ID) == 0 ||
|
||||
g_strcmp0 (immodules_list[i], ALT_SIMPLE_ID) == 0)
|
||||
return SIMPLE_ID;
|
||||
else if (g_strcmp0 (immodules_list[i], NONE_ID) == 0)
|
||||
else if (g_strcmp0 (immodules_list[i], NONE_ID) == 0 ||
|
||||
g_strcmp0 (immodules_list[i], ALT_NONE_ID) == 0)
|
||||
return NONE_ID;
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user