Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/Shell.py
blob: c952dd5a1f5bf3fc4d2fce884e129b1f2066b64d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import dbus
import gobject

from sugar.LogWriter import LogWriter
from WindowManager import WindowManager
from ConsoleLogger import ConsoleLogger
from ActivityContainer import ActivityContainer
from ActivityRegistry import ActivityRegistry

class Shell(gobject.GObject):
	__gsignals__ = {
		'close': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
				 ([])),
	}

	def __init__(self):
		gobject.GObject.__init__(self)

	def start(self):
		console = ConsoleLogger()

		log_writer = LogWriter("Shell", False)
		log_writer.start()

		registry = ActivityRegistry()
		
		session_bus = dbus.SessionBus()
		service = dbus.service.BusName("com.redhat.Sugar.Shell", bus=session_bus)

		activity_container = ActivityContainer(service, session_bus)

if __name__ == "__main__":
	shell = Shell()
	shell.start()
	try:
		gtk.main()
	except KeyboardInterrupt:
		print 'Ctrl+c pressed, exiting...'