diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/Makefile.am | 7 | ||||
-rw-r--r-- | shell/kbdconfig | 7 | ||||
-rwxr-xr-x | shell/sugar-shell | 44 |
3 files changed, 40 insertions, 18 deletions
diff --git a/shell/Makefile.am b/shell/Makefile.am index 0d881ed..dfcbcc2 100644 --- a/shell/Makefile.am +++ b/shell/Makefile.am @@ -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) diff --git a/shell/kbdconfig b/shell/kbdconfig new file mode 100644 index 0000000..415c69f --- /dev/null +++ b/shell/kbdconfig @@ -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 diff --git a/shell/sugar-shell b/shell/sugar-shell index 24eb751..753fd67 100755 --- a/shell/sugar-shell +++ b/shell/sugar-shell @@ -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) |