Support the API change in libexif > 0.5.12.

2005-01-27  Chris Lahey  <clahey@ximian.com>

	* acconfig.h, configure.in, src/nautilus-image-properties-page.c:
	Support the API change in libexif > 0.5.12.
This commit is contained in:
Chris Lahey 2005-01-27 16:51:15 +00:00 committed by Chris Lahey
parent c123abcb46
commit c18bd686a7
4 changed files with 24 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2005-01-27 Chris Lahey <clahey@ximian.com>
* acconfig.h, configure.in, src/nautilus-image-properties-page.c:
Support the API change in libexif > 0.5.12.
2005-01-27 Kjartan Maraas <kmaraas@gnome.org>
* src/nautilus-main.c: Don't leak the icon info

View file

@ -23,3 +23,4 @@
#define HAVE_GTK_MULTIHEAD /* needed for egg-screen-exec functions */
#undef HAVE_STARTUP_NOTIFICATION
#undef HAVE_EXIF
#undef HAVE_OLD_EXIF

View file

@ -211,10 +211,17 @@ dnl exif checking
AC_MSG_CHECKING(for libExif)
PKG_CHECK_MODULES(EXIF, libexif >= exif_minver, have_exif=yes, have_exif=no)
if test "x$have_exif" = "xyes"; then
AC_DEFINE(HAVE_EXIF,1, [define to enable EXIF support])
fi
PKG_CHECK_MODULES(EXIF, libexif > exif_minver, [
AC_DEFINE(HAVE_EXIF, 1, [Define to enable EXIF support])
AC_SUBST(EXIF_CFLAGS)
AC_SUBST(EXIF_LIBS)
], [
PKG_CHECK_MODULES(EXIF, libexif = exif_minver, [
AC_DEFINE(HAVE_EXIF, 1)
AC_DEFINE(HAVE_OLD_EXIF, 1, [Define if your EXIF library has old API.])
AC_SUBST(EXIF_CFLAGS)
AC_SUBST(EXIF_LIBS)
])])
dnl ==========================================================================

View file

@ -144,13 +144,20 @@ static void
exif_content_callback (ExifContent *content, gpointer data)
{
struct ExifAttribute *attribute;
#if !HAVE_OLD_EXIF
char b[1024];
#endif
attribute = (struct ExifAttribute *)data;
if (attribute->found) {
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;
}