diff options
author | Conor Curran <conor.curran@canonical.com> | 2010-08-06 13:22:25 +0100 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2010-08-06 13:22:25 +0100 |
commit | 8286c9e86314f8ff459576efde19b03709634140 (patch) | |
tree | 4fe1716675002bc8cde09e647e8431f7da2ff235 /src/pulse-manager.c | |
parent | 830c82bc82d7ea3bc891b35e2169170e1352c199 (diff) | |
parent | 734cf9dc8224140b6b729c09237d598aec546ef3 (diff) | |
download | ayatana-indicator-sound-8286c9e86314f8ff459576efde19b03709634140.tar.gz ayatana-indicator-sound-8286c9e86314f8ff459576efde19b03709634140.tar.bz2 ayatana-indicator-sound-8286c9e86314f8ff459576efde19b03709634140.zip |
volume slider refactor merged
Diffstat (limited to 'src/pulse-manager.c')
-rw-r--r-- | src/pulse-manager.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/pulse-manager.c b/src/pulse-manager.c index a9a47e4..4ff9e1d 100644 --- a/src/pulse-manager.c +++ b/src/pulse-manager.c @@ -211,7 +211,8 @@ static void mute_each_sink(gpointer key, gpointer value, gpointer user_data) if (GPOINTER_TO_INT(user_data) == 1) { sound_service_dbus_update_sink_mute(dbus_service, TRUE); } else { - sound_service_dbus_update_sink_volume(dbus_service, get_default_sink_volume()); + //sound_service_dbus_update_sink_volume(dbus_service, get_default_sink_volume()); + dbus_menu_manager_update_volume(get_default_sink_volume()); } /* g_debug("in the pulse manager: mute each sink %i", GPOINTER_TO_INT(user_data));*/ @@ -288,7 +289,7 @@ static void context_success_callback(pa_context *c, int success, void *userdata) /** On Service startup this callback will be called multiple times resulting our sinks_hash container to be filled with the available sinks. -For now this callback it assumes it only used at startup. It may be necessary to use if sinks become available after startup. +For now this callback assumes it only used at startup. It may be necessary to use if sinks become available after startup. Major candidate for refactoring. **/ static void pulse_sink_info_callback(pa_context *c, const pa_sink_info *sink, int eol, void *userdata) @@ -399,7 +400,7 @@ static void update_sink_info(pa_context *c, const pa_sink_info *info, int eol, v pa_volume_t vol = pa_cvolume_max(&s->volume); gdouble volume_percent = ((gdouble) vol * 100) / PA_VOLUME_NORM; /* g_debug("Updating volume from PA manager with volume = %f", volume_percent);*/ - sound_service_dbus_update_sink_volume(dbus_service, volume_percent); + dbus_menu_manager_update_volume(volume_percent); } if (mute_changed == TRUE) { @@ -410,7 +411,8 @@ static void update_sink_info(pa_context *c, const pa_sink_info *info, int eol, v pa_volume_t vol = pa_cvolume_max(&s->volume); gdouble volume_percent = ((gdouble) vol * 100) / PA_VOLUME_NORM; /* g_debug("Updating volume from PA manager with volume = %f", volume_percent);*/ - sound_service_dbus_update_sink_volume(dbus_service, volume_percent); + //sound_service_dbus_update_sink_volume(dbus_service, volume_percent); + dbus_menu_manager_update_volume(volume_percent); } } } |