diff options
author | phantom_sf <phantom_sf@f01d2545-417e-4e96-918e-98f8d0dbbcb6> | 2008-08-09 17:00:34 +0000 |
---|---|---|
committer | phantom_sf <phantom_sf@f01d2545-417e-4e96-918e-98f8d0dbbcb6> | 2008-08-09 17:00:34 +0000 |
commit | b5623e36a85a491318198bf8e5013b0eb018e748 (patch) | |
tree | 969140235d5b8138455c45c31870d9ad8f06e8f1 /src | |
parent | 07e4589f9a6bec310b82fdf63705f5b138c268be (diff) | |
download | libgpod-tmz-b5623e36a85a491318198bf8e5013b0eb018e748.tar.gz libgpod-tmz-b5623e36a85a491318198bf8e5013b0eb018e748.tar.xz libgpod-tmz-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
Diffstat (limited to 'src')
-rw-r--r-- | src/db-artwork-parser.c | 1 | ||||
-rw-r--r-- | src/itdb.h | 1 | ||||
-rw-r--r-- | src/itdb_photoalbum.c | 2 |
3 files changed, 4 insertions, 0 deletions
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; @@ -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); |