summaryrefslogtreecommitdiff
path: root/src/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/setup.c')
-rw-r--r--src/setup.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/setup.c b/src/setup.c
index 37a5382..3d1ff2e 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -102,7 +102,6 @@ parse_setup_xml (const gchar *filename)
setup->erase_exif_thumbnail = xml_file_get_node_attribute_boolean_with_default (xml, "/gallery_setup/images/erase_embed_thumbnail", "value", FALSE);
setup->strip_xmp = xml_file_get_node_attribute_boolean_with_default (xml, "/gallery_setup/images/strip_xmp", "value", TRUE);
setup->write_supplied_exif = xml_file_get_node_attribute_boolean_with_default (xml, "/gallery_setup/images/write_supplied_exif", "value", FALSE);
- setup->nofullsize = xml_file_get_node_present (xml, "/gallery_setup/images/nofullsize");
setup->autorotate = xml_file_get_node_attribute_boolean_with_default (xml, "/gallery_setup/images/autorotate", "value", TRUE);
/* meta section */
@@ -144,6 +143,18 @@ parse_setup_xml (const gchar *filename)
}
+/* Dummy image size sort func */
+static gint
+image_sizes_compare_func (TImageSize *a, TImageSize *b)
+{
+ int sa, sb;
+
+ sa = a->landscape_width + a->landscape_height + a->portrait_width + a->portrait_height + a->square_size;
+ sb = b->landscape_width + b->landscape_height + b->portrait_width + b->portrait_height + b->square_size;
+
+ return sb - sa;
+}
+
/*
* parse_design_setup_xml: XML parser for design.xml file
*/
@@ -238,6 +249,7 @@ parse_design_setup_xml (const gchar *filename)
image_size->fallback_size = xml_file_get_node_attribute (xml, s, "size");
g_free (s);
}
+ design->image_sizes = g_list_sort (design->image_sizes, (GCompareFunc) image_sizes_compare_func);
/* theme section */