Change preedit's background color.
authorHuang Peng <shawn.p.huang@gmail.com>
Thu, 12 Jun 2008 02:58:03 +0000 (10:58 +0800)
committerHuang Peng <shawn.p.huang@gmail.com>
Thu, 12 Jun 2008 02:58:03 +0000 (10:58 +0800)
engine/anthy/engine.py
ibus/interface/iengine.py

index fba1ec3..d60192c 100644 (file)
@@ -170,7 +170,7 @@ class Engine (interface.IEngine):
 
                attrs = ibus.AttrList ()
                attrs.append (ibus.AttributeUnderline (pango.UNDERLINE_SINGLE, 0, len (self._convert_chars)))
-               attrs.append (ibus.AttributeBackground (ibus.RGB (200, 200, 200),
+               attrs.append (ibus.AttributeBackground (ibus.RGB (200, 200, 240),
                                pos - len (self._segments[self._cursor_pos][1]),
                                pos))
                self.UpdatePreedit (dbus.String (self._convert_chars),
@@ -322,6 +322,8 @@ class Engine (interface.IEngine):
 
 
        def _on_key_common (self, keyval):
+               if self._convert_begined:
+                       return True
                self._input_chars += unichr (keyval)
                self._cursor_pos += 1
                self._invalidate ()
index c5b5394..46f48dd 100644 (file)
@@ -63,7 +63,7 @@ class IEngine (dbus.service.Object):
        @signal (signature="ubu")
        def ForwardKeyEvent (self, keyval, is_press, state): pass
 
-       @signal (signature="saaiib")
+       @signal (signature="saauib")
        def UpdatePreedit (self, text, attrs, cursor_pos, visible): pass
 
        @signal (signature="svb")