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
=== modified file 'src/volume-control.vala'
--- src/volume-control.vala 2014-10-07 02:40:45 +0000
+++ src/volume-control.vala 2014-10-08 18:34:46 +0000
@@ -19,7 +19,6 @@
19 */19 */
2020
21using PulseAudio;21using PulseAudio;
22using Notify;
23using Gee;22using Gee;
2423
25[CCode(cname="pa_cvolume_set", cheader_filename = "pulse/volume.h")]24[CCode(cname="pa_cvolume_set", cheader_filename = "pulse/volume.h")]
@@ -68,7 +67,6 @@
68 private uint _accountservice_volume_timer = 0;67 private uint _accountservice_volume_timer = 0;
69 private bool _send_next_local_volume = false;68 private bool _send_next_local_volume = false;
70 private double _account_service_volume = 0.0;69 private double _account_service_volume = 0.0;
71 private Notify.Notification _notification;
7270
73 public signal void volume_changed (double v);71 public signal void volume_changed (double v);
74 public signal void mic_volume_changed (double v);72 public signal void mic_volume_changed (double v);
@@ -86,13 +84,6 @@
8684
87 _mute_cancellable = new Cancellable ();85 _mute_cancellable = new Cancellable ();
88 _volume_cancellable = new Cancellable ();86 _volume_cancellable = new Cancellable ();
89
90 Notify.init ("Volume");
91 _notification = new Notify.Notification("Volume", "", "audio-volume-muted");
92 _notification.set_hint ("value", 0);
93 _notification.set_hint ("x-canonical-private-synchronous", "true");
94 _notification.set_hint ("x-canonical-non-shaped-icon", "true");
95
96 setup_accountsservice.begin ();87 setup_accountsservice.begin ();
9788
98 this.reconnect_to_pulse ();89 this.reconnect_to_pulse ();
@@ -577,21 +568,8 @@
577568
578 public void set_volume (double volume)569 public void set_volume (double volume)
579 {570 {
580 if (_volume == 0.0)571 if (set_volume_internal (volume))
581 _notification.update ("Volume", "", "audio-volume-muted");
582 if (_volume > 0.0 && _volume <= 0.33)
583 _notification.update ("Volume", "", "audio-volume-low");
584 if (_volume > 0.33 && _volume <= 0.66)
585 _notification.update ("Volume", "", "audio-volume-medium");
586 if (_volume > 0.66 && _volume <= 1.0)
587 _notification.update ("Volume", "", "audio-volume-high");
588 _notification.set_hint ("value", _volume * 100.0);
589 _notification.set_hint ("sound-file", "/usr/share/sounds/ubuntu/stereo/message.ogg");
590 _notification.show ();
591
592 if (set_volume_internal (volume)) {
593 start_local_volume_timer();572 start_local_volume_timer();
594 }
595 }573 }
596574
597 void set_mic_volume_success_cb (Context c, int success)575 void set_mic_volume_success_cb (Context c, int success)

Subscribers

People subscribed via source and target branches