summaryrefslogtreecommitdiff
path: root/ibus
diff options
context:
space:
mode:
authorPeng Huang <shawn.p.huang@gmail.com>2010-10-19 10:26:08 +0900
committerPeng Huang <shawn.p.huang@gmail.com>2010-11-03 10:54:58 +0900
commiteb0c12036b8806c1e0587dba1744cd4998f66d4e (patch)
treeb6388935ae18d349c19d127c083b685bc498d8b0 /ibus
parent164fc1f12467a73c32552292076fd8226873252e (diff)
downloadibus-eb0c12036b8806c1e0587dba1744cd4998f66d4e.tar.gz
Use va_list in IBusEngineDesc and IBusComponent for back compatibility.
Provided by fujiwarat <takao.fujiwara1@gmail.com> Conflicts: bus/engineproxy.c bus/factoryproxy.c bus/ibusimpl.c src/ibuscomponent.c src/ibusenginedesc.c src/test-bus.c src/tests/ibus-global-engine.c
Diffstat (limited to 'ibus')
-rw-r--r--ibus/component.py4
-rw-r--r--ibus/enginedesc.py18
2 files changed, 15 insertions, 7 deletions
diff --git a/ibus/component.py b/ibus/component.py
index a662b706..12f593d0 100644
--- a/ibus/component.py
+++ b/ibus/component.py
@@ -106,6 +106,8 @@ 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)
@@ -121,6 +123,8 @@ 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", "", "", "", "", "", "", "")
diff --git a/ibus/enginedesc.py b/ibus/enginedesc.py
index d8ba28b5..e8a89823 100644
--- a/ibus/enginedesc.py
+++ b/ibus/enginedesc.py
@@ -41,8 +41,8 @@ class EngineDesc(Serializable):
self.__author = author
self.__icon = icon
self.__layout = layout
- self.__hotkeys = hotkeys
self.__rank = rank
+ self.__hotkeys = hotkeys
def get_name(self):
return self.__name
@@ -68,12 +68,12 @@ class EngineDesc(Serializable):
def get_layout(self):
return self.__layout
- def get_hotkeys(self):
- return self.__hotkeys
-
def get_rank(self):
return self.__rank
+ def get_hotkeys(self):
+ return self.__hotkeys
+
name = property(get_name)
longname = property(get_longname)
description = property(get_description)
@@ -82,8 +82,8 @@ class EngineDesc(Serializable):
author = property(get_author)
icon = property(get_icon)
layout = property(get_layout)
- hotkeys = property(get_hotkeys)
rank = property(get_rank)
+ hotkeys = property(get_hotkeys)
def serialize(self, struct):
super(EngineDesc, self).serialize(struct)
@@ -95,8 +95,10 @@ class EngineDesc(Serializable):
struct.append(dbus.String(self.__author))
struct.append(dbus.String(self.__icon))
struct.append(dbus.String(self.__layout))
- struct.append(dbus.String(self.__hotkeys))
struct.append(dbus.UInt32(self.__rank))
+ struct.append(dbus.String(self.__hotkeys))
+ # New properties of EngineDesc will use dict for serialize
+ struct.append(dbus.Array({}, signature=None))
def deserialize(self, struct):
super(EngineDesc, self).deserialize(struct)
@@ -108,8 +110,10 @@ class EngineDesc(Serializable):
self.__author = struct.pop(0)
self.__icon = struct.pop(0)
self.__layout = struct.pop(0)
- self.__hotkeys = struct.pop(0)
self.__rank = struct.pop(0)
+ self.__hotkeys = struct.pop(0)
+ # New properties of EngineDesc will use dict for serialize
+ #value = struct.pop(0)
def test():
engine = EngineDesc("Hello", "", "", "", "", "", "", "", "")