diff options
author | waker <wakeroid@gmail.com> | 2012-12-03 18:34:49 +0100 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2012-12-03 18:34:49 +0100 |
commit | d2f1b28b81d0f80ef14536d5955a1b92925c62cc (patch) | |
tree | c7343627301395c2cbde92a6d88dc96504a173d7 /plugins/gtkui/plcommon.c | |
parent | 47201c70fcf8f85e333bab2d3804fe7a89539b4a (diff) |
gtkui: cover art fixes
Diffstat (limited to 'plugins/gtkui/plcommon.c')
-rw-r--r-- | plugins/gtkui/plcommon.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/plugins/gtkui/plcommon.c b/plugins/gtkui/plcommon.c index 880f5f81..65734752 100644 --- a/plugins/gtkui/plcommon.c +++ b/plugins/gtkui/plcommon.c @@ -73,6 +73,19 @@ rewrite_column_config (DdbListview *listview, const char *name) { } } +static gboolean +redraw_playlist_cb (gpointer dt) { + void main_refresh (void); + main_refresh (); + return FALSE; +} + +static void +redraw_playlist (void *user_data) { + g_idle_add (redraw_playlist_cb, NULL); +} + + #define ART_PADDING_HORZ 8 #define ART_PADDING_VERT 0 @@ -134,7 +147,7 @@ void draw_column_data (DdbListview *listview, cairo_t *cr, DdbListviewIter it, D if (!album || !*album) { album = deadbeef->pl_find_meta (group_it, "title"); } - GdkPixbuf *pixbuf = get_cover_art (deadbeef->pl_find_meta (((DB_playItem_t *)group_it), ":URI"), artist, album, art_width); + GdkPixbuf *pixbuf = get_cover_art_callb (deadbeef->pl_find_meta (((DB_playItem_t *)group_it), ":URI"), artist, album, art_width, redraw_playlist, NULL); if (pixbuf) { int pw = gdk_pixbuf_get_width (pixbuf); int ph = gdk_pixbuf_get_height (pixbuf); |