Rework the emulator. Move matchbox in the shell.

This commit is contained in:
Marco Pesenti Gritti
2007-03-16 18:12:47 +01:00
parent 8b6af7efa5
commit c9f28b7317
11 changed files with 85 additions and 161 deletions
+5 -2
View File
@@ -7,7 +7,10 @@ bin_SCRIPTS = \
sugardir = $(pkgdatadir)/shell
sugar_PYTHON = \
__init__.py \
__init__.py \
shellservice.py
EXTRA_DIST = $(bin_SCRIPTS)
confdir = $(pkgdatadir)/shell
conf_DATA = kbdconfig
EXTRA_DIST = $(bin_SCRIPTS) $(conf_DATA)
+7
View File
@@ -0,0 +1,7 @@
# This is the sugar keyboard configuration for matchbox
### Window operation short cuts
<Alt>n=next
<Alt>p=prev
<Alt>c=close
+28 -16
View File
@@ -1,5 +1,4 @@
#!/usr/bin/env python
# Copyright (C) 2006, Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -40,6 +39,34 @@ from model.ShellModel import ShellModel
from shellservice import ShellService
from intro import intro
def _start_matchbox():
cmd = ['matchbox-window-manager']
cmd.extend(['-use_titlebar', 'no'])
cmd.extend(['-theme', 'olpc'])
cmd.extend(['-kbdconfig', env.get_shell_path('kbdconfig')])
gobject.spawn_async(cmd, flags=gobject.SPAWN_SEARCH_PATH)
def _save_session_info():
# Save our DBus Session Bus address somewhere it can be found
#
# WARNING!!! this is going away at some near future point, do not rely on it
#
dsba_file = os.path.join(env.get_profile_path(), "session.info")
f = open(dsba_file, "w")
cp = ConfigParser()
cp.add_section('Session')
cp.set('Session', 'dbus_address', os.environ['DBUS_SESSION_BUS_ADDRESS'])
cp.set('Session', 'display', gtk.gdk.display_get_default().get_name())
cp.write(f)
f.close()
_save_session_info()
_start_matchbox()
# Do initial setup if needed
key = profile.get_pubkey()
if not key or not len(key):
@@ -48,21 +75,6 @@ if not key or not len(key):
gtk.main()
profile.update()
# Save our DBus Session Bus address somewhere it can be found
#
# WARNING!!! this is going away at some near future point, do not rely on it
#
dsba_file = os.path.join(env.get_profile_path(), "session.info")
f = open(dsba_file, "w")
cp = ConfigParser()
cp.add_section('Session')
cp.set('Session', 'dbus_address', os.environ['DBUS_SESSION_BUS_ADDRESS'])
cp.set('Session', 'display', gtk.gdk.display_get_default().get_name())
cp.write(f)
f.close()
model = ShellModel()
service = ShellService(model)
shell = Shell(model)