summaryrefslogtreecommitdiff
path: root/src/setup.h
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2014-09-15 23:45:14 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2014-09-15 23:45:14 +0200
commitd8708c220afc84549e5e4feaa09f32aa46aba4b5 (patch)
tree5c5f3a2aca7de56737a739e667c5f428321d3c34 /src/setup.h
parent2ab38412b14f38202b364558031ddb7db357f1ec (diff)
downloadcataract-d8708c220afc84549e5e4feaa09f32aa46aba4b5.tar.xz
theming: Allow themes to use different thumbnail image sizes
This change makes thumbnail image sizes more flexible by explicitly stating the particular image size is a thumbnail. And each thumbnail image size can have different squared settings. On the theme side it's now mandatory to specify which thumbnail size to use (if applicable). This allows us to have different thumbnail styles for index and album pages. This commit also removes the <squared_thumbnails> tag from setup.xml file but retains fallback for ver. 1 setup.xml files.
Diffstat (limited to 'src/setup.h')
-rw-r--r--src/setup.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/setup.h b/src/setup.h
index 9e8f9dd..64351f3 100644
--- a/src/setup.h
+++ b/src/setup.h
@@ -35,12 +35,6 @@ G_BEGIN_DECLS
/* forward declaration */
typedef struct TGalleryDesign TGalleryDesign;
-typedef enum {
- THUMBNAIL_SQUARE_TYPE_NONE,
- THUMBNAIL_SQUARE_TYPE_SIMPLE
-} ThumbnailSquareType;
-
-
/* Global gallery setup */
typedef struct {
gboolean verbose;
@@ -63,7 +57,6 @@ typedef struct {
gboolean strip_xmp;
gboolean write_supplied_exif;
gboolean nofullsize;
- ThumbnailSquareType squared_thumbnail_type;
gboolean autorotate;
/* meta section */
@@ -96,6 +89,7 @@ typedef struct {
typedef struct {
gchar *name;
+ gboolean is_thumbnail;
int landscape_width;
int landscape_height;
int portrait_width;
@@ -103,15 +97,18 @@ typedef struct {
int square_size;
int quality;
gboolean no_resize;
+ gboolean squared_thumb;
} TImageSize;
typedef struct {
gboolean enabled;
gchar *index_template;
gchar *index_filename;
+ gchar *index_thumb_size;
gchar *album_template;
gchar *album_filename;
gchar *album_image_size;
+ gchar *album_thumb_size;
gchar *album_protected_thumbnail;
gchar *picture_template;
gchar *picture_filename;
@@ -153,9 +150,14 @@ TGalleryDesign * parse_design_setup_xml (const gchar *filename);
TGalleryDesign * makeup_legacy_design (const gchar *filename);
/*
+ * lookup_image_size_for_name: looks up an image size record for given image size name
+ */
+TImageSize * lookup_image_size_for_name (TGallerySetup *setup, const gchar *name);
+
+/*
* validate_design_setup: validate design.xml file setup
*/
-gboolean validate_design_setup (TGalleryDesign *design);
+gboolean validate_design_setup (TGallerySetup *setup);
/*
* free_setup_data: free allocated setup data