Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 589482 Details for
Bug 828764
Request to backport the fix of better immodule fallback
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
revised patch for gtk2
gtk2-allow-fallback-for-input-method-modules.patch (text/plain), 3.71 KB, created by
Akira TAGOH
on 2012-06-05 10:41:46 UTC
(
hide
)
Description:
revised patch for gtk2
Filename:
MIME Type:
Creator:
Akira TAGOH
Created:
2012-06-05 10:41:46 UTC
Size:
3.71 KB
patch
obsolete
>diff -pruN gtk+-2.24.10.orig/docs/reference/gtk/running.sgml gtk+-2.24.10/docs/reference/gtk/running.sgml >--- gtk+-2.24.10.orig/docs/reference/gtk/running.sgml 2011-08-16 11:30:51.000000000 +0900 >+++ gtk+-2.24.10/docs/reference/gtk/running.sgml 2012-06-05 19:35:44.828218094 +0900 >@@ -264,6 +264,8 @@ additional environment variables. > that enables <literal>XSETTINGS</literal> and has a value in > <literal>Gtk/IMModule</literal>, that will be used for the default > IM module. >+ This also can be a colon-separated list of input-methods, which >+ GTK+ will try in turn until it finds one available on the system. > </para> > </formalpara> > >diff -pruN gtk+-2.24.10.orig/gtk/gtkimmodule.c gtk+-2.24.10/gtk/gtkimmodule.c >--- gtk+-2.24.10.orig/gtk/gtkimmodule.c 2011-08-16 11:30:52.000000000 +0900 >+++ gtk+-2.24.10/gtk/gtkimmodule.c 2012-06-05 19:35:44.828218094 +0900 >@@ -650,6 +650,26 @@ match_locale (const gchar *locale, > return 0; > } > >+static const gchar * >+lookup_immodule (gchar **immodules_list) >+{ >+ while (immodules_list && *immodules_list) >+ { >+ if (g_strcmp0 (*immodules_list, SIMPLE_ID) == 0) >+ return SIMPLE_ID; >+ else >+ { >+ GtkIMModule *module; >+ module = g_hash_table_lookup (contexts_hash, *immodules_list); >+ if (module) >+ return module->contexts[0]->context_id; >+ } >+ immodules_list++; >+ } >+ >+ return NULL; >+} >+ > /** > * _gtk_im_module_get_default_context_id: > * @client_window: a window >@@ -666,7 +686,7 @@ _gtk_im_module_get_default_context_id (G > const gchar *context_id = NULL; > gint best_goodness = 0; > gint i; >- gchar *tmp_locale, *tmp; >+ gchar *tmp_locale, *tmp, **immodules; > const gchar *envvar; > GdkScreen *screen; > GtkSettings *settings; >@@ -674,11 +694,16 @@ _gtk_im_module_get_default_context_id (G > if (!contexts_hash) > gtk_im_module_initialize (); > >- envvar = g_getenv ("GTK_IM_MODULE"); >- if (envvar && >- (strcmp (envvar, SIMPLE_ID) == 0 || >- g_hash_table_lookup (contexts_hash, envvar))) >- return envvar; >+ envvar = g_getenv("GTK_IM_MODULE"); >+ if (envvar) >+ { >+ immodules = g_strsplit(envvar, ":", 0); >+ context_id = lookup_immodule(immodules); >+ g_strfreev(immodules); >+ >+ if (context_id) >+ return context_id; >+ } > > /* Check if the certain immodule is set in XSETTINGS. > */ >@@ -689,15 +714,9 @@ _gtk_im_module_get_default_context_id (G > g_object_get (G_OBJECT (settings), "gtk-im-module", &tmp, NULL); > if (tmp) > { >- if (strcmp (tmp, SIMPLE_ID) == 0) >- context_id = SIMPLE_ID; >- else >- { >- GtkIMModule *module; >- module = g_hash_table_lookup (contexts_hash, tmp); >- if (module) >- context_id = module->contexts[0]->context_id; >- } >+ immodules = g_strsplit(tmp, ":", 0); >+ context_id = lookup_immodule(immodules); >+ g_strfreev(immodules); > g_free (tmp); > > if (context_id) >diff -pruN gtk+-2.24.10.orig/gtk/gtksettings.c gtk+-2.24.10/gtk/gtksettings.c >--- gtk+-2.24.10.orig/gtk/gtksettings.c 2011-11-09 02:20:20.000000000 +0900 >+++ gtk+-2.24.10/gtk/gtksettings.c 2012-06-05 19:36:50.855163242 +0900 >@@ -850,6 +850,8 @@ gtk_settings_class_init (GtkSettingsClas > * Which IM (input method) module should be used by default. This is the > * input method that will be used if the user has not explicitly chosen > * another input method from the IM context menu. >+ * This also can be a colon-separated list of input methods, which GTK+ >+ * will try in turn until it finds one available on the system. > * > * See #GtkIMContext and see the #GtkSettings:gtk-show-input-method-menu property. > */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 828764
: 589482