aboutsummaryrefslogtreecommitdiff
path: root/src/metadata-widget.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-06-17 18:02:38 +0100
committerConor Curran <conor.curran@canonical.com>2010-06-17 18:02:38 +0100
commit5f7e8583de28afb9424666bbf9652b9774cf9499 (patch)
tree37ab15bef7ff780e512a24d685e11436ab1b6b84 /src/metadata-widget.c
parent05e82f2c6a8a72aeb3a589b702e5a9f1d68251d9 (diff)
downloadayatana-indicator-sound-5f7e8583de28afb9424666bbf9652b9774cf9499.tar.gz
ayatana-indicator-sound-5f7e8583de28afb9424666bbf9652b9774cf9499.tar.bz2
ayatana-indicator-sound-5f7e8583de28afb9424666bbf9652b9774cf9499.zip
merge request comments applied
Diffstat (limited to 'src/metadata-widget.c')
-rw-r--r--src/metadata-widget.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/metadata-widget.c b/src/metadata-widget.c
index 357c31a..c4d3b50 100644
--- a/src/metadata-widget.c
+++ b/src/metadata-widget.c
@@ -158,10 +158,13 @@ metadata_widget_button_release_event (GtkWidget *menuitem,
return TRUE;
}
+// TODO: Manage empty/mangled music details <unknown artist> etc.
static void
metadata_widget_property_update(DbusmenuMenuitem* item, gchar* property,
GValue* value, gpointer userdata)
{
+ g_return_if_fail (IS_METADATA_WIDGET (userdata));
+
MetadataWidget* mitem = METADATA_WIDGET(userdata);
MetadataWidgetPrivate * priv = METADATA_WIDGET_GET_PRIVATE(mitem);
@@ -175,8 +178,13 @@ metadata_widget_property_update(DbusmenuMenuitem* item, gchar* property,
gtk_label_set_text(GTK_LABEL(priv->container_label), g_value_get_string(value));
}
else if(g_ascii_strcasecmp(DBUSMENU_METADATA_MENUITEM_IMAGE_PATH, property) == 0){
- priv->image_path = g_strdup(g_value_get_string(value));
- if(priv->image_path != NULL){
+ if(priv->image_path != NULL){
+ g_free(priv->image_path);
+ }
+
+ priv->image_path = g_value_dup_string(value);
+
+ if(priv->image_path != NULL){
update_album_art(mitem);
}
}