After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 632868 - VolumeIndicator: Wrong icon on startup when output is muted
VolumeIndicator: Wrong icon on startup when output is muted
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Giovanni Campagna
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-10-22 09:17 UTC by Florian Müllner
Modified: 2010-10-22 14:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
VolumeIndicator: Set correct icon on startup (1.46 KB, patch)
2010-10-22 09:17 UTC, Florian Müllner
rejected Details | Review
Fix audio volume icon (1.04 KB, patch)
2010-10-22 13:37 UTC, Giovanni Campagna
needs-work Details | Review
Fix audio volume icon (1.52 KB, patch)
2010-10-22 13:59 UTC, Giovanni Campagna
committed Details | Review

Description Florian Müllner 2010-10-22 09:17:53 UTC
To reproduce: mute the volume, restart the shell.
Comment 1 Florian Müllner 2010-10-22 09:17:57 UTC
Created attachment 172983 [details] [review]
VolumeIndicator: Set correct icon on startup

If the output is muted, the correct icon is set and immediately
replaced with the icon indicating the unmuted volume level on
startup. Fix by moving the check for the muted state below the
update of the initial volume and removing a duplicate call to
setIcon().
Comment 2 Giovanni Campagna 2010-10-22 13:31:23 UTC
Review of attachment 172983 [details] [review]:

This patch is wrong. _volumeChanged should not update the icon if volume is muted (as pulseaudio API allows the volume to change without changing the mute switch, so in theory it could happen).
The real correction is in _volumeChanged and makes order irrelevant.
Patch will follow soon.
Comment 3 Giovanni Campagna 2010-10-22 13:37:05 UTC
Created attachment 173000 [details] [review]
Fix audio volume icon

_volumeChanged should not update the icon if the sink is muted.
Fixes the case when shell is started with a muted sink (_mutedChanged
is called before _volumeChanged).
Comment 4 Florian Müllner 2010-10-22 13:44:50 UTC
Review of attachment 173000 [details] [review]:

You missed the duplicated call to setIcon() in _readOutput(). Did you actually test your patch?
Comment 5 Giovanni Campagna 2010-10-22 13:59:34 UTC
Created attachment 173005 [details] [review]
Fix audio volume icon

_volumeChanged should not update the icon if the sink is muted, and 
_readOutput should not call setIcon (implied by _mutedChanged and
_volumeChanged).
Fixes the case when shell is started with a muted sink (_mutedChanged
is called before _volumeChanged).
Comment 6 Florian Müllner 2010-10-22 14:02:54 UTC
Review of attachment 173005 [details] [review]:

OK