Merge lp:~ted/indicator-sound/lp1381871-no-initial-value-for-utopic into lp:indicator-sound/14.10

Proposed by Ted Gould
Status: Superseded
Proposed branch: lp:~ted/indicator-sound/lp1381871-no-initial-value-for-utopic
Merge into: lp:indicator-sound/14.10
Prerequisite: lp:~ted/indicator-sound/extreme-volume-warning
Diff against target: 13 lines (+3/-0)
1 file modified
src/service.vala (+3/-0)
To merge this branch: bzr merge lp:~ted/indicator-sound/lp1381871-no-initial-value-for-utopic
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Indicator Applet Developers Pending
Review via email: mp+238593@code.launchpad.net

This proposal has been superseded by a proposal from 2014-10-31.

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.
461. By Ted Gould

Align with trunk to prepare for landing there

462. By Ted Gould

No RTM changelog entries in Utopic

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Unmerged revisions

462. By Ted Gould

No RTM changelog entries in Utopic

461. By Ted Gould

Align with trunk to prepare for landing there

460. By Lars Karlitski

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.

459. By PS Jenkins bot

Releasing 12.10.2+14.10.20141015.5~rtm-0ubuntu1

458. By Ted Gould

Warn on high audio levels when using headphones Fixes: 1373404
Approved by: Mirco Müller

457. By Ted Gould

Show notifications on volume change Fixes: 1378564, 1378961

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/service.vala'
2--- src/service.vala 2014-10-16 16:12:54 +0000
3+++ src/service.vala 2014-10-16 16:12:54 +0000
4@@ -131,6 +131,9 @@
5 }
6
7 set {
8+ if (this.allow_amplified_volume == value)
9+ return;
10+
11 if (value) {
12 /* from pulse/volume.h: #define PA_VOLUME_UI_MAX (pa_sw_volume_from_dB(+11.0)) */
13 this.max_volume = (double)PulseAudio.Volume.sw_from_dB(11.0) / PulseAudio.Volume.NORM;

Subscribers

People subscribed via source and target branches