+ GdkPixbuf *pix = NULL;
+ GError *p_error = NULL;
+
+ psz_arturl = input_item_GetArtURL( input_GetItem( p_input ) );
+ if( psz_arturl && !strncmp( psz_arturl, "file://", 7 ) &&
+ strlen( psz_arturl ) > 7 )
+ { /* scale the art to show it in notify popup */
+ gboolean b = TRUE;
+ pix = gdk_pixbuf_new_from_file_at_scale(
+ (psz_arturl + 7), 72, 72, b, &p_error );
+ free( psz_arturl );
+ }
+ else /* else we show state-of-the art logo */
+ pix = gdk_pixbuf_new_from_file( DATA_PATH "/vlc48x48.png", &p_error );
+
+ /* we need to replace '&' with '&' because '&' is a keyword of
+ * notification-daemon parser */
+ int i_notify, i_len, i;
+ i_len = strlen( psz_tmp );
+ i_notify = 0;
+ for( i = 0; ( ( i < i_len ) && ( i_notify < ( MAX_LENGTH - 5 ) ) ); i++ )
+ { /* we use MAX_LENGTH - 5 because if the last char of psz_tmp is '&'
+ * we will need 5 more characters: 'amp;\0' .
+ * however that's unlikely to happen because the last char is '\0' */
+ if( psz_tmp[i] != '&' )
+ psz_notify[i_notify] = psz_tmp[i];
+ else
+ {
+ snprintf( psz_notify + i_notify, 6, "&" );
+ i_notify += 4;
+ }
+ i_notify++;
+ }
+ psz_notify[i_notify] = '\0';
+