+2004-09-09 Lutz Mueller <lutz@users.sourceforge.net>
+
+ * configure.in: Remove "([external])" after AM_GNU_GETTEXT as it
+ doesn't work for David MacMahon <davidm@astro.berkeley.edu>.
+ * libexif/exif-log.[c,h]: Provide some standard messages and titles.
+ * configure.in: Increment version as interfaces have been added.
+
2004-09-08 Lutz Mueller <lutz@users.sourceforge.net>
* libexif/exif-entry.c: Change comment to point to specification.
-SUBDIRS = libexif libjpeg test po m4
+SUBDIRS = libexif libjpeg test po m4
EXTRA_DIST = @PACKAGE@.spec
dnl ---------------------------------------------------------------------------
LIBEXIF_AGE=0
LIBEXIF_REVISION=0
-LIBEXIF_CURRENT=10
+LIBEXIF_CURRENT=11
AC_SUBST(LIBEXIF_AGE)
AC_SUBST(LIBEXIF_REVISION)
AC_SUBST(LIBEXIF_CURRENT)
else
AC_MSG_RESULT([no])
fi
-AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT
dnl ---------------------------------------------------------------------------
AC_SUBST(LDFLAGS)
fi
-AC_OUTPUT([ po/Makefile.in
+AC_OUTPUT([
Makefile
libexif.spec
libexif/Makefile
#include <config.h>
#include <libexif/exif-log.h>
+#include <libexif/i18n.h>
#include <stdlib.h>
#include <string.h>
void *data;
};
+static struct {
+ ExifLogCode code;
+ const char *title;
+ const char *message;
+} codes[] = {
+ { EXIF_LOG_CODE_DEBUG, N_("Debugging information"),
+ N_("Debugging information is available.") },
+ { EXIF_LOG_CODE_NO_MEMORY, N_("Not enough memory"),
+ N_("The system cannot provide enough memory.") },
+ { EXIF_LOG_CODE_CORRUPT_DATA, N_("Corrupt data"),
+ N_("The data provided does not follow the specification.") },
+ { 0, NULL, NULL }
+};
+
+const char *
+exif_log_code_get_title (ExifLogCode code)
+{
+ unsigned int i;
+
+ for (i = 0; codes[i].title; i++) if (codes[i].code == code) break;
+ return _(codes[i].title);
+}
+
+const char *
+exif_log_code_get_message (ExifLogCode code)
+{
+ unsigned int i;
+
+ for (i = 0; codes[i].message; i++) if (codes[i].code == code) break;
+ return _(codes[i].message);
+}
+
ExifLog *
exif_log_new (void)
{
EXIF_LOG_CODE_NO_MEMORY,
EXIF_LOG_CODE_CORRUPT_DATA
} ExifLogCode;
+const char *exif_log_code_get_title (ExifLogCode); /* Title for dialog */
+const char *exif_log_code_get_message (ExifLogCode); /* Message for dialog */
typedef void (* ExifLogFunc) (ExifLog *log, ExifLogCode, const char *domain,
const char *format, va_list args, void *data);