Merge remote-tracking branches 'origin/merge-requests/10' and 'origin/merge-requests/9'
authorKlaus Ethgen <Klaus@Ethgen.de>
Sun, 26 Jan 2014 12:30:18 +0000 (13:30 +0100)
committerKlaus Ethgen <Klaus@Ethgen.de>
Sun, 26 Jan 2014 12:30:18 +0000 (13:30 +0100)
Merge in some trivial but useful merge requests. (Note that 9 includes 8.)

* origin/merge-requests/10:
  transifex config file allowing to easily use transifex-client

* origin/merge-requests/9:
  Skip over expanded keys.
  Annotate debug_exception() with source file, line, and function.

src/exiv2.cc
src/image-overlay.c

index b0f6560..455c8d3 100644 (file)
@@ -101,13 +101,18 @@ static const AltKey alt_keys[] = {
        {NULL, NULL, NULL}
        };
 
-static void debug_exception(Exiv2::AnyError& e)
+static void _debug_exception(const char* file,
+                             int line,
+                             const char* func,
+                             Exiv2::AnyError& e)
 {
        gchar *str = g_locale_from_utf8(e.what(), -1, NULL, NULL, NULL);
-       DEBUG_1("Exiv2: %s", str);
+       DEBUG_1("%s:%d:%s:Exiv2: %s", file, line, func, str);
        g_free(str);
 }
 
+#define debug_exception(e) _debug_exception(__FILE__, __LINE__, __func__, e)
+
 struct _ExifData
 {
        Exiv2::ExifData::const_iterator exifIter; /* for exif_get_next_item */
index 10d8284..dcba8ed 100644 (file)
@@ -262,7 +262,7 @@ static gchar *image_osd_mkinfo(const gchar *str, ImageWindow *imd, GHashTable *v
 
        new = g_string_new(str);
 
-       prev = 0;
+       prev = -1;
 
        while (TRUE)
                {
@@ -273,7 +273,7 @@ static gchar *image_osd_mkinfo(const gchar *str, ImageWindow *imd, GHashTable *v
                gchar *extrapos = NULL;
                gchar *p;
 
-               start = strchr(new->str, delim);
+               start = strchr(new->str + (prev + 1), delim);
                if (!start)
                        break;
                end = strchr(start+1, delim);