From a894e2f163153553e5ac32a1f2600315971e13c4 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sat, 4 Jun 2011 18:36:44 +0200 Subject: Port border style to the new defines system This change allows greater flexibility for separate themes. --- sample/src/setup.xml | 2 -- src/generators.c | 7 ++----- src/setup.c | 2 -- src/setup.h | 1 - templates/default.xml | 8 ++++++-- templates/template_picture.html | 2 +- 6 files changed, 9 insertions(+), 13 deletions(-) diff --git a/sample/src/setup.xml b/sample/src/setup.xml index 63f9caf..8ccde39 100644 --- a/sample/src/setup.xml +++ b/sample/src/setup.xml @@ -11,8 +11,6 @@ - - diff --git a/src/generators.c b/src/generators.c index 1623ad5..c27b2e5 100644 --- a/src/generators.c +++ b/src/generators.c @@ -812,11 +812,8 @@ write_html_image (TGallerySetup *setup, s1 = item->border_style; if (s1 == NULL) s1 = parent_items->border_style; - if (s1 == NULL) - s1 = setup->border_style; - if (s1 == NULL) - s1 = "border_single"; - replace_table_add_key (replace_table, "IMG_BORDER_STYLE", s1); + if (s1) + g_hash_table_replace (defines, g_strdup ("BORDER_STYLE"), g_strdup (s1)); /* Next/Previous links */ if (next_item) { diff --git a/src/setup.c b/src/setup.c index 3a2a66d..2d7fbac 100644 --- a/src/setup.c +++ b/src/setup.c @@ -91,7 +91,6 @@ parse_setup_xml (const gchar *filename) setup->supplemental_files_use_common_root = xml_file_get_node_attribute_boolean (xml, "/gallery_setup/design/supplemental_files_use_common_root", "value", FALSE); /* images section */ - setup->border_style = xml_file_get_node_attribute (xml, "/gallery_setup/images/border", "style"); setup->preload = xml_file_get_node_attribute_boolean (xml, "/gallery_setup/images/preload", "value", TRUE); setup->use_iptc_exif = xml_file_get_node_attribute_boolean (xml, "/gallery_setup/images/use_iptc_exif", "value", FALSE); setup->erase_exif_thumbnail = xml_file_get_node_attribute_boolean (xml, "/gallery_setup/images/erase_embed_thumbnail", "value", FALSE); @@ -371,7 +370,6 @@ free_setup_data (TGallerySetup *setup) if (setup) { g_free (setup->setup_xml_path); g_free (setup->design_setup_file); - g_free (setup->border_style); g_free (setup->meta_author); g_free (setup->meta_author_email); g_free (setup->meta_description); diff --git a/src/setup.h b/src/setup.h index a96a73f..75cbef7 100644 --- a/src/setup.h +++ b/src/setup.h @@ -53,7 +53,6 @@ typedef struct { gboolean supplemental_files_use_common_root; /* images section */ - gchar *border_style; gboolean preload; gboolean use_iptc_exif; gboolean erase_exif_thumbnail; diff --git a/templates/default.xml b/templates/default.xml index 2a2fd8b..83a1c1a 100644 --- a/templates/default.xml +++ b/templates/default.xml @@ -93,8 +93,12 @@ act as block conditionals (combo "ifdef(DEFINE_NAME)" and "endif(DEFINE_NAME)") or as a value constant (specify "value(DEFINE_NAME)" to retrieve the value). For "ifdef" negation, use "ifndef" or "else". --> - - + + + +
- +
See original size (x) -- cgit v1.2.3