2004-09-09 Lutz Mueller <lutz@users.sourceforge.net>
authorLutz Mueller <lutz.s.mueller@gmail.com>
Thu, 9 Sep 2004 06:27:21 +0000 (08:27 +0200)
committerLutz Mueller <lutz.s.mueller@gmail.com>
Thu, 9 Sep 2004 06:27:21 +0000 (08:27 +0200)
* 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.

ChangeLog
Makefile.am
configure.in
libexif/exif-log.c
libexif/exif-log.h

index 8283b35603291558109a8fcfd855ffd294667645..1bfc6e8fac82bfa77bebe1dc81a8aa374d00dd77 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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.
index cf2a6ca30b171e2386d46bfd5372bac687f0ac95..fc9b09a8ceeb973751d65f9f374631e96f444d51 100644 (file)
@@ -1,4 +1,4 @@
-SUBDIRS = libexif libjpeg test po m4
+SUBDIRS =  libexif libjpeg test po m4
 
 EXTRA_DIST = @PACKAGE@.spec
 
index 106a668a4e7494d5fb2bfe88626a933bd0b9d14b..c2719b7cf7c895159a5532aede51dcf8890dc5f0 100644 (file)
@@ -16,7 +16,7 @@ dnl                      removals.
 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)
@@ -46,7 +46,7 @@ then
 else
        AC_MSG_RESULT([no])
 fi
-AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT
 
 
 dnl ---------------------------------------------------------------------------
@@ -59,7 +59,7 @@ if test "x$GCC" = "xyes"; then
     AC_SUBST(LDFLAGS)
 fi
 
-AC_OUTPUT([ po/Makefile.in 
+AC_OUTPUT([
   Makefile
   libexif.spec
   libexif/Makefile
index d3287157d5fc32d3d2b13f6165b3369a8213a0f2..409a9ce4b72d8fe7b509b6a9772cb4603f3210a3 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <config.h>
 #include <libexif/exif-log.h>
+#include <libexif/i18n.h>
 
 #include <stdlib.h>
 #include <string.h>
@@ -31,6 +32,38 @@ struct _ExifLog {
        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)
 {
index 7b0433549119d6807ecacb0611ca13798aafe19c..9831b2adac246ca3c76ec381331b956cb962f0cd 100644 (file)
@@ -40,6 +40,8 @@ typedef enum {
        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);