[sugar] [PATCH 1/2] set_mute --> set_muted, consistent with get_muted()

Martin Dengler martin
Tue Jun 3 23:25:10 EDT 2008


---
 src/hardware/hardwaremanager.py |    5 +++--
 src/model/devices/speaker.py    |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/hardware/hardwaremanager.py b/src/hardware/hardwaremanager.py
index 87d79c1..29f5fba 100644
--- a/src/hardware/hardwaremanager.py
+++ b/src/hardware/hardwaremanager.py
@@ -103,10 +103,11 @@ class HardwareManager(object):
             last_volumes_read = self._mixer.get_volume(self._master)
             read_count += 1
 
-    def set_mute(self, mute):
+    def set_muted(self, mute):
         if not self._mixer or not self._master:
             logging.error('Cannot mute the audio channel')
-        self._mixer.set_mute(self._master, mute)
+        else:
+            self._mixer.set_mute(self._master, mute)
 
     def startup(self):
         if env.is_emulator() is False:
diff --git a/src/model/devices/speaker.py b/src/model/devices/speaker.py
index 8526ea3..683849d 100644
--- a/src/model/devices/speaker.py
+++ b/src/model/devices/speaker.py
@@ -40,7 +40,7 @@ class Device(device.Device):
         return self._manager.get_muted()
 
     def _set_muted(self, mute):
-        self._manager.set_mute(mute)
+        self._manager.set_muted(mute)
         self.notify('muted')
 
     def get_type(self):
-- 
1.5.5.1




More information about the Sugar-devel mailing list