Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2007-01-05 01:19:52 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2007-01-05 01:19:52 (GMT)
commitdda100fca6bd68ba01a43134f6e3a422bda77908 (patch)
treed44918d0adfd45fbfe09a4175dda177773146326 /shell
parentbcc4b4f34f511d56267a7250fc4f2fbdc1153ff1 (diff)
Stub volume control code
Diffstat (limited to 'shell')
-rw-r--r--shell/view/Shell.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/shell/view/Shell.py b/shell/view/Shell.py
index f6d47fb..bace0f9 100644
--- a/shell/view/Shell.py
+++ b/shell/view/Shell.py
@@ -31,6 +31,7 @@ from sugar.activity import Activity
from view.frame.Frame import Frame
from view.dconmanager import DCONManager
from _sugar import KeyGrabber
+from _sugar import AudioManager
import sugar
class Shell(gobject.GObject):
@@ -45,6 +46,7 @@ class Shell(gobject.GObject):
style.load_stylesheet(view.stylesheet)
self._dcon_manager = DCONManager()
+ self._audio_manager = AudioManager()
self._key_grabber = KeyGrabber()
self._key_grabber.connect('key-pressed',
@@ -66,7 +68,7 @@ class Shell(gobject.GObject):
self._frame = Frame(self)
self._frame.show_and_hide(3)
- self.start_activity('org.laptop.JournalActivity')
+ #self.start_activity('org.laptop.JournalActivity')
def _handle_camera_key(self):
if self._current_host:
@@ -116,6 +118,20 @@ class Shell(gobject.GObject):
self._dcon_manager.set_brightness(12)
elif key == 'F8':
self._dcon_manager.set_brightness(15)
+ elif key == 'F9':
+ self._audio_manager.set_volume(0)
+ elif key == 'F19':
+ self._audio_manager.set_volume(16)
+ elif key == 'F10':
+ self._audio_manager.set_volume(32)
+ elif key == 'F20':
+ self._audio_manager.set_volume(48)
+ elif key == 'F11':
+ self._audio_manager.set_volume(64)
+ elif key == 'F21':
+ self._audio_manager.set_volume(80)
+ elif key == 'F12':
+ self._audio_manager.set_volume(100)
elif key == '<alt>F5':
self._dcon_manager.set_mode(DCONManager.COLOR_MODE)
elif key == '<alt>F8':