Re: Yiddish input method

On Wed, 2003-03-19 at 15:37, Raphael Finkel wrote:
> > from Owen Taylor <otaylor redhat com>, Mar 19, Re: Yiddish input method      
> >
> > > I discovered that gtk+ does a context reset in places I think it
> > > shouldn't.  Supposedly, gtk+ only does context reset when the user moves
> > > the cursor to a new position by clicking somewhere.  But in an entry
> > > widget, such as that used to elicit a file name, gtk+ is calling my context
> > > reset routine after each keystroke, which confuses my input method.
> > 
> > Can you find out what is making reset get called? (Put a breakpoint, do a
> > backtrace)
> It looks like it is being called as a deep side-effect of the commit that my
> code calls.
> #0  0x4028ea54 in my_context_reset (context=0x8142988) at imyiddish.c:347
> #1  0x4011f651 in gtk_im_context_reset (context=0x8142988)
>     at gtkimcontext.c:374
> #2  0x401215de in gtk_im_multicontext_reset (context=0x813a628)
>     at gtkimmulticontext.c:322
> #3  0x4011f651 in gtk_im_context_reset (context=0x813a628)
>     at gtkimcontext.c:374
> #4  0x401046e9 in gtk_entry_reset_im_context (entry=0x813a4f0)
>     at gtkentry.c:2762
> #5  0x40102c91 in gtk_entry_real_set_position (editable=0x813a4f0, position=2)
>     at gtkentry.c:1729
> #6  0x401002f2 in gtk_editable_set_position (editable=0x813a4f0, position=2)
>     at gtkeditable.c:136
> #7  0x40103bd8 in gtk_entry_enter_text (entry=0x813a4f0, str=0x8145a28 "�\234")
>     at gtkentry.c:2305

Hmmm, what version of GTK+ are you using?

Mon Dec 16 21:39:28 2002  Owen Taylor  <otaylor redhat com>
        * gtk/gtkentry.c (gtk_entry_enter_text): Call
        gtk_entry_set_position_internal() that takes a
        new "reset_IM" parameter, so that we avoid the
        problem where committing text would reset the
        input method. (#74381, Kang Jeong-Hee)

> >   I'm not really sure what the issue you are trying to solve with the
> >   delayed commit is ... it strikes me as a little odd to be able to
> >   backspace through arbitrary amounts text and convert shin => sin, 
> >   especially if you can't do the same thing when moving the cursor
> >   around.
> I am not delaying a commit; I am committing something on every keystroke, but
> sometimes I need to go back and change what I have committed.  The result is a
> very pleasant look and feel; you always see text that is correct with respect
> to what you have entered so far.

Are you you using gtk_im_context_delete_surrounding ()? ... that's
the only way that can back and change what you have committed already..

Or are you simply doing partial commits?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]