diff options
author | Conor Curran <conor.curran@canonical.com> | 2011-02-07 18:08:19 +0000 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2011-02-07 18:08:19 +0000 |
commit | fba8f5aa4d7619b6e796ebb7cd4c96d30f5fd0ff (patch) | |
tree | 0c729f8b6106119be61d56a40c25eaab2cc72bba | |
parent | a87a201a7873fa28c08bdee08d710efd7a2ae731 (diff) | |
download | ayatana-indicator-sound-fba8f5aa4d7619b6e796ebb7cd4c96d30f5fd0ff.tar.gz ayatana-indicator-sound-fba8f5aa4d7619b6e796ebb7cd4c96d30f5fd0ff.tar.bz2 ayatana-indicator-sound-fba8f5aa4d7619b6e796ebb7cd4c96d30f5fd0ff.zip |
tidy ups and comments
-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) { |