summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2015-01-25 19:09:08 +0100
committerTomas Bzatek <tbzatek@users.sourceforge.net>2015-01-25 19:09:08 +0100
commit5a9e74611d2faef1fb68873b1e7925a5850ec86f (patch)
tree18ed0d6d32f4e9ace5032dfc782d24238f827c0a
parent6fffe1a21d5acaa544f7796241e13ff37e75349f (diff)
downloadcataract-5a9e74611d2faef1fb68873b1e7925a5850ec86f.tar.xz
generators: Rename HAS_ conditionals to HAVE_
... just a matter of personal taste. Note: this breaks the template API only in current unreleased versions.
-rw-r--r--src/generators.c8
-rw-r--r--templates/template_picture.html18
2 files changed, 13 insertions, 13 deletions
diff --git a/src/generators.c b/src/generators.c
index e1bedf9..c1cb2e4 100644
--- a/src/generators.c
+++ b/src/generators.c
@@ -321,7 +321,7 @@ get_exif_value_fixed_cb (gchar **args, gpointer user_data)
}
static gboolean
-has_exif_key_cb (gchar **args, gpointer user_data)
+have_exif_key_cb (gchar **args, gpointer user_data)
{
ExifData *exif = user_data;
@@ -841,7 +841,7 @@ process_img_item (TGallerySetup *setup,
img_orig_dst = img_orig_dst_page = NULL;
get_image_paths (setup, items, item, path_info, orig_image_size, NULL, &img_orig_dst, &img_orig_dst_page);
get_image_sizes (img_orig_dst, &img_orig_w, &img_orig_h, setup->autorotate);
- g_hash_table_replace (defines, g_strdup ("HAS_FULLSIZE"), g_strdup (""));
+ g_hash_table_replace (defines, g_strdup ("HAVE_FULLSIZE"), g_strdup (""));
replace_table_add_key_int (replace_table, "IMG_SIZE_FULLSIZE_W", img_orig_w);
replace_table_add_key_int (replace_table, "IMG_SIZE_FULLSIZE_H", img_orig_h);
replace_table_add_key (replace_table, "IMG_SRC_FULLSIZE", img_orig_dst_page);
@@ -875,11 +875,11 @@ process_img_item (TGallerySetup *setup,
/* EXIF callbacks - all do handle NULL value pointer */
replace_table_register_function (replace_table, "get_exif_value", get_exif_value_cb, exif);
replace_table_register_function (replace_table, "get_exif_value_fixed", get_exif_value_fixed_cb, exif);
- block_parser_register_function (block_parser, "has_exif_key", has_exif_key_cb, exif);
+ block_parser_register_function (block_parser, "have_exif_key", have_exif_key_cb, exif);
if (exif != NULL && exif_has_key (exif, EXIF_APERTURE) &&
exif_has_key (exif, EXIF_FOCAL_LENGTH) &&
exif_has_key (exif, EXIF_EXPOSURE))
- g_hash_table_replace (defines, g_strdup ("HAS_EXIF"), g_strdup (""));
+ g_hash_table_replace (defines, g_strdup ("HAVE_EXIF"), g_strdup (""));
/* Border style */
s1 = get_prop_string (items, item, PROP_BORDER_STYLE, NULL);
diff --git a/templates/template_picture.html b/templates/template_picture.html
index d4115d1..19f77d5 100644
--- a/templates/template_picture.html
+++ b/templates/template_picture.html
@@ -38,9 +38,9 @@
<span class="navposspacer"></span>
<a href="$(LINK_PREV)" rel="prev">&lt; Previous</a> :: <a href="$(LINK_NEXT)" rel="next">Next &gt;</a>
</div>
- <!-- $(ifdef(HAS_EXIF)) -->
+ <!-- $(ifdef(HAVE_EXIF)) -->
<div class="navexif">ISO <!-- $(get_exif_value_fixed("Exif.Photo.ISOSpeedRatings")) --> :: <!-- $(get_exif_value_fixed("Exif.Photo.ExposureTime")) --> :: <!-- $(get_exif_value_fixed("Exif.Photo.FNumber")) --> :: <!-- $(get_exif_value_fixed("Exif.Photo.FocalLength")) --></div>
- <!-- $(endif(HAS_EXIF)) -->
+ <!-- $(endif(HAVE_EXIF)) -->
</div>
@@ -54,11 +54,11 @@
<!-- ## Image -->
<div class="img_preview">
<a href="$(LINK_NEXT)" rel="next"><img src="$(IMG_SRC)" width="$(IMG_SIZE_W)" height="$(IMG_SIZE_H)" alt="" id="$(value(BORDER_STYLE))" /></a>
- <!-- $(ifdef(HAS_FULLSIZE)) -->
+ <!-- $(ifdef(HAVE_FULLSIZE)) -->
<div class="img_preview_full">
<a href="$(IMG_SRC_FULLSIZE)">See original size (<!-- $(IMG_SIZE_FULLSIZE_W) -->x<!-- $(IMG_SIZE_FULLSIZE_H) -->)</a>
</div>
- <!-- $(endif(HAS_FULLSIZE)) -->
+ <!-- $(endif(HAVE_FULLSIZE)) -->
</div>
<!-- $(ifdef(SHOW_EXIF_TABLE)) -->
@@ -66,7 +66,7 @@
<div class="exif">
<div id="exif_table" style="display: none;">
:: <a href="javascript: set_exif_table_visibility('no'); write_exif_table_cookie('no');">Hide EXIF</a><br/>
- <!-- $(ifdef(HAS_EXIF)) -->
+ <!-- $(ifdef(HAVE_EXIF)) -->
<table><tbody>
<tr><td>Date: </td> <td><!-- $(get_exif_value_fixed("Exif.Photo.DateTimeOriginal")) --></td></tr>
<tr><td>Camera: </td> <td><!-- $(get_exif_value_fixed("Exif.Image.Model")) --></td></tr>
@@ -75,15 +75,15 @@
<tr><td>Aperture value: </td> <td><!-- $(get_exif_value_fixed("Exif.Photo.FNumber")) --></td></tr>
<tr><td>Exposure time: </td> <td><!-- $(get_exif_value_fixed("Exif.Photo.ExposureTime")) --></td></tr>
<tr><td>Flash: </td> <td><!-- $(get_exif_value_fixed("Exif.Photo.Flash")) --></td></tr>
-<!-- $(if (has_exif_key ("Exif.CanonSi.CameraTemperature"))) -->
+<!-- $(if (have_exif_key ("Exif.CanonSi.CameraTemperature"))) -->
<tr><td>Camera temperature: </td> <td><!-- $(get_exif_value_fixed("Exif.CanonSi.CameraTemperature")) --></td></tr>
-<!-- $(endif (has_exif_key ())) -->
+<!-- $(endif (have_exif_key ())) -->
</tbody></table>
- <!-- $(else(HAS_EXIF)) -->
+ <!-- $(else(HAVE_EXIF)) -->
<div class="no_exif">
No EXIF information available.
</div>
- <!-- $(endif(HAS_EXIF)) -->
+ <!-- $(endif(HAVE_EXIF)) -->
</div>
<div id="exif_line" style="display: block;">
:: <a href="javascript: set_exif_table_visibility('yes'); write_exif_table_cookie('yes');">Show EXIF</a>