diff options
author | Conor Curran <conor.curran@canonical.com> | 2010-06-17 16:41:54 +0100 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2010-06-17 16:41:54 +0100 |
commit | 05e82f2c6a8a72aeb3a589b702e5a9f1d68251d9 (patch) | |
tree | 1e0de7f106d14e59585926bed28db184f1434572 /src/metadata-widget.c | |
parent | 4125fd9e2eb0de55d04482b3c035aa91fe7d547a (diff) | |
download | ayatana-indicator-sound-05e82f2c6a8a72aeb3a589b702e5a9f1d68251d9.tar.gz ayatana-indicator-sound-05e82f2c6a8a72aeb3a589b702e5a9f1d68251d9.tar.bz2 ayatana-indicator-sound-05e82f2c6a8a72aeb3a589b702e5a9f1d68251d9.zip |
transport plugged in
Diffstat (limited to 'src/metadata-widget.c')
-rw-r--r-- | src/metadata-widget.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/metadata-widget.c b/src/metadata-widget.c index e0dca6e..357c31a 100644 --- a/src/metadata-widget.c +++ b/src/metadata-widget.c @@ -176,7 +176,9 @@ metadata_widget_property_update(DbusmenuMenuitem* item, gchar* property, } else if(g_ascii_strcasecmp(DBUSMENU_METADATA_MENUITEM_IMAGE_PATH, property) == 0){ priv->image_path = g_strdup(g_value_get_string(value)); - update_album_art(mitem); + if(priv->image_path != NULL){ + update_album_art(mitem); + } } } @@ -184,11 +186,13 @@ static void update_album_art(MetadataWidget* self){ MetadataWidgetPrivate * priv = METADATA_WIDGET_GET_PRIVATE(self); GdkPixbuf* pixbuf; pixbuf = gdk_pixbuf_new_from_file(priv->image_path, NULL); - pixbuf = gdk_pixbuf_scale_simple(pixbuf,60,60,GDK_INTERP_BILINEAR); + pixbuf = gdk_pixbuf_scale_simple(pixbuf,60, 60,GDK_INTERP_BILINEAR); + g_debug("attempting to set the image with path %s", priv->image_path); gtk_image_set_from_pixbuf(GTK_IMAGE(priv->album_art), pixbuf); g_object_unref(pixbuf); } + /** * transport_new: * @returns: a new #MetadataWidget. |