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

Tomeu Vizoso tomeu at tomeuvizoso.net
Tue Jun 10 03:25:33 EDT 2008


r+ Thanks!

On Wed, Jun 4, 2008 at 5:25 AM, Martin Dengler <martin at martindengler.com> wrote:
> ---
>  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
>
> _______________________________________________
> Sugar mailing list
> Sugar at lists.laptop.org
> http://lists.laptop.org/listinfo/sugar
>


More information about the Sugar mailing list