[Xfce4-commits] [panel-plugins/xfce4-pulseaudio-plugin] 06/12: Check volume at start up
noreply at xfce.org
noreply at xfce.org
Tue Feb 17 00:12:45 CET 2015
This is an automated email from the git hooks/post-receive script.
andrzejr pushed a commit to branch master
in repository panel-plugins/xfce4-pulseaudio-plugin.
commit a4c2b790637e3568a3d7ab771359151f168d26c5
Author: Andrzej <ndrwrdck at gmail.com>
Date: Wed Apr 30 22:34:54 2014 +0100
Check volume at start up
---
panel-plugin/pulseaudio-volume.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/panel-plugin/pulseaudio-volume.c b/panel-plugin/pulseaudio-volume.c
index cd34ad6..279f359 100644
--- a/panel-plugin/pulseaudio-volume.c
+++ b/panel-plugin/pulseaudio-volume.c
@@ -172,6 +172,18 @@ pulseaudio_volume_server_info_cb (pa_context *context,
static void
+pulseaudio_volume_sink_check (PulseaudioVolume *volume,
+ pa_context *context)
+{
+ g_return_if_fail (IS_PULSEAUDIO_VOLUME (volume));
+
+ pa_context_get_server_info (context, pulseaudio_volume_server_info_cb, volume);
+}
+
+
+
+
+static void
pulseaudio_volume_subscribe_cb (pa_context *context,
pa_subscription_event_type_t t,
uint32_t idx,
@@ -182,8 +194,8 @@ pulseaudio_volume_subscribe_cb (pa_context *context,
switch (t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK)
{
case PA_SUBSCRIPTION_EVENT_SINK :
- pa_context_get_server_info (context, pulseaudio_volume_server_info_cb, volume);
- //g_debug ("PulseAudio sink event");
+ pulseaudio_volume_sink_check (volume, context);
+ g_debug ("PulseAudio sink event");
break;
case PA_SUBSCRIPTION_EVENT_SOURCE :
@@ -217,6 +229,7 @@ pulseaudio_volume_context_state_cb (pa_context *context,
g_debug ("PulseAudio connection established");
volume->connected = TRUE;
+ pulseaudio_volume_sink_check (volume, context);
break;
case PA_CONTEXT_FAILED :
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list