diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/playlists-menu-item.vala | 2 | ||||
-rw-r--r-- | src/slider-menu-item.c | 16 | ||||
-rw-r--r-- | src/volume-widget.c | 8 |
3 files changed, 17 insertions, 9 deletions
diff --git a/src/playlists-menu-item.vala b/src/playlists-menu-item.vala index 79ab506..6524bec 100644 --- a/src/playlists-menu-item.vala +++ b/src/playlists-menu-item.vala @@ -80,7 +80,7 @@ public class PlaylistsMenuitem : PlayerItem if (this.root_item.property_get (MENUITEM_PATH) == item.property_get (MENUITEM_PATH)){ this.root_item.property_set (MENUITEM_PROP_LABEL, _("Choose Playlist")); } - this.root_item.child_delete (item); + //this.root_item.child_delete (item); } } } 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 +} diff --git a/src/volume-widget.c b/src/volume-widget.c index 1a6895e..77392c8 100644 --- a/src/volume-widget.c +++ b/src/volume-widget.c @@ -131,6 +131,12 @@ volume_widget_property_update( DbusmenuMenuitem* item, gchar* property, g_return_if_fail (IS_VOLUME_WIDGET (userdata)); VolumeWidget* mitem = VOLUME_WIDGET(userdata); VolumeWidgetPrivate * priv = VOLUME_WIDGET_GET_PRIVATE(mitem); + + g_debug ("volume-widget::volume_widget_property_update for prop %s, is it a double %i", + property, g_variant_is_of_type (value, G_VARIANT_TYPE_DOUBLE) ); + g_debug ("volume-widget::volume_widget_property_update for prop %s, is it a boolean %i", + property, g_variant_is_of_type (value, G_VARIANT_TYPE_BOOLEAN) ); + if(g_ascii_strcasecmp(DBUSMENU_VOLUME_MENUITEM_LEVEL, property) == 0){ g_return_if_fail (g_variant_is_of_type (value, G_VARIANT_TYPE_DOUBLE) ); if(priv->grabbed == FALSE){ @@ -139,7 +145,7 @@ volume_widget_property_update( DbusmenuMenuitem* item, gchar* property, gdouble update = g_variant_get_double (value); gtk_range_set_value(range, update); update_accessible_desc(priv->indicator); - g_debug ("volume-widget::volume_widget_property_update - mute - value %f", update); + g_debug ("volume-widget::volume_widget_property_update - volume - value %f", update); } } else if(g_ascii_strcasecmp(DBUSMENU_VOLUME_MENUITEM_MUTE, property) == 0){ |