Merge lp:~larsu/indicator-sound/lp1293163 into lp:indicator-sound/14.04

Proposed by Lars Karlitski
Status: Merged
Approved by: Charles Kerr
Approved revision: 424
Merged at revision: 426
Proposed branch: lp:~larsu/indicator-sound/lp1293163
Merge into: lp:indicator-sound/14.04
Diff against target: 12 lines (+1/-1)
1 file modified
src/service.vala (+1/-1)
To merge this branch: bzr merge lp:~larsu/indicator-sound/lp1293163
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+211456@code.launchpad.net

Commit message

Scale volume in notifications when allow-amplified-volume is set

Description of the change

Scale volume in notifications when allow-amplified-volume is set

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 :

A nice simple fix. \o/

Lars, when update_root_icon() builds the accessible desc, it also uses this.volume_control.get_volume() * 100. Does it need this adjustment as well?

Revision history for this message
Lars Karlitski (larsu) wrote :

That's a good point. I'm not sure. I kind of like having values of > 100% in there.

It needs to scale for the sliders and notifications because those only accept values in [0, 100].

Revision history for this message
Charles Kerr (charlesk) wrote :

Fair enough. I could go either way with the accessible desc too.

review: Approve

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-03-12 13:26:10 +0000
3+++ src/service.vala 2014-03-18 08:59:55 +0000
4@@ -141,7 +141,7 @@
5 icon = "notification-audio-volume-high";
6
7 this.notification.update ("indicator-sound", "", icon);
8- this.notification.set_hint_int32 ("value", ((int32) (100 * v)).clamp (-1, 101));
9+ this.notification.set_hint_int32 ("value", ((int32) (100 * v / this.max_volume)).clamp (-1, 101));
10 try {
11 this.notification.show ();
12 }

Subscribers

People subscribed via source and target branches