aboutsummaryrefslogtreecommitdiff
path: root/src/sound-service.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-02-04 11:22:33 -0800
committerConor Curran <conor.curran@canonical.com>2010-02-04 11:22:33 -0800
commit3ae4622f023e91f1963aae272e443593b41db705 (patch)
tree7935d0faedd459d1ade66c441417a0e1caa0777b /src/sound-service.c
parent60ea7aa0f6219a69d05b658cba562d1e2c6104e2 (diff)
downloadayatana-indicator-sound-3ae4622f023e91f1963aae272e443593b41db705.tar.gz
ayatana-indicator-sound-3ae4622f023e91f1963aae272e443593b41db705.tar.bz2
ayatana-indicator-sound-3ae4622f023e91f1963aae272e443593b41db705.zip
images now change on scale of volume
Diffstat (limited to 'src/sound-service.c')
-rw-r--r--src/sound-service.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sound-service.c b/src/sound-service.c
index ce2b101..e7341bd 100644
--- a/src/sound-service.c
+++ b/src/sound-service.c
@@ -79,6 +79,12 @@ static void set_global_mute()
b_all_muted = !b_all_muted;
toggle_global_mute(b_all_muted);
dbusmenu_menuitem_property_set(mute_all_menuitem, DBUSMENU_MENUITEM_PROP_LABEL, _(b_all_muted == FALSE ? "Mute All" : "Unmute"));
+
+/* GValue value = {0};*/
+/* g_value_init(&value, G_TYPE_DOUBLE);*/
+/* g_value_set_double(&value, 100.0);*/
+/* // Testing*/
+/* dbusmenu_menuitem_property_set_value(DBUSMENU_MENUITEM(volume_slider_menuitem), DBUSMENU_SLIDER_MENUITEM_PROP_VOLUME, &value);*/
}
@@ -106,6 +112,12 @@ void update_pa_state(gboolean pa_state, gboolean sink_available, gboolean sink_m
volume_percent = percent;
g_debug("update pa state with state %i, availability of %i, mute value of %i and a volume percent is %f", pa_state, sink_available, sink_muted, volume_percent);
rebuild_sound_menu(root_menuitem, dbus_interface);
+ g_debug("About to send over the volume slider");
+ GValue value = {0};
+ g_value_init(&value, G_TYPE_DOUBLE);
+ g_value_set_double(&value, volume_percent * 100);
+ dbusmenu_menuitem_property_set_value(DBUSMENU_MENUITEM(volume_slider_menuitem), DBUSMENU_SLIDER_MENUITEM_PROP_VOLUME, &value);
+
}