aboutsummaryrefslogtreecommitdiff
path: root/src/slider-menu-item.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-03-22 19:53:19 +0000
committerConor Curran <conor.curran@canonical.com>2011-03-22 19:53:19 +0000
commit0a7074927f2f600b6e7eb98459b97b73de0baa8d (patch)
tree17fdc92413bd0a354f0d36c0284df7aa0d6a45f4 /src/slider-menu-item.c
parent851b1bb2b1acaa5440f66d69948a066779ddf862 (diff)
downloadayatana-indicator-sound-0a7074927f2f600b6e7eb98459b97b73de0baa8d.tar.gz
ayatana-indicator-sound-0a7074927f2f600b6e7eb98459b97b73de0baa8d.tar.bz2
ayatana-indicator-sound-0a7074927f2f600b6e7eb98459b97b73de0baa8d.zip
protected now against any type ot irregular spam dbusmenu may throw at it
Diffstat (limited to 'src/slider-menu-item.c')
-rw-r--r--src/slider-menu-item.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/slider-menu-item.c b/src/slider-menu-item.c
index b194395..8186fa3 100644
--- a/src/slider-menu-item.c
+++ b/src/slider-menu-item.c
@@ -69,9 +69,6 @@ slider_menu_item_class_init (SliderMenuItemClass *klass)
static void
slider_menu_item_init (SliderMenuItem *self)
{
-/*
- g_debug("Building new Slider Menu Item");
-*/
dbusmenu_menuitem_property_set( DBUSMENU_MENUITEM(self),
DBUSMENU_MENUITEM_PROP_TYPE,
DBUSMENU_VOLUME_MENUITEM_TYPE );
@@ -109,9 +106,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);
@@ -148,8 +147,9 @@ 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);
@@ -178,8 +178,9 @@ slider_menu_item_update (SliderMenuItem* self, const pa_sink_info* update)
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,