summaryrefslogtreecommitdiffstats
path: root/daemon/contextmanager.py
diff options
context:
space:
mode:
authorHuang Peng <shawn.p.huang@gmail.com>2008-07-15 11:19:15 +0800
committerHuang Peng <shawn.p.huang@gmail.com>2008-07-15 11:19:15 +0800
commit0379f83eab1863249f0633383376ec2a8cdbedd6 (patch)
tree51d0953d1f8dc28ed123b34583497a347ad1cf43 /daemon/contextmanager.py
parenta40b567469921f109fd2a0628e212fb82e4bc4a2 (diff)
downloadibus-0379f83eab1863249f0633383376ec2a8cdbedd6.tar.gz
ibus-0379f83eab1863249f0633383376ec2a8cdbedd6.tar.xz
ibus-0379f83eab1863249f0633383376ec2a8cdbedd6.zip
Refine coding style of contextmanager.py
Diffstat (limited to 'daemon/contextmanager.py')
-rw-r--r--daemon/contextmanager.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/daemon/contextmanager.py b/daemon/contextmanager.py
index ac01a23..aadbe96 100644
--- a/daemon/contextmanager.py
+++ b/daemon/contextmanager.py
@@ -22,23 +22,24 @@
import ibus
from inputcontext import InputContext
-class ContextManager (ibus.Object):
- def __init__ (self):
+class ContextManager(ibus.Object):
+ def __init__(self):
+ super(ContextManager, self).__init__()
self._contexts = {}
- def create_input_context (self, name, ibusconn):
- context = InputContext (name, ibusconn)
- self._contexts[context.get_id ()] = context
- context.connect ("destroy", self._context_destroy_cb)
+ def create_input_context(self, name, ibusconn):
+ context = InputContext(name, ibusconn)
+ self._contexts[context.get_id()] = context
+ context.connect("destroy", self._context_destroy_cb)
return context
- def release_input_context (self, ic, ibusconn):
+ def release_input_context(self, ic, ibusconn):
context = self._contexts[ic]
- context.destroy ()
+ context.destroy()
- def lookup_context (self, ic, ibusconn):
+ def lookup_context(self, ic, ibusconn):
return self._contexts[ic]
- def _context_destroy_cb (self, context):
- del self._contexts[context.get_id ()]
+ def _context_destroy_cb(self, context):
+ del self._contexts[context.get_id()]