diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2008-02-05 00:02:33 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2008-02-05 00:02:33 (GMT) |
commit | aca3ae6c88eb56b4dd2f818928ecca5064669978 (patch) | |
tree | 5070bb108005d97b6346a25bb7921947b1ef0ef1 /service | |
parent | ae5ce06ccb1f604fa1e4eaeb16d9ba8122b4923d (diff) |
Remove get_service_path and use the usual wrapper script approach.
Diffstat (limited to 'service')
-rw-r--r-- | service/Makefile.am | 10 | ||||
-rwxr-xr-x | service/main.py (renamed from service/sugar-shell-service) | 30 |
2 files changed, 17 insertions, 23 deletions
diff --git a/service/Makefile.am b/service/Makefile.am index 44496ff..17ac9f7 100644 --- a/service/Makefile.am +++ b/service/Makefile.am @@ -17,18 +17,16 @@ org.laptop.Clipboard.service: org.laptop.Clipboard.service.in Makefile org.laptop.ObjectTypeRegistry.service: org.laptop.ObjectTypeRegistry.service.in Makefile @sed -e "s|\@bindir\@|$(bindir)|" $< > $@ -sugardir = $(pkgdatadir)/services/shell +sugardir = $(pkgdatadir)/service sugar_PYTHON = \ __init__.py \ activityregistryservice.py \ bundleregistry.py \ clipboardobject.py \ - clipboardservice.py - -bin_SCRIPTS = sugar-shell-service + clipboardservice.py \ + main.py DISTCLEANFILES = $(service_DATA) -EXTRA_DIST = $(service_in_files) $(bin_SCRIPTS) - +EXTRA_DIST = $(service_in_files) diff --git a/service/sugar-shell-service b/service/main.py index e5c6a7d..679cc09 100755 --- a/service/sugar-shell-service +++ b/service/main.py @@ -1,6 +1,3 @@ -#!/usr/bin/env python -# vi: ts=4 ai noet -# # Copyright (C) 2006, Red Hat, Inc. # Copyright (C) 2007, One Laptop Per Child # @@ -28,23 +25,22 @@ import dbus.glib from sugar import logger from sugar import env -sys.path.append(env.get_service_path('shell')) - -import clipboardservice import activityregistryservice +import clipboardservice -logger.start('shellservice') -logging.info('Starting shell service.') +def main(): + logger.start('shellservice') + logging.info('Starting shell service.') -gobject.threads_init() -dbus.glib.threads_init() + gobject.threads_init() + dbus.glib.threads_init() -clipboard_service = clipboardservice.get_instance() -activity_registry = activityregistryservice.get_instance() + clipboard_service = clipboardservice.get_instance() + activity_registry = activityregistryservice.get_instance() -loop = gobject.MainLoop() -try: - loop.run() -except KeyboardInterrupt: - print 'Ctrl+C pressed, exiting...' + loop = gobject.MainLoop() + try: + loop.run() + except KeyboardInterrupt: + print 'Ctrl+C pressed, exiting...' |