Merge lp:~ted/indicator-sound/revert-notifications into lp:indicator-sound/14.10

Proposed by Ted Gould
Status: Merged
Approved by: Charles Kerr
Approved revision: 451
Merged at revision: 455
Proposed branch: lp:~ted/indicator-sound/revert-notifications
Merge into: lp:indicator-sound/14.10
Diff against target: 56 lines (+1/-23)
1 file modified
src/volume-control.vala (+1/-23)
To merge this branch: bzr merge lp:~ted/indicator-sound/revert-notifications
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
Review via email: mp+237664@code.launchpad.net

Commit message

Revert notifications on volume change.

Description of the change

Reverting notifications so other things can land while it gets fixed.

To post a comment you must log in.
Revision history for this message
Charles Kerr (charlesk) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/volume-control.vala'
2--- src/volume-control.vala 2014-10-07 02:40:45 +0000
3+++ src/volume-control.vala 2014-10-08 18:34:46 +0000
4@@ -19,7 +19,6 @@
5 */
6
7 using PulseAudio;
8-using Notify;
9 using Gee;
10
11 [CCode(cname="pa_cvolume_set", cheader_filename = "pulse/volume.h")]
12@@ -68,7 +67,6 @@
13 private uint _accountservice_volume_timer = 0;
14 private bool _send_next_local_volume = false;
15 private double _account_service_volume = 0.0;
16- private Notify.Notification _notification;
17
18 public signal void volume_changed (double v);
19 public signal void mic_volume_changed (double v);
20@@ -86,13 +84,6 @@
21
22 _mute_cancellable = new Cancellable ();
23 _volume_cancellable = new Cancellable ();
24-
25- Notify.init ("Volume");
26- _notification = new Notify.Notification("Volume", "", "audio-volume-muted");
27- _notification.set_hint ("value", 0);
28- _notification.set_hint ("x-canonical-private-synchronous", "true");
29- _notification.set_hint ("x-canonical-non-shaped-icon", "true");
30-
31 setup_accountsservice.begin ();
32
33 this.reconnect_to_pulse ();
34@@ -577,21 +568,8 @@
35
36 public void set_volume (double volume)
37 {
38- if (_volume == 0.0)
39- _notification.update ("Volume", "", "audio-volume-muted");
40- if (_volume > 0.0 && _volume <= 0.33)
41- _notification.update ("Volume", "", "audio-volume-low");
42- if (_volume > 0.33 && _volume <= 0.66)
43- _notification.update ("Volume", "", "audio-volume-medium");
44- if (_volume > 0.66 && _volume <= 1.0)
45- _notification.update ("Volume", "", "audio-volume-high");
46- _notification.set_hint ("value", _volume * 100.0);
47- _notification.set_hint ("sound-file", "/usr/share/sounds/ubuntu/stereo/message.ogg");
48- _notification.show ();
49-
50- if (set_volume_internal (volume)) {
51+ if (set_volume_internal (volume))
52 start_local_volume_timer();
53- }
54 }
55
56 void set_mic_volume_success_cb (Context c, int success)

Subscribers

People subscribed via source and target branches