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 81031 - (gtkthai) immodules for Thai
(gtkthai)
immodules for Thai
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Input Methods
2.0.x
Other All
: Normal enhancement
: Small feature
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2002-05-07 12:14 UTC by Cholwich Nattee
Modified: 2006-11-29 19:48 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
immodule for Thai keyboard (TIS820-2538) (5.56 KB, text/plain)
2002-05-07 12:16 UTC, Cholwich Nattee
  Details
imthai patch (22.82 KB, patch)
2003-01-14 11:24 UTC, Theppitak Karoonboonyanan
none Details | Review
polished patch (against gtk+ 2.2.1) (23.74 KB, patch)
2003-02-28 16:18 UTC, Theppitak Karoonboonyanan
none Details | Review
Updated patch, against CVS HEAD 2004-11-02 snapshot, with Lao support. (25.79 KB, patch)
2004-11-02 12:40 UTC, Theppitak Karoonboonyanan
none Details | Review
committed patch (32.49 KB, patch)
2006-11-29 01:13 UTC, Behdad Esfahbod
committed Details | Review

Description Cholwich Nattee 2002-05-07 12:14:28 UTC
I just tested gtk+ 2.0.2 and I found that there is a module
,imthai-broken.c, working with Thai input. However, I found in the source
that this module works for converting Thai TIS620 charset to Unicode, such
as from 0xa1 to 0x0e01, which is not useful since I have to set xkb to Thai
in X before I can type Thai and when I set xkb, this module will not necessary.

I think this module had better work for converting qwerty key to Unicode
(in thai) such as 0x64 to 0x0e01. I try to create compose_seqs due to
TIS820-2538 which is This Industrial Standard for Keyboard.
Then, I change the module name to imthai-tis820.c
Comment 1 Cholwich Nattee 2002-05-07 12:16:14 UTC
Created attachment 8250 [details]
immodule for Thai keyboard (TIS820-2538)
Comment 2 Owen Taylor 2002-05-07 16:02:07 UTC
I think that a non-broken Thai input method should just
expect a Thai keyboard map and handle prohibiting or
correcting mis-ordered input sequences. See, the 
thread from:

http://mail.gnome.org/archives/gtk-i18n-list/2001-October/msg00043.html

Much work needs to be done on making switching input methods
and keymaps convenient for users on the Unix desktop, but
I don't think using input methods to substitute for keymaps
helps with that.

Comment 3 Owen Taylor 2002-10-04 18:44:46 UTC
Putting on 'future' as a wishlist item, since I don't think
a Thai-specific input module is needed for correct operation.
Comment 4 Theppitak Karoonboonyanan 2003-01-14 11:22:45 UTC
I have tried hacking out the imthai module, as in the patch 
attached.

Note that my patch in bug #101814 (attachment #13303 [details]) also
enable GTK+ to use Thai XIM through the 
StringConversionCallback. And I hope this imthai patch will
enable elegant Thai input method in non-XFree86 environments
also.
Comment 5 Theppitak Karoonboonyanan 2003-01-14 11:24:22 UTC
Created attachment 13555 [details] [review]
imthai patch
Comment 6 Theppitak Karoonboonyanan 2003-02-28 16:15:38 UTC
I find some bug in fallbacks when the
signals are not handled. So, I have
polished the patch a little more.
Comment 7 Theppitak Karoonboonyanan 2003-02-28 16:18:57 UTC
Created attachment 14691 [details] [review]
polished patch (against gtk+ 2.2.1)
Comment 8 Luis Villa 2004-04-29 15:51:03 UTC
Comment on attachment 13555 [details] [review]
imthai patch

This patch is obsoleted by the newer one.
Comment 9 Theppitak Karoonboonyanan 2004-11-02 12:40:10 UTC
Created attachment 33345 [details] [review]
Updated patch, against CVS HEAD 2004-11-02 snapshot, with Lao support.

In parallel to Lao support in Pango proposed in Bug #156781, I create another
patch using the enhanced tables extracted from the Pango patch. This makes the
IM  support both Lao and Thai in the same module.
Comment 10 Theppitak Karoonboonyanan 2004-11-02 12:43:42 UTC
Added Anousak Souphavanh from Laonux project to Cc: list.
Comment 11 Theppitak Karoonboonyanan 2004-11-21 11:37:50 UTC
Should this bug be targeted to 2.6.0, in parallel to Bug #156781 for Lao support
in Pango?
Comment 12 Behdad Esfahbod 2006-11-27 23:53:28 UTC
Matthias, can I commit this to HEAD and stable and remove thai-im-broken?

I committed thai-lang module to Pango, so Pango now fully supports Thai without any external module.
Comment 13 Matthias Clasen 2006-11-28 02:23:45 UTC
I haven't looked at the patch, but I have no objections to replacing imthai-broken by something better. No need to let this work languish in bugzilla another 2 years...
Comment 14 Behdad Esfahbod 2006-11-29 00:53:58 UTC
Ok, landing this on HEAD.  May I commit to branch too, so it gets in a stable release soonish?
Comment 15 Behdad Esfahbod 2006-11-29 01:13:52 UTC
Created attachment 77319 [details] [review]
committed patch

Committed to HEAD:

2006-11-28  Behdad Esfahbod  <behdad@gnome.org>

        Remove the broken Thai input method and add a functional Thai and Lao
        input method by Theppitak Karoonboonyanan. (#81031)

        * modules/input/imthai.c:
        * modules/input/gtkimcontextthai.c:
        * modules/input/gtkimcontextthai.h:
        * modules/input/thai-charprop.c:
        * modules/input/thai-charprop.h:
        Added.

        * modules/input/imthai-broken.c:
        Removed.

        * modules/input/Makefile.am: 
        Updated.
Comment 16 Behdad Esfahbod 2006-11-29 01:15:00 UTC
Leaving open to get mclasen's ack and commit to branch.
Comment 17 Behdad Esfahbod 2006-11-29 01:15:55 UTC
Thep, can you test Pango HEAD and Gtk+ HEAD and confirm that shaping, line breaking, and input method are all working as expected now?
Comment 18 Theppitak Karoonboonyanan 2006-11-29 03:22:43 UTC
(In reply to comment #17)
> Thep, can you test Pango HEAD and Gtk+ HEAD and confirm that shaping, line
> breaking, and input method are all working as expected now?

For the record, I've tested Pango HEAD and it all works well. And I'll manage to build GTK+ HEAD for testing soon. (Currently, I'm using gtk-2-10 branch as per jhbuild's gnome-2.18 moduleset.)
Comment 19 Theppitak Karoonboonyanan 2006-11-29 03:48:27 UTC
Before testing GTK+ HEAD, I've applied your updated patch to gtk-2-10 branch, for quick test. It works for both Lao and Thai.
Comment 20 Theppitak Karoonboonyanan 2006-11-29 06:48:05 UTC
GTK+ HEAD is also tested. The Thai-Lao input method works here as well.
Comment 21 Matthias Clasen 2006-11-29 12:48:04 UTC
No objection from me for putting it in the stable branch then
Comment 22 Behdad Esfahbod 2006-11-29 19:48:11 UTC
Committed to gtk-2-10 too.