diff options
author | Eitan Isaacson <eitan@monotonous.org> | 2011-06-08 12:53:10 -0700 |
---|---|---|
committer | Eitan Isaacson <eitan@monotonous.org> | 2011-06-08 12:56:28 -0700 |
commit | 80ff27e165389fe490305d05e2e01708d113ddc2 (patch) | |
tree | c1e6decde9db174d3bc107217951e1f68749f904 /caribou/antler/main.py | |
parent | 031c5c6b2701504fcf9e0c6f056b7cc8e67e7964 (diff) | |
download | caribou-80ff27e165389fe490305d05e2e01708d113ddc2.tar.gz |
Use generic keyboard service name.
- Have it replaceable by a service that is activated later.
- Have Antler quit if the generic name is acquired by a new service.
- Keep non-replaceable implementation specific name on bus.
https://bugzilla.gnome.org/show_bug.cgi?id=651702
Diffstat (limited to 'caribou/antler/main.py')
-rw-r--r-- | caribou/antler/main.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/caribou/antler/main.py b/caribou/antler/main.py index ce0eca3..d5d9a1b 100644 --- a/caribou/antler/main.py +++ b/caribou/antler/main.py @@ -2,6 +2,7 @@ from gi.repository import Caribou from window import AntlerWindowEntry from keyboard_view import AntlerKeyboardView import gobject +import sys class AntlerKeyboardService(Caribou.KeyboardService): def __init__(self): @@ -25,6 +26,10 @@ class AntlerKeyboardService(Caribou.KeyboardService): def do_set_entry_location (self, x, y, w, h): self.window.set_entry_location(x, y, w, h) + def do_name_lost (self, name): + sys.stderr.write("Another service acquired %s, quitting..\n") + sys.exit(0) + if __name__ == "__main__": antler_keyboard_service = AntlerKeyboardService() antler_keyboard_service.run() |