annotate src/bar_exif.c @ 1062:2e661b3e7ca0

Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
author zas_
date Sun, 12 Oct 2008 08:43:14 +0000
parents 1646720364cf
children 6a8402e0eaea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
1 /*
196
f6e307c7bad6 rename GQview -> Geeqie over the code
nadvornik
parents: 188
diff changeset
2 * Geeqie
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
3 * (C) 2004 John Ellis
475
48c8e49b571c updated copyright in source files
nadvornik
parents: 449
diff changeset
4 * Copyright (C) 2008 The Geeqie Team
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
5 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
6 * Author: John Ellis
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
7 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
8 * This software is released under the GNU General Public License (GNU GPL).
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
9 * Please read the included file COPYING for more information.
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
10 * This software comes with no warranty of any kind, use at your own risk!
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
11 */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
12
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
13
281
9995c5fb202a gqview.h -> main.h
zas_
parents: 258
diff changeset
14 #include "main.h"
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
15 #include "bar_exif.h"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
16
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
17 #include "exif.h"
1022
9962b24b6b43 Move miscellaneous functions to their own files (new misc.[ch]).
zas_
parents: 902
diff changeset
18 #include "filedata.h"
902
c414002a1f27 Move history_list_*() functions to separate files:
zas_
parents: 895
diff changeset
19 #include "history_list.h"
1022
9962b24b6b43 Move miscellaneous functions to their own files (new misc.[ch]).
zas_
parents: 902
diff changeset
20 #include "misc.h"
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
21 #include "ui_misc.h"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
22
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
23 #include <math.h>
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
24
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
25 #define EXIF_BAR_SIZE_INCREMENT 48
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
26 #define EXIF_BAR_ARROW_SIZE 7
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
27
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
28 #define EXIF_BAR_CUSTOM_COUNT 20
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
29
48
6948407f52a5 Fri Jun 3 18:43:46 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
30 #define BAR_EXIF_DATA_COLUMN_WIDTH 250
6948407f52a5 Fri Jun 3 18:43:46 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
31
222
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
32 ExifUI ExifUIList[]={
566
db08ccd54169 Change the prefix of formatted exif tags to a more explicit "formatted." prefix
zas_
parents: 550
diff changeset
33 { 0, 0, EXIF_UI_IFSET, "formatted.Camera"},
db08ccd54169 Change the prefix of formatted exif tags to a more explicit "formatted." prefix
zas_
parents: 550
diff changeset
34 { 0, 0, EXIF_UI_IFSET, "formatted.DateTime"},
db08ccd54169 Change the prefix of formatted exif tags to a more explicit "formatted." prefix
zas_
parents: 550
diff changeset
35 { 0, 0, EXIF_UI_IFSET, "formatted.ShutterSpeed"},
db08ccd54169 Change the prefix of formatted exif tags to a more explicit "formatted." prefix
zas_
parents: 550
diff changeset
36 { 0, 0, EXIF_UI_IFSET, "formatted.Aperture"},
db08ccd54169 Change the prefix of formatted exif tags to a more explicit "formatted." prefix
zas_
parents: 550
diff changeset
37 { 0, 0, EXIF_UI_IFSET, "formatted.ExposureBias"},
db08ccd54169 Change the prefix of formatted exif tags to a more explicit "formatted." prefix
zas_
parents: 550
diff changeset
38 { 0, 0, EXIF_UI_IFSET, "formatted.ISOSpeedRating"},
db08ccd54169 Change the prefix of formatted exif tags to a more explicit "formatted." prefix
zas_
parents: 550
diff changeset
39 { 0, 0, EXIF_UI_IFSET, "formatted.FocalLength"},
db08ccd54169 Change the prefix of formatted exif tags to a more explicit "formatted." prefix
zas_
parents: 550
diff changeset
40 { 0, 0, EXIF_UI_IFSET, "formatted.FocalLength35mmFilm"},
db08ccd54169 Change the prefix of formatted exif tags to a more explicit "formatted." prefix
zas_
parents: 550
diff changeset
41 { 0, 0, EXIF_UI_IFSET, "formatted.Flash"},
325
a0fcd4934266 Only display defined exif tags by default.
zas_
parents: 324
diff changeset
42 { 0, 0, EXIF_UI_IFSET, "Exif.Photo.ExposureProgram"},
a0fcd4934266 Only display defined exif tags by default.
zas_
parents: 324
diff changeset
43 { 0, 0, EXIF_UI_IFSET, "Exif.Photo.MeteringMode"},
a0fcd4934266 Only display defined exif tags by default.
zas_
parents: 324
diff changeset
44 { 0, 0, EXIF_UI_IFSET, "Exif.Photo.LightSource"},
566
db08ccd54169 Change the prefix of formatted exif tags to a more explicit "formatted." prefix
zas_
parents: 550
diff changeset
45 { 0, 0, EXIF_UI_IFSET, "formatted.ColorProfile"},
db08ccd54169 Change the prefix of formatted exif tags to a more explicit "formatted." prefix
zas_
parents: 550
diff changeset
46 { 0, 0, EXIF_UI_IFSET, "formatted.SubjectDistance"},
db08ccd54169 Change the prefix of formatted exif tags to a more explicit "formatted." prefix
zas_
parents: 550
diff changeset
47 { 0, 0, EXIF_UI_IFSET, "formatted.Resolution"},
325
a0fcd4934266 Only display defined exif tags by default.
zas_
parents: 324
diff changeset
48 { 0, 0, EXIF_UI_IFSET, "Exif.Image.Orientation"},
1052
338c21c87ff5 Add support for GPSInfo - patch by Klaus Ethgen
nadvornik
parents: 1022
diff changeset
49 { 0, 0, EXIF_UI_IFSET, "formatted.GPSPosition"},
338c21c87ff5 Add support for GPSInfo - patch by Klaus Ethgen
nadvornik
parents: 1022
diff changeset
50 { 0, 0, EXIF_UI_IFSET, "formatted.GPSAltitude"},
325
a0fcd4934266 Only display defined exif tags by default.
zas_
parents: 324
diff changeset
51 { 0, 0, EXIF_UI_IFSET, "Exif.Image.ImageDescription"},
a0fcd4934266 Only display defined exif tags by default.
zas_
parents: 324
diff changeset
52 { 0, 0, EXIF_UI_IFSET, "Exif.Image.Copyright"},
a0fcd4934266 Only display defined exif tags by default.
zas_
parents: 324
diff changeset
53 { 0, 0, EXIF_UI_OFF, NULL}
222
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
54 };
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
55
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
56
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
57 /*
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
58 *-------------------------------------------------------------------
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
59 * table util
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
60 *-------------------------------------------------------------------
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
61 */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
62
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
63 static void table_add_line_custom(GtkWidget *table, gint x, gint y,
442
4b2d7f9af171 Big whitespaces cleanup:
zas_
parents: 438
diff changeset
64 const gchar *text1, const gchar *text2,
1062
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
65 GtkWidget **label1, GtkWidget **label2,
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
66 GtkWidget **button)
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
67 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
68 GtkWidget *label;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
69 gchar *buf;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
70
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
71 buf = g_strconcat((text1) ? text1 : "fixme", ":", NULL);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
72 if (!text2) text2 = "";
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
73
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
74 label = gtk_label_new(buf);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
75 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.0);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
76 pref_label_bold(label, TRUE, FALSE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
77 gtk_table_attach(GTK_TABLE(table), label,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
78 x, x + 1, y, y + 1,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
79 GTK_FILL, GTK_FILL,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
80 2, 2);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
81 *label1 = label;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
82
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
83 label = gtk_label_new(text2);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
84 gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
85 gtk_table_attach(GTK_TABLE(table), label,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
86 x + 1, x + 2, y, y + 1,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
87 GTK_FILL, GTK_FILL,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
88 2, 2);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
89 *label2 = label;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
90
1062
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
91 if (button)
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
92 {
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
93 *button = gtk_button_new_from_stock(GTK_STOCK_REMOVE);
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
94 gtk_table_attach(GTK_TABLE(table), *button,
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
95 x + 2, x + 3, y, y + 1,
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
96 GTK_FILL, GTK_FILL,
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
97 2, 2);
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
98 }
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
99
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
100 g_free(buf);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
101 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
102
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
103 static GtkWidget *table_add_line(GtkWidget *table, gint x, gint y,
222
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
104 const gchar *description, const gchar *text,
1062
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
105 GtkWidget **keyret)
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
106 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
107 GtkWidget *key;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
108 GtkWidget *label;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
109
1062
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
110 table_add_line_custom(table, x, y, description, text, &key, &label, NULL);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
111 gtk_widget_show(key);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
112 gtk_widget_show(label);
222
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
113 if (keyret) *keyret = key;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
114
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
115 return label;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
116 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
117
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
118
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
119 /*
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
120 *-------------------------------------------------------------------
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
121 * EXIF bar
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
122 *-------------------------------------------------------------------
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
123 */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
124
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
125 typedef struct _ExifBar ExifBar;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
126 struct _ExifBar
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
127 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
128 GtkWidget *vbox;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
129 GtkWidget *scrolled;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
130 GtkWidget *table;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
131 GtkWidget *advanced_scrolled;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
132 GtkWidget *listview;
222
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
133 GtkWidget **keys;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
134 GtkWidget **labels;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
135
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
136 GtkWidget *custom_sep;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
137 GtkWidget *custom_name[EXIF_BAR_CUSTOM_COUNT];
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
138 GtkWidget *custom_value[EXIF_BAR_CUSTOM_COUNT];
1062
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
139 GtkWidget *custom_remove[EXIF_BAR_CUSTOM_COUNT];
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
140
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 114
diff changeset
141 FileData *fd;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
142
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
143 gint allow_search;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
144 };
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
145
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
146 enum {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
147 EXIF_ADVCOL_ENABLED = 0,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
148 EXIF_ADVCOL_TAG,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
149 EXIF_ADVCOL_NAME,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
150 EXIF_ADVCOL_VALUE,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
151 EXIF_ADVCOL_FORMAT,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
152 EXIF_ADVCOL_ELEMENTS,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
153 EXIF_ADVCOL_DESCRIPTION,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
154 EXIF_ADVCOL_COUNT
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
155 };
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
156
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
157 static void bar_exif_sensitive(ExifBar *eb, gint enable)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
158 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
159 gtk_widget_set_sensitive(eb->table, enable);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
160 if (eb->advanced_scrolled) gtk_widget_set_sensitive(eb->advanced_scrolled, enable);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
161 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
162
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
163 static gint bar_exif_row_enabled(const gchar *name)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
164 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
165 GList *list;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
166
895
b48c366d5707 Move out test outside the loop.
zas_
parents: 844
diff changeset
167 if (!name) return FALSE;
b48c366d5707 Move out test outside the loop.
zas_
parents: 844
diff changeset
168
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
169 list = history_list_get_by_key("exif_extras");
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
170 while (list)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
171 {
895
b48c366d5707 Move out test outside the loop.
zas_
parents: 844
diff changeset
172 if (strcmp(name, (gchar *)(list->data)) == 0) return TRUE;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
173 list = list->next;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
174 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
175
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
176 return FALSE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
177 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
178
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
179 static void bar_exif_update(ExifBar *eb)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
180 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
181 ExifData *exif;
233
f9634d21ad35 Remove unused variable declarations.
zas_
parents: 222
diff changeset
182 gint i;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
183
449
115db540bd0c read color profiles from jpeg also with Exiv2
nadvornik
parents: 446
diff changeset
184 exif = exif_read_fd(eb->fd);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
185
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
186 if (!exif)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
187 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
188 bar_exif_sensitive(eb, FALSE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
189 return;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
190 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
191
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
192 bar_exif_sensitive(eb, TRUE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
193
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
194 if (GTK_WIDGET_VISIBLE(eb->scrolled))
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
195 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
196 GList *list;
222
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
197 for (i = 0; ExifUIList[i].key; i++)
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
198 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
199 gchar *text;
767
e73d30e0c896 Make utf8_validate_or_convert() to always allocate a new string.
zas_
parents: 680
diff changeset
200 gchar *utf8_text;
222
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
201
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
202 if (ExifUIList[i].current == EXIF_UI_OFF)
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
203 {
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
204 gtk_widget_hide(eb->labels[i]);
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
205 gtk_widget_hide(eb->keys[i]);
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
206 continue;
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
207 }
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
208 text = exif_get_data_as_text(exif, ExifUIList[i].key);
767
e73d30e0c896 Make utf8_validate_or_convert() to always allocate a new string.
zas_
parents: 680
diff changeset
209 utf8_text = utf8_validate_or_convert(text);
e73d30e0c896 Make utf8_validate_or_convert() to always allocate a new string.
zas_
parents: 680
diff changeset
210 g_free(text);
222
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
211 if (ExifUIList[i].current == EXIF_UI_IFSET
767
e73d30e0c896 Make utf8_validate_or_convert() to always allocate a new string.
zas_
parents: 680
diff changeset
212 && (!utf8_text || !*utf8_text))
442
4b2d7f9af171 Big whitespaces cleanup:
zas_
parents: 438
diff changeset
213 {
222
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
214 gtk_widget_hide(eb->labels[i]);
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
215 gtk_widget_hide(eb->keys[i]);
767
e73d30e0c896 Make utf8_validate_or_convert() to always allocate a new string.
zas_
parents: 680
diff changeset
216 g_free(utf8_text);
222
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
217 continue;
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
218 }
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
219 gtk_widget_show(eb->labels[i]);
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
220 gtk_widget_show(eb->keys[i]);
767
e73d30e0c896 Make utf8_validate_or_convert() to always allocate a new string.
zas_
parents: 680
diff changeset
221 gtk_label_set_text(GTK_LABEL(eb->labels[i]), utf8_text);
e73d30e0c896 Make utf8_validate_or_convert() to always allocate a new string.
zas_
parents: 680
diff changeset
222 g_free(utf8_text);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
223 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
224
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
225 list = g_list_last(history_list_get_by_key("exif_extras"));
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
226 if (list)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
227 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
228 gtk_widget_show(eb->custom_sep);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
229 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
230 else
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
231 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
232 gtk_widget_hide(eb->custom_sep);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
233 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
234 i = 0;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
235 while (list && i < EXIF_BAR_CUSTOM_COUNT)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
236 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
237 gchar *text;
767
e73d30e0c896 Make utf8_validate_or_convert() to always allocate a new string.
zas_
parents: 680
diff changeset
238 gchar *utf8_text;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
239 gchar *name;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
240 gchar *buf;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
241
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
242 name = list->data;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
243 list = list->prev;
1062
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
244
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
245 text = exif_get_data_as_text(exif, name);
767
e73d30e0c896 Make utf8_validate_or_convert() to always allocate a new string.
zas_
parents: 680
diff changeset
246 utf8_text = utf8_validate_or_convert(text);
e73d30e0c896 Make utf8_validate_or_convert() to always allocate a new string.
zas_
parents: 680
diff changeset
247 g_free(text);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
248
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
249 buf = g_strconcat(name, ":", NULL);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
250 gtk_label_set_text(GTK_LABEL(eb->custom_name[i]), buf);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
251 g_free(buf);
767
e73d30e0c896 Make utf8_validate_or_convert() to always allocate a new string.
zas_
parents: 680
diff changeset
252 gtk_label_set_text(GTK_LABEL(eb->custom_value[i]), utf8_text);
e73d30e0c896 Make utf8_validate_or_convert() to always allocate a new string.
zas_
parents: 680
diff changeset
253 g_free(utf8_text);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
254
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
255 gtk_widget_show(eb->custom_name[i]);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
256 gtk_widget_show(eb->custom_value[i]);
1062
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
257 gtk_widget_show(eb->custom_remove[i]);
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
258 g_object_set_data(G_OBJECT(eb->custom_remove[i]), "key", name);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
259
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
260 i++;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
261 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
262 while (i < EXIF_BAR_CUSTOM_COUNT)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
263 {
1062
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
264 g_object_set_data(G_OBJECT(eb->custom_remove[i]), "key", NULL);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
265 gtk_widget_hide(eb->custom_name[i]);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
266 gtk_widget_hide(eb->custom_value[i]);
1062
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
267 gtk_widget_hide(eb->custom_remove[i]);
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
268
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
269 i++;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
270 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
271 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
272
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
273 if (eb->advanced_scrolled && GTK_WIDGET_VISIBLE(eb->advanced_scrolled))
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
274 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
275 GtkListStore *store;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
276 GtkTreeIter iter;
176
695e1ad3b169 simplified exif.h, moved implementation-specific stuff to exif-int.h
nadvornik
parents: 138
diff changeset
277 ExifItem *item;
442
4b2d7f9af171 Big whitespaces cleanup:
zas_
parents: 438
diff changeset
278
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
279 store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(eb->listview)));
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
280 gtk_list_store_clear(store);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
281
176
695e1ad3b169 simplified exif.h, moved implementation-specific stuff to exif-int.h
nadvornik
parents: 138
diff changeset
282 item = exif_get_first_item(exif);
695e1ad3b169 simplified exif.h, moved implementation-specific stuff to exif-int.h
nadvornik
parents: 138
diff changeset
283 while (item)
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
284 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
285 gchar *tag;
185
354da67a7ca2 read also iptc and xmp
nadvornik
parents: 182
diff changeset
286 gchar *tag_name;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
287 gchar *text;
767
e73d30e0c896 Make utf8_validate_or_convert() to always allocate a new string.
zas_
parents: 680
diff changeset
288 gchar *utf8_text;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
289 const gchar *format;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
290 gchar *elements;
185
354da67a7ca2 read also iptc and xmp
nadvornik
parents: 182
diff changeset
291 gchar *description;
767
e73d30e0c896 Make utf8_validate_or_convert() to always allocate a new string.
zas_
parents: 680
diff changeset
292 gchar *utf8_description;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
293
176
695e1ad3b169 simplified exif.h, moved implementation-specific stuff to exif-int.h
nadvornik
parents: 138
diff changeset
294 tag = g_strdup_printf("0x%04x", exif_item_get_tag_id(item));
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
295 tag_name = exif_item_get_tag_name(item);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
296 format = exif_item_get_format_name(item, TRUE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
297 text = exif_item_get_data_as_text(item);
767
e73d30e0c896 Make utf8_validate_or_convert() to always allocate a new string.
zas_
parents: 680
diff changeset
298 utf8_text = utf8_validate_or_convert(text);
e73d30e0c896 Make utf8_validate_or_convert() to always allocate a new string.
zas_
parents: 680
diff changeset
299 g_free(text);
176
695e1ad3b169 simplified exif.h, moved implementation-specific stuff to exif-int.h
nadvornik
parents: 138
diff changeset
300 elements = g_strdup_printf("%d", exif_item_get_elements(item));
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
301 description = exif_item_get_description(item);
182
8a417f10ba09 more exiv2 fixes
nadvornik
parents: 181
diff changeset
302 if (!description) description = g_strdup("");
767
e73d30e0c896 Make utf8_validate_or_convert() to always allocate a new string.
zas_
parents: 680
diff changeset
303 utf8_description = utf8_validate_or_convert(description);
e73d30e0c896 Make utf8_validate_or_convert() to always allocate a new string.
zas_
parents: 680
diff changeset
304 g_free(description);
e73d30e0c896 Make utf8_validate_or_convert() to always allocate a new string.
zas_
parents: 680
diff changeset
305
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
306 gtk_list_store_append(store, &iter);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
307 gtk_list_store_set(store, &iter,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
308 EXIF_ADVCOL_ENABLED, bar_exif_row_enabled(tag_name),
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
309 EXIF_ADVCOL_TAG, tag,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
310 EXIF_ADVCOL_NAME, tag_name,
767
e73d30e0c896 Make utf8_validate_or_convert() to always allocate a new string.
zas_
parents: 680
diff changeset
311 EXIF_ADVCOL_VALUE, utf8_text,
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
312 EXIF_ADVCOL_FORMAT, format,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
313 EXIF_ADVCOL_ELEMENTS, elements,
767
e73d30e0c896 Make utf8_validate_or_convert() to always allocate a new string.
zas_
parents: 680
diff changeset
314 EXIF_ADVCOL_DESCRIPTION, utf8_description, -1);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
315 g_free(tag);
767
e73d30e0c896 Make utf8_validate_or_convert() to always allocate a new string.
zas_
parents: 680
diff changeset
316 g_free(utf8_text);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
317 g_free(elements);
767
e73d30e0c896 Make utf8_validate_or_convert() to always allocate a new string.
zas_
parents: 680
diff changeset
318 g_free(utf8_description);
185
354da67a7ca2 read also iptc and xmp
nadvornik
parents: 182
diff changeset
319 g_free(tag_name);
176
695e1ad3b169 simplified exif.h, moved implementation-specific stuff to exif-int.h
nadvornik
parents: 138
diff changeset
320 item = exif_get_next_item(exif);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
321 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
322 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
323
844
efed9a1520d6 implemented generic FileData cache
nadvornik
parents: 767
diff changeset
324 exif_free_fd(eb->fd, exif);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
325 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
326
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
327 static void bar_exif_clear(ExifBar *eb)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
328 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
329 gint i;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
330
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
331 if (!GTK_WIDGET_SENSITIVE(eb->labels[0])) return;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
332
222
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
333 for (i = 0; ExifUIList[i].key; i++)
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
334 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
335 gtk_label_set_text(GTK_LABEL(eb->labels[i]), "");
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
336 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
337 for (i = 0; i < EXIF_BAR_CUSTOM_COUNT; i++)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
338 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
339 gtk_label_set_text(GTK_LABEL(eb->custom_value[i]), "");
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
340 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
341
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
342 if (eb->listview)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
343 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
344 GtkListStore *store;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
345
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
346 store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(eb->listview)));
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
347 gtk_list_store_clear(store);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
348 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
349 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
350
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 114
diff changeset
351 void bar_exif_set(GtkWidget *bar, FileData *fd)
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
352 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
353 ExifBar *eb;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
354
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
355 eb = g_object_get_data(G_OBJECT(bar), "bar_exif_data");
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
356 if (!eb) return;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
357
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
358 /* store this, advanced view toggle needs to reload data */
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 114
diff changeset
359 file_data_unref(eb->fd);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 114
diff changeset
360 eb->fd = file_data_ref(fd);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
361
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
362 bar_exif_clear(eb);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
363 bar_exif_update(eb);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
364 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
365
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
366 static void bar_exif_row_toggled_cb(GtkCellRendererToggle *toggle, const gchar *path, gpointer data)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
367 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
368 GtkWidget *listview = data;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
369 GtkTreeModel *store;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
370 GtkTreeIter iter;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
371 GtkTreePath *tpath;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
372 gchar *name = NULL;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
373 gboolean active;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
374
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
375 store = gtk_tree_view_get_model(GTK_TREE_VIEW(listview));
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
376
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
377 tpath = gtk_tree_path_new_from_string(path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
378 gtk_tree_model_get_iter(store, &iter, tpath);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
379 gtk_tree_path_free(tpath);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
380
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
381 gtk_tree_model_get(store, &iter, EXIF_ADVCOL_ENABLED, &active,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
382 EXIF_ADVCOL_NAME, &name, -1);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
383 active = (!active);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
384
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
385 if (active &&
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
386 g_list_length(history_list_get_by_key("exif_extras")) >= EXIF_BAR_CUSTOM_COUNT)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
387 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
388 active = FALSE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
389 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
390
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
391 gtk_list_store_set(GTK_LIST_STORE(store), &iter, EXIF_ADVCOL_ENABLED, active, -1);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
392
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
393 if (active)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
394 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
395 history_list_add_to_key("exif_extras", name, EXIF_BAR_CUSTOM_COUNT);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
396 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
397 else
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
398 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
399 history_list_item_change("exif_extras", name, NULL);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
400 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
401
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
402 g_free(name);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
403 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
404
1062
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
405 static void bar_exif_remove_advanced_cb(GtkWidget *widget, gpointer data)
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
406 {
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
407 ExifBar *eb = data;
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
408 const gchar *key;
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
409
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
410 key = g_object_get_data(G_OBJECT(widget), "key");
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
411 if (!key) return;
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
412
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
413 history_list_item_change("exif_extras", key, NULL);
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
414
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
415 bar_exif_update(eb);
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
416 }
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
417
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
418 static void bar_exif_add_column_check(GtkWidget *listview, const gchar *title, gint n)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
419 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
420 GtkTreeViewColumn *column;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
421 GtkCellRenderer *renderer;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
422
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
423 column = gtk_tree_view_column_new();
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
424 gtk_tree_view_column_set_title(column, title);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
425 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
426
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
427 renderer = gtk_cell_renderer_toggle_new();
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
428 gtk_tree_view_column_pack_start(column, renderer, TRUE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
429 gtk_tree_view_column_add_attribute(column, renderer, "active", n);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
430 gtk_tree_view_append_column(GTK_TREE_VIEW(listview), column);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
431
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
432 g_signal_connect(G_OBJECT(renderer), "toggled",
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
433 G_CALLBACK(bar_exif_row_toggled_cb), listview);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
434 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
435
48
6948407f52a5 Fri Jun 3 18:43:46 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
436 static void bar_exif_add_column(GtkWidget *listview, const gchar *title, gint n, gint sizable)
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
437 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
438 GtkTreeViewColumn *column;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
439 GtkCellRenderer *renderer;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
440
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
441 column = gtk_tree_view_column_new();
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
442 gtk_tree_view_column_set_title(column, title);
48
6948407f52a5 Fri Jun 3 18:43:46 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
443
6948407f52a5 Fri Jun 3 18:43:46 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
444 if (sizable)
6948407f52a5 Fri Jun 3 18:43:46 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
445 {
6948407f52a5 Fri Jun 3 18:43:46 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
446 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
6948407f52a5 Fri Jun 3 18:43:46 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
447 gtk_tree_view_column_set_fixed_width(column, BAR_EXIF_DATA_COLUMN_WIDTH);
6948407f52a5 Fri Jun 3 18:43:46 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
448 gtk_tree_view_column_set_resizable(column, TRUE);
6948407f52a5 Fri Jun 3 18:43:46 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
449 }
6948407f52a5 Fri Jun 3 18:43:46 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
450 else
6948407f52a5 Fri Jun 3 18:43:46 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
451 {
6948407f52a5 Fri Jun 3 18:43:46 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
452 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
6948407f52a5 Fri Jun 3 18:43:46 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
453 }
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
454
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
455 renderer = gtk_cell_renderer_text_new();
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
456 gtk_tree_view_column_pack_start(column, renderer, TRUE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
457 gtk_tree_view_column_add_attribute(column, renderer, "text", n);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
458 gtk_tree_view_append_column(GTK_TREE_VIEW(listview), column);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
459 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
460
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
461 static void bar_exif_advanced_build_view(ExifBar *eb)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
462 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
463 GtkListStore *store;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
464
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
465 if (eb->listview) return;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
466
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
467 store = gtk_list_store_new(7, G_TYPE_BOOLEAN,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
468 G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
469 G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
470 eb->listview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
471 g_object_unref(store);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
472
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
473 gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(eb->listview), TRUE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
474 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(eb->listview), TRUE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
475
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
476 if (eb->allow_search)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
477 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
478 gtk_tree_view_set_search_column(GTK_TREE_VIEW(eb->listview), EXIF_ADVCOL_NAME);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
479 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
480 else
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
481 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
482 gtk_tree_view_set_enable_search(GTK_TREE_VIEW(eb->listview), FALSE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
483 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
484
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
485 bar_exif_add_column_check(eb->listview, "", EXIF_ADVCOL_ENABLED);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
486
48
6948407f52a5 Fri Jun 3 18:43:46 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
487 bar_exif_add_column(eb->listview, _("Tag"), EXIF_ADVCOL_TAG, FALSE);
6948407f52a5 Fri Jun 3 18:43:46 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
488 bar_exif_add_column(eb->listview, _("Name"), EXIF_ADVCOL_NAME, FALSE);
6948407f52a5 Fri Jun 3 18:43:46 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
489 bar_exif_add_column(eb->listview, _("Value"), EXIF_ADVCOL_VALUE, TRUE);
6948407f52a5 Fri Jun 3 18:43:46 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
490 bar_exif_add_column(eb->listview, _("Format"), EXIF_ADVCOL_FORMAT, FALSE);
6948407f52a5 Fri Jun 3 18:43:46 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
491 bar_exif_add_column(eb->listview, _("Elements"), EXIF_ADVCOL_ELEMENTS, FALSE);
6948407f52a5 Fri Jun 3 18:43:46 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
492 bar_exif_add_column(eb->listview, _("Description"), EXIF_ADVCOL_DESCRIPTION, FALSE);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
493
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
494 eb->advanced_scrolled = gtk_scrolled_window_new(NULL, NULL);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
495 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(eb->advanced_scrolled), GTK_SHADOW_IN);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
496 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(eb->advanced_scrolled),
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
497 GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
498 gtk_box_pack_start(GTK_BOX(eb->vbox), eb->advanced_scrolled, TRUE, TRUE, 0);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
499 gtk_container_add(GTK_CONTAINER(eb->advanced_scrolled), eb->listview);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
500 gtk_widget_show(eb->listview);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
501 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
502
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
503 static void bar_exif_advanced_cb(GtkWidget *widget, gpointer data)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
504 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
505 ExifBar *eb = data;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
506 gint advanced;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
507
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
508 advanced = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
509
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
510 if (advanced)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
511 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
512 gtk_widget_hide(eb->scrolled);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
513 bar_exif_advanced_build_view(eb);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
514 gtk_widget_show(eb->advanced_scrolled);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
515 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
516 else
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
517 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
518 gtk_widget_hide(eb->advanced_scrolled);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
519 gtk_widget_show(eb->scrolled);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
520 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
521
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
522 bar_exif_update(eb);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
523 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
524
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
525 gint bar_exif_is_advanced(GtkWidget *bar)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
526 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
527 ExifBar *eb;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
528
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
529 eb = g_object_get_data(G_OBJECT(bar), "bar_exif_data");
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
530 if (!eb) return FALSE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
531
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
532 return (eb->advanced_scrolled && GTK_WIDGET_VISIBLE(eb->advanced_scrolled));
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
533 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
534
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
535 void bar_exif_close(GtkWidget *bar)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
536 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
537 ExifBar *eb;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
538
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
539 eb = g_object_get_data(G_OBJECT(bar), "bar_exif_data");
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
540 if (!eb) return;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
541
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
542 gtk_widget_destroy(eb->vbox);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
543 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
544
489
3809ffa3567b Save state and width of exif, info and sort panels to rc file.
zas_
parents: 475
diff changeset
545 static void bar_exif_width(ExifBar *eb, gint val)
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
546 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
547 gint size;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
548
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
549 size = eb->vbox->allocation.width;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
550 size = CLAMP(size + val, EXIF_BAR_SIZE_INCREMENT * 2, EXIF_BAR_SIZE_INCREMENT * 16);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
551
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
552 gtk_widget_set_size_request(eb->vbox, size, -1);
489
3809ffa3567b Save state and width of exif, info and sort panels to rc file.
zas_
parents: 475
diff changeset
553 options->panels.exif.width = eb->vbox->allocation.width;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
554 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
555
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
556 static void bar_exif_larger(GtkWidget *widget, gpointer data)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
557 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
558 ExifBar *eb = data;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
559
489
3809ffa3567b Save state and width of exif, info and sort panels to rc file.
zas_
parents: 475
diff changeset
560 bar_exif_width(eb, EXIF_BAR_SIZE_INCREMENT);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
561 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
562
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
563 static void bar_exif_smaller(GtkWidget *widget, gpointer data)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
564 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
565 ExifBar *eb = data;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
566
489
3809ffa3567b Save state and width of exif, info and sort panels to rc file.
zas_
parents: 475
diff changeset
567 bar_exif_width(eb, -EXIF_BAR_SIZE_INCREMENT);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
568 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
569
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
570 static void bar_exif_destroy(GtkWidget *widget, gpointer data)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
571 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
572 ExifBar *eb = data;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
573
222
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
574 g_free(eb->keys);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
575 g_free(eb->labels);
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 114
diff changeset
576 file_data_unref(eb->fd);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
577 g_free(eb);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
578 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
579
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 114
diff changeset
580 GtkWidget *bar_exif_new(gint show_title, FileData *fd, gint advanced, GtkWidget *bounding_widget)
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
581 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
582 ExifBar *eb;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
583 GtkWidget *table;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
584 GtkWidget *viewport;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
585 GtkWidget *hbox;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
586 GtkWidget *button;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
587 gint i;
222
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
588 gint exif_len;
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
589
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
590 for (exif_len = 0; ExifUIList[exif_len].key; exif_len++)
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
591 ;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
592
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
593 eb = g_new0(ExifBar, 1);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
594
222
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
595 eb->keys = g_new0(GtkWidget *, exif_len);
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
596 eb->labels = g_new0(GtkWidget *, exif_len);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
597
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
598 eb->vbox = gtk_vbox_new(FALSE, PREF_PAD_GAP);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
599 g_object_set_data(G_OBJECT(eb->vbox), "bar_exif_data", eb);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
600 g_signal_connect_after(G_OBJECT(eb->vbox), "destroy",
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
601 G_CALLBACK(bar_exif_destroy), eb);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
602
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
603 eb->allow_search = !show_title;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
604
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
605 if (show_title)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
606 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
607 GtkWidget *box;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
608 GtkWidget *label;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
609 GtkWidget *button;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
610 GtkWidget *arrow;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
611
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
612 box = gtk_hbox_new(FALSE, 0);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
613
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
614 label = sizer_new(eb->vbox, bounding_widget, SIZER_POS_LEFT);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
615 sizer_set_limits(label, EXIF_BAR_SIZE_INCREMENT * 2, -1, -1 , -1);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
616 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 0);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
617 gtk_widget_show(label);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
618
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
619 label = gtk_label_new(_("Exif"));
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
620 pref_label_bold(label, TRUE, FALSE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
621 gtk_box_pack_start(GTK_BOX(box), label, TRUE, TRUE, 0);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
622 gtk_widget_show(label);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
623
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
624 button = gtk_button_new();
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
625 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
626 g_signal_connect(G_OBJECT(button), "clicked",
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
627 G_CALLBACK(bar_exif_smaller), eb);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
628 gtk_box_pack_end(GTK_BOX(box), button, FALSE, FALSE, 0);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
629 arrow = gtk_arrow_new(GTK_ARROW_RIGHT, GTK_SHADOW_NONE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
630 gtk_widget_set_size_request(arrow, EXIF_BAR_ARROW_SIZE, EXIF_BAR_ARROW_SIZE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
631 gtk_container_add(GTK_CONTAINER(button), arrow);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
632 gtk_widget_show(arrow);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
633 gtk_widget_show(button);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
634
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
635 button = gtk_button_new();
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
636 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
637 g_signal_connect(G_OBJECT(button), "clicked",
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
638 G_CALLBACK(bar_exif_larger), eb);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
639 gtk_box_pack_end(GTK_BOX(box), button, FALSE, FALSE, 0);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
640 arrow = gtk_arrow_new(GTK_ARROW_LEFT, GTK_SHADOW_NONE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
641 gtk_widget_set_size_request(arrow, EXIF_BAR_ARROW_SIZE, EXIF_BAR_ARROW_SIZE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
642 gtk_container_add(GTK_CONTAINER(button), arrow);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
643 gtk_widget_show(arrow);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
644 gtk_widget_show(button);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
645
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
646 gtk_box_pack_start(GTK_BOX(eb->vbox), box, FALSE, FALSE, 0);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
647 gtk_widget_show(box);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
648 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
649
222
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
650
1062
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
651 table = gtk_table_new(3, exif_len + 1 + EXIF_BAR_CUSTOM_COUNT, FALSE);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
652
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
653 eb->table = table;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
654
222
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
655 for (i = 0; ExifUIList[i].key; i++)
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
656 {
1053
77ca9a5d42be fixed charset of exiv2 strings in non-utf8 locales
nadvornik
parents: 1052
diff changeset
657 gchar *text;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
658
222
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
659 text = exif_get_description_by_key(ExifUIList[i].key);
442
4b2d7f9af171 Big whitespaces cleanup:
zas_
parents: 438
diff changeset
660 eb->labels[i] = table_add_line(table, 0, i, text, NULL,
222
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
661 &eb->keys[i]);
1053
77ca9a5d42be fixed charset of exiv2 strings in non-utf8 locales
nadvornik
parents: 1052
diff changeset
662 g_free(text);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
663 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
664
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
665 eb->custom_sep = gtk_hseparator_new();
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
666 gtk_table_attach(GTK_TABLE(table), eb->custom_sep, 0, 1,
222
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
667 exif_len, exif_len + 1,
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
668 GTK_FILL, GTK_FILL, 2, 2);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
669
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
670 for (i = 0; i < EXIF_BAR_CUSTOM_COUNT; i++)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
671 {
222
77f1bcc6c161 various exif improvements based on patch by Uwe Ohse
nadvornik
parents: 204
diff changeset
672 table_add_line_custom(table, 0, exif_len + 1 + i,
1062
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
673 "", "", &eb->custom_name[i], &eb->custom_value[i],
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
674 &eb->custom_remove[i]);
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
675 g_signal_connect(G_OBJECT(eb->custom_remove[i]), "clicked",
2e661b3e7ca0 Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
zas_
parents: 1055
diff changeset
676 G_CALLBACK(bar_exif_remove_advanced_cb), eb);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
677 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
678
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
679 eb->scrolled = gtk_scrolled_window_new(NULL, NULL);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
680 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(eb->scrolled),
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
681 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
682
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
683 viewport = gtk_viewport_new(NULL, NULL);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
684 gtk_viewport_set_shadow_type(GTK_VIEWPORT(viewport), GTK_SHADOW_NONE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
685 gtk_container_add(GTK_CONTAINER(eb->scrolled), viewport);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
686 gtk_widget_show(viewport);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
687
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
688 gtk_container_add(GTK_CONTAINER(viewport), table);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
689 gtk_widget_show(table);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
690
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
691 gtk_box_pack_start(GTK_BOX(eb->vbox), eb->scrolled, TRUE, TRUE, 0);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
692
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
693 hbox = gtk_hbox_new(FALSE, PREF_PAD_SPACE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
694 gtk_box_pack_end(GTK_BOX(eb->vbox), hbox, FALSE, FALSE, 0);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
695 gtk_widget_show(hbox);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
696
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
697 button = gtk_check_button_new_with_label(_("Advanced view"));
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
698 if (advanced) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
699 g_signal_connect(G_OBJECT(button), "toggled",
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
700 G_CALLBACK(bar_exif_advanced_cb), eb);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
701 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
702 gtk_widget_show(button);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
703
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
704 eb->advanced_scrolled = NULL;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
705 eb->listview = NULL;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
706
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
707 if (advanced)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
708 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
709 bar_exif_advanced_build_view(eb);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
710 gtk_widget_show(eb->advanced_scrolled);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
711 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
712 else
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
713 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
714 gtk_widget_show(eb->scrolled);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
715 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
716
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 114
diff changeset
717 eb->fd = file_data_ref(fd);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
718 bar_exif_update(eb);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
719
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
720 return eb->vbox;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
721 }
1055
1646720364cf Adding a vim modeline to all files - patch by Klaus Ethgen
nadvornik
parents: 1053
diff changeset
722 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */