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 ()
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 ()
-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"
pass
def default_error_handler (e):
- print e
+ print >> sys.stderr, e
+ sys.exit (1)
DEFAULT_ASYNC_HANDLERS = {
"reply_handler" : default_reply_handler,