summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphantom_sf <phantom_sf@f01d2545-417e-4e96-918e-98f8d0dbbcb6>2008-08-09 17:00:34 +0000
committerphantom_sf <phantom_sf@f01d2545-417e-4e96-918e-98f8d0dbbcb6>2008-08-09 17:00:34 +0000
commitb5623e36a85a491318198bf8e5013b0eb018e748 (patch)
tree969140235d5b8138455c45c31870d9ad8f06e8f1
parent07e4589f9a6bec310b82fdf63705f5b138c268be (diff)
downloadlibgpod-b5623e36a85a491318198bf8e5013b0eb018e748.tar.gz
libgpod-b5623e36a85a491318198bf8e5013b0eb018e748.tar.xz
libgpod-b5623e36a85a491318198bf8e5013b0eb018e748.zip
2008-08-09 Paul Richardson <phantom_sf at users.sourceforge.net>
* Added eclipse project related files to svn:ignore * src/db-artwork-parser.c src/itdb.h src/itdb_photoalbum.c: Added to Itdb_PhotoAlbum, a reference to its parent Photo DB. When albums are constructed upon loading of the Photo DB, the reference is added as part of initialisation. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@2096 f01d2545-417e-4e96-918e-98f8d0dbbcb6
-rw-r--r--ChangeLog10
-rw-r--r--src/db-artwork-parser.c1
-rw-r--r--src/itdb.h1
-rw-r--r--src/itdb_photoalbum.c2
4 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index fa626fd..18e1380 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-08-09 Paul Richardson <phantom_sf at users.sourceforge.net>
+
+ * Added eclipse project related files to svn:ignore
+ * src/db-artwork-parser.c
+ src/itdb.h
+ src/itdb_photoalbum.c:
+ Added to Itdb_PhotoAlbum, a reference to its parent Photo DB.
+ When albums are constructed upon loading of the Photo DB, the
+ reference is added as part of initialisation.
+
2008-08-09 Todd Zullinger <tmzullinger at users.sourceforge.net>
* src/itdb_playlist.c
diff --git a/src/db-artwork-parser.c b/src/db-artwork-parser.c
index 62cf4a1..3ee20d0 100644
--- a/src/db-artwork-parser.c
+++ b/src/db-artwork-parser.c
@@ -392,6 +392,7 @@ parse_mhba (DBParseContext *ctx, GError *error)
g_free (mhia_ctx);
photodb = db_get_photodb (ctx->db);
g_return_val_if_fail (photodb, -1);
+ album->photodb = photodb;
photodb->photoalbums = g_list_append (photodb->photoalbums,
album);
return 0;
diff --git a/src/itdb.h b/src/itdb.h
index 49d2d3c..d53f588 100644
--- a/src/itdb.h
+++ b/src/itdb.h
@@ -549,6 +549,7 @@ struct _Itdb_iTunesDB
struct _Itdb_PhotoAlbum
{
+ Itdb_PhotoDB *photodb; /* database to which this album belongs */
gchar *name; /* name of photoalbum in UTF8 */
GList *members; /* photos in album (Itdb_Artwork *) */
guint8 album_type; /* 0x01 for master (Photo Library),
diff --git a/src/itdb_photoalbum.c b/src/itdb_photoalbum.c
index 747c17e..a5e9d76 100644
--- a/src/itdb_photoalbum.c
+++ b/src/itdb_photoalbum.c
@@ -335,6 +335,7 @@ static void itdb_photodb_photoalbum_free (Itdb_PhotoAlbum *album)
{
if (album)
{
+ album->photodb = NULL;
g_free (album->name);
g_list_free (album->members);
@@ -735,6 +736,7 @@ Itdb_PhotoAlbum *itdb_photodb_photoalbum_create (Itdb_PhotoDB *db,
album = g_new0 (Itdb_PhotoAlbum, 1);
album->album_type = 2; /* normal album, set to 1 for Photo Library */
+ album->photodb = db;
album->name = g_strdup(albumname);
db->photoalbums = g_list_insert (db->photoalbums, album, pos);