WIP.
authorHuang Peng <shawn.p.huang@gmail.com>
Fri, 13 Jun 2008 16:17:14 +0000 (00:17 +0800)
committerHuang Peng <shawn.p.huang@gmail.com>
Fri, 13 Jun 2008 16:17:14 +0000 (00:17 +0800)
engine/anthy/main.py
engine/enchant/main.py
ibus/common.py

index 8df5c0f..aedc214 100644 (file)
@@ -13,7 +13,7 @@ class IMApp:
                                                        dbus_interface = dbus.LOCAL_IFACE)
                self._engine = factory.DemoEngineFactory (self._dbusconn)
                self._ibus = self._dbusconn.get_object (ibus.IBUS_NAME, ibus.IBUS_PATH)
-               self._ibus.RegisterFactories ([factory.FACTORY_PATH])
+               self._ibus.RegisterFactories ([factory.FACTORY_PATH], **ibus.DEFAULT_ASYNC_HANDLERS)
 
        def run (self):
                gtk.main ()
index 8df5c0f..aedc214 100644 (file)
@@ -13,7 +13,7 @@ class IMApp:
                                                        dbus_interface = dbus.LOCAL_IFACE)
                self._engine = factory.DemoEngineFactory (self._dbusconn)
                self._ibus = self._dbusconn.get_object (ibus.IBUS_NAME, ibus.IBUS_PATH)
-               self._ibus.RegisterFactories ([factory.FACTORY_PATH])
+               self._ibus.RegisterFactories ([factory.FACTORY_PATH], **ibus.DEFAULT_ASYNC_HANDLERS)
 
        def run (self):
                gtk.main ()
index aac76de..303e236 100644 (file)
@@ -1,5 +1,6 @@
-import getpass
 import os
+import sys
+import getpass
 
 IBUS_ADDR = "unix:path=/tmp/ibus-%s/ibus-%s" % (getpass.getuser (), os.environ["DISPLAY"].replace (":", "-"))
 # IBUS_ADDR  = "tcp:host=localhost,port=7799"
@@ -17,7 +18,8 @@ def default_reply_handler ( *args):
        pass
 
 def default_error_handler (e):
-       print e
+       print >> sys.stderr, e
+       sys.exit (1)
 
 DEFAULT_ASYNC_HANDLERS = {
        "reply_handler" : default_reply_handler,