[Uim] refactoring candidate window of gtk-im-uim

Takuro Ashie ashie at good-day.co.jp
Tue Jul 27 10:06:04 EEST 2004


Hi all.

I'm Takuro Ashie, new commiter of uim.

I'm now refactoring the candidate window of gtk-im-uim.
I wanted to share candidate window related codes between gtk-im-uim and
uim-helper-candwin-gtk. Because behavior of each candidate window is too
different, as a result user is confused. 

Now I separated candidate window related codes from gtk/gtk-im-uim.c to
uim-cand-win-gtk.c. Following file is the patch against r1033:

  http://www.homa.ne.jp/~ashie/linux/files/uim-cand-win.diff

# But uim-helper-candwin-gtk doesn't depend on this code yet because this
# code still has a problem (describe later), and we need to modify the
# protocol of candidate window to unify each behavior strictly (I'll
# describe it in another mail).

Although I believe this patch doesn't change any behavior from original
code except buggy one, it may break any functions because I'm not sure
about whole code/functions of uim yet. 
It is the reason I've not commit this code although I already have
account of uim repository.

In addtion to separating the source code, this patch will fix these
problems:

  * shift to invalid page.
    Although I'm not sure about strict reproduce procedure,sometimes
    candidate window of original code switches to the empty page by
    pressing page up/down(on uim-anthy).
  * label doesn't sync on mouse cliking.
  * selection is gone on selecting empty row by mouse clicking.
  * plugged some memory leaks.
  * performance improvement
    Original code always update candidates in layout_candidates(), and
    layout_candidates() is called on each X event, so the original
    candidate window is a little heavy on certain situation like moving
    the window, holding the space key to change selected candidate long
    time, and so on.
    So I separated the funtion for layouting the window and the funtion
    to updating candidates, and modified to set all candidates on
    activating the candidate window. But It's not completed yet. Interface
    of uim_cand_win_gtk_set_candidates() isn't suitable for
    uim-helper-cand-win-gtk because it shouldn't know the content of
    uim_candidate_ struct.
  * simplify the gtk-im-uim.c.

Again It's not completed yet, but I believe this code is usable to
simplify problems around gtk-im-uim bridge.

Can I commit this patch?
Or could you point out problems if exist?

Regards,

--
Takuro Ashie <ashie at good-day.co.jp>




More information about the uim mailing list