Updates:
Status: Started
Labels: Component-ibus
Comment #1 on issue 671 by Shawn.P.Huang: Patch to add delete-surrounding
functionality and fix forward-key-event
http://code.google.com/p/ibus/issues/detail?id=671
Just reviewed your patch, and found several problems:
1. The first arg of delete-surrounding should not be unsigned. It is the
character offset from
the cursor position.
2. It is not good to use a1, a2 as the argument name. It is not readable.
3. You removed gdk_event_free ((GdkEvent *)event) after gdk_event_put. It
will cause
memory leak. gdk_event_put does not consumes event, it will make a copy of
the event.
4. It is not a big problem. I would like to use DeleteSurroundingText to
replace
DeleteSurrounding. Because of CJK WG has a draft standard of im plaform. It
use
DeleteSurroundingText. I'd like follow it.
5. For IBUS_CAP_DELETE_SURROUNDING. I think it is better just use
IBUS_CAP_SURROUNDING_TEXT to indicate if engine or clients support
surrending text
related operation.
6. About get surrounding text feature, do you plan to implement it? If yes,
I would like give
some suggestions. gtk and qt use different ways for surrounding text. For
gtk, the im module
should ask surrending text from client application, but qt does not use
this way. It will notify
input method about the surrounding text update continually. I pref to use
qt way. If the
engine and client app both support IBUS_CAP_SURROUNDING_TEXT, the client
app will notify
the engine about each time surrounding text update.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google
Groups "ibus-devel" group.
iBus project web page: http://code.google.com/p/ibus/
iBus dev group: http://groups.google.com/group/ibus-devel?hl=en