annotate src/bar_exif.c @ 1343:9161a33c2cf3

give the panes more control over expander title
author Vladimir Nadvornik <nadvornik@suse.cz>
date Sat, 28 Feb 2009 19:44:58 +0000
parents 4f8f11de5c36
children 1ef332b8a27a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
1 /*
196
bdad1cacadf4 rename GQview -> Geeqie over the code
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 188
diff changeset
2 * Geeqie
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
3 * (C) 2004 John Ellis
1284
5cb31602f595 Add year 2009 to copyright info everywhere.
Laurent Monin <geeqie@norz.org>
parents: 1189
diff changeset
4 * Copyright (C) 2008 - 2009 The Geeqie Team
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
5 *
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
6 * Author: John Ellis
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
7 *
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
8 * This software is released under the GNU General Public License (GNU GPL).
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
9 * Please read the included file COPYING for more information.
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
10 * This software comes with no warranty of any kind, use at your own risk!
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
11 */
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
12
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
13
281
b1c2c2cf19d4 gqview.h -> main.h
Laurent Monin <geeqie@norz.org>
parents: 258
diff changeset
14 #include "main.h"
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
15 #include "bar_exif.h"
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
16
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
17 #include "exif.h"
1288
01a4a8674c8b use metadata_read_* functions where possible
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1284
diff changeset
18 #include "metadata.h"
1022
d09059a8b243 Move miscellaneous functions to their own files (new misc.[ch]).
Laurent Monin <geeqie@norz.org>
parents: 902
diff changeset
19 #include "filedata.h"
902
ee3a7b7dbc33 Move history_list_*() functions to separate files:
Laurent Monin <geeqie@norz.org>
parents: 895
diff changeset
20 #include "history_list.h"
1022
d09059a8b243 Move miscellaneous functions to their own files (new misc.[ch]).
Laurent Monin <geeqie@norz.org>
parents: 902
diff changeset
21 #include "misc.h"
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
22 #include "ui_misc.h"
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
23 #include "bar.h"
1309
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
24 #include "rcfile.h"
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
25
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
26
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
27 #include <math.h>
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
28
222
fe6cb572a798 various exif improvements based on patch by Uwe Ohse
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 204
diff changeset
29 ExifUI ExifUIList[]={
1189
2f89804152d0 Do not hardcode exif formatted prefix.
Laurent Monin <geeqie@norz.org>
parents: 1069
diff changeset
30 { 0, 0, EXIF_UI_IFSET, EXIF_FORMATTED("Camera")},
2f89804152d0 Do not hardcode exif formatted prefix.
Laurent Monin <geeqie@norz.org>
parents: 1069
diff changeset
31 { 0, 0, EXIF_UI_IFSET, EXIF_FORMATTED("DateTime")},
2f89804152d0 Do not hardcode exif formatted prefix.
Laurent Monin <geeqie@norz.org>
parents: 1069
diff changeset
32 { 0, 0, EXIF_UI_IFSET, EXIF_FORMATTED("ShutterSpeed")},
2f89804152d0 Do not hardcode exif formatted prefix.
Laurent Monin <geeqie@norz.org>
parents: 1069
diff changeset
33 { 0, 0, EXIF_UI_IFSET, EXIF_FORMATTED("Aperture")},
2f89804152d0 Do not hardcode exif formatted prefix.
Laurent Monin <geeqie@norz.org>
parents: 1069
diff changeset
34 { 0, 0, EXIF_UI_IFSET, EXIF_FORMATTED("ExposureBias")},
2f89804152d0 Do not hardcode exif formatted prefix.
Laurent Monin <geeqie@norz.org>
parents: 1069
diff changeset
35 { 0, 0, EXIF_UI_IFSET, EXIF_FORMATTED("ISOSpeedRating")},
2f89804152d0 Do not hardcode exif formatted prefix.
Laurent Monin <geeqie@norz.org>
parents: 1069
diff changeset
36 { 0, 0, EXIF_UI_IFSET, EXIF_FORMATTED("FocalLength")},
2f89804152d0 Do not hardcode exif formatted prefix.
Laurent Monin <geeqie@norz.org>
parents: 1069
diff changeset
37 { 0, 0, EXIF_UI_IFSET, EXIF_FORMATTED("FocalLength35mmFilm")},
2f89804152d0 Do not hardcode exif formatted prefix.
Laurent Monin <geeqie@norz.org>
parents: 1069
diff changeset
38 { 0, 0, EXIF_UI_IFSET, EXIF_FORMATTED("Flash")},
325
6414b01aace9 Only display defined exif tags by default.
Laurent Monin <geeqie@norz.org>
parents: 324
diff changeset
39 { 0, 0, EXIF_UI_IFSET, "Exif.Photo.ExposureProgram"},
6414b01aace9 Only display defined exif tags by default.
Laurent Monin <geeqie@norz.org>
parents: 324
diff changeset
40 { 0, 0, EXIF_UI_IFSET, "Exif.Photo.MeteringMode"},
6414b01aace9 Only display defined exif tags by default.
Laurent Monin <geeqie@norz.org>
parents: 324
diff changeset
41 { 0, 0, EXIF_UI_IFSET, "Exif.Photo.LightSource"},
1189
2f89804152d0 Do not hardcode exif formatted prefix.
Laurent Monin <geeqie@norz.org>
parents: 1069
diff changeset
42 { 0, 0, EXIF_UI_IFSET, EXIF_FORMATTED("ColorProfile")},
2f89804152d0 Do not hardcode exif formatted prefix.
Laurent Monin <geeqie@norz.org>
parents: 1069
diff changeset
43 { 0, 0, EXIF_UI_IFSET, EXIF_FORMATTED("SubjectDistance")},
2f89804152d0 Do not hardcode exif formatted prefix.
Laurent Monin <geeqie@norz.org>
parents: 1069
diff changeset
44 { 0, 0, EXIF_UI_IFSET, EXIF_FORMATTED("Resolution")},
325
6414b01aace9 Only display defined exif tags by default.
Laurent Monin <geeqie@norz.org>
parents: 324
diff changeset
45 { 0, 0, EXIF_UI_IFSET, "Exif.Image.Orientation"},
1189
2f89804152d0 Do not hardcode exif formatted prefix.
Laurent Monin <geeqie@norz.org>
parents: 1069
diff changeset
46 { 0, 0, EXIF_UI_IFSET, EXIF_FORMATTED("GPSPosition")},
2f89804152d0 Do not hardcode exif formatted prefix.
Laurent Monin <geeqie@norz.org>
parents: 1069
diff changeset
47 { 0, 0, EXIF_UI_IFSET, EXIF_FORMATTED("GPSAltitude")},
325
6414b01aace9 Only display defined exif tags by default.
Laurent Monin <geeqie@norz.org>
parents: 324
diff changeset
48 { 0, 0, EXIF_UI_IFSET, "Exif.Image.ImageDescription"},
6414b01aace9 Only display defined exif tags by default.
Laurent Monin <geeqie@norz.org>
parents: 324
diff changeset
49 { 0, 0, EXIF_UI_IFSET, "Exif.Image.Copyright"},
6414b01aace9 Only display defined exif tags by default.
Laurent Monin <geeqie@norz.org>
parents: 324
diff changeset
50 { 0, 0, EXIF_UI_OFF, NULL}
222
fe6cb572a798 various exif improvements based on patch by Uwe Ohse
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 204
diff changeset
51 };
fe6cb572a798 various exif improvements based on patch by Uwe Ohse
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 204
diff changeset
52
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
53
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
54 /*
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
55 *-------------------------------------------------------------------
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
56 * table util
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
57 *-------------------------------------------------------------------
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
58 */
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
59
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
60 static void table_add_line_custom(GtkWidget *table, gint x, gint y,
442
f698b737556b Big whitespaces cleanup:
Laurent Monin <geeqie@norz.org>
parents: 438
diff changeset
61 const gchar *text1, const gchar *text2,
1062
71dd2c4426ce Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
Laurent Monin <geeqie@norz.org>
parents: 1055
diff changeset
62 GtkWidget **label1, GtkWidget **label2,
1065
91d9bbcf75d0 improved custom exif look:
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1062
diff changeset
63 GtkWidget **remove)
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
64 {
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
65 GtkWidget *label;
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
66 gchar *buf;
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
67
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
68 buf = g_strconcat((text1) ? text1 : "fixme", ":", NULL);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
69 if (!text2) text2 = "";
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
70
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
71 label = gtk_label_new(buf);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
72 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.0);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
73 pref_label_bold(label, TRUE, FALSE);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
74 gtk_table_attach(GTK_TABLE(table), label,
1065
91d9bbcf75d0 improved custom exif look:
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1062
diff changeset
75 x + 1, x + 2, y, y + 1,
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
76 GTK_FILL, GTK_FILL,
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
77 2, 2);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
78 *label1 = label;
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
79
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
80 label = gtk_label_new(text2);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
81 gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
82 gtk_table_attach(GTK_TABLE(table), label,
1065
91d9bbcf75d0 improved custom exif look:
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1062
diff changeset
83 x + 2, x + 3, y, y + 1,
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
84 GTK_FILL, GTK_FILL,
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
85 2, 2);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
86 *label2 = label;
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
87
1065
91d9bbcf75d0 improved custom exif look:
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1062
diff changeset
88 if (remove)
1062
71dd2c4426ce Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
Laurent Monin <geeqie@norz.org>
parents: 1055
diff changeset
89 {
1065
91d9bbcf75d0 improved custom exif look:
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1062
diff changeset
90 *remove = gtk_check_button_new();
91d9bbcf75d0 improved custom exif look:
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1062
diff changeset
91 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(*remove), TRUE);
91d9bbcf75d0 improved custom exif look:
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1062
diff changeset
92
91d9bbcf75d0 improved custom exif look:
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1062
diff changeset
93 gtk_table_attach(GTK_TABLE(table), *remove,
91d9bbcf75d0 improved custom exif look:
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1062
diff changeset
94 x, x + 1, y, y + 1,
1062
71dd2c4426ce Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
Laurent Monin <geeqie@norz.org>
parents: 1055
diff changeset
95 GTK_FILL, GTK_FILL,
71dd2c4426ce Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
Laurent Monin <geeqie@norz.org>
parents: 1055
diff changeset
96 2, 2);
71dd2c4426ce Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
Laurent Monin <geeqie@norz.org>
parents: 1055
diff changeset
97 }
71dd2c4426ce Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
Laurent Monin <geeqie@norz.org>
parents: 1055
diff changeset
98
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
99 g_free(buf);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
100 }
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
101
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
102 static GtkWidget *table_add_line(GtkWidget *table, gint x, gint y,
222
fe6cb572a798 various exif improvements based on patch by Uwe Ohse
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 204
diff changeset
103 const gchar *description, const gchar *text,
1062
71dd2c4426ce Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
Laurent Monin <geeqie@norz.org>
parents: 1055
diff changeset
104 GtkWidget **keyret)
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
105 {
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
106 GtkWidget *key;
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
107 GtkWidget *label;
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
108
1062
71dd2c4426ce Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
Laurent Monin <geeqie@norz.org>
parents: 1055
diff changeset
109 table_add_line_custom(table, x, y, description, text, &key, &label, NULL);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
110 gtk_widget_show(key);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
111 gtk_widget_show(label);
222
fe6cb572a798 various exif improvements based on patch by Uwe Ohse
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 204
diff changeset
112 if (keyret) *keyret = key;
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
113
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
114 return label;
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
115 }
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
116
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
117
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
118 /*
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
119 *-------------------------------------------------------------------
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
120 * EXIF widget
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
121 *-------------------------------------------------------------------
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
122 */
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
123
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
124 typedef struct _PaneExifData PaneExifData;
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
125 struct _PaneExifData
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
126 {
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
127 PaneData pane;
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
128 GtkWidget *vbox;
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
129 GtkWidget *scrolled;
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
130 GtkWidget *table;
222
fe6cb572a798 various exif improvements based on patch by Uwe Ohse
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 204
diff changeset
131 GtkWidget **keys;
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
132 GtkWidget **labels;
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
133
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
134 GtkWidget *custom_sep;
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
135 GtkWidget *custom_name[EXIF_BAR_CUSTOM_COUNT];
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
136 GtkWidget *custom_value[EXIF_BAR_CUSTOM_COUNT];
1062
71dd2c4426ce Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
Laurent Monin <geeqie@norz.org>
parents: 1055
diff changeset
137 GtkWidget *custom_remove[EXIF_BAR_CUSTOM_COUNT];
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
138
138
5be5d1c53016 replaced gchar* path with FileData *fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 114
diff changeset
139 FileData *fd;
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
140
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
141 gint allow_search;
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
142 };
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
143
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
144 static void bar_pane_exif_sensitive(PaneExifData *ped, gint enable)
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
145 {
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
146 gtk_widget_set_sensitive(ped->table, enable);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
147 }
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
148
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
149 static void bar_pane_exif_update(PaneExifData *ped)
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
150 {
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
151 ExifData *exif;
233
bf438491ea88 Remove unused variable declarations.
Laurent Monin <geeqie@norz.org>
parents: 222
diff changeset
152 gint i;
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
153 GList *list;
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
154
1288
01a4a8674c8b use metadata_read_* functions where possible
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1284
diff changeset
155 /* do we have any exif at all ? */
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
156 exif = exif_read_fd(ped->fd);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
157
1288
01a4a8674c8b use metadata_read_* functions where possible
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1284
diff changeset
158 if (!exif)
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
159 {
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
160 bar_pane_exif_sensitive(ped, FALSE);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
161 return;
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
162 }
1069
495c9ff682ed infrastructure for preprocessing of metadata
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1068
diff changeset
163 else
495c9ff682ed infrastructure for preprocessing of metadata
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1068
diff changeset
164 {
1288
01a4a8674c8b use metadata_read_* functions where possible
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1284
diff changeset
165 /* we will use high level functions so we can release it for now.
01a4a8674c8b use metadata_read_* functions where possible
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1284
diff changeset
166 it will stay in the cache */
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
167 exif_free_fd(ped->fd, exif);
1288
01a4a8674c8b use metadata_read_* functions where possible
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1284
diff changeset
168 exif = NULL;
1069
495c9ff682ed infrastructure for preprocessing of metadata
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1068
diff changeset
169 }
1288
01a4a8674c8b use metadata_read_* functions where possible
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1284
diff changeset
170
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
171
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
172 bar_pane_exif_sensitive(ped, TRUE);
222
fe6cb572a798 various exif improvements based on patch by Uwe Ohse
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 204
diff changeset
173
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
174 for (i = 0; ExifUIList[i].key; i++)
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
175 {
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
176 gchar *text;
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
177
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
178 if (ExifUIList[i].current == EXIF_UI_OFF)
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
179 {
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
180 gtk_widget_hide(ped->labels[i]);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
181 gtk_widget_hide(ped->keys[i]);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
182 continue;
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
183 }
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
184 text = metadata_read_string(ped->fd, ExifUIList[i].key, METADATA_FORMATTED);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
185 if (ExifUIList[i].current == EXIF_UI_IFSET
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
186 && (!text || !*text))
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
187 {
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
188 gtk_widget_hide(ped->labels[i]);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
189 gtk_widget_hide(ped->keys[i]);
1288
01a4a8674c8b use metadata_read_* functions where possible
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1284
diff changeset
190 g_free(text);
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
191 continue;
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
192 }
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
193 gtk_widget_show(ped->labels[i]);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
194 gtk_widget_show(ped->keys[i]);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
195 gtk_label_set_text(GTK_LABEL(ped->labels[i]), text);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
196 g_free(text);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
197 }
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
198
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
199 list = g_list_last(history_list_get_by_key("exif_extras"));
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
200 if (list)
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
201 {
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
202 gtk_widget_show(ped->custom_sep);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
203 }
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
204 else
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
205 {
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
206 gtk_widget_hide(ped->custom_sep);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
207 }
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
208 i = 0;
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
209 while (list && i < EXIF_BAR_CUSTOM_COUNT)
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
210 {
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
211 gchar *text;
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
212 gchar *name;
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
213 gchar *buf;
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
214 gchar *description;
1288
01a4a8674c8b use metadata_read_* functions where possible
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1284
diff changeset
215
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
216 name = list->data;
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
217 list = list->prev;
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
218
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
219 text = metadata_read_string(ped->fd, name, METADATA_FORMATTED);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
220
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
221 description = exif_get_tag_description_by_key(name);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
222 if (!description || *description == '\0')
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
223 {
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
224 g_free(description);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
225 description = g_strdup(name);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
226 }
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
227 buf = g_strconcat(description, ":", NULL);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
228 g_free(description);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
229
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
230 gtk_label_set_text(GTK_LABEL(ped->custom_name[i]), buf);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
231 g_free(buf);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
232 gtk_label_set_text(GTK_LABEL(ped->custom_value[i]), text);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
233 g_free(text);
767
f8ae19e47ef8 Make utf8_validate_or_convert() to always allocate a new string.
Laurent Monin <geeqie@norz.org>
parents: 680
diff changeset
234
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
235 gtk_widget_show(ped->custom_name[i]);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
236 gtk_widget_show(ped->custom_value[i]);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
237 g_object_set_data(G_OBJECT(ped->custom_remove[i]), "key", name);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
238 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ped->custom_remove[i]), TRUE);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
239 gtk_widget_show(ped->custom_remove[i]);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
240
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
241 i++;
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
242 }
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
243 while (i < EXIF_BAR_CUSTOM_COUNT)
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
244 {
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
245 g_object_set_data(G_OBJECT(ped->custom_remove[i]), "key", NULL);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
246 gtk_widget_hide(ped->custom_name[i]);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
247 gtk_widget_hide(ped->custom_value[i]);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
248 gtk_widget_hide(ped->custom_remove[i]);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
249
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
250 i++;
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
251 }
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
252 }
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
253
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
254 static void bar_pane_exif_clear(PaneExifData *ped)
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
255 {
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
256 gint i;
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
257
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
258 if (!GTK_WIDGET_SENSITIVE(ped->labels[0])) return;
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
259
222
fe6cb572a798 various exif improvements based on patch by Uwe Ohse
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 204
diff changeset
260 for (i = 0; ExifUIList[i].key; i++)
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
261 {
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
262 gtk_label_set_text(GTK_LABEL(ped->labels[i]), "");
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
263 }
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
264 for (i = 0; i < EXIF_BAR_CUSTOM_COUNT; i++)
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
265 {
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
266 gtk_label_set_text(GTK_LABEL(ped->custom_value[i]), "");
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
267 }
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
268 }
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
269
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
270 void bar_pane_exif_set_fd(GtkWidget *widget, FileData *fd)
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
271 {
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
272 PaneExifData *ped;
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
273
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
274 ped = g_object_get_data(G_OBJECT(widget), "pane_data");
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
275 if (!ped) return;
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
276
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
277 /* store this, advanced view toggle needs to reload data */
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
278 file_data_unref(ped->fd);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
279 ped->fd = file_data_ref(fd);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
280
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
281 bar_pane_exif_clear(ped);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
282 bar_pane_exif_update(ped);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
283 }
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
284
1309
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
285 static void bar_pane_exif_write_config(GtkWidget *pane, GString *outstr, gint indent)
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
286 {
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
287 PaneExifData *ped;
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
288
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
289 ped = g_object_get_data(G_OBJECT(pane), "pane_data");
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
290 if (!ped) return;
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
291
1314
c933e9655c0d simplified config writing
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1309
diff changeset
292 WRITE_STRING("<pane_exif\n");
1309
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
293 indent++;
1343
9161a33c2cf3 give the panes more control over expander title
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1315
diff changeset
294 write_char_option(outstr, indent, "pane.title", gtk_label_get_text(GTK_LABEL(ped->pane.title)));
1309
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
295 WRITE_BOOL(*ped, pane.expanded);
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
296 indent--;
1314
c933e9655c0d simplified config writing
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1309
diff changeset
297 WRITE_STRING("/>\n");
1309
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
298 }
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
299
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
300
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
301 static void bar_pane_exif_remove_advanced_cb(GtkWidget *widget, gpointer data)
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
302 {
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
303 PaneExifData *ped = data;
1062
71dd2c4426ce Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
Laurent Monin <geeqie@norz.org>
parents: 1055
diff changeset
304 const gchar *key;
71dd2c4426ce Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
Laurent Monin <geeqie@norz.org>
parents: 1055
diff changeset
305
1065
91d9bbcf75d0 improved custom exif look:
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1062
diff changeset
306 /* continue only if the toggle was deactivated */
91d9bbcf75d0 improved custom exif look:
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1062
diff changeset
307 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) return;
91d9bbcf75d0 improved custom exif look:
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1062
diff changeset
308
1062
71dd2c4426ce Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
Laurent Monin <geeqie@norz.org>
parents: 1055
diff changeset
309 key = g_object_get_data(G_OBJECT(widget), "key");
71dd2c4426ce Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
Laurent Monin <geeqie@norz.org>
parents: 1055
diff changeset
310 if (!key) return;
71dd2c4426ce Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
Laurent Monin <geeqie@norz.org>
parents: 1055
diff changeset
311
71dd2c4426ce Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
Laurent Monin <geeqie@norz.org>
parents: 1055
diff changeset
312 history_list_item_change("exif_extras", key, NULL);
71dd2c4426ce Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
Laurent Monin <geeqie@norz.org>
parents: 1055
diff changeset
313
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
314 bar_pane_exif_update(ped);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
315 }
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
316
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
317 void bar_pane_exif_close(GtkWidget *widget)
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
318 {
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
319 PaneExifData *ped;
48
afddac748267 Fri Jun 3 18:43:46 2005 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents: 9
diff changeset
320
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
321 ped = g_object_get_data(G_OBJECT(widget), "pane_data");
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
322 if (!ped) return;
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
323
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
324 gtk_widget_destroy(ped->vbox);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
325 }
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
326
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
327 static void bar_pane_exif_destroy(GtkWidget *widget, gpointer data)
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
328 {
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
329 PaneExifData *ped = data;
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
330
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
331 g_free(ped->keys);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
332 g_free(ped->labels);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
333 file_data_unref(ped->fd);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
334 g_free(ped);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
335 }
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
336
1309
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
337 GtkWidget *bar_pane_exif_new(const gchar *title, gboolean expanded)
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
338 {
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
339 PaneExifData *ped;
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
340 GtkWidget *table;
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
341 GtkWidget *viewport;
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
342 GtkWidget *hbox;
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
343 gint i;
222
fe6cb572a798 various exif improvements based on patch by Uwe Ohse
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 204
diff changeset
344 gint exif_len;
fe6cb572a798 various exif improvements based on patch by Uwe Ohse
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 204
diff changeset
345
fe6cb572a798 various exif improvements based on patch by Uwe Ohse
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 204
diff changeset
346 for (exif_len = 0; ExifUIList[exif_len].key; exif_len++)
fe6cb572a798 various exif improvements based on patch by Uwe Ohse
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 204
diff changeset
347 ;
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
348
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
349 ped = g_new0(PaneExifData, 1);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
350
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
351 ped->pane.pane_set_fd = bar_pane_exif_set_fd;
1309
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
352 ped->pane.pane_write_config = bar_pane_exif_write_config;
1343
9161a33c2cf3 give the panes more control over expander title
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1315
diff changeset
353 ped->pane.title = gtk_label_new(title);
1309
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
354 ped->pane.expanded = expanded;
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
355
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
356 ped->keys = g_new0(GtkWidget *, exif_len);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
357 ped->labels = g_new0(GtkWidget *, exif_len);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
358
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
359 ped->vbox = gtk_vbox_new(FALSE, PREF_PAD_GAP);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
360 g_object_set_data(G_OBJECT(ped->vbox), "pane_data", ped);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
361 g_signal_connect_after(G_OBJECT(ped->vbox), "destroy",
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
362 G_CALLBACK(bar_pane_exif_destroy), ped);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
363
222
fe6cb572a798 various exif improvements based on patch by Uwe Ohse
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 204
diff changeset
364
1062
71dd2c4426ce Add a button for each advanced entry in Properties Exif Panel that allow to remove it from display. It fixes bug 1962611.
Laurent Monin <geeqie@norz.org>
parents: 1055
diff changeset
365 table = gtk_table_new(3, exif_len + 1 + EXIF_BAR_CUSTOM_COUNT, FALSE);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
366
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
367 ped->table = table;
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
368
222
fe6cb572a798 various exif improvements based on patch by Uwe Ohse
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 204
diff changeset
369 for (i = 0; ExifUIList[i].key; i++)
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
370 {
1053
d213ef1fc608 fixed charset of exiv2 strings in non-utf8 locales
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1052
diff changeset
371 gchar *text;
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
372
222
fe6cb572a798 various exif improvements based on patch by Uwe Ohse
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 204
diff changeset
373 text = exif_get_description_by_key(ExifUIList[i].key);
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
374 ped->labels[i] = table_add_line(table, 0, i, text, NULL,
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
375 &ped->keys[i]);
1053
d213ef1fc608 fixed charset of exiv2 strings in non-utf8 locales
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1052
diff changeset
376 g_free(text);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
377 }
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
378
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
379 ped->custom_sep = gtk_hseparator_new();
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
380 gtk_table_attach(GTK_TABLE(table), ped->custom_sep, 0, 3,
222
fe6cb572a798 various exif improvements based on patch by Uwe Ohse
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 204
diff changeset
381 exif_len, exif_len + 1,
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
382 GTK_FILL, GTK_FILL, 2, 2);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
383
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
384 for (i = 0; i < EXIF_BAR_CUSTOM_COUNT; i++)
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
385 {
222
fe6cb572a798 various exif improvements based on patch by Uwe Ohse
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 204
diff changeset
386 table_add_line_custom(table, 0, exif_len + 1 + i,
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
387 "", "", &ped->custom_name[i], &ped->custom_value[i],
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
388 &ped->custom_remove[i]);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
389 g_signal_connect(G_OBJECT(ped->custom_remove[i]), "clicked",
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
390 G_CALLBACK(bar_pane_exif_remove_advanced_cb), ped);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
391 }
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
392
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
393 ped->scrolled = gtk_scrolled_window_new(NULL, NULL);
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
394 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(ped->scrolled),
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
395 GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
396
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
397 viewport = gtk_viewport_new(NULL, NULL);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
398 gtk_viewport_set_shadow_type(GTK_VIEWPORT(viewport), GTK_SHADOW_NONE);
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
399 gtk_container_add(GTK_CONTAINER(ped->scrolled), viewport);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
400 gtk_widget_show(viewport);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
401
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
402 gtk_container_add(GTK_CONTAINER(viewport), table);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
403 gtk_widget_show(table);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
404
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
405 gtk_box_pack_start(GTK_BOX(ped->vbox), ped->scrolled, TRUE, TRUE, 0);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
406
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
407 hbox = gtk_hbox_new(FALSE, PREF_PAD_SPACE);
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
408 gtk_box_pack_end(GTK_BOX(ped->vbox), hbox, FALSE, FALSE, 0);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
409 gtk_widget_show(hbox);
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
410
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
411 gtk_widget_show(ped->scrolled);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
412
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
413 gtk_widget_show(ped->vbox);
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
414
1293
6546ca1fea07 separated "normal" and advanced exif, "Normal" exif is now in the
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1288
diff changeset
415 return ped->vbox;
9
8d9e9edd6fdf Sync to GQview 1.5.9 release.
John Ellis <johne@verizon.net>
parents:
diff changeset
416 }
1309
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
417
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
418 GtkWidget *bar_pane_exif_new_from_config(const gchar **attribute_names, const gchar **attribute_values)
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
419 {
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
420 gchar *title = g_strdup(_("NoName"));
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
421 gboolean expanded = TRUE;
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
422
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
423 while (*attribute_names)
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
424 {
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
425 const gchar *option = *attribute_names++;
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
426 const gchar *value = *attribute_values++;
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
427
1315
4f8f11de5c36 Since READ_*() macros are now exported, do not hide
Laurent Monin <geeqie@norz.org>
parents: 1314
diff changeset
428 if (READ_CHAR_FULL("pane.title", title)) continue;
4f8f11de5c36 Since READ_*() macros are now exported, do not hide
Laurent Monin <geeqie@norz.org>
parents: 1314
diff changeset
429 if (READ_BOOL_FULL("pane.expanded", expanded)) continue;
1309
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
430
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
431
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
432 DEBUG_1("unknown attribute %s = %s", option, value);
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
433 }
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
434
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
435 return bar_pane_exif_new(title, expanded);
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
436 }
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
437
d89f8c4d593b config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1293
diff changeset
438
1055
4bbdfab3c89a Adding a vim modeline to all files - patch by Klaus Ethgen
Vladimir Nadvornik <nadvornik@suse.cz>
parents: 1053
diff changeset
439 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */