2007-01-20 13:38:58 +01:00
|
|
|
#!/usr/bin/env python
|
2006-11-15 13:56:19 +01:00
|
|
|
# vi: ts=4 ai noet
|
|
|
|
#
|
|
|
|
# Copyright (C) 2006, Red Hat, Inc.
|
2007-06-20 21:28:00 +02:00
|
|
|
# Copyright (C) 2007, One Laptop Per Child
|
2006-11-15 13:56:19 +01:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
|
|
|
|
import sys
|
2007-03-09 12:32:32 +01:00
|
|
|
import os
|
2006-11-15 13:56:19 +01:00
|
|
|
import logging
|
|
|
|
|
|
|
|
import gobject
|
|
|
|
import dbus.glib
|
|
|
|
|
2007-10-23 17:44:23 +02:00
|
|
|
from sugar import logger
|
2006-11-15 13:56:19 +01:00
|
|
|
from sugar import env
|
|
|
|
|
2007-08-08 18:33:10 +02:00
|
|
|
sys.path.append(env.get_service_path('shell'))
|
2006-11-15 13:56:19 +01:00
|
|
|
|
2007-06-20 21:28:00 +02:00
|
|
|
import clipboardservice
|
2007-08-08 18:08:07 +02:00
|
|
|
import activityregistryservice
|
2006-11-15 13:56:19 +01:00
|
|
|
|
2007-10-23 17:44:23 +02:00
|
|
|
logger.start('shellservice')
|
2007-08-08 18:33:10 +02:00
|
|
|
logging.info('Starting shell service.')
|
2006-11-15 13:56:19 +01:00
|
|
|
|
|
|
|
gobject.threads_init()
|
|
|
|
dbus.glib.threads_init()
|
|
|
|
|
2007-06-20 21:28:00 +02:00
|
|
|
clipboard_service = clipboardservice.get_instance()
|
2007-08-08 18:08:07 +02:00
|
|
|
activity_registry = activityregistryservice.get_instance()
|
2007-06-12 21:57:49 +02:00
|
|
|
|
|
|
|
loop = gobject.MainLoop()
|
|
|
|
try:
|
|
|
|
loop.run()
|
|
|
|
except KeyboardInterrupt:
|
|
|
|
print 'Ctrl+C pressed, exiting...'
|
2007-08-08 18:08:07 +02:00
|
|
|
|