aboutsummaryrefslogtreecommitdiff
path: root/src/volume-control.vala
diff options
context:
space:
mode:
authorMichael Terry <michael.terry@canonical.com>2014-03-03 19:00:30 -0500
committerMichael Terry <michael.terry@canonical.com>2014-03-03 19:00:30 -0500
commit754ce6a412d782a24ad763a481af412a615ad951 (patch)
tree432818c4a27a8f4ce9d6014919641e7ce5d95934 /src/volume-control.vala
parent0b3b6c5d2e66b5372df6a34ee2beb995e5c697e7 (diff)
downloadayatana-indicator-sound-754ce6a412d782a24ad763a481af412a615ad951.tar.gz
ayatana-indicator-sound-754ce6a412d782a24ad763a481af412a615ad951.tar.bz2
ayatana-indicator-sound-754ce6a412d782a24ad763a481af412a615ad951.zip
Set AS with new values
Diffstat (limited to 'src/volume-control.vala')
-rw-r--r--src/volume-control.vala12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/volume-control.vala b/src/volume-control.vala
index b9c6399..f83d29d 100644
--- a/src/volume-control.vala
+++ b/src/volume-control.vala
@@ -240,7 +240,7 @@ public class VolumeControl : Object
public void set_mute (bool mute)
{
if (set_mute_internal (mute))
- sync_mute_to_accountsservice.begin ();
+ sync_mute_to_accountsservice.begin (mute);
}
public void toggle_mute ()
@@ -311,7 +311,7 @@ public class VolumeControl : Object
public void set_volume (double volume)
{
if (set_volume_internal (volume))
- sync_volume_to_accountsservice.begin ();
+ sync_volume_to_accountsservice.begin (volume);
}
void set_mic_volume_success_cb (Context c, int success)
@@ -431,7 +431,7 @@ public class VolumeControl : Object
}
}
- private async void sync_mute_to_accountsservice ()
+ private async void sync_mute_to_accountsservice (bool mute)
{
if (_user_proxy == null)
return;
@@ -440,13 +440,13 @@ public class VolumeControl : Object
_mute_cancellable.reset ();
try {
- yield _user_proxy.get_connection ().call (_user_proxy.get_name (), _user_proxy.get_object_path (), "org.freedesktop.DBus.Properties", "Set", new Variant ("(ssv)", _user_proxy.get_interface_name (), "Muted", new Variant ("b", _mute)), null, DBusCallFlags.NONE, -1, _mute_cancellable);
+ yield _user_proxy.get_connection ().call (_user_proxy.get_name (), _user_proxy.get_object_path (), "org.freedesktop.DBus.Properties", "Set", new Variant ("(ssv)", _user_proxy.get_interface_name (), "Muted", new Variant ("b", mute)), null, DBusCallFlags.NONE, -1, _mute_cancellable);
} catch (GLib.Error e) {
warning ("unable to sync mute to AccountsService: %s", e.message);
}
}
- private async void sync_volume_to_accountsservice ()
+ private async void sync_volume_to_accountsservice (double volume)
{
if (_user_proxy == null)
return;
@@ -455,7 +455,7 @@ public class VolumeControl : Object
_volume_cancellable.reset ();
try {
- yield _user_proxy.get_connection ().call (_user_proxy.get_name (), _user_proxy.get_object_path (), "org.freedesktop.DBus.Properties", "Set", new Variant ("(ssv)", _user_proxy.get_interface_name (), "Volume", new Variant ("d", _volume)), null, DBusCallFlags.NONE, -1, _volume_cancellable);
+ yield _user_proxy.get_connection ().call (_user_proxy.get_name (), _user_proxy.get_object_path (), "org.freedesktop.DBus.Properties", "Set", new Variant ("(ssv)", _user_proxy.get_interface_name (), "Volume", new Variant ("d", volume)), null, DBusCallFlags.NONE, -1, _volume_cancellable);
} catch (GLib.Error e) {
warning ("unable to sync volume to AccountsService: %s", e.message);
}