summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2015-02-01 17:52:10 +0100
committerTomas Bzatek <tbzatek@users.sourceforge.net>2015-02-01 17:52:10 +0100
commit9f927315eb2536ac37d67ed304c02bcd4ea755c9 (patch)
tree90292f5c7524757c0771671acb5df2dcd454ceab /src
parent44640c813bc030f92235ef16fbe4680f5e811b13 (diff)
downloadcataract-9f927315eb2536ac37d67ed304c02bcd4ea755c9.tar.xz
theming: Fix thumbnail sizes validation
Diffstat (limited to 'src')
-rw-r--r--src/setup.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/setup.c b/src/setup.c
index f0a6f3d..911a702 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -457,8 +457,11 @@ validate_design_setup (TGallerySetup *setup)
for (l = g_list_first (setup->design->image_sizes); l; l = g_list_next (l)) {
image_size = l->data;
g_assert (image_size != NULL);
- if (image_size->landscape_width <= 0 || image_size->landscape_height <= 0 ||
- image_size->portrait_width <= 0 || image_size->portrait_height <= 0) {
+ if (((! image_size->is_thumbnail || image_size->thumb_crop_style == CROP_STYLE_NORMAL) && (
+ image_size->landscape_width <= 0 || image_size->landscape_height <= 0 ||
+ image_size->portrait_width <= 0 || image_size->portrait_height <= 0)) ||
+ (image_size->thumb_crop_style == CROP_STYLE_SQUARED && image_size->square_size <= 0) ||
+ (image_size->thumb_crop_style == CROP_STYLE_FIXED && (image_size->crop_width <= 0 || image_size->crop_height <= 0))) {
fprintf (stderr, "design validation warning: image size %s defined with zero sized element\n", image_size->name);
continue;
}