aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-10-05 17:15:34 +0100
committerConor Curran <conor.curran@canonical.com>2010-10-05 17:15:34 +0100
commit352919657eab5a4e1fc63e6191cc088b148ab376 (patch)
tree2dc63b4db35be80a2173f8722a19420e6ea9e944
parent4fc0ff60801ac25c7edbf099916a96d12089818c (diff)
downloadayatana-indicator-sound-352919657eab5a4e1fc63e6191cc088b148ab376.tar.gz
ayatana-indicator-sound-352919657eab5a4e1fc63e6191cc088b148ab376.tar.bz2
ayatana-indicator-sound-352919657eab5a4e1fc63e6191cc088b148ab376.zip
removed unused pulse method
-rw-r--r--src/pulse-manager.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/pulse-manager.c b/src/pulse-manager.c
index b8e2ef7..8779525 100644
--- a/src/pulse-manager.c
+++ b/src/pulse-manager.c
@@ -43,7 +43,6 @@ static void pulse_server_info_callback(pa_context *c, const pa_server_info *info
static void update_sink_info(pa_context *c, const pa_sink_info *info, int eol, void *userdata);
static void destroy_sink_info(void *value);
static gboolean determine_sink_availability();
-static void reconnect_to_pulse();
static gboolean has_volume_changed(const pa_sink_info* new_sink, sink_info* cached_sink);
static pa_cvolume construct_mono_volume(const pa_cvolume* vol);
@@ -100,35 +99,6 @@ void close_pulse_activites()
}
/**
-reconnect_to_pulse()
-In the event of Pulseaudio flapping in the wind handle gracefully without
-memory leaks !
-*/
-static void reconnect_to_pulse()
-{
- // reset
- if (pulse_context != NULL) {
- g_debug("freeing the pulse context");
- pa_context_unref(pulse_context);
- pulse_context = NULL;
- }
-
- if (sink_hash != NULL) {
- g_hash_table_destroy(sink_hash);
- sink_hash = NULL;
- }
-
- // reconnect
- pulse_context = pa_context_new(pa_glib_mainloop_get_api(pa_main_loop), "ayatana.indicator.sound");
- g_assert(pulse_context);
- sink_hash = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, destroy_sink_info);
- // Establish event callback registration
- pa_context_set_state_callback(pulse_context, context_state_callback, NULL);
- dbus_menu_manager_update_pa_state(FALSE, FALSE, FALSE, 0);
- pa_context_connect(pulse_context, NULL, PA_CONTEXT_NOFAIL, NULL);
-}
-
-/**
destroy_sink_info()
item destructor method for the sink_info hash
**/