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 684511 - Gnumeric wrongly clear the cell while preedit changes.
Gnumeric wrongly clear the cell while preedit changes.
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Sheet Objects
git master
Other Linux
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2012-09-20 23:28 UTC by Weng Xuetian
Modified: 2012-09-23 02:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for fixing this (596 bytes, application/octet-stream)
2012-09-20 23:28 UTC, Weng Xuetian
  Details
Use imcontext's preedit-start/end to avoid unwanted preedit-change. (5.29 KB, patch)
2012-09-21 00:28 UTC, Weng Xuetian
committed Details | Review

Description Weng Xuetian 2012-09-20 23:28:26 UTC
Created attachment 224880 [details]
patch for fixing this

while preedit change the text should still be kept even if it began edit, clear the text will cause some unintend data loss, please check the patch.

Related report:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=687729
Comment 1 Weng Xuetian 2012-09-21 00:28:48 UTC
Created attachment 224884 [details] [review]
Use imcontext's preedit-start/end to avoid unwanted preedit-change.

Use imcontext's preedit-start/end to avoid unwanted preedit-change.

This seems to be far better than use im_block_start_edit hack, need to be polished.
Comment 2 Morten Welinder 2012-09-22 14:47:17 UTC
As long as we can verify that this doesn't affect people using the default
input method, I think something like this can go in.

I really wish there was some authoritative documentation on this stuff.
Comment 3 Weng Xuetian 2012-09-22 15:14:03 UTC
Since "start/end" is maintained in GtkIMContext itself, I'm not sure whether gnumeric want to still to keep some "block" (init and finalize or some special case that I don't know), that's why I mentioned need to be polished, but code used to "wrap-up" reset is quite ugly and useless.

I'm developer of fcitx and also I have read related ibus code throughly.
Well, as from fcitx and ibus code, preedit-start and end will always appear in pairs.
Other built-in im module in GTK don't even use preedit. So they will not be affected.

Another comments is, I think the "if (is_editing)" in preedit-changed callback will never run after this change, I just leave it there if anything bad happens by chance.
Comment 4 Andreas J. Guelzow 2012-09-23 02:04:39 UTC
There does not seem to be any real documentation for correct use of the "preedit-*" signals. So I don't think it should really be used. (We see enough changes breaking documented interfaces so that using a non-documented interface seems to be ill-advised.)

Nevertheless, I have committed your changes since at the moment they seem to cause no negative issues, but I will be the first to rip them out again should we observe any negative behaviour that might be associated with this commit.