diff options
author | Ted Gould <ted@gould.cx> | 2015-02-18 14:19:53 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2015-02-18 14:19:53 -0600 |
commit | 2eb6c98d25ecc54cccbb1f1cf48d838d1bb761e7 (patch) | |
tree | 5088a15be8f23dad5bda5ba40ec72d0872c4d704 | |
parent | ba1c11c53bf618dce70cc2b916c5ad5e8b9c7114 (diff) | |
download | ayatana-indicator-sound-2eb6c98d25ecc54cccbb1f1cf48d838d1bb761e7.tar.gz ayatana-indicator-sound-2eb6c98d25ecc54cccbb1f1cf48d838d1bb761e7.tar.bz2 ayatana-indicator-sound-2eb6c98d25ecc54cccbb1f1cf48d838d1bb761e7.zip |
Fixing debug messages and printing one after setting PA
-rw-r--r-- | src/volume-control-pulse.vala | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/volume-control-pulse.vala b/src/volume-control-pulse.vala index f917599..39ff14c 100644 --- a/src/volume-control-pulse.vala +++ b/src/volume-control-pulse.vala @@ -565,8 +565,9 @@ public class VolumeControlPulse : VolumeControl active_role_objp = _sink_input_hash.get (_active_sink_input); try { + double vol = _volume.volume; var builder = new VariantBuilder (new VariantType ("a(uu)")); - builder.add ("(uu)", 0, double_to_volume (_volume.volume)); + builder.add ("(uu)", 0, double_to_volume (vol)); Variant volume = builder.end (); /* Increase the signal counter so we can handle the callback */ @@ -579,7 +580,7 @@ public class VolumeControlPulse : VolumeControl new Variant ("(ssv)", "org.PulseAudio.Ext.StreamRestore1.RestoreEntry", "Volume", volume), null, DBusCallFlags.NONE, -1); - this.notify_property("volume"); + debug ("Set volume to %f on path %s", vol, active_role_objp); } catch (GLib.Error e) { lock (_pa_volume_sig_count) { _pa_volume_sig_count--; @@ -676,7 +677,7 @@ public class VolumeControlPulse : VolumeControl } } - stdout.printf ("PulseAudio dbus unix socket: %s\n", address); + debug ("PulseAudio dbus unix socket: %s", address); try { _pconn = new DBusConnection.for_address_sync (address, DBusConnectionFlags.AUTHENTICATION_CLIENT); } catch (GLib.Error e) { @@ -696,7 +697,7 @@ public class VolumeControlPulse : VolumeControl /* Only use stream restore if every used role is available */ if (_objp_role_multimedia != null && _objp_role_alert != null && _objp_role_alarm != null && _objp_role_phone != null) { - stdout.printf ("Using PulseAudio DBUS Stream Restore module\n"); + debug ("Using PulseAudio DBUS Stream Restore module"); /* Restore volume and update default entry */ update_active_sink_input.begin (-1); _pulse_use_stream_restore = true; @@ -712,7 +713,7 @@ public class VolumeControlPulse : VolumeControl /* Workaround for older versions of vala that don't provide get_objv */ VariantIter iter = props_variant.iterator (); iter.next ("o", &objp); - stdout.printf ("Found obj path %s for restore data named %s\n", objp, name); + debug ("Found obj path %s for restore data named %s\n", objp, name); } catch (GLib.Error e) { warning ("unable to find stream restore data for: %s", name); } |