Ejemplo n.º 1
0
    def __init__(self, exec_by_ibus):
        self.__component = ibus.Component(BUS_NAME,
                                          BUS_DESCRIPTION,
                                          VERSION,
                                          LICENSE,
                                          AUTHOR,
                                          HOMEPAGE)

        self.__component.add_engine(ENGINE_NAME,
                                    ENGINE_LONG_NAME,
                                    ENGINE_DESCRIPTION,
                                    LANGUAGE,
                                    LICENSE,
                                    AUTHOR,
                                    ICON,
                                    LAYOUT)


        self.__mainloop = gobject.MainLoop()
        self.__bus = ibus.Bus()
        self.__bus.connect("disconnected", self.__bus_disconnected_cb)
        self.__factory = factory.EngineFactory(self.__bus)
        if exec_by_ibus:
            self.__bus.request_name(BUS_NAME, 0)
        else:
            self.__bus.register_component(self.__component)
Ejemplo n.º 2
0
    def __init__(self, dbfile, exec_by_ibus):
        self.__mainloop = gobject.MainLoop()
        self.__bus = ibus.Bus()
        self.__bus.connect("disconnected", self.__bus_destroy_cb)
        self.__factory = factory.EngineFactory(self.__bus, dbfile)
        self.destroied = False
        if exec_by_ibus:
            self.__bus.request_name("org.freedesktop.IBus.Table", 0)
        else:
            self.__component = ibus.Component("org.freedesktop.IBus.Table",
                                              "Table Component", "0.1.0",
                                              "GPL",
                                              "Yuwei Yu <*****@*****.**>")
            # now we get IME info from self.__factory.db
            name = self.__factory.db.get_ime_property("name")
            longname = name
            description = self.__factory.db.get_ime_property("description")
            language = self.__factory.db.get_ime_property("languages")
            license = self.__factory.db.get_ime_property("credit")
            author = self.__factory.db.get_ime_property("author")
            icon = self.__factory.db.get_ime_property("icon")
            if icon:
                icon = os.path.join(icon_dir, icon)
                if not os.access(icon, os.F_OK):
                    icon = ''
            layout = self.__factory.db.get_ime_property("layout")

            self.__component.add_engine(name, longname, description, language,
                                        license, author, icon, layout)
            self.__bus.register_component(self.__component)
Ejemplo n.º 3
0
 def __init__(self, exec_by_ibus):
     self.__component = ibus.Component(
         "org.freedesktop.IBus.GooglePinyin", "GooglePinyin Component",
         "0.1.1", "GPL", "Jiahua Huang <*****@*****.**>")
     self.__component.add_engine("googlepinyin", "googlepinyin",
                                 "GooglePinyin", "zh_CN", "GPL",
                                 "Jiahu Huang <*****@*****.**>", "",
                                 "en")
     self.__mainloop = gobject.MainLoop()
     self.__bus = ibus.Bus()
     self.__bus.connect("destroy", self.__bus_destroy_cb)
     self.__factory = factory.EngineFactory(self.__bus)
     if exec_by_ibus:
         self.__bus.request_name("org.freedesktop.IBus.GooglePinyin", 0)
     else:
         self.__bus.register_component(self.__component)
Ejemplo n.º 4
0
 def __init__(self, exec_by_ibus):
     self.__component = ibus.Component(
         "org.freedesktop.IBus.EnchantPython", "Enchant Python Component",
         "0.1.0", "GPL", "Peng Huang <*****@*****.**>")
     self.__component.add_engine("enchant-python", "enchant python",
                                 "English Enchant", "en", "GPL",
                                 "Peng Huang <*****@*****.**>", "",
                                 "en")
     self.__mainloop = gobject.MainLoop()
     self.__bus = ibus.Bus()
     self.__bus.connect("disconnected", self.__bus_disconnected_cb)
     self.__factory = factory.EngineFactory(self.__bus)
     if exec_by_ibus:
         self.__bus.request_name("org.freedesktop.IBus.EnchantPython", 0)
     else:
         self.__bus.register_component(self.__component)
Ejemplo n.º 5
0
 def __init__(self, exec_by_ibus):
     self.__component = ibus.Component(
         "org.freedesktop.IBus.Sulekha", "Sulekha Component", "0.1.0",
         "GPL", "Peng Huang <*****@*****.**>")
     self.__component.add_engine("sulekha", "Sulekha",
                                 "Sulekha Input method", "ml_IN", "GPL",
                                 "Peng Huang <*****@*****.**>", "",
                                 "en")
     self.__mainloop = gobject.MainLoop()
     self.__bus = ibus.Bus()
     self.__bus.connect("destroy", self.__bus_destroy_cb)
     self.__factory = factory.EngineFactory(self.__bus)
     if exec_by_ibus:
         self.__bus.request_name("org.freedesktop.IBus.Sulekha", 0)
     else:
         self.__bus.register_component(self.__component)
Ejemplo n.º 6
0
    def __init__(self, exec_by_ibus):
        print("IM App initialzation begin")
        self.__component = ibus.Component(
            "org.freedesktop.IBus.WaitZar", "WaitZar Component", "1.0.0",
            "GPLv3", "Seth N. Hetu <*****@*****.**>")
        self.__component.add_engine("waitzar", "waitzar", "Myanmar WaitZar",
                                    "my", "GPLv3",
                                    "Seth N. Hetu <*****@*****.**>",
                                    "", "en")
        self.__mainloop = gobject.MainLoop()
        self.__bus = ibus.Bus()
        self.__factory = factory.EngineFactory(self.__bus)
        if exec_by_ibus:
            self.__bus.request_name("org.freedesktop.IBus.WaitZar", 0)
        else:
            self.__bus.register_component(self.__component)

        print("IM App initialzation end")
Ejemplo n.º 7
0
 def __init__(self, exec_by_ibus):
     self.__component = ibus.Component("org.freedesktop.IBus.Plover",
                                       "Plover IBus",
                                       "0.1.0",
                                       "GPL",
                                       "Rick Lupton")
     self.__component.add_engine("plover",
                                 "plover",
                                 "Plover",
                                 "en",
                                 "GPL",
                                 "Rick Lupton",
                                 "",
                                 "en")
     self.__mainloop = gobject.MainLoop()
     self.__bus = ibus.Bus()
     self.__bus.connect("disconnected", self.__bus_disconnected_cb)
     self.__factory = factory.EngineFactory(self.__bus)
     if exec_by_ibus:
         self.__bus.request_name("org.freedesktop.IBus.Plover", 0)
     else:
         self.__bus.register_component(self.__component)
Ejemplo n.º 8
0
 def __init__(self, exec_by_ibus):
     self.__component = ibus.Component("cn.zzsst.Rime",
                                       "Rime Component",
                                       "0.1.0",
                                       "GPL",
                                       "GONG Chen <*****@*****.**>")
     self.__component.add_engine("rime",
                                 "Rime",
                                 "ibus-rime, powered by Rime Input Method Engine",
                                 "zh_CN",
                                 "GPL",
                                 "GONG Chen <*****@*****.**>",
                                 "",
                                 "en")
     self.__mainloop = gobject.MainLoop()
     self.__bus = ibus.Bus()
     self.__bus.connect("destroy", self.__bus_destroy_cb)
     self.__factory = factory.EngineFactory(self.__bus)
     if exec_by_ibus:
         self.__bus.request_name("cn.zzsst.Rime", 0)
     else:
         self.__bus.register_component(self.__component)
Ejemplo n.º 9
0
 def __init__(self, exec_by_ibus):
     self.__mainloop = gobject.MainLoop()
     self.__bus = ibus.Bus()
     self.__bus.connect("disconnected", self.__bus_destroy_cb)
     self.__factory = factory.EngineFactory(self.__bus)
     self.destroied = False
     if exec_by_ibus:
         self.__bus.request_name("org.freedesktop.IBus.Sdim", 0)
     else:
         self.__component = ibus.Component("org.freedesktop.IBus.Sdim",
                                           "Sdim Component",
                                           "0.1.0",
                                           "GPL",
                                           "Yuwei Yu <*****@*****.**>")
         name = 'SDIM'
         longname = name
         description = 'Shadow Dance Input Method'
         language = 'zh'
         license = 'LGPL'
         author = 'Bao Haojun <*****@*****.**>'
         icon = icon_dir + "/sdim.png"
         if icon:
             icon = os.path.join (icon_dir, icon)
             if not os.access( icon, os.F_OK):
                 icon = ''
         layout = 'us'
         
         self.__component.add_engine(name,
                                     longname,
                                     description,
                                     language,
                                     license,
                                     author,
                                     icon,
                                     layout)
         self.__bus.register_component(self.__component)