The option to display exif data in pan view was NULLed out.
This commit implements the display of exif data.
The parameters displayed are the same as in the info sidebar.
#include "rcfile.h"
#include "dnd.h"
#include "ui_utildlg.h"
+#include "layout.h"
#include <math.h>
WRITE_NL(); WRITE_STRING("</pane_exif>");
}
+GList * bar_pane_exif_list()
+{
+ PaneExifData *ped;
+ GList *list;
+ GList *work_windows;
+ GList *exif_list = NULL;
+ LayoutWindow *lw;
+ GtkWidget *bar;
+ GtkWidget *pane;
+ GtkWidget *entry;
+ ExifEntry *ee;
+
+ work_windows = layout_window_list;
+ lw = work_windows->data;
+ bar = lw->bar;
+ pane = bar_find_pane_by_id(bar, PANE_EXIF, "exif");
+ ped = g_object_get_data(G_OBJECT(pane), "pane_data");
+
+ list = gtk_container_get_children(GTK_CONTAINER(ped->vbox));
+ while (list)
+ {
+ entry = list->data;
+ list = list->next;
+ ee = g_object_get_data(G_OBJECT(entry), "entry_data");
+ exif_list = g_list_append(exif_list, g_strdup(ee->title));
+ exif_list = g_list_append(exif_list, g_strdup(ee->key));
+ }
+
+ g_list_free(list);
+
+ return exif_list;
+}
void bar_pane_exif_close(GtkWidget *widget)
{
const gchar **bar_exif_key_list;
const gint bar_exif_key_count;
-
+GList *bar_pane_exif_list();
#endif
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
static void pan_info_add_exif(PanTextAlignment *ta, FileData *fd)
{
+ GList *exif_list;
+ gchar *text;
+ gchar *title;
+ gchar *key;
if (!fd) return;
- pan_text_alignment_add(ta, NULL, NULL);
+ exif_list = bar_pane_exif_list();
+ while (exif_list)
+ {
+ title = exif_list->data;
+ exif_list = exif_list->next;
+ key = exif_list->data;
+ exif_list = exif_list->next;
+
+ text = metadata_read_string(fd, key, METADATA_FORMATTED);
+ if (text && text[0] != '\0')
+ {
+ pan_text_alignment_add(ta, title, text);
+ }
+
+ g_free(text);
+ }
+
+ string_list_free(exif_list);
}