More work on the new console

This commit is contained in:
Marco Pesenti Gritti
2007-09-30 12:42:48 +02:00
parent 03a4f01c25
commit c8b5ab290e
4 changed files with 86 additions and 22 deletions
+7 -2
View File
@@ -25,6 +25,7 @@ import gtk
from hardware import hardwaremanager
from model.shellmodel import ShellModel
from sugar._sugaruiext import KeyGrabber
import console
_BRIGHTNESS_STEP = 2
_VOLUME_STEP = 10
@@ -47,6 +48,7 @@ _actions_table = {
'<alt>1' : 'screenshot',
'<alt>equal' : 'console',
'<alt>0' : 'console',
'<alt>9' : 'new_console',
'<alt>f' : 'frame',
'0x93' : 'frame',
'<alt>o' : 'overlay',
@@ -145,6 +147,9 @@ class KeyHandler(object):
def handle_console(self):
gobject.idle_add(self._toggle_console_visibility_cb)
def handle_new_console(self):
console.toggle_visibility()
def handle_frame(self):
self._shell.get_frame().notify_key_press()
@@ -217,5 +222,5 @@ class KeyHandler(object):
bus = dbus.SessionBus()
proxy = bus.get_object('org.laptop.sugar.Console',
'/org/laptop/sugar/Console')
console = dbus.Interface(proxy, 'org.laptop.sugar.Console')
console.ToggleVisibility()
console_service = dbus.Interface(proxy, 'org.laptop.sugar.Console')
console_service.ToggleVisibility()