annotate src/advanced_exif.c @ 1320:055ed09d5a03

improved bar_sort configuration
author nadvornik
date Tue, 24 Feb 2009 22:21:28 +0000
parents 48e064b37ba6
children 77c3d9dcd6bc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1293
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
1 /*
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
2 * Geeqie
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
3 * (C) 2004 John Ellis
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
4 * Copyright (C) 2008 - 2009 The Geeqie Team
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
5 *
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
6 * Author: John Ellis
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
7 *
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
8 * This software is released under the GNU General Public License (GNU GPL).
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
9 * Please read the included file COPYING for more information.
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
10 * This software comes with no warranty of any kind, use at your own risk!
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
11 */
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
12
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
13
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
14 #include "main.h"
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
15 #include "advanced_exif.h"
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
16
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
17 #include "exif.h"
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
18 #include "metadata.h"
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
19 #include "filedata.h"
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
20 #include "history_list.h"
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
21 #include "misc.h"
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
22 #include "ui_misc.h"
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
23 #include "window.h"
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
24
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
25 /* FIXME: not needed when bar_exif.c is improved */
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
26 #include "bar_exif.h"
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
27
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
28 #include <math.h>
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
29
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
30 #define ADVANCED_EXIF_DATA_COLUMN_WIDTH 200
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
31
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
32 /*
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
33 *-------------------------------------------------------------------
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
34 * EXIF window
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
35 *-------------------------------------------------------------------
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
36 */
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
37
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
38 typedef struct _ExifWin ExifWin;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
39 struct _ExifWin
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
40 {
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
41 GtkWidget *window;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
42 GtkWidget *vbox;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
43 GtkWidget *scrolled;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
44 GtkWidget *listview;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
45
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
46 FileData *fd;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
47 };
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
48
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
49 enum {
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
50 EXIF_ADVCOL_ENABLED = 0,
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
51 EXIF_ADVCOL_TAG,
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
52 EXIF_ADVCOL_NAME,
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
53 EXIF_ADVCOL_VALUE,
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
54 EXIF_ADVCOL_FORMAT,
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
55 EXIF_ADVCOL_ELEMENTS,
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
56 EXIF_ADVCOL_DESCRIPTION,
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
57 EXIF_ADVCOL_COUNT
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
58 };
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
59
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
60 static gint advanced_exif_row_enabled(const gchar *name)
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
61 {
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
62 GList *list;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
63
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
64 if (!name) return FALSE;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
65
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
66 list = history_list_get_by_key("exif_extras");
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
67 while (list)
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
68 {
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
69 if (strcmp(name, (gchar *)(list->data)) == 0) return TRUE;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
70 list = list->next;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
71 }
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
72
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
73 return FALSE;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
74 }
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
75
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
76 static void advanced_exif_update(ExifWin *ew)
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
77 {
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
78 ExifData *exif;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
79
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
80 GtkListStore *store;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
81 GtkTreeIter iter;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
82 ExifData *exif_original;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
83 ExifItem *item;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
84
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
85 exif = exif_read_fd(ew->fd);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
86
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
87 gtk_widget_set_sensitive(ew->scrolled, !!exif);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
88
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
89 if (!exif) return;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
90
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
91 exif_original = exif_get_original(exif);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
92
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
93 store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(ew->listview)));
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
94 gtk_list_store_clear(store);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
95
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
96 item = exif_get_first_item(exif_original);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
97 while (item)
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
98 {
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
99 gchar *tag;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
100 gchar *tag_name;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
101 gchar *text;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
102 gchar *utf8_text;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
103 const gchar *format;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
104 gchar *elements;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
105 gchar *description;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
106
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
107 tag = g_strdup_printf("0x%04x", exif_item_get_tag_id(item));
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
108 tag_name = exif_item_get_tag_name(item);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
109 format = exif_item_get_format_name(item, TRUE);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
110 text = exif_item_get_data_as_text(item);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
111 utf8_text = utf8_validate_or_convert(text);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
112 g_free(text);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
113 elements = g_strdup_printf("%d", exif_item_get_elements(item));
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
114 description = exif_item_get_description(item);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
115 if (!description || *description == '\0')
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
116 {
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
117 g_free(description);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
118 description = g_strdup(tag_name);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
119 }
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
120
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
121 gtk_list_store_append(store, &iter);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
122 gtk_list_store_set(store, &iter,
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
123 EXIF_ADVCOL_ENABLED, advanced_exif_row_enabled(tag_name),
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
124 EXIF_ADVCOL_TAG, tag,
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
125 EXIF_ADVCOL_NAME, tag_name,
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
126 EXIF_ADVCOL_VALUE, utf8_text,
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
127 EXIF_ADVCOL_FORMAT, format,
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
128 EXIF_ADVCOL_ELEMENTS, elements,
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
129 EXIF_ADVCOL_DESCRIPTION, description, -1);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
130 g_free(tag);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
131 g_free(utf8_text);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
132 g_free(elements);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
133 g_free(description);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
134 g_free(tag_name);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
135 item = exif_get_next_item(exif_original);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
136 }
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
137 exif_free_fd(ew->fd, exif);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
138
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
139 }
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
140
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
141 static void advanced_exif_clear(ExifWin *ew)
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
142 {
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
143 GtkListStore *store;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
144
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
145 store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(ew->listview)));
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
146 gtk_list_store_clear(store);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
147 }
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
148
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
149 void advanced_exif_set_fd(GtkWidget *window, FileData *fd)
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
150 {
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
151 ExifWin *ew;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
152
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
153 ew = g_object_get_data(G_OBJECT(window), "advanced_exif_data");
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
154 if (!ew) return;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
155
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
156 /* store this, advanced view toggle needs to reload data */
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
157 file_data_unref(ew->fd);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
158 ew->fd = file_data_ref(fd);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
159
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
160 advanced_exif_clear(ew);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
161 advanced_exif_update(ew);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
162 }
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
163
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
164 static void advanced_exif_row_toggled_cb(GtkCellRendererToggle *toggle, const gchar *path, gpointer data)
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
165 {
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
166 GtkWidget *listview = data;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
167 GtkTreeModel *store;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
168 GtkTreeIter iter;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
169 GtkTreePath *tpath;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
170 gchar *name = NULL;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
171 gboolean active;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
172
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
173 store = gtk_tree_view_get_model(GTK_TREE_VIEW(listview));
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
174
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
175 tpath = gtk_tree_path_new_from_string(path);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
176 gtk_tree_model_get_iter(store, &iter, tpath);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
177 gtk_tree_path_free(tpath);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
178
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
179 gtk_tree_model_get(store, &iter, EXIF_ADVCOL_ENABLED, &active,
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
180 EXIF_ADVCOL_NAME, &name, -1);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
181 active = (!active);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
182
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
183 if (active &&
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
184 g_list_length(history_list_get_by_key("exif_extras")) >= EXIF_BAR_CUSTOM_COUNT)
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
185 {
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
186 active = FALSE;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
187 }
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
188
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
189 gtk_list_store_set(GTK_LIST_STORE(store), &iter, EXIF_ADVCOL_ENABLED, active, -1);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
190
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
191 if (active)
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
192 {
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
193 history_list_add_to_key("exif_extras", name, EXIF_BAR_CUSTOM_COUNT);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
194 }
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
195 else
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
196 {
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
197 history_list_item_change("exif_extras", name, NULL);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
198 }
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
199
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
200 g_free(name);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
201 }
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
202
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
203 static void advanced_exif_add_column_check(GtkWidget *listview, const gchar *title, gint n)
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
204 {
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
205 GtkTreeViewColumn *column;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
206 GtkCellRenderer *renderer;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
207
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
208 column = gtk_tree_view_column_new();
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
209 gtk_tree_view_column_set_title(column, title);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
210 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
211
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
212 renderer = gtk_cell_renderer_toggle_new();
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
213 gtk_tree_view_column_pack_start(column, renderer, TRUE);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
214 gtk_tree_view_column_add_attribute(column, renderer, "active", n);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
215 gtk_tree_view_append_column(GTK_TREE_VIEW(listview), column);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
216
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
217 g_signal_connect(G_OBJECT(renderer), "toggled",
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
218 G_CALLBACK(advanced_exif_row_toggled_cb), listview);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
219 }
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
220
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
221 static void advanced_exif_add_column(GtkWidget *listview, const gchar *title, gint n, gint sizable)
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
222 {
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
223 GtkTreeViewColumn *column;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
224 GtkCellRenderer *renderer;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
225
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
226 column = gtk_tree_view_column_new();
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
227 gtk_tree_view_column_set_title(column, title);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
228
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
229 if (sizable)
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
230 {
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
231 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
232 gtk_tree_view_column_set_fixed_width(column, ADVANCED_EXIF_DATA_COLUMN_WIDTH);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
233 gtk_tree_view_column_set_resizable(column, TRUE);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
234 }
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
235 else
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
236 {
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
237 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
238 }
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
239
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
240 renderer = gtk_cell_renderer_text_new();
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
241 gtk_tree_view_column_pack_start(column, renderer, TRUE);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
242 gtk_tree_view_column_add_attribute(column, renderer, "text", n);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
243 gtk_tree_view_append_column(GTK_TREE_VIEW(listview), column);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
244 }
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
245
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
246 void advanced_exif_close(GtkWidget *window)
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
247 {
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
248 ExifWin *ew;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
249
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
250 ew = g_object_get_data(G_OBJECT(window), "advanced_exif_data");
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
251 if (!ew) return;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
252
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
253 gtk_widget_destroy(ew->vbox);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
254 }
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
255
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
256 static void advanced_exif_destroy(GtkWidget *widget, gpointer data)
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
257 {
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
258 ExifWin *ew = data;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
259 file_data_unref(ew->fd);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
260 g_free(ew);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
261 }
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
262
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
263 GtkWidget *advanced_exif_new(void)
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
264 {
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
265 ExifWin *ew;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
266 GtkListStore *store;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
267 GdkGeometry geometry;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
268
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
269 ew = g_new0(ExifWin, 1);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
270
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
271
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
272 ew->window = window_new(GTK_WINDOW_TOPLEVEL, "view", NULL, NULL, _("Metadata"));
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
273
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
274 geometry.min_width = 900;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
275 geometry.min_height = 600;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
276 gtk_window_set_geometry_hints(GTK_WINDOW(ew->window), NULL, &geometry, GDK_HINT_MIN_SIZE);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
277
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
278 gtk_window_set_resizable(GTK_WINDOW(ew->window), TRUE);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
279
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
280 g_object_set_data(G_OBJECT(ew->window), "advanced_exif_data", ew);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
281 g_signal_connect_after(G_OBJECT(ew->window), "destroy",
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
282 G_CALLBACK(advanced_exif_destroy), ew);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
283
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
284 ew->vbox = gtk_vbox_new(FALSE, PREF_PAD_GAP);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
285 gtk_container_add(GTK_CONTAINER(ew->window), ew->vbox);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
286 gtk_widget_show(ew->vbox);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
287
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
288
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
289 store = gtk_list_store_new(7, G_TYPE_BOOLEAN,
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
290 G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
291 G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
292 ew->listview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
293 g_object_unref(store);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
294
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
295 gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(ew->listview), TRUE);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
296 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(ew->listview), TRUE);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
297
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
298 gtk_tree_view_set_search_column(GTK_TREE_VIEW(ew->listview), EXIF_ADVCOL_NAME);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
299
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
300 advanced_exif_add_column_check(ew->listview, "", EXIF_ADVCOL_ENABLED);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
301
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
302 advanced_exif_add_column(ew->listview, _("Description"), EXIF_ADVCOL_DESCRIPTION, FALSE);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
303 advanced_exif_add_column(ew->listview, _("Value"), EXIF_ADVCOL_VALUE, TRUE);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
304 advanced_exif_add_column(ew->listview, _("Name"), EXIF_ADVCOL_NAME, FALSE);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
305 advanced_exif_add_column(ew->listview, _("Tag"), EXIF_ADVCOL_TAG, FALSE);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
306 advanced_exif_add_column(ew->listview, _("Format"), EXIF_ADVCOL_FORMAT, FALSE);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
307 advanced_exif_add_column(ew->listview, _("Elements"), EXIF_ADVCOL_ELEMENTS, FALSE);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
308
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
309 ew->scrolled = gtk_scrolled_window_new(NULL, NULL);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
310 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(ew->scrolled), GTK_SHADOW_IN);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
311 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(ew->scrolled),
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
312 GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
313 gtk_box_pack_start(GTK_BOX(ew->vbox), ew->scrolled, TRUE, TRUE, 0);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
314 gtk_container_add(GTK_CONTAINER(ew->scrolled), ew->listview);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
315 gtk_widget_show(ew->listview);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
316 gtk_widget_show(ew->scrolled);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
317
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
318 gtk_widget_show(ew->window);
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
319 return ew->window;
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
320 }
48e064b37ba6 separated "normal" and advanced exif, "Normal" exif is now in the
nadvornik
parents:
diff changeset
321 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */