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 fba1ec3f781cb5189b46c625d4c69367c4baaa38..d60192c32d3c61f015025e19cea472264c77dbf0 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 c5b53945bdb8c64d65b8bb3bf717e9832db16b6d..46f48ddf0fdf120fa7e5c88a06ff3cbf8d89edfd 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")