Merge lp:~rsalveti/indicator-sound/only_set_volume_different_reason_not_As into lp:indicator-sound/15.04

Proposed by Ricardo Salveti
Status: Merged
Approved by: Charles Kerr
Approved revision: no longer in the source branch.
Merged at revision: 490
Proposed branch: lp:~rsalveti/indicator-sound/only_set_volume_different_reason_not_As
Merge into: lp:indicator-sound/15.04
Diff against target: 46 lines (+20/-17)
1 file modified
src/volume-control-pulse.vala (+20/-17)
To merge this branch: bzr merge lp:~rsalveti/indicator-sound/only_set_volume_different_reason_not_As
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+255781@code.launchpad.net

Commit message

volume-control-pulse: only set volume if value is indeed different and reason not from AS

Description of the change

volume-control-pulse: only set volume if value is indeed different and reason not from AS

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote :

LGTM.

review: Approve
490. By Ricardo Salveti

volume-control-pulse: only set volume if value is indeed different and reason not from AS

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/volume-control-pulse.vala'
--- src/volume-control-pulse.vala 2015-02-27 22:34:23 +0000
+++ src/volume-control-pulse.vala 2015-04-12 04:11:32 +0000
@@ -608,23 +608,26 @@
608 return _volume;608 return _volume;
609 }609 }
610 set {610 set {
611 debug("Setting volume to %f for profile %d because %d", value.volume, _active_sink_input, value.reason);611 if (value.volume != _volume.volume) {
612612 debug("Setting volume to %f for profile %d because %d", value.volume, _active_sink_input, value.reason);
613 var old_high_volume = this.high_volume;613
614 _volume = value;614 var old_high_volume = this.high_volume;
615615 _volume = value;
616 /* Make sure we're connected to Pulse and pulse didn't give us the change */616
617 if (context.get_state () == Context.State.READY &&617 /* Make sure we're connected to Pulse and pulse didn't give us the change */
618 _volume.reason != VolumeControl.VolumeReasons.PULSE_CHANGE)618 if (context.get_state () == Context.State.READY &&
619 if (_pulse_use_stream_restore)619 _volume.reason != VolumeControl.VolumeReasons.PULSE_CHANGE)
620 set_volume_active_role.begin ();620 if (_pulse_use_stream_restore)
621 else621 set_volume_active_role.begin ();
622 context.get_server_info (server_info_cb_for_set_volume);622 else
623623 context.get_server_info (server_info_cb_for_set_volume);
624 if (this.high_volume != old_high_volume)624
625 this.notify_property("high-volume");625 if (this.high_volume != old_high_volume)
626626 this.notify_property("high-volume");
627 start_local_volume_timer();627
628 if (volume.reason != VolumeControl.VolumeReasons.ACCOUNTS_SERVICE_SET)
629 start_local_volume_timer();
630 }
628 }631 }
629 }632 }
630633

Subscribers

People subscribed via source and target branches