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

Proposed by Josh Arenson on 2015-02-19
Status: Rejected
Rejected by: Ted Gould on 2015-02-19
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) 2015-02-19 Disapprove on 2015-02-19
PS Jenkins bot (community) continuous-integration Approve on 2015-02-19
Review via email:

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.

To post a comment you must log in.
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.

review: Disapprove
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 on 2015-02-19

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
1=== modified file 'src/service.vala'
2--- src/service.vala 2015-02-05 14:52:58 +0000
3+++ src/service.vala 2015-02-19 17:56:54 +0000
4@@ -292,12 +292,16 @@
5 var oldvolume = this.last_volume_notification;
6 this.last_volume_notification = volume_control.volume;
8- /* Suppress notifications of volume changes if it is because the
9+ /* Suppress notifications of volume changes if it is because the
10 output stream changed. */
11 if (oldoutput != this.last_output_notification)
12 return;
13- /* Supress updates that don't change the value */
14- if (GLib.Math.fabs(oldvolume - this.last_volume_notification) < 0.01)
16+ /* Supress updates that don't change the value unless they are muted or max.
17+ * This allows the user to receive feedback if the device is already in a
18+ * muted or maxed state.
19+ */
20+ if ((GLib.Math.fabs(oldvolume - this.last_volume_notification) < 0.01) && (this.last_volume_notification > 0.0) && (this.last_volume_notification < 1.0))
21 return;
23 var shown_action = actions.lookup_action ("indicator-shown") as SimpleAction;


People subscribed via source and target branches