Merge lp:~josharenson/indicator-sound/fix_mute_notifications into lp:indicator-sound/15.04

Proposed by Josh Arenson
Status: Rejected
Rejected by: Ted Gould
Proposed branch: lp:~josharenson/indicator-sound/fix_mute_notifications
Merge into: lp:indicator-sound/15.04
Diff against target: 23 lines (+7/-3)
1 file modified
src/service.vala (+7/-3)
To merge this branch: bzr merge lp:~josharenson/indicator-sound/fix_mute_notifications
Reviewer Review Type Date Requested Status
Ted Gould (community) Disapprove
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+250359@code.launchpad.net

Commit message

  Allow unchanged volume events if volume is 0.0 || 1.0

  Fixes lp:1421396

Description of the change

* Ensure the project compiles and the test suite executes without error
  It does, they do.

* Ensure that non-obvious code has comments explaining it
  Added comment

* If the change works on specific profiles, please include those in the merge description.
  N/A

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
Ted Gould (ted) wrote :

Hi, thanks for the contribution. The code here that you modified was actually just a quick fix and is in the process of being dropped (as soon as it works through the machinery). If you're curious you can see the branch that fixes it, you can grab one of the debs there if you want it fixed on your device right away.

https://code.launchpad.net/~ted/indicator-sound/volume-reason/+merge/250042

review: Disapprove
Revision history for this message
Josh Arenson (josharenson) wrote :

Ah cool, I was a tad uneasy about my change anyway, just in case there was a weird usecase I missed. Yours should handle everything nicely. Thanks for updating the bug.

Unmerged revisions

477. By Josh Arenson

Allow unchanged volume events if volume is 0.0 || 1.0

Fixes lp:1421396

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/service.vala'
--- src/service.vala 2015-02-05 14:52:58 +0000
+++ src/service.vala 2015-02-19 17:56:54 +0000
@@ -292,12 +292,16 @@
292 var oldvolume = this.last_volume_notification;292 var oldvolume = this.last_volume_notification;
293 this.last_volume_notification = volume_control.volume;293 this.last_volume_notification = volume_control.volume;
294294
295 /* Suppress notifications of volume changes if it is because the 295 /* Suppress notifications of volume changes if it is because the
296 output stream changed. */296 output stream changed. */
297 if (oldoutput != this.last_output_notification)297 if (oldoutput != this.last_output_notification)
298 return;298 return;
299 /* Supress updates that don't change the value */299
300 if (GLib.Math.fabs(oldvolume - this.last_volume_notification) < 0.01)300 /* Supress updates that don't change the value unless they are muted or max.
301 * This allows the user to receive feedback if the device is already in a
302 * muted or maxed state.
303 */
304 if ((GLib.Math.fabs(oldvolume - this.last_volume_notification) < 0.01) && (this.last_volume_notification > 0.0) && (this.last_volume_notification < 1.0))
301 return;305 return;
302306
303 var shown_action = actions.lookup_action ("indicator-shown") as SimpleAction;307 var shown_action = actions.lookup_action ("indicator-shown") as SimpleAction;

Subscribers

People subscribed via source and target branches