Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 131227 - [RHEL4] input preedit string gets replicated in Evolution Cal
Summary: [RHEL4] input preedit string gets replicated in Evolution Cal
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: libgal2
Version: 4.0
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Matthew Barnes
QA Contact:
Whiteboard: RHEL4U3NAK
Depends On:
Blocks: IIIMF 157391 166231
TreeView+ depends on / blocked
Reported: 2004-08-30 06:43 UTC by Lawrence Lim
Modified: 2014-03-26 00:50 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-02-03 16:57:54 UTC
Target Upstream Version:

Attachments (Terms of Use)
a screenshot in the ja locale (deleted)
2004-08-30 06:48 UTC, Lawrence Lim
no flags Details
Patch to tackle preedit buffer duplication problem (deleted)
2006-05-19 10:34 UTC, Mayank Jain
no flags Details | Diff
A better looking patch (deleted)
2006-05-22 11:57 UTC, Mayank Jain
no flags Details | Diff
Another patch (deleted)
2006-07-21 11:16 UTC, Mayank Jain
no flags Details | Diff

System ID Priority Status Summary Last Updated
GNOME Bugzilla 264485 None None None Never

Description Lawrence Lim 2004-08-30 06:43:19 UTC
Description of problem:
In CJK locale, input characters gets replicated when they are not

Version-Release number of selected component (if applicable):
- evolution-data-server-0.0.97-2
- evolution-
- im-sdl-12.0.1-1

How reproducible:

Steps to Reproduce:
1.Select any CJK locale at gdm and log in (in this example, we use Japan)
2.Start Evolution -> Select Cal
3.Ctrl+SPACE to activate the Language Engine
4.Single click any of the time widget and enter 'aka' 
5.Repeat Step 4, you should see the charcters replicating 
Actual results:
Please refer to screen shot

Expected results:
Characers does not get replicated.

Additional info:
Tested in GNOME environment

Comment 1 Lawrence Lim 2004-08-30 06:48:46 UTC
Created attachment 103231 [details]
a screenshot in the ja locale

Comment 2 Lawrence Lim 2004-08-30 08:46:21 UTC
Bug filed upstream.

Comment 3 Lawrence Lim 2004-11-25 03:11:44 UTC
Bug still exist in the latest evolution-data-server.


Comment 4 Dave Malcolm 2005-01-20 21:23:29 UTC
Some problems here: input method can't be activated, since the widget
responds to characters being typed by turning the selected time region
into a text entry field that becomes a new appointment.  There isn't
an initial "become text entry" stage.

Comment 5 Dave Malcolm 2005-01-20 21:39:11 UTC
Seems to be much harder (but still possible) to reproduce with
evolution (as opposed to 2.0.2, where it's 100% reproducable).

Seeing problems in where pressing return to commit the
japanese preedit (for example) leaves it still in a preedit state.

Comment 7 Dave Malcolm 2005-02-10 21:57:10 UTC
See also bug 140813

Comment 8 Leon Ho 2005-04-06 01:01:54 UTC
Moving to U2.

Comment 9 Akira TAGOH 2005-04-19 11:53:47 UTC
looks like when the editing was done, I mean after clicking another cell, the
widget doesn't call gtk_im_context_reset(). so the calendar widget is lacking of
some code for supporting the input methods.

Comment 10 Lawrence Lim 2005-04-26 05:12:58 UTC
Please DO NOT reply to this by email. All additional comments should be made
inthe comments box of this bug report. 
Evolution | Calendar | Ver: 1.5

------- Additional Comments From Yong Sun  2005-04-25 07:01 -------
It seems that e-day-view.c::e_day_view_do_key_press () does not pass this
keypress to gtk immodule.

Comment 11 Lawrence Lim 2005-04-26 23:09:46 UTC
Please DO NOT reply to this by email. All additional comments should be made
inthe comments box of this bug report.
 Evolution | Calendar | Ver: 1.5

------- Additional Comments From Yong Sun  2005-04-26 10:45 -------
Suresh, could you please look at this patch? 

And, if iiim is used as the im module of gtk, gtk_im_context_filter_keypress
()always return true (even before the IM is activated by ctrl+space), while
ximworks fine in this case.

------- You are receiving this mail because: -------
You reported the bug.

Comment 12 Lawrence Lim 2005-04-26 23:16:34 UTC
Please DO NOT reply to this by email. All additional comments should be made
inthe comments box of this bug report.
Evolution | Calendar | Ver: 1.5

Yong Sun changed:
           What    |Removed                     |Added
                 CC|                            |Suresh.Chandrasekharan@Sun.C
                   |                            |OM

------- Additional Comments From Yong Sun  2005-04-26 10:42 -------
--- e-day-view.c.orig   2004-11-30 11:17:51.000000000 +0800
+++    2005-04-26 18:10:10.550333288 +0800

        cal_component_get_uid (comp, &uid);
        if (e_day_view_find_event_from_uid (day_view, uid, &day, &event_num)) {
+               gboolean im_handled = FALSE;
+               EDayViewEvent *edv_event = NULL;
+               GtkIMContext *im_context = NULL;
+               if (day == E_DAY_VIEW_LONG_EVENT) {
+                       edv_event = &g_array_index
+                                                   event_num);
+                } else {
+                       edv_event = &g_array_index
+                                                   event_num);
+                }
+               if (edv_event->canvas_item)
+                       g_object_get (G_OBJECT (edv_event->canvas_item),
+                                     "im_context", &im_context,
+                                     NULL);
+               im_handled = im_context?
gtk_im_context_filter_keypress(im_context, (GdkEventKey*)event): FALSE;
                e_day_view_start_editing_event (day_view, day, event_num,
-                                               initial_text);
+                                               im_handled? NULL:
        } else {
                g_warning ("Couldn't find event to start editing.\n");

------- You are receiving this mail because: -------
You reported the bug.

Comment 13 Lawrence Lim 2005-04-26 23:18:37 UTC
Hi Yong,
From a quick look I think similar issues may be there in week/month views,
didyou test them ?

I have found some weird behaviours with month view when trying to inputjapanese.
Check it, I think we need to have a fix for all those calendar inputissues together.

Pl. let me know if you need any help, I will be away for a while on a
vacation,but ofcouse if this one do affect all views we can make it a stopper
and fix itin one of the later builds in  Cinnabar itself.

------- You are receiving this mail because: -------
You reported the bug.

Comment 14 Lawrence Lim 2005-04-26 23:19:55 UTC
Please DO NOT reply to this by email. All additional comments should be made
inthe comments box of this bug report.
 Evolution | Calendar | Ver: 1.5

------- Additional Comments From suresh  2005-04-26 23:15 -------
Sorry for those comments about Cinnabar, I just forgot this is gnome bugzilla. :(

------- You are receiving this mail because: -------
You reported the bug.

Comment 15 Lawrence Lim 2005-05-12 03:48:11 UTC
------- Additional Comment #9 From Yong Sun  2005-04-27 03:28 UTC -------

Hi, Suresh,

I just found this fix also affects "Work Week" view. While weekly and monthly
view don't have this problem. :)

Comment 18 Dave Malcolm 2005-06-24 23:19:35 UTC
From my reading of the patch suggested upstream, am I right in thinking the
patch covers only some of the calendar views?

Comment 19 Akira TAGOH 2005-06-27 07:15:34 UTC
Sorry for not updating this bug, I missed this.  You won't need any patches for
this as long as you take two patches in Bug#154360.

Comment 20 Dave Malcolm 2005-08-04 19:07:53 UTC
154360 is fixed; so should this one be closed as well?

Comment 22 Akira TAGOH 2005-08-05 08:47:28 UTC
yes, it should be.

Comment 23 Akira TAGOH 2005-09-28 10:56:35 UTC
As I mentioned at, this
problem isn't yet fixed.

Comment 25 Dave Malcolm 2005-10-18 18:53:30 UTC
tagoh: it's not clear from comment #23 which bug you were referring to.

What's the remaining problem here?  comment #22 suggests that it is fixed,
comment #23 that it isn't.

Comment 26 Lawrence Lim 2005-10-19 03:34:59 UTC
Tested in U2, the bug seems to be fixed. 
Tagoh-san, is that anything you wish to clarify in regards to Comment #25?



Comment 27 Akira TAGOH 2005-10-19 03:51:49 UTC
Oops, I'm sorry. correct URL is

Comment 28 Akira TAGOH 2005-10-19 07:21:49 UTC
Comment #26:
Lawrence, I'm not sure how you did test this on RHEL4, unfortunately I can still
reproduce this problem.

The steps how to reproduce this are:
1. run evolution with LANG=ja_JP.UTF-8
2. select the day view on the calendar
3. press 'a' say on any time slot
4. press ctrl+space
5. type a k a
6. click on another time slot (at this time, it leaves the input mode.)
7. press 'a' say (it will enters into the input mode again)
8. press a again

after this step, a<u>ããã</u> will appears on 2nd time slot you clicked at
step 6. the underlining means it's still in the preediting and that reason is
what I said on Comment #27's URL.


Comment 29 Lawrence Lim 2005-10-19 07:53:24 UTC
YES! You are right. I was fooled by my own Bug Description. :p
I switched off the LE and clicked on the second time slot, thanks for pointing
it out.

Comment 31 Dave Malcolm 2005-10-21 23:59:42 UTC
Does Yong Sun's patch in upstream bugzilla fix this problem, at least in one of
the views?  From the discussion in the upstream BZ it looks like we'd have to go
through and fix the various views individually.

Comment 36 Mayank Jain 2006-05-16 10:22:14 UTC
*** Bug 166231 has been marked as a duplicate of this bug. ***

Comment 37 Mayank Jain 2006-05-19 10:34:37 UTC
Created attachment 129593 [details]
Patch to tackle preedit buffer duplication problem

This patch seemingly solves the bug.
Can the QA team kindly confirm this :)


Comment 38 Lawrence Lim 2006-05-19 12:22:09 UTC
Thanks for the patch. We can include this bug in this month's bug sweep if you
have test rpm available.

Comment 40 Lawrence Lim 2006-05-22 07:31:43 UTC
Include a link here will be fine. 

This bug is already a private bug, so private message is not necessary as
everyone able to view this bug will be able to see the comment anyway. :)

Comment 41 Mayank Jain 2006-05-22 11:57:58 UTC
Created attachment 129791 [details]
A better looking patch

Comment 42 Mayank Jain 2006-06-21 08:55:32 UTC
Adding llch to CC.

The upstream code has bugfix for this without the patch in

Matthew, can you please comment on how RHEL bug which need fixes from new code
is to be patched (because of version difference in lots of dependency libraries).

Is the patch in upstream needs to be backported or will we fork from an FC
release for RHEL5?


Comment 43 Matthew Barnes 2006-06-27 20:32:01 UTC
Mayank, Evolution in RHEL5 will probably be FC6 + some updates.

Comment 44 Mayank Jain 2006-07-06 09:10:02 UTC
Hi Matt,

The Patch in seems
to be missing from the latest builds. Can you please apply it to the latest code

As you mentioned, RHEL5 would be FC6+updates, then this patch can go directly
into RHEL5 without backporting. 

Pls let me know if you need any help regarding this.

PS: this is same bug as bug #166231 and bug #157391 & hopefully the same patch
should do.


Comment 45 Matthew Barnes 2006-07-06 16:58:48 UTC
Done - evolution-2.7.3-8

Only two of the three hunks in the patch applied.  The third (plugs a memory
leak) is already fixed upstream.

Changing component from evolution-data-server to evolution.

Comment 46 Mayank Jain 2006-07-21 11:16:53 UTC
Created attachment 132798 [details]
Another patch 

Hi Matthew,
This is another patch from me, kindly apply it & try to reproduce the problem.
If it seems working, kindly put up a reply upstream.

This time we'll include the patch only after its accepted upstrem, so as we
dont have to revert it.


Comment 47 A S Alam 2006-07-21 11:27:11 UTC
Not fixed in latest Version:

Comment 49 RHEL Product and Program Management 2006-08-18 17:56:07 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update

Comment 50 Matthew Barnes 2006-09-01 03:05:13 UTC
devel_ack -- Patch is available, looks pretty simple.

Comment 51 Mayank Jain 2006-09-01 09:00:21 UTC
Matthew, is it okay to accept a patch before its not in upstream?

Comment 52 Matthew Barnes 2006-09-01 14:49:37 UTC
Mayank, I will devel_nack this if the patch doesn't work and we can't produce
one that does by RHEL5 code freeze.

Comment 53 Mayank Jain 2006-09-02 12:48:56 UTC
Matthew, the patch in does
works, even Ikezoe san has confirmed this. However, we are just waiting for
Andre's approval (who is testing the patch). But it seems that he is running
into troubles with activating scim with evo. 

If you have 10 free minutes & have latest evo, can you please apply the patch &
let Andre know on gnome bz, so as we can push this patch in Beta2.

Thanks in advance,

Comment 54 Matthew Barnes 2006-11-08 14:50:30 UTC
Can you address Chen's comment [1] in the upstream bug report?  It sounds like
he noticed some side-effects that might be solved by a gtk_im_context_reset()
(like we did with that recent RHEL-5 bug that I can't remember the number for).


Comment 55 Matthew Barnes 2006-12-08 13:21:47 UTC
Changing component to libgal2.

Comment 56 Matthew Barnes 2006-12-08 13:56:32 UTC
Patch applied to libgal2-2.2.3-11.el4.

Comment 57 Matthew Barnes 2006-12-08 18:55:54 UTC
Had to apply the patch by hand, and I made a typo that causes Evolution to crash.

Here's a better version: libgal2-2.2.3-12.el4

Comment 61 Matthew Barnes 2008-02-03 16:57:54 UTC
Evolution 2.0.2 is only being updated for security issues.  Closing as WONTFIX.

Note You need to log in before you can comment on or make changes to this bug.