diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2015-01-04 19:58:05 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2015-01-04 19:58:05 +0100 |
| commit | 1f9e7dee25dfd002b6b1ab4636faa9a24f74d09f (patch) | |
| tree | fb8343fddb4e6931cd361f78b30b292532a03dfa /src/items.h | |
| parent | 6f6d8002d318d502ca1f645f95a4c018871c70b3 (diff) | |
| download | cataract-1f9e7dee25dfd002b6b1ab4636faa9a24f74d09f.tar.xz | |
generators: Use single function for all templates
This commit makes use of a common function for all template parsing and page
writing. The behaviour is controlled by the "item" argument passed in. This
allows us to have a single code that generates code for list of items as well
as for a single item. In the future, this can be used for e.g. combining
thumbnails and large images on the same page.
Other than that this commit also brings several other changes:
- further clarification of theming setup XML file
- <protected_thumbnail> tag has been moved out of the <album> structure into
the <index> structure where it functionally belongs. Only whole albums can
be protected and the substitute thumbnail is displayed on index pages.
- position marker format has been broken out to a constant
- added few more FIXMEs to mark places that will change soon
- some template variables have been renamed
Diffstat (limited to 'src/items.h')
| -rw-r--r-- | src/items.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/items.h b/src/items.h index 46b4c38..8c14dda 100644 --- a/src/items.h +++ b/src/items.h @@ -76,8 +76,8 @@ typedef struct { gchar *path; gchar *title; gchar *title_description; - gchar *thumbnail; - gchar *preview; + gchar *thumbnail; /* FIXME: port to flexible image sizes */ + gchar *preview; /* FIXME: port to flexible image sizes */ gboolean force_nofullsize; gboolean force_fullsize; gboolean hidden; @@ -113,7 +113,8 @@ typedef enum { /* * GET_ITEM_TARGET_FILENAME: get target item filename */ -#define GET_ITEM_TARGET_FILENAME(i) g_path_get_basename ((i->path == NULL && i->preview) ? i->preview : i->path); +/* FIXME: port to flexible image sizes */ +#define GET_ITEM_TARGET_FILENAME(i) g_path_get_basename ((i->path == NULL && i->preview) ? i->preview : i->path) /* * parse_album_xml: XML parser for gallery index.xml files |
