Merge branch 'master' of git://dev.laptop.org/sugar

This commit is contained in:
Eduardo Silva 2007-01-04 16:29:14 -03:00
commit bcc4b4f34f
3 changed files with 15 additions and 16 deletions

4
README
View File

@ -22,10 +22,6 @@ F1 Mesh zoom level
F2 Friends zoom level
F3 Home zoom level
F4 Activity zoom level
F5 Decrease brightness (DCON)
F6 Increase brightness (DCON)
F7 Color mode (DCON)
F8 Black and white mode (DCON)
Shift+Alt+F9 Show the frame
Shift+Alt+F10 Toggle chat visibility

View File

@ -103,12 +103,22 @@ class Shell(gobject.GObject):
elif key == 'F4':
self.set_zoom_level(sugar.ZOOM_ACTIVITY)
elif key == 'F5':
self._dcon_manager.decrease_brightness()
self._dcon_manager.set_brightness(0)
elif key == 'F16':
self._dcon_manager.set_brightness(3)
elif key == 'F6':
self._dcon_manager.increase_brightness()
self._dcon_manager.set_brightness(5)
elif key == 'F17':
self._dcon_manager.set_brightness(7)
elif key == 'F7':
self._dcon_manager.set_mode(DCONManager.COLOR_MODE)
self._dcon_manager.set_brightness(9)
elif key == 'F18':
self._dcon_manager.set_brightness(12)
elif key == 'F8':
self._dcon_manager.set_brightness(15)
elif key == '<alt>F5':
self._dcon_manager.set_mode(DCONManager.COLOR_MODE)
elif key == '<alt>F8':
self._dcon_manager.set_mode(DCONManager.BLACK_AND_WHITE_MODE)
elif key == '<shft><alt>F9':
self._frame.notify_key_press()

View File

@ -32,12 +32,5 @@ class DCONManager(object):
def set_mode(self, mode):
self._service.set_mode(mode)
def increase_brightness(self):
level = self._service.get_backlight_level()
if level >= 0:
self._service.set_backlight_level(level + 1)
def decrease_brightness(self):
level = self._service.get_backlight_level()
if level >= 0:
self._service.set_backlight_level(level - 1)
def set_brightness(self, level):
self._service.set_backlight_level(level)