summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonsta <[email protected]>2015-01-07 13:13:33 +0300
committerMonsta <[email protected]>2015-01-07 13:13:33 +0300
commitb474b31308b269d60721b650fd0e34a7fa2743da (patch)
treed7181f7cdd0fcfd4478b82e099adac90eada3ae7
parent5b4e98dbe0ce1cd9c108b1a69810aac61a5c96fc (diff)
downloadcaja-b474b31308b269d60721b650fd0e34a7fa2743da.tar.bz2
caja-b474b31308b269d60721b650fd0e34a7fa2743da.tar.xz
drop support for ancient versions of exempi and exif
-rw-r--r--configure.ac18
-rw-r--r--src/caja-image-properties-page.c28
2 files changed, 13 insertions, 33 deletions
diff --git a/configure.ac b/configure.ac
index 6e4bb6b0..5464cb7e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,9 +8,8 @@ m4_define(mate_desktop_minver, 1.9.0)
m4_define(pango_minver, 1.1.2)
m4_define(gtk_minver, 2.24.0)
m4_define(xml_minver, 2.4.7)
-m4_define(exif_minver, 0.5.12)
-m4_define(exempi_minver, 1.99.2)
-m4_define(exempi_minver_newapi, 1.99.5)
+m4_define(exif_minver, 0.6.14)
+m4_define(exempi_minver, 1.99.5)
m4_define(gail_minver, 0.16)
@@ -132,7 +131,6 @@ AC_DEFINE([HAVE_GTK_MULTIHEAD], [], [needed for egg-screen-exec functions])
AH_TEMPLATE([HAVE_STARTUP_NOTIFICATION])
AH_TEMPLATE([HAVE_EXIF])
-AH_TEMPLATE([HAVE_OLD_EXIF])
AH_TEMPLATE([HAVE_RENDER])
AM_GLIB_GNU_GETTEXT
@@ -160,15 +158,11 @@ AM_CONDITIONAL(HAVE_EXIF, false)
dnl libexif checking
-PKG_CHECK_MODULES(EXIF, libexif > exif_minver,
+PKG_CHECK_MODULES(EXIF, libexif >= exif_minver,
[AM_CONDITIONAL(HAVE_EXIF, true)
AC_DEFINE(HAVE_EXIF, 1, [Define to enable EXIF support])
],
- [PKG_CHECK_MODULES(EXIF, libexif = exif_minver,
- [AM_CONDITIONAL(HAVE_EXIF, true)
- AC_DEFINE(HAVE_OLD_EXIF, 1, [Define if your EXIF library has old API])
- ], [AM_CONDITIONAL(HAVE_EXIF, false)])
- ])
+ [AM_CONDITIONAL(HAVE_EXIF, false)])
AC_SUBST(EXIF_CFLAGS)
AC_SUBST(EXIF_LIBS)
@@ -190,10 +184,6 @@ if test "x$enable_xmp" != "xno"; then
msg_xmp=yes,
[AM_CONDITIONAL(HAVE_EXEMPI, false)])
- PKG_CHECK_MODULES(EXEMPI_NEW_API, exempi-2.0 >= exempi_minver_newapi,
- AC_DEFINE(HAVE_EXEMPI_NEW_API, 1,
- [Define if we have exempi with the new API]), true)
-
AC_SUBST(EXEMPI_CFLAGS)
AC_SUBST(EXEMPI_LIBS)
fi
diff --git a/src/caja-image-properties-page.c b/src/caja-image-properties-page.c
index 1e5b53e2..a5b5e0b5 100644
--- a/src/caja-image-properties-page.c
+++ b/src/caja-image-properties-page.c
@@ -38,11 +38,11 @@
#include <libexif/exif-data.h>
#include <libexif/exif-ifd.h>
#include <libexif/exif-loader.h>
-#endif
+#endif /*HAVE_EXIF*/
#ifdef HAVE_EXEMPI
#include <exempi/xmp.h>
#include <exempi/xmpconsts.h>
-#endif
+#endif /*HAVE_EXEMPI*/
#define LOAD_BUFFER_SIZE 8192
@@ -62,7 +62,7 @@ struct CajaImagePropertiesPageDetails
#endif /*HAVE_EXIF*/
#ifdef HAVE_EXEMPI
XmpPtr xmp;
-#endif
+#endif /*HAVE_EXEMPI*/
};
#ifdef HAVE_EXIF
@@ -192,9 +192,7 @@ static void
exif_content_callback (ExifContent *content, gpointer data)
{
struct ExifAttribute *attribute;
-#ifndef HAVE_OLD_EXIF
char b[1024];
-#endif
attribute = (struct ExifAttribute *)data;
if (attribute->found)
@@ -202,11 +200,7 @@ exif_content_callback (ExifContent *content, gpointer data)
return;
}
-#ifdef HAVE_OLD_EXIF
- attribute->value = g_strdup (exif_content_get_value (content, attribute->tag));
-#else
attribute->value = g_strdup (exif_content_get_value (content, attribute->tag, b, sizeof(b)));
-#endif
if (attribute->value != NULL)
{
attribute->found = TRUE;
@@ -315,13 +309,9 @@ append_xmp_value_pair (CajaImagePropertiesPage *page,
XmpStringPtr value;
value = xmp_string_new();
-#ifdef HAVE_EXEMPI_NEW_API
+
if (xmp_get_property (xmp, ns, propname, value, &options))
{
-#else
- if (xmp_get_property_and_bits (xmp, ns, propname, value, &options))
- {
-#endif
if (XMP_IS_PROP_SIMPLE (options))
{
append_label_take_str
@@ -381,7 +371,7 @@ append_xmpdata_string (XmpPtr xmp, CajaImagePropertiesPage *page)
/* TODO add CC licenses */
}
}
-#endif
+#endif /*HAVE EXEMPI*/
static void
load_finished (CajaImagePropertiesPage *page)
@@ -399,7 +389,7 @@ load_finished (CajaImagePropertiesPage *page)
{
#ifdef HAVE_EXIF
ExifData *exif_data;
-#endif
+#endif /*HAVE_EXIF*/
format = gdk_pixbuf_loader_get_format (page->details->loader);
@@ -431,7 +421,7 @@ load_finished (CajaImagePropertiesPage *page)
#endif /*HAVE_EXIF*/
#ifdef HAVE_EXEMPI
append_xmpdata_string (page->details->xmp, page);
-#endif /*HAVE EXEMPI*/
+#endif /*HAVE_EXEMPI*/
}
else
{
@@ -457,7 +447,7 @@ load_finished (CajaImagePropertiesPage *page)
xmp_free(page->details->xmp);
page->details->xmp = NULL;
}
-#endif
+#endif /*HAVE_EXEMPI*/
}
static void
@@ -490,7 +480,7 @@ file_read_callback (GObject *object,
count_read);
#else
exif_still_loading = 0;
-#endif
+#endif /*HAVE_EXIF*/
if (page->details->pixbuf_still_loading)
{