summaryrefslogtreecommitdiff
path: root/ibus
diff options
context:
space:
mode:
authorfujiwarat <takao.fujiwara1@gmail.com>2011-07-12 15:14:59 +0900
committerfujiwarat <takao.fujiwara1@gmail.com>2011-07-12 15:14:59 +0900
commit48cc200d7dbe999f92b05507a7c59bea42ac6f1c (patch)
tree0be49a325f20620a1facc2e8965b48917159088c /ibus
parent290a37e1d4e3ec44dfea4b99744520f781c92592 (diff)
downloadibus-48cc200d7dbe999f92b05507a7c59bea42ac6f1c.tar.gz
Fixed an error in IBus.Bus.register_component
TEST=Linux desktop Review URL: http://codereview.appspot.com/4668060
Diffstat (limited to 'ibus')
-rw-r--r--ibus/component.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/ibus/component.py b/ibus/component.py
index 12f593d0..7255ee1c 100644
--- a/ibus/component.py
+++ b/ibus/component.py
@@ -94,6 +94,11 @@ class Component(Serializable):
engine = EngineDesc(name, longname, description, language, license, author, icon, layout, hotkeys)
self.__engines.append(engine)
+ def add_engines(self, engines):
+ if not isinstance(engines, list):
+ raise TypeError("engines must be an instance of list")
+ self.__engines.extend(engines)
+
def serialize(self, struct):
super(Component, self).serialize(struct)
struct.append (dbus.String(self.__name))
@@ -106,8 +111,6 @@ class Component(Serializable):
struct.append (dbus.String(self.__textdomain))
struct.append (dbus.Array(map(serialize_object,self.__observed_paths), signature="v"))
struct.append (dbus.Array(map(serialize_object,self.__engines), signature="v"))
- # New properties of Component will use dict for serialize
- struct.append(dbus.Array({}, signature=None))
def deserialize(self, struct):
super(Component, self).deserialize(struct)
@@ -123,8 +126,6 @@ class Component(Serializable):
self.__observed_paths = map(deserialize_object, struct.pop(0))
self.__engines = map(deserialize_object, struct.pop(0))
- # New properties of Component will use dict for serialize
- #value = struct.pop(0)
def test():
text = Component("Hello", "", "", "", "", "", "", "")