diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2007-01-08 17:06:59 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2007-01-08 17:06:59 (GMT) |
commit | cae78d70415923c0deabd518f23dc534f11cfacd (patch) | |
tree | 482c96ed3f959b8f8f3d135d9ec1d905db6a541f /shell/view | |
parent | 764eee81e57aa637c7d6c95d3d75f94d9f29d650 (diff) |
Rework the console to use autoactivation, move it in services/
Diffstat (limited to 'shell/view')
-rw-r--r-- | shell/view/Shell.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/shell/view/Shell.py b/shell/view/Shell.py index 24e62a1..40c5c83 100644 --- a/shell/view/Shell.py +++ b/shell/view/Shell.py @@ -94,6 +94,8 @@ class Shell(gobject.GObject): self._key_grabber.grab('F12') self._key_grabber.grab('<alt>F5') self._key_grabber.grab('<alt>F8') + self._key_grabber.grab('<alt>=') + self._key_grabber.grab('<alt>0') self._key_grabber.grab('0xDC') # Camera key self._key_grabber.grab('0xE0') # Overlay key @@ -135,6 +137,8 @@ class Shell(gobject.GObject): self._hw_manager.set_display_mode(HardwareManager.COLOR_MODE) elif key == '<alt>F8': self._hw_manager.set_display_mode(HardwareManager.B_AND_W_MODE) + elif key == '<alt>=' or key == '<alt>0': + self._show_console() elif key == '<shft><alt>F9': self._frame.notify_key_press() elif key == '<shft><alt>F10': @@ -154,6 +158,13 @@ class Shell(gobject.GObject): box = self._home_window.get_home_box() box.grab_and_rotate() + def _show_console(self): + bus = dbus.SessionBus() + proxy = bus.get_object('org.laptop.sugar.Console', + '/org/laptop/sugar/Console') + mgr = dbus.Interface(proxy, 'org.laptop.sugar.Console') + mgr.show() + def _shutdown(self): bus = dbus.SystemBus() proxy = bus.get_object('org.freedesktop.Hal', |