diff options
-rw-r--r-- | src/mute-menu-item.c | 2 | ||||
-rw-r--r-- | src/pulseaudio-mgr.c | 15 |
2 files changed, 6 insertions, 11 deletions
diff --git a/src/mute-menu-item.c b/src/mute-menu-item.c index 4740ecf..8409b9f 100644 --- a/src/mute-menu-item.c +++ b/src/mute-menu-item.c @@ -1,4 +1,4 @@ -#/* +/* Copyright 2011 Canonical Ltd. Authors: diff --git a/src/pulseaudio-mgr.c b/src/pulseaudio-mgr.c index 736b26d..1a2b3e0 100644 --- a/src/pulseaudio-mgr.c +++ b/src/pulseaudio-mgr.c @@ -79,15 +79,7 @@ pm_establish_pulse_connection (ActiveSink* active_sink) { pa_main_loop = pa_glib_mainloop_new (g_main_context_default ()); g_assert (pa_main_loop); - pulse_context = pa_context_new (pa_glib_mainloop_get_api (pa_main_loop), - "com.canonical.indicators.sound"); - g_assert (pulse_context); - - pa_context_set_state_callback (pulse_context, - pm_context_state_callback, - (gpointer)active_sink); - - pa_context_connect (pulse_context, NULL, PA_CONTEXT_NOFAIL, (gpointer)active_sink); + reconnect_to_pulse ((gpointer)active_sink); } /** @@ -104,7 +96,10 @@ void close_pulse_activites() pa_main_loop = NULL; } - +/** +reconnect_to_pulse (gpointer user_data) +Method which connects to the pulse server and is used to track reconnects. + */ static gboolean reconnect_to_pulse (gpointer user_data) { |