diff options
author | Huang Peng <shawn.p.huang@gmail.com> | 2009-02-05 15:25:13 +0800 |
---|---|---|
committer | Huang Peng <shawn.p.huang@gmail.com> | 2009-02-05 15:25:13 +0800 |
commit | 5fc311c8a1195afca7a29006f8d3e785b35c6b00 (patch) | |
tree | 72b31b0f8a3c3ee8b1766d002af3013c4cb44646 /engine/factory.py | |
parent | 87c79e5ebdbac37e6a7533f2d41a3905ca62692a (diff) | |
download | ibus-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.py | 20 |
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) |