Commit 8574b4ba authored by Felix Riemann's avatar Felix Riemann

Make sure GPS Exif tags are named and ordered correctly

Some GPS tag IDs overlap with IDs from other IFDs.
Specifically check for the GPS IFD and order the entries accordingly.
Also respect the IFD when determining the tag's title.

https://bugzilla.gnome.org/show_bug.cgi?id=627185
parent 1d0672a4
......@@ -285,6 +285,12 @@ get_exif_category (ExifEntry *entry)
ExifCategory cat = EXIF_CATEGORY_OTHER;
int i;
/* Some GPS tag IDs overlap with other ones, so check the IFD */
if (exif_entry_get_ifd (entry) == EXIF_IFD_GPS) {
return EXIF_CATEGORY_OTHER;
}
for (i = 0; exif_tag_category_map [i].id != -1; i++) {
if (exif_tag_category_map[i].id == (int) entry->tag) {
cat = exif_tag_category_map[i].category;
......@@ -355,6 +361,7 @@ exif_entry_cb (ExifEntry *entry, gpointer data)
EogExifDetails *view;
EogExifDetailsPrivate *priv;
ExifCategory cat;
ExifIfd ifd = exif_entry_get_ifd (entry);
char *path;
char b[1024];
......@@ -369,7 +376,7 @@ exif_entry_cb (ExifEntry *entry, gpointer data)
set_row_data (store,
path,
NULL,
exif_tag_get_name (entry->tag),
exif_tag_get_name_in_ifd (entry->tag, ifd),
exif_entry_get_value (entry, b, sizeof(b)));
} else {
......@@ -401,7 +408,7 @@ exif_entry_cb (ExifEntry *entry, gpointer data)
path = set_row_data (store,
NULL,
exif_categories[cat].path,
exif_tag_get_name (entry->tag),
exif_tag_get_name_in_ifd (entry->tag, ifd),
exif_entry_get_value (entry, b,
sizeof(b)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment