diff src/bar_exif.c @ 2759:dc29a31b7c47

Pan view - implement exif data display 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.
author Colin Clark <colin.clark@cclark.uk>
date Thu, 24 May 2018 19:25:45 +0100
parents 1e344397544c
children 5e4e640df4d8
line wrap: on
line diff
--- a/src/bar_exif.c	Thu May 24 10:04:39 2018 +0100
+++ b/src/bar_exif.c	Thu May 24 19:25:45 2018 +0100
@@ -33,6 +33,7 @@
 #include "rcfile.h"
 #include "dnd.h"
 #include "ui_utildlg.h"
+#include "layout.h"
 
 
 #include <math.h>
@@ -725,6 +726,38 @@
 	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)
 {