Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 24657 - Patch for gaim CJK input problem with immodules
Summary: Patch for gaim CJK input problem with immodules
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gaim Bugs Crew
URL:
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2003-07-17 04:37 UTC by Park Ji-in
Modified: 2003-11-27 22:51 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild. (gaim-0.65.ebuild,2.00 KB, text/plain)
2003-07-17 04:38 UTC, Park Ji-in
Details
patch for cjk input. (gaim_gtkimcontext_patch.diff,529 bytes, patch)
2003-07-17 04:42 UTC, Park Ji-in
Details | Diff
ebuild (gaim_gtkimcontext_patch.diff,529 bytes, text/plain)
2003-07-17 04:48 UTC, Park Ji-in
Details
patch updated to fix XIM event loop (gaim_gtkimcontext_patch.diff,1.09 KB, patch)
2003-08-03 04:36 UTC, Botond Botyanszki
Details | Diff
modifed to gaim-0.66 (gaim_gtkimcontext_patch.diff,1.08 KB, patch)
2003-08-03 07:20 UTC, Park Ji-in
Details | Diff
Botond's patch which modified to gaim 0.68. (gaim_gtkimcontext_patch.diff,1.10 KB, patch)
2003-09-06 16:28 UTC, Park Ji-in
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Park Ji-in 2003-07-17 04:37:07 UTC
this is based gaim-0.64-r2.ebuild.

also, this ebuild contain patch from the im-ja package.



Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Park Ji-in 2003-07-17 04:38:30 UTC
Created attachment 14613 [details]
ebuild.
Comment 2 Park Ji-in 2003-07-17 04:42:57 UTC
Created attachment 14614 [details, diff]
patch for cjk input.
Comment 3 Park Ji-in 2003-07-17 04:45:13 UTC
Comment on attachment 14613 [details]
ebuild.

# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /home/cvsroot/gentoo-x86/net-im/gaim/gaim-0.64.ebuild,v 1.5
2003/07/09 14:11:56 lostlogic Exp $

IUSE="nls perl spell ssl nas cjk"

DESCRIPTION="GTK Instant Messenger client"
HOMEPAGE="http://gaim.sourceforge.net/"
EV=2.00
SRC_URI="mirror://sourceforge/gaim/${P}.tar.bz2
	ssl? ( mirror://sourceforge/gaim-encryption/encrypt-${EV}.tar.gz )"


SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~x86 ~ppc ~alpha ~sparc"

DEPEND="=sys-libs/db-1*
	>=x11-libs/gtk+-2.0
	>=dev-libs/glib-2.0
	nas? ( >=media-libs/nas-1.4.1-r1 )
	nls? ( sys-devel/gettext )
	media-libs/libao
	>=media-libs/audiofile-0.2.0
	perl? ( >=dev-lang/perl-5.6.1 )
	ssl? ( dev-libs/nss )
	spell? ( >=app-text/gtkspell-2.0.2 )"

src_unpack() {
	unpack ${P}.tar.bz2
	use ssl && {
		cd ${S}/plugins
		unpack encrypt-${EV}.tar.gz
		cd encrypt
		epatch patchfile.0.65
		cd ../..
		touch aclocal.m4 config.h.in Makefile.in */Makefile.in
*/*/Makefile.in */*/*/Makefile.in configure
	}
	use cjk && {
		cd ${S}/src
		epatch ${FILESDIR}/gaim_gtkimcontext_patch.diff
	}
}

src_compile() {

	local myconf
	use perl || myconf="${myconf} --disable-perl"
	use spell || myconf="${myconf} --disable-gtkspell"
	use nls  || myconf="${myconf} --disable-nls"
	use nas && myconf="${myconf} --enable-nas" || myconf="${myconf}
--disable-nas"

	econf ${myconf} || die "Configuration failed"
	emake || die "Make failed"
}

src_install() {
	einstall || die "Install failed"
	dodoc ABOUT-NLS AUTHORS HACKING INSTALL NEWS README TODO ChangeLog
}

pkg_postinst() {
	if [ `use ssl` ]; then
		ewarn
		ewarn "You have chosen (by selecting 'USE=ssl') to install"
		ewarn "the gaim-encryption plugin (
http://gaim-encryption.sf.net/ )"
		ewarn "this plugin is NOT supported by the Gaim project, and if
you"
		ewarn "expierence problems related to it, contact the Gentoo
project"
		ewarn "via http://bugs.gentoo.org/ or the gaim-encryption
project."
		ewarn
	fi
}
Comment 4 Park Ji-in 2003-07-17 04:48:13 UTC
Created attachment 14615 [details]
ebuild

delete unneccesary line
echo `pwd`.

however, sorry that i'm not good at using bugzilla. please forgive me that i
submit unnecessary comment ;)
Comment 5 Brandon Low (RETIRED) gentoo-dev 2003-07-17 08:24:00 UTC
in gaim-0.65-r1 soon.
Comment 6 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-07-17 09:48:56 UTC
Hi.

I tested your patch and ebuild provided above with XIM and found 
that it makes it difficult to input messages via XIM. Running gaim,
when I turn XIM (this time I tested skkinput and kinput2) on,
I could input as many characters as I want, but once I press
Ctrl or Return key, always it freezes :( If I remove the patch
from the ebuild, this problem doesn't occur.

Do you know any workaround with the problem?
Comment 7 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-07-17 10:22:20 UTC
Now I know what was the problem you described before, mithrandir.
It will solve the cjk's input problem with im-ja, but it will cause
many problems with other XIMs, skkinput, kinput (both are Japanese 
XIM) and chinput (Chinese Big5 XIM). Even though ami, Korean IM, 
doesn't have this problem as mithrandir reported on IRC, I think
we should think better way to apply the patch.
Comment 8 Georgi Georgiev 2003-07-20 04:52:33 UTC
The patch breaks stuff here as well, as I usually use kinput2 (I wanted to report it but found it is reported already).

Since the big problem in gaim usually is that pressing Enter sends the message, a workaround would be to press Shift+Enter when you want to insert the converted text. This workaround should work with most input methods.

Until the patch is officially pulled, I have to remember to USE=-cjk emerge gaim.
Comment 9 Park Ji-in 2003-07-20 05:59:21 UTC
problem is simple. when we call gtk_im_context_filter_keypress() for one,same event, then key_press_event emitted infintely. Even if the return value of gtk_im_context_filter_keypress() is FALSE (this means im doesnt handle that keystroke(or event?).

I test in XIM(skkinput, ami) , imhangul, im-ja. I cant find any problem that is not XIM. but skkinput has problem, and ami too. but the keystroke that occur problem is different. ami's problem-keystroke is backspace. and skkinput is shift. (in my case). 

I wonder it is bug of gtk2's XIM input module or XIM itself. 
This is not simple problem for me :( anyway I'm finding why this occur. If you want, please help me.
Comment 10 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-08-01 18:17:38 UTC
I suggest that we change use cjk to use immodule and add an entry
for immodule local USE flag as:

net-im/gaim:immodule - Enables GTK+2 immodule input method support

or something like it. Since gaim-0.66-r2.ebuild was marked stable
yesterday, not a few XIM users think gaim is broken, rush to
file a bug report and find this bug ;-(

gaim_gtkimcontext_patch.diff should be applied only if users know
what to do because it changes default behaviour of gaim and not all cjk
users want this patch (because immodule has known to be unstable for
everyday use and is not widely used at least among Japanese). 

I'm not going to say we should remove the patch because some
people have a benefit from it, but I want to emphasise that it
should not do harm to existing users and we better stop nonsense
of emerging gaim with USE="-cjk" even when we want to use cjk
languages.
Comment 11 Kalin KOZHUHAROV 2003-08-03 02:47:58 UTC
Ok, I was just debugging the 0.66-r2 gaim with USE=+cjk and I found that this is already a known problem...

So, marking something as stable and applying a patch that break things (gaim locks up when presiing Shift or Ctrl or something else while kinput2 is active) is a BAD THING(tm).

As long as we don't have separate useflags for chinese, japanese, etc. (and AFAIS, it is dependant on the input method, not language), I'd suggest omit the path by default, so people with +cjk can use gaim "the old way" (press Shift+Enter).

Comment 12 Botond Botyanszki 2003-08-03 04:36:30 UTC
Created attachment 15428 [details, diff]
patch updated to fix XIM event loop

I have modified my original patch so that it works with gtkxim (tested kinput2)
and im-ja as well.  I hope it will please everybody now.

(I just don't know why I keep spending my time on things mostly irrelevant to
me such as gaim and gentoo...)
Comment 13 Park Ji-in 2003-08-03 07:20:35 UTC
Created attachment 15435 [details, diff]
modifed to gaim-0.66

modified boti's gaim patch for gaim-0.66 source.
thanks to boti. ;)
Comment 14 Park Ji-in 2003-08-03 07:34:35 UTC
Comment on attachment 15435 [details, diff]
modifed to gaim-0.66

I test boti's new patch , and it works FINE at skkinput and ami. I think it
works also with kinput. please change patch with. thanks.
Comment 15 Don Seiler (RETIRED) gentoo-dev 2003-08-03 17:50:19 UTC
OK testing out this new patch and will add a revision bump to alert users to the new patch.  Will let you know when it's checked in.
Comment 16 Don Seiler (RETIRED) gentoo-dev 2003-08-03 18:01:27 UTC
OK gaim-0.66-r3 is in portage and is in STABLE, as the only change from the stable gaim-0.66-r2 is this patch.  I know this is taboo but 0.66-r2 wasn't working for cjk so I see no harm in bumping this in right away.  Non-cjk users will see absolutely no change.

Please test out and verify.
Comment 17 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-08-03 21:44:28 UTC
Thanks for the patch and revision bump.  I tested it with skkinput
and kinput2 and saw no problem.  I'm absolutely sure CJK users will
appreciate Botond, Park and Don's work. I think it would be nice
to add Botond's name to ChangeLog in respect to fixing the bug
(this bug was so annoying for Japanese gaim users that some of us
masked >=gaim-0.65-r1 completely rather than emerging every now and 
then with USE="-cjk", since there were so many releases after that...).
Comment 18 Don Seiler (RETIRED) gentoo-dev 2003-08-04 04:56:19 UTC
You are absolutely right.  I've added a thanks to Botond Botyanszki and Park Ji-in in the ChangeLog, which should have been there from the start.  I really deserve no credit as all I did was add files into CVS.  :p

Anyway as soon as I hear back from Park Ji-in I'll feel comfortable resolving this bug fixed.

Comment 19 Don Seiler (RETIRED) gentoo-dev 2003-08-04 04:59:34 UTC
By the way I take responsibility and apologize for marking 0.66-r2 stable without getting this bug taken care of.  I realize that it is causing a lot of trouble for C/J/K users and can be incredibly frustrating to have to work around all of the time.
Comment 20 Botond Botyanszki 2003-08-04 05:12:17 UTC
I have filed a bug against gtk, because I think the event-loop should be blocked in the input module, not in the signal handler as in the patch.

See http://bugzilla.gnome.org/show_bug.cgi?id=119075
Comment 21 Park Ji-in 2003-08-04 10:53:19 UTC
I just happy using gaim FINE. thanks to all of you :) 
Comment 22 Don Seiler (RETIRED) gentoo-dev 2003-08-04 11:16:16 UTC
Alright I'm closing this bug as FIXED.

Thanks again you guys.
Comment 23 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-08-19 05:30:27 UTC
Hi, I just noticed that after emerging gaim with this patch
skkinput doesn't work well (it is alright with kinput2).
When I use skkinput, at first hand nothing wrong but
everytime immediately after I send a message the first 
character I type will not be passed through to skkinput
(so I have to erase first character for each message :-/ ).

A screenshot is available at http://www.usata.org/misc/gaim-skkinput.png
(I tried to send the same message twice, but failed to input the second time)

This only happens when I input hiragana/katakana with skkinput.
If I input kanji (that means I press Shift key altogether)
it will sucessfully be passed to skkinput.  If I don't use
the patch, this problem doesn't occur.

Now I'm using kinput2 only for the sake of gaim :-(
Comment 24 Georgi Georgiev 2003-08-19 05:36:13 UTC
Could you try emerging gaim-0.67 without the patch (it doesn't apply anyway).

I think the problem may be fixed in gaim itself. I have no problem using kinput2 without the patch.

I have a custom ebuild on my mirror if you want:
rsync://gg3.net/gentoo-portage-chutz/net-im/gaim/
Comment 25 Don Seiler (RETIRED) gentoo-dev 2003-08-19 06:53:56 UTC
I have what will be the gaim-0.67.ebuild (no cjk support yet since the patch didn't take anyway.  gaim really changed their headers) in Bug 26806.

Wasn't it actually the case that this was a problem on gnome/gtk's side of the fence?  I saw that they closed that bug as invalid.

I don't use CJK so I'll need to lean heavily on you guys to come up with a fixed fix.
Comment 26 Botond Botyanszki 2003-08-19 07:25:30 UTC
I just tried 0.67 (straight from sf) and it doesn't seem to be fixed. I looked at the source as well and it didn't change anything in this respect. 

Please note that you can still use gaim with CJK input with the unpatched version if you set your preferences so that gaim uses CTRL-Enter and disable Enter under Interface->shortcuts. (Maybe this is what Georgi did?!)
See this thread also:
http://sourceforge.net/mailarchive/forum.php?thread_id=2871169&forum_id=29602

Another dirty fix would be to remove the g_signal_connect(line 3454, and 3552) from gtkconv.c (with a patch) when CJK is set but I wouldn't recommend this.

I think that with the patch applied, only skkinput users will see odd behaviour, this is still better than all CJK users. Unfortunately I don't have the time to look for the fix with skkinput. 

This bug is rather on gaim's side of the fence than GTK's. Though the bug I filed against GTK (lockup with kinput2) was invalid for some reason, I need to talk to Owen about this.

Hope this clears thing up. I leave it up to the package maintainer what solution he choses.

Comment 27 Georgi Georgiev 2003-08-19 07:35:29 UTC
My bad. This patch we're talking about was introducing so many problems I got used to pressing Shift+Enter and sort of forgot what the original problem was :(. I confirm the problem is not fixed.
Comment 28 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-08-19 08:41:56 UTC
I totally agree with Botond's opinion.  I tried gaim-0.67 and found
the original problem (I first didn't recognise it since I set
CTRL-Enter to send a message in preference, as Botond suggested).
gaim-0.67 works perfectly fine in terms of kinput2 and skkinput, 
because they use XIM to talk to gaim.  This is not GTK+/GNOME problem 
but gaim's problem.  I can use gedit with skkinput having no problem.
Comment 29 Park Ji-in 2003-09-06 16:28:53 UTC
Created attachment 17201 [details, diff]
Botond's patch which modified to gaim 0.68. 

same as 0.66's and so. I test this with im-ja, imhangul, skkinput. and works
fine. (in my case) 
I suggest reinput this patch in portage, because there is someone who want this
patch to use.
Comment 30 Martin Holzer (RETIRED) gentoo-dev 2003-10-12 23:12:44 UTC
gaim 0.71 is latest
Comment 31 Park Ji-in 2003-10-13 08:44:59 UTC
What a fast response :)

Anyway, that patch also works for gaim-0.71.

Tested by imhangul, nabi (these are korean), and im-ja, skkinput (these are
japanese).

Comment 32 Brandon Low (RETIRED) gentoo-dev 2003-10-25 16:12:18 UTC
Will look into this further, has anyone seen any detrimental effects with
this patch?
Comment 33 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-10-25 23:15:45 UTC
As I described in comment #23, the patch has a problem with skkinput.However,
most people will have benefits from the patch (only skkinput'speople are
affected) and they were having input problem atm. I agree with adding the
patch by default or USE="cjk", but it would be nice to be able to turn it
off by local USE flag such as "noimmodule" (as I describedin comment #10).
Comment 34 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-11-07 03:27:46 UTC
Hi! Welcome back, rizzo :) Is there any chance the patch committed
again? I think applying it when USE="cjk" is fine (though I suggest
local USE flag "noimmodules" might be useful). If you are not sure or
don't have test environment about the patch, I'd like to add cjk herd
to gaim and maintain the patch. What do you think of it?
Comment 35 Don Seiler (RETIRED) gentoo-dev 2003-11-10 10:04:55 UTC
Can you verify the patch works with gaim-0.72?
Comment 36 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-11-10 11:52:46 UTC
Attachment 17201 [details, diff] applies to gaim-0.72-r1.ebuild and works fine.
(Still have the probmle described in Comment #23, though)
Comment 37 Don Seiler (RETIRED) gentoo-dev 2003-11-10 12:34:00 UTC
If you feel that it works despite the problems you mention in Comment 23,
I'll go ahead and suggest to lostlogic that we add the patch back in.
Comment 38 Don Seiler (RETIRED) gentoo-dev 2003-11-11 07:31:21 UTC
Just one more thing as well:  Have you guys brought this bug up to the Gaim
developers?
Comment 39 Don Seiler (RETIRED) gentoo-dev 2003-11-12 09:06:21 UTC
I will probably commit this and have a postinstall warning about the possible issues in comment 23.

lostlogic let me know if you have an issue with this.
Comment 40 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-11-12 10:54:51 UTC
Oh well, I should have done so. I submitted a bug to Gaim sf.net ->
http://sourceforge.net/tracker/index.php?func=detail&aid=840904&group_id=235&atid=100235

I'm okay with the solution in Comment #39.
Comment 41 Don Seiler (RETIRED) gentoo-dev 2003-11-12 11:36:02 UTC
gaim-0.72-r2 checked into CVS.
Comment 42 Don Seiler (RETIRED) gentoo-dev 2003-11-22 07:53:56 UTC
Just an FYI that gaim-0.73 is out and the patch as is fails to take.  I'll see if I can see what needs to be changed.
Comment 43 Don Seiler (RETIRED) gentoo-dev 2003-11-22 07:55:31 UTC
Looking at the sourceforge bug that usata filed, is the CJK patch posted here even necessary?
Comment 44 Don Seiler (RETIRED) gentoo-dev 2003-11-22 08:07:26 UTC
OK I redid the patch.  Line numbers just got bumped down it seems.

Releasing soon.
Comment 45 Don Seiler (RETIRED) gentoo-dev 2003-11-22 08:16:53 UTC
Looking again at usata's bug.  It seems that at the very least I don't need the postinfo warning about CJK input now.

Can anyone confirm?  I don't use CJK, despite my being half-Korean.  I don't need to tell you how disappointed my mom is in that.
Comment 46 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-11-22 20:04:15 UTC
I talked with mithrandir at IRC few days ago, and found freeze bugs of
some input methods were fixed, while other bugs weren't. I tested only
a couple of input methods and reported it was fixed but I was wrong
about it. I was going to test as many input methods as possible and
reopen that bug (but I haven't much time to do that until today).

In short, we still need the patch.
Comment 47 Botond Botyanszki 2003-11-22 20:15:55 UTC
Looking at the diff for gtkconv.c between 0.67 and 0.72 I don't see a single line of change that would fix this problem. Maybe it's just my bad eyes...
And the comment "I believe it is fixed" on the SF bugtracker isn't very technical either.
Comment 48 Don Seiler (RETIRED) gentoo-dev 2003-11-26 08:52:52 UTC
Should I still be presenting the postinfo warning about Comment 23?
Comment 49 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-11-27 22:51:16 UTC
Sorry for late response. skkinput has trouble with the patch in
gaim-0.74.ebuild, so we still need that message in postinst.