aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-10-08 18:54:56 +0000
committerCI bot <ps-jenkins@lists.canonical.com>2014-10-08 18:54:56 +0000
commit76517567c49ac9b07ff798e7849da85b84102561 (patch)
treef0e54275d06e36b4c0eb5f876da2ae63d8fb1bdd
parentdbcb55e3fb48831124a3210abe36f049262bb22d (diff)
parent01f7666daad3f238bc413211322c77a347cdf202 (diff)
downloadayatana-indicator-sound-76517567c49ac9b07ff798e7849da85b84102561.tar.gz
ayatana-indicator-sound-76517567c49ac9b07ff798e7849da85b84102561.tar.bz2
ayatana-indicator-sound-76517567c49ac9b07ff798e7849da85b84102561.zip
Revert notifications on volume change.
Approved by: Charles Kerr
-rw-r--r--src/volume-control.vala24
1 files changed, 1 insertions, 23 deletions
diff --git a/src/volume-control.vala b/src/volume-control.vala
index 5a8bbe2..ba87de5 100644
--- a/src/volume-control.vala
+++ b/src/volume-control.vala
@@ -19,7 +19,6 @@
*/
using PulseAudio;
-using Notify;
using Gee;
[CCode(cname="pa_cvolume_set", cheader_filename = "pulse/volume.h")]
@@ -68,7 +67,6 @@ public class VolumeControl : Object
private uint _accountservice_volume_timer = 0;
private bool _send_next_local_volume = false;
private double _account_service_volume = 0.0;
- private Notify.Notification _notification;
public signal void volume_changed (double v);
public signal void mic_volume_changed (double v);
@@ -86,13 +84,6 @@ public class VolumeControl : Object
_mute_cancellable = new Cancellable ();
_volume_cancellable = new Cancellable ();
-
- Notify.init ("Volume");
- _notification = new Notify.Notification("Volume", "", "audio-volume-muted");
- _notification.set_hint ("value", 0);
- _notification.set_hint ("x-canonical-private-synchronous", "true");
- _notification.set_hint ("x-canonical-non-shaped-icon", "true");
-
setup_accountsservice.begin ();
this.reconnect_to_pulse ();
@@ -577,21 +568,8 @@ public class VolumeControl : Object
public void set_volume (double volume)
{
- if (_volume == 0.0)
- _notification.update ("Volume", "", "audio-volume-muted");
- if (_volume > 0.0 && _volume <= 0.33)
- _notification.update ("Volume", "", "audio-volume-low");
- if (_volume > 0.33 && _volume <= 0.66)
- _notification.update ("Volume", "", "audio-volume-medium");
- if (_volume > 0.66 && _volume <= 1.0)
- _notification.update ("Volume", "", "audio-volume-high");
- _notification.set_hint ("value", _volume * 100.0);
- _notification.set_hint ("sound-file", "/usr/share/sounds/ubuntu/stereo/message.ogg");
- _notification.show ();
-
- if (set_volume_internal (volume)) {
+ if (set_volume_internal (volume))
start_local_volume_timer();
- }
}
void set_mic_volume_success_cb (Context c, int success)