summaryrefslogtreecommitdiff
path: root/src/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/setup.c')
-rw-r--r--src/setup.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/setup.c b/src/setup.c
index d945021..5cfc255 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -193,10 +193,14 @@ parse_design_setup_xml (const gchar *filename)
if (s2 && g_ascii_strcasecmp (s2, "thumbnail") == 0)
image_size->is_thumbnail = TRUE;
g_free (s2);
+ image_size->thumb_crop_style = CROP_STYLE_NORMAL;
if (image_size->is_thumbnail) {
s2 = xml_file_get_node_attribute (xml, s, "style");
if (s2 && g_ascii_strcasecmp (s2, "squared") == 0)
- image_size->squared_thumb = TRUE;
+ image_size->thumb_crop_style = CROP_STYLE_SQUARED;
+ else
+ if (s2 && g_ascii_strcasecmp (s2, "fixed") == 0)
+ image_size->thumb_crop_style = CROP_STYLE_FIXED;
g_free (s2);
}
g_free (s);
@@ -219,6 +223,11 @@ parse_design_setup_xml (const gchar *filename)
image_size->square_size = xml_file_get_node_attribute_long_with_default (xml, s, "size", 0);
g_free (s);
+ s = g_strdup_printf ("/design_setup/image_sizes/size[%d]/crop", i + 1);
+ image_size->crop_width = xml_file_get_node_attribute_long_with_default (xml, s, "w", 0);
+ image_size->crop_height = xml_file_get_node_attribute_long_with_default (xml, s, "h", 0);
+ g_free (s);
+
s = g_strdup_printf ("/design_setup/image_sizes/size[%d]/quality", i + 1);
image_size->quality = xml_file_get_node_attribute_long_with_default (xml, s, "value", -1);
g_free (s);
@@ -347,7 +356,7 @@ makeup_legacy_design (const gchar *filename)
image_size->quality = xml_file_get_node_attribute_long_with_default (xml, s, "quality", -1);
image_size->no_resize = (i != 0);
image_size->is_thumbnail = (i == 0);
- image_size->squared_thumb = (i == 0) && squared_thumbs;
+ image_size->thumb_crop_style = ((i == 0) && squared_thumbs) ? CROP_STYLE_SQUARED : CROP_STYLE_NORMAL;
g_free (s);
design->image_sizes = g_list_append (design->image_sizes, image_size);
}