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 266206 - Bunch of input method fixes
Bunch of input method fixes
Status: RESOLVED FIXED
Product: GtkHtml
Classification: Other
Component: Editing
unspecified
Other All
: Normal normal
: 2.5
Assigned To: gtkhtml-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2004-09-17 21:25 UTC by Owen Taylor
Modified: 2008-03-11 15:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch with fixes (4.72 KB, patch)
2004-09-17 21:25 UTC, Owen Taylor
needs-work Details | Review
Revised patch (1.11 KB, patch)
2008-03-07 05:39 UTC, Matthew Barnes
committed Details | Review

Description Owen Taylor 2004-09-17 21:25:18 UTC
Here are a bunch of fixes I found while reading through the
input method code in gtkhtml.c. Easiest to just quote the ChangeLog
entry from the patch

Fri Sep 17 13:50:19 2004  Owen Taylor  <otaylor@redhat.com>
                                                                          
     
        * gtkhtml.c (gtk_html_im_retrieve_surrounding_cb): Fix chars/bytes
        confusion for cursor_index parameter of
        gtk_im_context_set_surrounding().
                                                                          
     
        * gtkhtml.c (get_surrounding_text): Fix problem where
        we'd call gtk_im_context_set_surrounding() with an uninitialized
        value for offset.
                                                                          
     
        * gtkhtml.c (unrealize): Set IM context client window to NULL,
        not to widget->window.
                                                                          
     
        * gtkhtml.c (gtk_html_im_delete_surrounding_cb): Handle the
        case where offset < 0 and n_chars < -offset.
                                                                          
     
        * gtkhtml.c (gtk_html_im_preedit_changed_cb): Fix chars/bytes
        confusion for returned cursor position for
        gtk_im_context_get_preedit_string()
Comment 1 Owen Taylor 2004-09-17 21:25:50 UTC
Created attachment 44218 [details] [review]
Patch with fixes
Comment 2 Owen Taylor 2004-09-21 21:10:06 UTC
Turns out that part of this patch is wrong ... the documentation
for GtkIMContext is wrong ... cursor position is in characters,
not bytes.
Comment 3 André Klapper 2005-03-05 15:55:57 UTC
adding patch keyword
Comment 4 Radek Doulik 2005-03-18 10:32:14 UTC
is just the gtk_im_context_get_preedit_string with position in
characters or is also get/set surrounding taking character position as
well?
Comment 5 André Klapper 2005-06-14 12:27:15 UTC
hmm... any news on this?

i'm setting this to needinfo and going to punt the target milestone from 2.1 to
2.3 to get rid of all those old ones.
Comment 6 André Klapper 2006-07-07 13:15:15 UTC
oewn: *poke*
Comment 7 Matthew Barnes 2008-03-07 05:35:13 UTC
I don't know much about input methods, but I had a look at Owen's patch.  Parts of it still look valid.  The GtkIMContext documentation appears to have been corrected, so I'm basing my review on it.


gtk_html_im_retrieve_surrounding_cb:

   This part has already been fixed.

get_surrounding_text:

   This part is correct and still valid.

unrealize:

   This part has already been fixed.

gtk_html_im_delete_surrounding_cb:

   Looks right, as far as I can tell.

gtk_html_im_preedit_changed_cb:

   I don't think this is right.  gtk_im_context_get_preedit_string()
   returns the cursor position in characters.
Comment 8 Matthew Barnes 2008-03-07 05:39:03 UTC
Created attachment 106756 [details] [review]
Revised patch

Here's the remaining pieces of the original patch that are still valid.
Approving for post-GNOME 2.22.0 commit.
Comment 9 Matthew Barnes 2008-03-11 15:35:02 UTC
Committed to trunk (revision 8778).