After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 690247 - multiple context in a immodule can't be selected
multiple context in a immodule can't be selected
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Input Methods
3.6.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 693680 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-12-15 09:40 UTC by Jeongsu Kim
Modified: 2013-02-16 01:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
check requested context in immodule (704 bytes, patch)
2012-12-15 09:41 UTC, Jeongsu Kim
none Details | Review
better way to get the context ID than checking the whole contexts (711 bytes, patch)
2013-02-13 02:44 UTC, Changwoo Ryu
committed Details | Review

Description Jeongsu Kim 2012-12-15 09:40:22 UTC
Some gtkimmodule supports multiple contexts. I use imhangul (http://code.google.com/p/imhangul/) and it supports 9 contexts.

Below is the list of contexts.
"/usr/lib/gtk-3.0/3.0.0/immodules/im-hangul.so" 
"hangul2" "Hangul Dubeolsik" "im-hangul-3.0" "/usr/share/locale" "ko" 
"hangul2y" "Hangul Dubeolsik Yetgeul" "im-hangul-3.0" "/usr/share/locale" "" 
"hangul39" "Hangul Sebeolsik 390" "im-hangul-3.0" "/usr/share/locale" "" 
"hangul3f" "Hangul Sebeolsik Final" "im-hangul-3.0" "/usr/share/locale" "" 
"hangul3s" "Hangul Sebeolsik Noshift" "im-hangul-3.0" "/usr/share/locale" "" 
"hangul3y" "Hangul Sebeolsik Yetgeul" "im-hangul-3.0" "/usr/share/locale" "" 
"hangul32" "Hangul Sebeolsik Dubeol Layout" "im-hangul-3.0" "/usr/share/locale" "" 
"hangulro" "Hangul Romaja" "im-hangul-3.0" "/usr/share/locale" "" 
"hangulahn" "Hangul Ahnmatae" "im-hangul-3.0" "/usr/share/locale" "" 

I set GTK_IM_MODULE as "hangul3f" but it always set as "hangulahn". 

I found the reason that lookup_immodule() in gtkimmodule.c always return first context of immodule.

I will attach a patch, please apply this.
Comment 1 Jeongsu Kim 2012-12-15 09:41:44 UTC
Created attachment 231615 [details] [review]
check requested context in immodule
Comment 2 Changwoo Ryu 2013-02-13 02:37:26 UTC
*** Bug 693680 has been marked as a duplicate of this bug. ***
Comment 3 Changwoo Ryu 2013-02-13 02:44:20 UTC
Created attachment 235859 [details] [review]
better way to get the context ID than checking the whole contexts

Better patch from bug 693680, using g_hash_table_lookup_extended().
Comment 4 Matthias Clasen 2013-02-14 19:49:03 UTC
Looks reasonable to me (but I haven't tried it)
Comment 5 Matthias Clasen 2013-02-14 19:49:15 UTC
Review of attachment 235859 [details] [review]:

.