diff options
Diffstat (limited to 'src/setup.c')
| -rw-r--r-- | src/setup.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/setup.c b/src/setup.c index f328196..145a5f2 100644 --- a/src/setup.c +++ b/src/setup.c @@ -100,6 +100,10 @@ parse_setup_xml (const char *filename, TGallerySetup *setup) s = xml_file_get_node_attribute (xml, "/gallery_setup/templates/support_files_use_common_root", "value"); setup->support_files_use_common_root = s ? strcasecmp (s, "yes") == 0 : FALSE; /* default to FALSE */ if (s) g_free (s); + setup->index_file_name = xml_file_get_node_value (xml, "/gallery_setup/templates/index_file/text()"); + if (setup->index_file_name == NULL || strlen (setup->index_file_name) == 0) + setup->index_file_name = strdup (DEFAULT_INDEX_FILENAME); + setup->thumbnail_landscape_width = xml_file_get_node_attribute_long (xml, "/gallery_setup/images/thumbnail", "landscape_w", 0); setup->thumbnail_landscape_height = xml_file_get_node_attribute_long (xml, "/gallery_setup/images/thumbnail", "landscape_h", 0); @@ -257,6 +261,8 @@ free_setup_data (TGallerySetup *setup) free (setup->template_photo); if (setup->template_files) g_strfreev (setup->template_files); + if (setup->index_file_name) + free (setup->index_file_name); if (setup->footer) free (setup->footer); if (setup->meta_author) |
