diff options
Diffstat (limited to 'src/items.c')
| -rw-r--r-- | src/items.c | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/src/items.c b/src/items.c index 5fc1963..98f97d2 100644 --- a/src/items.c +++ b/src/items.c @@ -30,31 +30,6 @@ #include "atom-writer.h" -static gchar * -get_album_path (TAlbum *items) -{ - TIndexItem *parent_item; - TAlbum *parent; - int old_parent_item_index; - gchar *path; - gchar *s; - - path = NULL; - parent = items->parent_index; - old_parent_item_index = items->parent_item_index; - while (parent) { - parent_item = g_ptr_array_index (parent->items, old_parent_item_index); - if (! parent_item) - break; - s = g_strdup_printf ("/%s%s", parent_item->path, path ? path : ""); - g_free (path); - path = s; - old_parent_item_index = parent->parent_item_index; - parent = parent->parent_index; - } - - return path ? path : g_strdup ("/"); -} static void free_album_item (TIndexItem *item) @@ -73,7 +48,7 @@ free_album_item (TIndexItem *item) * parse_album_xml: XML parser for gallery index.xml files */ TAlbum * -parse_album_xml (const gchar *filename) +parse_album_xml (const gchar *filename, TPathInfo *path_info) { TXMLFile *xml; gchar *gallery_type; @@ -160,9 +135,7 @@ parse_album_xml (const gchar *filename) atom_feed_item_set_summary (feed_item, s2); g_free (s2); - s = get_album_path (index); - atom_feed_item_set_path (feed_item, s); - g_free (s); + atom_feed_item_set_path (feed_item, path_info->album_path); } } |
