[rhythmbox] header: handle images added outside of requests
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] header: handle images added outside of requests
- Date: Fri, 6 Apr 2012 02:04:01 +0000 (UTC)
commit 34e8145db3755a901b95f35cbc72b85b0f8dfa2f
Author: Jonathan Matthew <jonathan d14n org>
Date: Fri Apr 6 11:59:25 2012 +1000
header: handle images added outside of requests
widgets/rb-header.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/widgets/rb-header.c b/widgets/rb-header.c
index 044886d..b5e8e7a 100644
--- a/widgets/rb-header.c
+++ b/widgets/rb-header.c
@@ -95,6 +95,7 @@ static void rb_header_sync_time (RBHeader *header);
static void uri_dropped_cb (RBFadingImage *image, const char *uri, RBHeader *header);
static void pixbuf_dropped_cb (RBFadingImage *image, GdkPixbuf *pixbuf, RBHeader *header);
static void image_button_press_cb (GtkWidget *widget, GdkEvent *event, RBHeader *header);
+static void art_added_cb (RBExtDB *db, RBExtDBKey *key, const char *filename, GValue *data, RBHeader *header);
struct RBHeaderPrivate
{
@@ -331,6 +332,10 @@ rb_header_init (RBHeader *header)
/* image display */
header->priv->art_store = rb_ext_db_new ("album-art");
+ g_signal_connect (header->priv->art_store,
+ "added",
+ G_CALLBACK (art_added_cb),
+ header);
header->priv->image = GTK_WIDGET (g_object_new (RB_TYPE_FADING_IMAGE,
"fallback", RB_STOCK_MISSING_ARTWORK,
NULL));
@@ -397,7 +402,6 @@ rb_header_finalize (GObject *object)
G_OBJECT_CLASS (rb_header_parent_class)->finalize (object);
}
-
static void
art_cb (RBExtDBKey *key, const char *filename, GValue *data, RBHeader *header)
{
@@ -425,6 +429,13 @@ art_cb (RBExtDBKey *key, const char *filename, GValue *data, RBHeader *header)
}
static void
+art_added_cb (RBExtDB *db, RBExtDBKey *key, const char *filename, GValue *data, RBHeader *header)
+{
+ art_cb (key, filename, data, header);
+}
+
+
+static void
rb_header_playing_song_changed_cb (RBShellPlayer *player, RhythmDBEntry *entry, RBHeader *header)
{
if (header->priv->entry == entry)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]