aboutsummaryrefslogtreecommitdiff
path: root/src/slider-menu-item.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-03-22 00:01:53 +0000
committerConor Curran <conor.curran@canonical.com>2011-03-22 00:01:53 +0000
commit851b1bb2b1acaa5440f66d69948a066779ddf862 (patch)
tree8a1b44160ae89ad9a6be15c95179d3c102ec1455 /src/slider-menu-item.c
parent6a501d5787eec8bfef3558d14a36754f7be22858 (diff)
downloadayatana-indicator-sound-851b1bb2b1acaa5440f66d69948a066779ddf862.tar.gz
ayatana-indicator-sound-851b1bb2b1acaa5440f66d69948a066779ddf862.tar.bz2
ayatana-indicator-sound-851b1bb2b1acaa5440f66d69948a066779ddf862.zip
more trace added
Diffstat (limited to 'src/slider-menu-item.c')
-rw-r--r--src/slider-menu-item.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/slider-menu-item.c b/src/slider-menu-item.c
index 1a57032..b194395 100644
--- a/src/slider-menu-item.c
+++ b/src/slider-menu-item.c
@@ -108,11 +108,11 @@ handle_event (DbusmenuMenuitem * mi,
SliderMenuItemPrivate* priv = SLIDER_MENU_ITEM_GET_PRIVATE (SLIDER_MENU_ITEM (mi));
gdouble volume_input = g_variant_get_double (value);
-/*
+
g_debug ("slider menu item handle event with value %f on name %s",
volume_input,
name);
-*/
+
slider_menu_item_update_volume (SLIDER_MENU_ITEM (mi), volume_input);
device_ensure_sink_is_unmuted (priv->a_sink);
}
@@ -147,9 +147,9 @@ slider_menu_item_populate (SliderMenuItem* self, const pa_sink_info* update)
static void
slider_menu_item_update_volume (SliderMenuItem* self, gdouble percent)
{
-/*
+
g_debug ("slider menu item update volume - about to set the volume to %f", percent);
-*/
+
pa_cvolume new_volume;
pa_cvolume_init(&new_volume);
@@ -177,12 +177,14 @@ slider_menu_item_update (SliderMenuItem* self, const pa_sink_info* update)
gdouble volume_percent = ((gdouble) vol * 100) / PA_VOLUME_NORM;
GVariant* new_volume = g_variant_new_double (volume_percent);
-/*
+
g_debug ("slider menu item update - volume update to ui to %f", volume_percent);
-*/
+
+
dbusmenu_menuitem_property_set_variant (DBUSMENU_MENUITEM(self),
DBUSMENU_VOLUME_MENUITEM_LEVEL,
new_volume);
+
if (priv->mute != update->mute){
priv->mute = update->mute;
/*
@@ -241,4 +243,4 @@ slider_menu_item_new (Device* sink)
SliderMenuItemPrivate* priv = SLIDER_MENU_ITEM_GET_PRIVATE (self);
priv->a_sink = sink;
return self;
-} \ No newline at end of file
+}