Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorOwen Williams <owen-olpc@ywwg.com>2007-03-16 20:42:43 (GMT)
committer Owen Williams <owen@ywwg.localdomain>2007-03-16 20:42:43 (GMT)
commitde80cf06dea05dba5d3f6741407d237d334ea7a3 (patch)
tree158eafbc32960f698745d30bc98eeddb6842bec9 /shell
parent72c511ba6195bdfca25f201dac6ad0b7256526ec (diff)
Set mode to black and white when brightness is zero.
Also, reverse Alt-F5 and Alt-F8 to make them more sensible
Diffstat (limited to 'shell')
-rw-r--r--shell/view/keyhandler.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/shell/view/keyhandler.py b/shell/view/keyhandler.py
index 0ef963a..ac3e7dd 100644
--- a/shell/view/keyhandler.py
+++ b/shell/view/keyhandler.py
@@ -23,8 +23,8 @@ _actions_table = {
'F10' : 'volume_2',
'F11' : 'volume_3',
'F12' : 'volume_4',
- '<alt>F5' : 'color_mode',
- '<alt>F8' : 'b_and_w_mode',
+ '<alt>F8' : 'color_mode',
+ '<alt>F5' : 'b_and_w_mode',
'<alt>equal' : 'console',
'<alt>0' : 'console',
'<alt>f' : 'frame',
@@ -60,6 +60,10 @@ class KeyHandler(object):
hw_manager = hardwaremanager.get_hardware_manager()
if hw_manager:
hw_manager.set_display_brightness(level)
+ if level == 0:
+ self._set_display_mode(hardwaremanager.B_AND_W_MODE)
+ else:
+ self._set_display_mode(hardwaremanager.COLOR_MODE)
def _set_display_mode(self, mode):
hw_manager = hardwaremanager.get_hardware_manager()