Merge lp://staging/~larsu/indicator-sound/lp1381871 into lp://staging/indicator-sound/rtm-14.09

Proposed by Lars Karlitski
Status: Merged
Approved by: Ted Gould
Approved revision: 460
Merged at revision: 460
Proposed branch: lp://staging/~larsu/indicator-sound/lp1381871
Merge into: lp://staging/indicator-sound/rtm-14.09
Diff against target: 13 lines (+3/-0)
1 file modified
src/service.vala (+3/-0)
To merge this branch: bzr merge lp://staging/~larsu/indicator-sound/lp1381871
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Review via email: mp+238555@code.staging.launchpad.net

Commit message

service.vala: don't call set_volume unnecessarily

The allow-amplified-volume setting is bound to a property on the service with the same name. GSettings always sets the target property when the binding is created. The property setter calls set_volume() unconditionally, which lead to a call on every startup of indicator-sound. That wasn't a problem until set_volume() started emitting a notification for volume changes...

Description of the change

service.vala: don't call set_volume unnecessarily

The allow-amplified-volume setting is bound to a property on the service with the same name. GSettings always sets the target property when the binding is created. The property setter calls set_volume() unconditionally, which lead to a call on every startup of indicator-sound. That wasn't a problem until set_volume() started emitting a notification for volume changes...

Fix this by only updating the property when the underlying value has actually changed.

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

Cool! Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches