Mercurial > geeqie
comparison src/bar_exif.c @ 1066:d0add22edb45
no need to validate description, it is in utf8
author | nadvornik |
---|---|
date | Sat, 18 Oct 2008 08:31:25 +0000 |
parents | 6a8402e0eaea |
children | 78007efd1140 |
comparison
equal
deleted
inserted
replaced
1065:6a8402e0eaea | 1066:d0add22edb45 |
---|---|
295 gchar *text; | 295 gchar *text; |
296 gchar *utf8_text; | 296 gchar *utf8_text; |
297 const gchar *format; | 297 const gchar *format; |
298 gchar *elements; | 298 gchar *elements; |
299 gchar *description; | 299 gchar *description; |
300 gchar *utf8_description; | |
301 | 300 |
302 tag = g_strdup_printf("0x%04x", exif_item_get_tag_id(item)); | 301 tag = g_strdup_printf("0x%04x", exif_item_get_tag_id(item)); |
303 tag_name = exif_item_get_tag_name(item); | 302 tag_name = exif_item_get_tag_name(item); |
304 format = exif_item_get_format_name(item, TRUE); | 303 format = exif_item_get_format_name(item, TRUE); |
305 text = exif_item_get_data_as_text(item); | 304 text = exif_item_get_data_as_text(item); |
306 utf8_text = utf8_validate_or_convert(text); | 305 utf8_text = utf8_validate_or_convert(text); |
307 g_free(text); | 306 g_free(text); |
308 elements = g_strdup_printf("%d", exif_item_get_elements(item)); | 307 elements = g_strdup_printf("%d", exif_item_get_elements(item)); |
309 description = exif_item_get_description(item); | 308 description = exif_item_get_description(item); |
310 if (!description) description = g_strdup(""); | 309 if (!description) description = g_strdup(tag_name); |
311 utf8_description = utf8_validate_or_convert(description); | |
312 g_free(description); | |
313 | 310 |
314 gtk_list_store_append(store, &iter); | 311 gtk_list_store_append(store, &iter); |
315 gtk_list_store_set(store, &iter, | 312 gtk_list_store_set(store, &iter, |
316 EXIF_ADVCOL_ENABLED, bar_exif_row_enabled(tag_name), | 313 EXIF_ADVCOL_ENABLED, bar_exif_row_enabled(tag_name), |
317 EXIF_ADVCOL_TAG, tag, | 314 EXIF_ADVCOL_TAG, tag, |
318 EXIF_ADVCOL_NAME, tag_name, | 315 EXIF_ADVCOL_NAME, tag_name, |
319 EXIF_ADVCOL_VALUE, utf8_text, | 316 EXIF_ADVCOL_VALUE, utf8_text, |
320 EXIF_ADVCOL_FORMAT, format, | 317 EXIF_ADVCOL_FORMAT, format, |
321 EXIF_ADVCOL_ELEMENTS, elements, | 318 EXIF_ADVCOL_ELEMENTS, elements, |
322 EXIF_ADVCOL_DESCRIPTION, utf8_description, -1); | 319 EXIF_ADVCOL_DESCRIPTION, description, -1); |
323 g_free(tag); | 320 g_free(tag); |
324 g_free(utf8_text); | 321 g_free(utf8_text); |
325 g_free(elements); | 322 g_free(elements); |
326 g_free(utf8_description); | 323 g_free(description); |
327 g_free(tag_name); | 324 g_free(tag_name); |
328 item = exif_get_next_item(exif); | 325 item = exif_get_next_item(exif); |
329 } | 326 } |
330 } | 327 } |
331 | 328 |