summaryrefslogtreecommitdiff
path: root/engine/factory.py
diff options
context:
space:
mode:
authorHuang Peng <shawn.p.huang@gmail.com>2009-02-05 15:25:13 +0800
committerHuang Peng <shawn.p.huang@gmail.com>2009-02-05 15:25:13 +0800
commit5fc311c8a1195afca7a29006f8d3e785b35c6b00 (patch)
tree72b31b0f8a3c3ee8b1766d002af3013c4cb44646 /engine/factory.py
parent87c79e5ebdbac37e6a7533f2d41a3905ca62692a (diff)
downloadibus-anthy-c_impl.tar.gz
Migrate ibus-anthy to ibus-1.1.xc_impl
Diffstat (limited to 'engine/factory.py')
-rw-r--r--engine/factory.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/engine/factory.py b/engine/factory.py
index f2d7105..d460bde 100644
--- a/engine/factory.py
+++ b/engine/factory.py
@@ -39,14 +39,12 @@ class EngineFactory(ibus.EngineFactoryBase):
CREDITS = "GPLv2"
def __init__(self, bus):
- self.__info = [
- self.NAME,
- self.LANG,
- self.ICON,
- self.AUTHORS,
- self.CREDITS
- ]
-
- super(EngineFactory, self).__init__(self.__info, engine.Engine, ENGINE_PATH, bus, FACTORY_PATH)
-
-
+ self.__bus = bus
+ self.__id = 0
+ super(EngineFactory, self).__init__(bus)
+
+ def create_engine(self, engine_name):
+ if engine_name == "anthy":
+ self.__id += 1
+ return engine.Engine(self.__bus, "/org/freedesktop/IBus/Anthy/%d" % self.__id)
+ return super(EngineFactory, self).create_engine(engine_name)