Ticket #737: keyhandler.py.patch
File keyhandler.py.patch, 1.6 KB (added by pgf, 14 years ago) |
---|
-
keyhandler.py
old new 164 164 view.Shell.get_instance().set_zoom_level(ShellModel.ZOOM_ACTIVITY) 165 165 166 166 def handle_brightness_max(self): 167 168 # patch v1 by olpc-powerd 169 if os.path.exists("/usr/bin/olpc-brightness"): 170 os.system("/usr/bin/olpc-brightness high") 171 return 172 167 173 self._change_brightness(value=_BRIGHTNESS_MAX) 168 174 169 175 def handle_brightness_min(self): 176 177 # patch v1 by olpc-powerd 178 if os.path.exists("/usr/bin/olpc-brightness"): 179 os.system("/usr/bin/olpc-brightness low") 180 return 181 170 182 self._change_brightness(value=0) 171 183 172 184 def handle_volume_max(self): … … 176 188 self._change_volume(value=0) 177 189 178 190 def handle_brightness_up(self): 191 192 # patch v1 by olpc-powerd 193 if os.path.exists("/usr/bin/olpc-brightness"): 194 os.system("/usr/bin/olpc-brightness up") 195 return 196 179 197 self._change_brightness(step=_BRIGHTNESS_STEP) 180 198 181 199 def handle_brightness_down(self): 200 201 # patch v1 by olpc-powerd 202 if os.path.exists("/usr/bin/olpc-brightness"): 203 os.system("/usr/bin/olpc-brightness down") 204 return 205 206 182 207 self._change_brightness(step=-_BRIGHTNESS_STEP) 183 208 184 209 def handle_volume_up(self): … … 196 221 197 222 def handle_rotate(self): 198 223 224 # patch v2 by olpc-kbdshim 225 if os.path.exists("/usr/bin/olpc-rotate"): 226 os.system("/usr/bin/olpc-rotate") 227 return 228 229 199 230 """ 200 231 Handles rotation of the display (using xrandr) and of the d-pad. 201 232