Mercurial > hg > forks > geeqie
annotate src/preferences.c @ 2826:d0c6c5ae586b
Option to hide predefined keyword tree
Selected on Preferences/General
author | Colin Clark <colin.clark@cclark.uk> |
---|---|
date | Sun, 26 Aug 2018 19:32:38 +0100 |
parents | b29ce668abca |
children | bb44bd76f857 |
rev | line source |
---|---|
9 | 1 /* |
2350
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2343
diff
changeset
|
2 * Copyright (C) 2006 John Ellis |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2343
diff
changeset
|
3 * Copyright (C) 2008 - 2016 The Geeqie Team |
9 | 4 * |
5 * Author: John Ellis | |
6 * | |
2350
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2343
diff
changeset
|
7 * This program is free software; you can redistribute it and/or modify |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2343
diff
changeset
|
8 * it under the terms of the GNU General Public License as published by |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2343
diff
changeset
|
9 * the Free Software Foundation; either version 2 of the License, or |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2343
diff
changeset
|
10 * (at your option) any later version. |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2343
diff
changeset
|
11 * |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2343
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2343
diff
changeset
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2343
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2343
diff
changeset
|
15 * GNU General Public License for more details. |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2343
diff
changeset
|
16 * |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2343
diff
changeset
|
17 * You should have received a copy of the GNU General Public License along |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2343
diff
changeset
|
18 * with this program; if not, write to the Free Software Foundation, Inc., |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2343
diff
changeset
|
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
9 | 20 */ |
21 | |
281 | 22 #include "main.h" |
9 | 23 #include "preferences.h" |
24 | |
648
36e8da5a771d
Move some functions from main.[ch] to new window.[ch].
Laurent Monin <geeqie@norz.org>
parents:
630
diff
changeset
|
25 #include "bar_exif.h" |
2824
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
26 #include "bar_keywords.h" |
1599
ec811624c949
Include missing header file.
Laurent Monin <geeqie@norz.org>
parents:
1596
diff
changeset
|
27 #include "cache.h" |
9 | 28 #include "cache_maint.h" |
29 #include "editors.h" | |
648
36e8da5a771d
Move some functions from main.[ch] to new window.[ch].
Laurent Monin <geeqie@norz.org>
parents:
630
diff
changeset
|
30 #include "exif.h" |
586
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
566
diff
changeset
|
31 #include "filedata.h" |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
566
diff
changeset
|
32 #include "filefilter.h" |
9 | 33 #include "fullscreen.h" |
26
f1fe26e637e9
Mon Mar 28 20:23:34 2005 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
15
diff
changeset
|
34 #include "image.h" |
469
681796421193
Rename few functions and replace fullscreen info with image overlay template string.
Laurent Monin <geeqie@norz.org>
parents:
468
diff
changeset
|
35 #include "image-overlay.h" |
426
e4a5d61aff1c
show the AdobeRGB profile in the menu, indicate input profile from image
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
413
diff
changeset
|
36 #include "color-man.h" |
9 | 37 #include "img-view.h" |
38 #include "layout_config.h" | |
39 #include "layout_util.h" | |
2824
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
40 #include "metadata.h" |
9 | 41 #include "pixbuf_util.h" |
42 #include "slideshow.h" | |
2623
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
43 #include "toolbar.h" |
597
471697db9e6b
moved safe delete functions to separate file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
594
diff
changeset
|
44 #include "trash.h" |
9 | 45 #include "utilops.h" |
46 #include "ui_fileops.h" | |
47 #include "ui_misc.h" | |
2824
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
48 #include "ui_spinner.h" |
9 | 49 #include "ui_tabcomp.h" |
50 #include "ui_utildlg.h" | |
648
36e8da5a771d
Move some functions from main.[ch] to new window.[ch].
Laurent Monin <geeqie@norz.org>
parents:
630
diff
changeset
|
51 #include "window.h" |
2746
8bab8ac8ade0
Local time - UTC offset and daylight saving correction
Colin Clark <colin.clark@cclark.uk>
parents:
2740
diff
changeset
|
52 #include "zonedetect.h" |
9 | 53 |
54 #include <math.h> | |
55 | |
2386 | 56 #ifdef HAVE_LCMS |
57 #ifdef HAVE_LCMS2 | |
58 #include <lcms2.h> | |
59 #else | |
60 #include <lcms.h> | |
61 #endif | |
62 #endif | |
9 | 63 |
64 #define EDITOR_NAME_MAX_LENGTH 32 | |
65 #define EDITOR_COMMAND_MAX_LENGTH 1024 | |
66 | |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
67 static void image_overlay_set_text_colours(); |
9 | 68 |
2824
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
69 GtkWidget *keyword_text; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
70 static void config_tab_keywords_save(); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
71 |
9 | 72 typedef struct _ThumbSize ThumbSize; |
73 struct _ThumbSize | |
74 { | |
75 gint w; | |
76 gint h; | |
77 }; | |
78 | |
79 static ThumbSize thumb_size_list[] = | |
80 { | |
81 { 24, 24 }, | |
82 { 32, 32 }, | |
83 { 48, 48 }, | |
84 { 64, 64 }, | |
85 { 96, 72 }, | |
86 { 96, 96 }, | |
87 { 128, 96 }, | |
88 { 128, 128 }, | |
89 { 160, 120 }, | |
90 { 160, 160 }, | |
91 { 192, 144 }, | |
92 { 192, 192 }, | |
93 { 256, 192 }, | |
94 { 256, 256 } | |
95 }; | |
96 | |
97 enum { | |
98 FE_ENABLE, | |
99 FE_EXTENSION, | |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
100 FE_DESCRIPTION, |
1239
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
101 FE_CLASS, |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
102 FE_WRITABLE, |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
103 FE_ALLOW_SIDECAR |
9 | 104 }; |
105 | |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
106 enum { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
107 AE_ACTION, |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
108 AE_KEY, |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
109 AE_TOOLTIP, |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
110 AE_ACCEL |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
111 }; |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
112 |
2768
7d275582e37d
Fix #612: Pan view image class filtering
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2756
diff
changeset
|
113 gchar *format_class_list[] = { |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
114 N_("Unknown"), |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
115 N_("Image"), |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
116 N_("RAW Image"), |
2597
e65df743a5a1
Ref #510: Rudimentary video support
Colin Clark <colin.clark@cclark.uk>
parents:
2596
diff
changeset
|
117 N_("Metadata"), |
2793 | 118 N_("Video"), |
2799
ea4163f0c769
Ref #332: include pdf-view
Colin Clark <colin.clark@cclark.uk>
parents:
2793
diff
changeset
|
119 N_("Collection"), |
ea4163f0c769
Ref #332: include pdf-view
Colin Clark <colin.clark@cclark.uk>
parents:
2793
diff
changeset
|
120 N_("Pdf") |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
121 }; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
122 |
9 | 123 /* config memory values */ |
321 | 124 static ConfOptions *c_options = NULL; |
9 | 125 |
126 | |
227
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
127 #ifdef DEBUG |
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
128 static gint debug_c; |
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
129 #endif |
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
130 |
9 | 131 static GtkWidget *configwindow = NULL; |
132 static GtkListStore *filter_store = NULL; | |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
133 static GtkTreeStore *accel_store = NULL; |
9 | 134 |
135 static GtkWidget *safe_delete_path_entry; | |
136 | |
113
f2109493004f
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
91
diff
changeset
|
137 static GtkWidget *color_profile_input_file_entry[COLOR_PROFILE_INPUTS]; |
f2109493004f
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
91
diff
changeset
|
138 static GtkWidget *color_profile_input_name_entry[COLOR_PROFILE_INPUTS]; |
f2109493004f
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
91
diff
changeset
|
139 static GtkWidget *color_profile_screen_file_entry; |
f2109493004f
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
91
diff
changeset
|
140 |
170
34d0013592f5
basic sidecar files configuration via preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
134
diff
changeset
|
141 static GtkWidget *sidecar_ext_entry; |
2756
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
142 static GtkWidget *help_search_engine_entry; |
225
5794f581eafc
Make the preferences window resizeable, and try to improve
Laurent Monin <geeqie@norz.org>
parents:
224
diff
changeset
|
143 |
5794f581eafc
Make the preferences window resizeable, and try to improve
Laurent Monin <geeqie@norz.org>
parents:
224
diff
changeset
|
144 |
5794f581eafc
Make the preferences window resizeable, and try to improve
Laurent Monin <geeqie@norz.org>
parents:
224
diff
changeset
|
145 #define CONFIG_WINDOW_DEF_WIDTH 700 |
1039
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
146 #define CONFIG_WINDOW_DEF_HEIGHT 600 |
225
5794f581eafc
Make the preferences window resizeable, and try to improve
Laurent Monin <geeqie@norz.org>
parents:
224
diff
changeset
|
147 |
9 | 148 /* |
149 *----------------------------------------------------------------------------- | |
150 * option widget callbacks (private) | |
151 *----------------------------------------------------------------------------- | |
442 | 152 */ |
9 | 153 |
154 static void zoom_increment_cb(GtkWidget *spin, gpointer data) | |
155 { | |
2341 | 156 c_options->image.zoom_increment = (gint)(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin)) * 100.0 + 0.01); |
9 | 157 } |
158 | |
2612
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
159 static void slideshow_delay_hours_cb(GtkWidget *spin, gpointer data) |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
160 { |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
161 gint mins_secs_tenths, delay; |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
162 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
163 mins_secs_tenths = c_options->slideshow.delay % |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
164 (3600 * SLIDESHOW_SUBSECOND_PRECISION); |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
165 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
166 delay = (gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin)) * |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
167 (3600 * SLIDESHOW_SUBSECOND_PRECISION) + |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
168 mins_secs_tenths); |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
169 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
170 c_options->slideshow.delay = delay > 0 ? delay : SLIDESHOW_MIN_SECONDS * |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
171 SLIDESHOW_SUBSECOND_PRECISION; |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
172 } |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
173 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
174 static void slideshow_delay_minutes_cb(GtkWidget *spin, gpointer data) |
9 | 175 { |
2612
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
176 gint hours, secs_tenths, delay; |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
177 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
178 hours = c_options->slideshow.delay / (3600 * SLIDESHOW_SUBSECOND_PRECISION); |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
179 secs_tenths = c_options->slideshow.delay % (60 * SLIDESHOW_SUBSECOND_PRECISION); |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
180 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
181 delay = hours * (3600 * SLIDESHOW_SUBSECOND_PRECISION) + |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
182 (gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin)) * |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
183 (60 * SLIDESHOW_SUBSECOND_PRECISION) + secs_tenths); |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
184 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
185 c_options->slideshow.delay = delay > 0 ? delay : SLIDESHOW_MIN_SECONDS * |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
186 SLIDESHOW_SUBSECOND_PRECISION; |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
187 } |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
188 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
189 static void slideshow_delay_seconds_cb(GtkWidget *spin, gpointer data) |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
190 { |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
191 gint hours_mins, delay; |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
192 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
193 hours_mins = c_options->slideshow.delay / (60 * SLIDESHOW_SUBSECOND_PRECISION); |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
194 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
195 delay = (hours_mins * (60 * SLIDESHOW_SUBSECOND_PRECISION)) + |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
196 (gint)(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin)) * |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
197 (gdouble)(SLIDESHOW_SUBSECOND_PRECISION) + 0.01); |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
198 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
199 c_options->slideshow.delay = delay > 0 ? delay : SLIDESHOW_MIN_SECONDS * |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
200 SLIDESHOW_SUBSECOND_PRECISION; |
9 | 201 } |
202 | |
203 /* | |
204 *----------------------------------------------------------------------------- | |
205 * sync progam to config window routine (private) | |
206 *----------------------------------------------------------------------------- | |
442 | 207 */ |
9 | 208 |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1400
diff
changeset
|
209 void config_entry_to_option(GtkWidget *entry, gchar **option, gchar *(*func)(const gchar *)) |
9 | 210 { |
211 const gchar *buf; | |
1042
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
212 |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
213 g_free(*option); |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
214 *option = NULL; |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
215 buf = gtk_entry_get_text(GTK_ENTRY(entry)); |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
216 if (buf && strlen(buf) > 0) |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
217 { |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
218 if (func) |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
219 *option = func(buf); |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
220 else |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
221 *option = g_strdup(buf); |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
222 } |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
223 } |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
224 |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
225 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
226 static gboolean accel_apply_cb(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
227 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
228 gchar *accel_path, *accel; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
229 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
230 gtk_tree_model_get(model, iter, AE_ACCEL, &accel_path, AE_KEY, &accel, -1); |
2059 | 231 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
232 if (accel_path && accel_path[0]) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
233 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
234 GtkAccelKey key; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
235 gtk_accelerator_parse(accel, &key.accel_key, &key.accel_mods); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
236 gtk_accel_map_change_entry(accel_path, key.accel_key, key.accel_mods, TRUE); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
237 } |
2059 | 238 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
239 g_free(accel_path); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
240 g_free(accel); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
241 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
242 return FALSE; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
243 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
244 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
245 |
1042
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
246 static void config_window_apply(void) |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
247 { |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
248 gint i; |
1437 | 249 gboolean refresh = FALSE; |
1042
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
250 |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
251 config_entry_to_option(safe_delete_path_entry, &options->file_ops.safe_delete_path, remove_trailing_slash); |
2059 | 252 |
356
ba4edae270d6
Rename show_dot_files to show_hidden_files.
Laurent Monin <geeqie@norz.org>
parents:
354
diff
changeset
|
253 if (options->file_filter.show_hidden_files != c_options->file_filter.show_hidden_files) refresh = TRUE; |
2265
15d51cf8ff3d
Allow to choose to show parent folder
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2255
diff
changeset
|
254 if (options->file_filter.show_parent_directory != c_options->file_filter.show_parent_directory) refresh = TRUE; |
373
363117fefc85
Add a new option in Preferences > Filtering to allow the
Laurent Monin <geeqie@norz.org>
parents:
356
diff
changeset
|
255 if (options->file_filter.show_dot_directory != c_options->file_filter.show_dot_directory) refresh = TRUE; |
329
056872a2bdf7
Rename file sorting options.
Laurent Monin <geeqie@norz.org>
parents:
327
diff
changeset
|
256 if (options->file_sort.case_sensitive != c_options->file_sort.case_sensitive) refresh = TRUE; |
2406 | 257 if (options->file_sort.natural != c_options->file_sort.natural) refresh = TRUE; |
2301
dec8d9db5770
Fix #333 Renaming file extensions
Colin Clark <cclark@mcb.net>
parents:
2265
diff
changeset
|
258 if (options->file_filter.disable_file_extension_checks != c_options->file_filter.disable_file_extension_checks) refresh = TRUE; |
332
e0907717f749
Rename file filtering options.
Laurent Monin <geeqie@norz.org>
parents:
330
diff
changeset
|
259 if (options->file_filter.disable != c_options->file_filter.disable) refresh = TRUE; |
9 | 260 |
341
3e0059a55671
Move safe_delete* and in place rename options to file_ops
Laurent Monin <geeqie@norz.org>
parents:
339
diff
changeset
|
261 options->file_ops.confirm_delete = c_options->file_ops.confirm_delete; |
3e0059a55671
Move safe_delete* and in place rename options to file_ops
Laurent Monin <geeqie@norz.org>
parents:
339
diff
changeset
|
262 options->file_ops.enable_delete_key = c_options->file_ops.enable_delete_key; |
3e0059a55671
Move safe_delete* and in place rename options to file_ops
Laurent Monin <geeqie@norz.org>
parents:
339
diff
changeset
|
263 options->file_ops.safe_delete_enable = c_options->file_ops.safe_delete_enable; |
3e0059a55671
Move safe_delete* and in place rename options to file_ops
Laurent Monin <geeqie@norz.org>
parents:
339
diff
changeset
|
264 options->file_ops.safe_delete_folder_maxsize = c_options->file_ops.safe_delete_folder_maxsize; |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1400
diff
changeset
|
265 options->tools_restore_state = c_options->tools_restore_state; |
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1400
diff
changeset
|
266 options->save_window_positions = c_options->save_window_positions; |
2376
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
267 options->use_saved_window_positions_for_new_windows = c_options->use_saved_window_positions_for_new_windows; |
2670
ec21b78a088c
Fix #543: Size of dialog windows in the GTK3 version is too small
Colin Clark <colin.clark@cclark.uk>
parents:
2666
diff
changeset
|
268 options->save_dialog_window_positions = c_options->save_dialog_window_positions; |
2740
808983eb036e
Option to display window ID
Colin Clark <colin.clark@cclark.uk>
parents:
2723
diff
changeset
|
269 options->show_window_ids = c_options->show_window_ids; |
1038
ea23bbd31f75
Allow to change image.scroll_reset_method in Preferences > Image.
Laurent Monin <geeqie@norz.org>
parents:
1024
diff
changeset
|
270 options->image.scroll_reset_method = c_options->image.scroll_reset_method; |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
271 options->image.zoom_2pass = c_options->image.zoom_2pass; |
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
272 options->image.fit_window_to_image = c_options->image.fit_window_to_image; |
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
273 options->image.limit_window_size = c_options->image.limit_window_size; |
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
274 options->image.zoom_to_fit_allow_expand = c_options->image.zoom_to_fit_allow_expand; |
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
275 options->image.max_window_size = c_options->image.max_window_size; |
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
276 options->image.limit_autofit_size = c_options->image.limit_autofit_size; |
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
277 options->image.max_autofit_size = c_options->image.max_autofit_size; |
2474
f591509cb3d3
Fix #123: Limit image expansion in Fit To Window
Colin Clark <colin.clark@cclark.uk>
parents:
2462
diff
changeset
|
278 options->image.max_enlargement_size = c_options->image.max_enlargement_size; |
2084
1c712b43f063
added option for clutter renderer
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2066
diff
changeset
|
279 options->image.use_clutter_renderer = c_options->image.use_clutter_renderer; |
321 | 280 options->progressive_key_scrolling = c_options->progressive_key_scrolling; |
2376
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
281 options->keyboard_scroll_step = c_options->keyboard_scroll_step; |
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
282 |
1506
6e235e3ba076
Force thumbnails refreshing when thumbnails dimensions are modified through Preferences.
Laurent Monin <geeqie@norz.org>
parents:
1443
diff
changeset
|
283 if (options->thumbnails.max_width != c_options->thumbnails.max_width |
6e235e3ba076
Force thumbnails refreshing when thumbnails dimensions are modified through Preferences.
Laurent Monin <geeqie@norz.org>
parents:
1443
diff
changeset
|
284 || options->thumbnails.max_height != c_options->thumbnails.max_height |
6e235e3ba076
Force thumbnails refreshing when thumbnails dimensions are modified through Preferences.
Laurent Monin <geeqie@norz.org>
parents:
1443
diff
changeset
|
285 || options->thumbnails.quality != c_options->thumbnails.quality) |
6e235e3ba076
Force thumbnails refreshing when thumbnails dimensions are modified through Preferences.
Laurent Monin <geeqie@norz.org>
parents:
1443
diff
changeset
|
286 { |
6e235e3ba076
Force thumbnails refreshing when thumbnails dimensions are modified through Preferences.
Laurent Monin <geeqie@norz.org>
parents:
1443
diff
changeset
|
287 thumb_format_changed = TRUE; |
6e235e3ba076
Force thumbnails refreshing when thumbnails dimensions are modified through Preferences.
Laurent Monin <geeqie@norz.org>
parents:
1443
diff
changeset
|
288 refresh = TRUE; |
6e235e3ba076
Force thumbnails refreshing when thumbnails dimensions are modified through Preferences.
Laurent Monin <geeqie@norz.org>
parents:
1443
diff
changeset
|
289 options->thumbnails.max_width = c_options->thumbnails.max_width; |
6e235e3ba076
Force thumbnails refreshing when thumbnails dimensions are modified through Preferences.
Laurent Monin <geeqie@norz.org>
parents:
1443
diff
changeset
|
290 options->thumbnails.max_height = c_options->thumbnails.max_height; |
6e235e3ba076
Force thumbnails refreshing when thumbnails dimensions are modified through Preferences.
Laurent Monin <geeqie@norz.org>
parents:
1443
diff
changeset
|
291 options->thumbnails.quality = c_options->thumbnails.quality; |
6e235e3ba076
Force thumbnails refreshing when thumbnails dimensions are modified through Preferences.
Laurent Monin <geeqie@norz.org>
parents:
1443
diff
changeset
|
292 } |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
293 options->thumbnails.enable_caching = c_options->thumbnails.enable_caching; |
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
294 options->thumbnails.cache_into_dirs = c_options->thumbnails.cache_into_dirs; |
1060
54806f8e4af5
added option to use exif thumbnails
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1055
diff
changeset
|
295 options->thumbnails.use_exif = c_options->thumbnails.use_exif; |
2800
0ecd4885dc09
Bug fix: Collection preview
Colin Clark <colin.clark@cclark.uk>
parents:
2799
diff
changeset
|
296 options->thumbnails.collection_preview = c_options->thumbnails.collection_preview; |
2673
bef1f1a91df9
Fix #541: Showing existing, or maybe generating thumbnails for MP4 and WEBM
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2670
diff
changeset
|
297 options->thumbnails.use_ft_metadata = c_options->thumbnails.use_ft_metadata; |
bef1f1a91df9
Fix #541: Showing existing, or maybe generating thumbnails for MP4 and WEBM
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2670
diff
changeset
|
298 // options->thumbnails.use_ft_metadata_small = c_options->thumbnails.use_ft_metadata_small; |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
299 options->thumbnails.spec_standard = c_options->thumbnails.spec_standard; |
1208
338afd22a394
added options for metadata - not yet used
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1188
diff
changeset
|
300 options->metadata.enable_metadata_dirs = c_options->metadata.enable_metadata_dirs; |
356
ba4edae270d6
Rename show_dot_files to show_hidden_files.
Laurent Monin <geeqie@norz.org>
parents:
354
diff
changeset
|
301 options->file_filter.show_hidden_files = c_options->file_filter.show_hidden_files; |
2265
15d51cf8ff3d
Allow to choose to show parent folder
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2255
diff
changeset
|
302 options->file_filter.show_parent_directory = c_options->file_filter.show_parent_directory; |
373
363117fefc85
Add a new option in Preferences > Filtering to allow the
Laurent Monin <geeqie@norz.org>
parents:
356
diff
changeset
|
303 options->file_filter.show_dot_directory = c_options->file_filter.show_dot_directory; |
2301
dec8d9db5770
Fix #333 Renaming file extensions
Colin Clark <cclark@mcb.net>
parents:
2265
diff
changeset
|
304 options->file_filter.disable_file_extension_checks = c_options->file_filter.disable_file_extension_checks; |
373
363117fefc85
Add a new option in Preferences > Filtering to allow the
Laurent Monin <geeqie@norz.org>
parents:
356
diff
changeset
|
305 |
329
056872a2bdf7
Rename file sorting options.
Laurent Monin <geeqie@norz.org>
parents:
327
diff
changeset
|
306 options->file_sort.case_sensitive = c_options->file_sort.case_sensitive; |
2406 | 307 options->file_sort.natural = c_options->file_sort.natural; |
332
e0907717f749
Rename file filtering options.
Laurent Monin <geeqie@norz.org>
parents:
330
diff
changeset
|
308 options->file_filter.disable = c_options->file_filter.disable; |
9 | 309 |
1229
2f11fec715ca
sidecar files grouping was made case-insensitive
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1216
diff
changeset
|
310 config_entry_to_option(sidecar_ext_entry, &options->sidecar.ext, NULL); |
1327
aadde9f46ce9
quoted_value is no longer needed
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1284
diff
changeset
|
311 sidecar_ext_parse(options->sidecar.ext); |
170
34d0013592f5
basic sidecar files configuration via preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
134
diff
changeset
|
312 |
326 | 313 options->slideshow.random = c_options->slideshow.random; |
314 options->slideshow.repeat = c_options->slideshow.repeat; | |
315 options->slideshow.delay = c_options->slideshow.delay; | |
9 | 316 |
321 | 317 options->mousewheel_scrolls = c_options->mousewheel_scrolls; |
2376
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
318 options->image_lm_click_nav = c_options->image_lm_click_nav; |
2631
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
319 options->image_l_click_video = c_options->image_l_click_video; |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
320 options->image_l_click_video_editor = c_options->image_l_click_video_editor; |
9 | 321 |
341
3e0059a55671
Move safe_delete* and in place rename options to file_ops
Laurent Monin <geeqie@norz.org>
parents:
339
diff
changeset
|
322 options->file_ops.enable_in_place_rename = c_options->file_ops.enable_in_place_rename; |
9 | 323 |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
324 options->image.tile_cache_max = c_options->image.tile_cache_max; |
848
79fc2c215d64
cache size made configurable
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
825
diff
changeset
|
325 options->image.image_cache_max = c_options->image.image_cache_max; |
442 | 326 |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
327 options->image.zoom_quality = c_options->image.zoom_quality; |
9 | 328 |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
329 options->image.zoom_increment = c_options->image.zoom_increment; |
9 | 330 |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
331 options->image.enable_read_ahead = c_options->image.enable_read_ahead; |
9 | 332 |
2059 | 333 |
339
4b5f75e97d81
Rename user_specified_window_background and window_background_color
Laurent Monin <geeqie@norz.org>
parents:
338
diff
changeset
|
334 if (options->image.use_custom_border_color != c_options->image.use_custom_border_color |
1644
2b10e2bee592
the options for custom border color were made independent
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1626
diff
changeset
|
335 || options->image.use_custom_border_color_in_fullscreen != c_options->image.use_custom_border_color_in_fullscreen |
339
4b5f75e97d81
Rename user_specified_window_background and window_background_color
Laurent Monin <geeqie@norz.org>
parents:
338
diff
changeset
|
336 || !gdk_color_equal(&options->image.border_color, &c_options->image.border_color)) |
9 | 337 { |
1644
2b10e2bee592
the options for custom border color were made independent
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1626
diff
changeset
|
338 options->image.use_custom_border_color_in_fullscreen = c_options->image.use_custom_border_color_in_fullscreen; |
339
4b5f75e97d81
Rename user_specified_window_background and window_background_color
Laurent Monin <geeqie@norz.org>
parents:
338
diff
changeset
|
339 options->image.use_custom_border_color = c_options->image.use_custom_border_color; |
4b5f75e97d81
Rename user_specified_window_background and window_background_color
Laurent Monin <geeqie@norz.org>
parents:
338
diff
changeset
|
340 options->image.border_color = c_options->image.border_color; |
9 | 341 layout_colors_update(); |
342 view_window_colors_update(); | |
343 } | |
344 | |
2457
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
345 options->image.alpha_color_1 = c_options->image.alpha_color_1; |
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
346 options->image.alpha_color_2 = c_options->image.alpha_color_2; |
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
347 |
322
a4fd6dd48d9b
Rationalize fullscreen options naming.
Laurent Monin <geeqie@norz.org>
parents:
321
diff
changeset
|
348 options->fullscreen.screen = c_options->fullscreen.screen; |
a4fd6dd48d9b
Rationalize fullscreen options naming.
Laurent Monin <geeqie@norz.org>
parents:
321
diff
changeset
|
349 options->fullscreen.clean_flip = c_options->fullscreen.clean_flip; |
a4fd6dd48d9b
Rationalize fullscreen options naming.
Laurent Monin <geeqie@norz.org>
parents:
321
diff
changeset
|
350 options->fullscreen.disable_saver = c_options->fullscreen.disable_saver; |
a4fd6dd48d9b
Rationalize fullscreen options naming.
Laurent Monin <geeqie@norz.org>
parents:
321
diff
changeset
|
351 options->fullscreen.above = c_options->fullscreen.above; |
1336
7fe7536f02e1
fixed overlay configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1327
diff
changeset
|
352 if (c_options->image_overlay.template_string) |
7fe7536f02e1
fixed overlay configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1327
diff
changeset
|
353 set_image_overlay_template_string(&options->image_overlay.template_string, |
7fe7536f02e1
fixed overlay configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1327
diff
changeset
|
354 c_options->image_overlay.template_string); |
2334
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
355 if (c_options->image_overlay.font) |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
356 set_image_overlay_font_string(&options->image_overlay.font, |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
357 c_options->image_overlay.font); |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
358 options->image_overlay.text_red = c_options->image_overlay.text_red; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
359 options->image_overlay.text_green = c_options->image_overlay.text_green; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
360 options->image_overlay.text_blue = c_options->image_overlay.text_blue; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
361 options->image_overlay.text_alpha = c_options->image_overlay.text_alpha; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
362 options->image_overlay.background_red = c_options->image_overlay.background_red; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
363 options->image_overlay.background_green = c_options->image_overlay.background_green; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
364 options->image_overlay.background_blue = c_options->image_overlay.background_blue; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
365 options->image_overlay.background_alpha = c_options->image_overlay.background_alpha; |
321 | 366 options->update_on_time_change = c_options->update_on_time_change; |
2066
01d2c966209e
exif autorotate for proofs
Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
parents:
2059
diff
changeset
|
367 options->image.exif_proof_rotate_enable = c_options->image.exif_proof_rotate_enable; |
9 | 368 |
342
de6de19bd03a
Rename dupe_custom_threshold option to duplicates_similarity_threshold.
Laurent Monin <geeqie@norz.org>
parents:
341
diff
changeset
|
369 options->duplicates_similarity_threshold = c_options->duplicates_similarity_threshold; |
2328
ad005c02001a
Allow to configure rotation invariance
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2301
diff
changeset
|
370 options->rot_invariant_sim = c_options->rot_invariant_sim; |
9 | 371 |
321 | 372 options->tree_descend_subdirs = c_options->tree_descend_subdirs; |
441
3cc6ee2e3e21
Allow the user to change open_recent_list_maxsize option through
Laurent Monin <geeqie@norz.org>
parents:
426
diff
changeset
|
373 |
2376
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
374 options->view_dir_list_single_click_enter = c_options->view_dir_list_single_click_enter; |
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
375 |
441
3cc6ee2e3e21
Allow the user to change open_recent_list_maxsize option through
Laurent Monin <geeqie@norz.org>
parents:
426
diff
changeset
|
376 options->open_recent_list_maxsize = c_options->open_recent_list_maxsize; |
458
1397463b9c74
Allow the user to set the drag'n drop icon size through
Laurent Monin <geeqie@norz.org>
parents:
446
diff
changeset
|
377 options->dnd_icon_size = c_options->dnd_icon_size; |
2662
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
378 options->clipboard_selection = c_options->clipboard_selection; |
2059 | 379 |
1208
338afd22a394
added options for metadata - not yet used
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1188
diff
changeset
|
380 options->metadata.save_in_image_file = c_options->metadata.save_in_image_file; |
1213
581886171554
show metadata options in preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1208
diff
changeset
|
381 options->metadata.save_legacy_IPTC = c_options->metadata.save_legacy_IPTC; |
581886171554
show metadata options in preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1208
diff
changeset
|
382 options->metadata.warn_on_write_problems = c_options->metadata.warn_on_write_problems; |
581886171554
show metadata options in preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1208
diff
changeset
|
383 options->metadata.save_legacy_format = c_options->metadata.save_legacy_format; |
581886171554
show metadata options in preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1208
diff
changeset
|
384 options->metadata.sync_grouped_files = c_options->metadata.sync_grouped_files; |
581886171554
show metadata options in preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1208
diff
changeset
|
385 options->metadata.confirm_write = c_options->metadata.confirm_write; |
2454
93d1c77a312b
Fix #147: Alternative format for sidecar extension
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2444
diff
changeset
|
386 options->metadata.sidecar_extended_name = c_options->metadata.sidecar_extended_name; |
1213
581886171554
show metadata options in preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1208
diff
changeset
|
387 options->metadata.confirm_timeout = c_options->metadata.confirm_timeout; |
1244
eeefa0f10d39
improved metadata preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1239
diff
changeset
|
388 options->metadata.confirm_after_timeout = c_options->metadata.confirm_after_timeout; |
1213
581886171554
show metadata options in preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1208
diff
changeset
|
389 options->metadata.confirm_on_image_change = c_options->metadata.confirm_on_image_change; |
581886171554
show metadata options in preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1208
diff
changeset
|
390 options->metadata.confirm_on_dir_change = c_options->metadata.confirm_on_dir_change; |
1590
32a63a57690f
use "keywords" instead of "tags" in option name, it is more consistent
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1567
diff
changeset
|
391 options->metadata.keywords_case_sensitive = c_options->metadata.keywords_case_sensitive; |
1567
ef3ca18df43f
added an option to write image orientation to the metadata
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1548
diff
changeset
|
392 options->metadata.write_orientation = c_options->metadata.write_orientation; |
1895
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
393 options->stereo.mode = (c_options->stereo.mode & (PR_STEREO_HORIZ | PR_STEREO_VERT | PR_STEREO_FIXED | PR_STEREO_ANAGLYPH | PR_STEREO_HALF)) | |
1889
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
394 (c_options->stereo.tmp.mirror_right ? PR_STEREO_MIRROR_RIGHT : 0) | |
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
395 (c_options->stereo.tmp.flip_right ? PR_STEREO_FLIP_RIGHT : 0) | |
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
396 (c_options->stereo.tmp.mirror_left ? PR_STEREO_MIRROR_LEFT : 0) | |
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
397 (c_options->stereo.tmp.flip_left ? PR_STEREO_FLIP_LEFT : 0) | |
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
398 (c_options->stereo.tmp.swap ? PR_STEREO_SWAP : 0) | |
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
399 (c_options->stereo.tmp.temp_disable ? PR_STEREO_TEMP_DISABLE : 0); |
1895
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
400 options->stereo.fsmode = (c_options->stereo.fsmode & (PR_STEREO_HORIZ | PR_STEREO_VERT | PR_STEREO_FIXED | PR_STEREO_ANAGLYPH | PR_STEREO_HALF)) | |
1889
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
401 (c_options->stereo.tmp.fs_mirror_right ? PR_STEREO_MIRROR_RIGHT : 0) | |
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
402 (c_options->stereo.tmp.fs_flip_right ? PR_STEREO_FLIP_RIGHT : 0) | |
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
403 (c_options->stereo.tmp.fs_mirror_left ? PR_STEREO_MIRROR_LEFT : 0) | |
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
404 (c_options->stereo.tmp.fs_flip_left ? PR_STEREO_FLIP_LEFT : 0) | |
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
405 (c_options->stereo.tmp.fs_swap ? PR_STEREO_SWAP : 0) | |
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
406 (c_options->stereo.tmp.fs_temp_disable ? PR_STEREO_TEMP_DISABLE : 0); |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
407 options->stereo.enable_fsmode = c_options->stereo.enable_fsmode; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
408 options->stereo.fixed_w = c_options->stereo.fixed_w; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
409 options->stereo.fixed_h = c_options->stereo.fixed_h; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
410 options->stereo.fixed_x1 = c_options->stereo.fixed_x1; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
411 options->stereo.fixed_y1 = c_options->stereo.fixed_y1; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
412 options->stereo.fixed_x2 = c_options->stereo.fixed_x2; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
413 options->stereo.fixed_y2 = c_options->stereo.fixed_y2; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
414 |
2482
9b050f7e7b6c
Fix #445: Info sidebar section heights
Colin Clark <colin.clark@cclark.uk>
parents:
2474
diff
changeset
|
415 options->info_keywords.height = c_options->info_keywords.height; |
9b050f7e7b6c
Fix #445: Info sidebar section heights
Colin Clark <colin.clark@cclark.uk>
parents:
2474
diff
changeset
|
416 options->info_title.height = c_options->info_title.height; |
9b050f7e7b6c
Fix #445: Info sidebar section heights
Colin Clark <colin.clark@cclark.uk>
parents:
2474
diff
changeset
|
417 options->info_comment.height = c_options->info_comment.height; |
2500
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2495
diff
changeset
|
418 options->info_rating.height = c_options->info_rating.height; |
2482
9b050f7e7b6c
Fix #445: Info sidebar section heights
Colin Clark <colin.clark@cclark.uk>
parents:
2474
diff
changeset
|
419 |
2826
d0c6c5ae586b
Option to hide predefined keyword tree
Colin Clark <colin.clark@cclark.uk>
parents:
2825
diff
changeset
|
420 options->show_predefined_keyword_tree = c_options->show_predefined_keyword_tree; |
d0c6c5ae586b
Option to hide predefined keyword tree
Colin Clark <colin.clark@cclark.uk>
parents:
2825
diff
changeset
|
421 |
2750
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2746
diff
changeset
|
422 options->marks_save = c_options->marks_save; |
2769
ed8cc78cb9dd
Option to change default button for copy/move dialogs
Colin Clark <colin.clark@cclark.uk>
parents:
2768
diff
changeset
|
423 options->with_rename = c_options->with_rename; |
2793 | 424 options->collections_on_top = c_options->collections_on_top; |
2756
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
425 config_entry_to_option(help_search_engine_entry, &options->help_search_engine, NULL); |
2750
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2746
diff
changeset
|
426 |
2770
2e819f4a7a41
Read metadata in the idle loop
Colin Clark <colin.clark@cclark.uk>
parents:
2769
diff
changeset
|
427 options->read_metadata_in_idle = c_options->read_metadata_in_idle; |
2777
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
428 |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
429 options->star_rating.star = c_options->star_rating.star; |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
430 options->star_rating.rejected = c_options->star_rating.rejected; |
227
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
431 #ifdef DEBUG |
507
7408e89b601d
Move debug macros from main.h to new debug.h.
Laurent Monin <geeqie@norz.org>
parents:
497
diff
changeset
|
432 set_debug_level(debug_c); |
227
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
433 #endif |
9 | 434 |
113
f2109493004f
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
91
diff
changeset
|
435 #ifdef HAVE_LCMS |
f2109493004f
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
91
diff
changeset
|
436 for (i = 0; i < COLOR_PROFILE_INPUTS; i++) |
f2109493004f
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
91
diff
changeset
|
437 { |
1042
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
438 config_entry_to_option(color_profile_input_name_entry[i], &options->color_profile.input_name[i], NULL); |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
439 config_entry_to_option(color_profile_input_file_entry[i], &options->color_profile.input_file[i], NULL); |
113
f2109493004f
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
91
diff
changeset
|
440 } |
1042
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
441 config_entry_to_option(color_profile_screen_file_entry, &options->color_profile.screen_file, NULL); |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
442 options->color_profile.use_x11_screen_profile = c_options->color_profile.use_x11_screen_profile; |
2386 | 443 if (options->color_profile.render_intent != c_options->color_profile.render_intent) |
444 { | |
445 options->color_profile.render_intent = c_options->color_profile.render_intent; | |
446 color_man_update(); | |
447 } | |
113
f2109493004f
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
91
diff
changeset
|
448 #endif |
f2109493004f
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
91
diff
changeset
|
449 |
2824
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
450 config_tab_keywords_save(); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
451 |
26
f1fe26e637e9
Mon Mar 28 20:23:34 2005 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
15
diff
changeset
|
452 image_options_sync(); |
f1fe26e637e9
Mon Mar 28 20:23:34 2005 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
15
diff
changeset
|
453 |
9 | 454 if (refresh) |
455 { | |
456 filter_rebuild(); | |
457 layout_refresh(NULL); | |
458 } | |
2059 | 459 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
460 if (accel_store) gtk_tree_model_foreach(GTK_TREE_MODEL(accel_store), accel_apply_cb, NULL); |
2623
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
461 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
462 toolbar_apply(); |
9 | 463 } |
464 | |
465 /* | |
466 *----------------------------------------------------------------------------- | |
467 * config window main button callbacks (private) | |
468 *----------------------------------------------------------------------------- | |
442 | 469 */ |
9 | 470 |
471 static void config_window_close_cb(GtkWidget *widget, gpointer data) | |
472 { | |
473 gtk_widget_destroy(configwindow); | |
474 configwindow = NULL; | |
475 filter_store = NULL; | |
476 } | |
477 | |
2412 | 478 static void config_window_help_cb(GtkWidget *widget, gpointer data) |
479 { | |
2431 | 480 GtkWidget *notebook = data; |
2412 | 481 gint i; |
482 | |
483 static gchar *html_section[] = | |
484 { | |
485 "GuideOptionsGeneral.html", | |
486 "GuideOptionsImage.html", | |
487 "GuideOptionsWindow.html", | |
488 "GuideOptionsKeyboard.html", | |
489 "GuideOptionsFiltering.html", | |
490 "GuideOptionsMetadata.html", | |
2825
b29ce668abca
Bug fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2824
diff
changeset
|
491 "GuideOptionsKeywords.html", |
2412 | 492 "GuideOptionsColor.html", |
2628
3685b630d2e4
Fix documentation errors
Colin Clark <colin.clark@cclark.uk>
parents:
2623
diff
changeset
|
493 "GuideOptionsStereo.html", |
3685b630d2e4
Fix documentation errors
Colin Clark <colin.clark@cclark.uk>
parents:
2623
diff
changeset
|
494 "GuideOptionsBehavior.html", |
3685b630d2e4
Fix documentation errors
Colin Clark <colin.clark@cclark.uk>
parents:
2623
diff
changeset
|
495 "GuideOptionsToolbar.html" |
2412 | 496 }; |
497 | |
2441
a2d4729a3b2d
Fix GCC and Clang compile warnings.
Omari Stephens <xsdg@google.com>
parents:
2412
diff
changeset
|
498 i = gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)); |
2412 | 499 help_window_show(html_section[i]); |
500 } | |
501 | |
1443 | 502 static gboolean config_window_delete(GtkWidget *widget, GdkEventAny *event, gpointer data) |
9 | 503 { |
504 config_window_close_cb(NULL, NULL); | |
505 return TRUE; | |
506 } | |
507 | |
508 static void config_window_ok_cb(GtkWidget *widget, gpointer data) | |
509 { | |
510 config_window_apply(); | |
511 config_window_close_cb(NULL, NULL); | |
512 } | |
513 | |
514 static void config_window_apply_cb(GtkWidget *widget, gpointer data) | |
515 { | |
2501
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
516 LayoutWindow *lw; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
517 lw = layout_window_list->data; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
518 |
9 | 519 config_window_apply(); |
2501
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
520 layout_util_sync(lw); |
9 | 521 } |
522 | |
1024
32e69d16dc5c
Add a Save button to Preferences dialog, which allow to save options to file without quitting the application.
Laurent Monin <geeqie@norz.org>
parents:
1001
diff
changeset
|
523 static void config_window_save_cb(GtkWidget *widget, gpointer data) |
32e69d16dc5c
Add a Save button to Preferences dialog, which allow to save options to file without quitting the application.
Laurent Monin <geeqie@norz.org>
parents:
1001
diff
changeset
|
524 { |
32e69d16dc5c
Add a Save button to Preferences dialog, which allow to save options to file without quitting the application.
Laurent Monin <geeqie@norz.org>
parents:
1001
diff
changeset
|
525 config_window_apply(); |
32e69d16dc5c
Add a Save button to Preferences dialog, which allow to save options to file without quitting the application.
Laurent Monin <geeqie@norz.org>
parents:
1001
diff
changeset
|
526 save_options(options); |
32e69d16dc5c
Add a Save button to Preferences dialog, which allow to save options to file without quitting the application.
Laurent Monin <geeqie@norz.org>
parents:
1001
diff
changeset
|
527 } |
32e69d16dc5c
Add a Save button to Preferences dialog, which allow to save options to file without quitting the application.
Laurent Monin <geeqie@norz.org>
parents:
1001
diff
changeset
|
528 |
9 | 529 /* |
530 *----------------------------------------------------------------------------- | |
531 * config window setup (private) | |
532 *----------------------------------------------------------------------------- | |
442 | 533 */ |
9 | 534 |
535 static void quality_menu_cb(GtkWidget *combo, gpointer data) | |
536 { | |
537 gint *option = data; | |
538 | |
539 switch (gtk_combo_box_get_active(GTK_COMBO_BOX(combo))) | |
540 { | |
541 case 0: | |
542 default: | |
543 *option = GDK_INTERP_NEAREST; | |
544 break; | |
545 case 1: | |
546 *option = GDK_INTERP_TILES; | |
547 break; | |
548 case 2: | |
549 *option = GDK_INTERP_BILINEAR; | |
550 break; | |
551 case 3: | |
552 *option = GDK_INTERP_HYPER; | |
553 break; | |
554 } | |
555 } | |
556 | |
2662
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
557 static void clipboard_selection_menu_cb(GtkWidget *combo, gpointer data) |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
558 { |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
559 gint *option = data; |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
560 |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
561 switch (gtk_combo_box_get_active(GTK_COMBO_BOX(combo))) |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
562 { |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
563 case 0: |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
564 default: |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
565 *option = PRIMARY; |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
566 break; |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
567 case 1: |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
568 *option = CLIPBOARD; |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
569 break; |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
570 } |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
571 } |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
572 |
9 | 573 static void add_quality_menu(GtkWidget *table, gint column, gint row, const gchar *text, |
1188
d69b18588e19
Fix up sign-related warning.
Laurent Monin <geeqie@norz.org>
parents:
1174
diff
changeset
|
574 guint option, guint *option_c) |
9 | 575 { |
576 GtkWidget *combo; | |
577 gint current = 0; | |
578 | |
579 *option_c = option; | |
580 | |
581 pref_table_label(table, column, row, text, 0.0); | |
582 | |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
583 combo = gtk_combo_box_text_new(); |
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
584 |
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
585 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Nearest (worst, but fastest)")); |
9 | 586 if (option == GDK_INTERP_NEAREST) current = 0; |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
587 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Tiles")); |
9 | 588 if (option == GDK_INTERP_TILES) current = 1; |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
589 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Bilinear")); |
9 | 590 if (option == GDK_INTERP_BILINEAR) current = 2; |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
591 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Hyper (best, but slowest)")); |
9 | 592 if (option == GDK_INTERP_HYPER) current = 3; |
593 | |
594 gtk_combo_box_set_active(GTK_COMBO_BOX(combo), current); | |
595 | |
596 g_signal_connect(G_OBJECT(combo), "changed", | |
597 G_CALLBACK(quality_menu_cb), option_c); | |
598 | |
599 gtk_table_attach(GTK_TABLE(table), combo, column + 1, column + 2, row, row + 1, | |
113
f2109493004f
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
91
diff
changeset
|
600 GTK_EXPAND | GTK_FILL, 0, 0, 0); |
9 | 601 gtk_widget_show(combo); |
602 } | |
603 | |
2662
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
604 static void add_clipboard_selection_menu(GtkWidget *table, gint column, gint row, const gchar *text, |
2666
4aebea1b0d5c
Addl Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2665
diff
changeset
|
605 gint option, gint *option_c) |
2662
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
606 { |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
607 GtkWidget *combo; |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
608 gint current = 0; |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
609 |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
610 *option_c = option; |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
611 |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
612 pref_table_label(table, column, row, text, 0.0); |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
613 |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
614 combo = gtk_combo_box_text_new(); |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
615 |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
616 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("PRIMARY")); |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
617 if (option == PRIMARY) current = 0; |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
618 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("CLIPBOARD")); |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
619 if (option == CLIPBOARD) current = 1; |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
620 |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
621 gtk_combo_box_set_active(GTK_COMBO_BOX(combo), current); |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
622 |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
623 g_signal_connect(G_OBJECT(combo), "changed", |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
624 G_CALLBACK(clipboard_selection_menu_cb), option_c); |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
625 |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
626 gtk_table_attach(GTK_TABLE(table), combo, column + 1, column + 2, row, row + 1, |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
627 GTK_EXPAND | GTK_FILL, 0, 0, 0); |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
628 gtk_widget_show(combo); |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
629 } |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
630 |
9 | 631 static void thumb_size_menu_cb(GtkWidget *combo, gpointer data) |
632 { | |
633 gint n; | |
634 | |
635 n = gtk_combo_box_get_active(GTK_COMBO_BOX(combo)); | |
736
31d858f3272d
Fix signed vs unsigned warnings.
Laurent Monin <geeqie@norz.org>
parents:
733
diff
changeset
|
636 if (n < 0) return; |
9 | 637 |
736
31d858f3272d
Fix signed vs unsigned warnings.
Laurent Monin <geeqie@norz.org>
parents:
733
diff
changeset
|
638 if ((guint) n < sizeof(thumb_size_list) / sizeof(ThumbSize)) |
9 | 639 { |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
640 c_options->thumbnails.max_width = thumb_size_list[n].w; |
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
641 c_options->thumbnails.max_height = thumb_size_list[n].h; |
9 | 642 } |
736
31d858f3272d
Fix signed vs unsigned warnings.
Laurent Monin <geeqie@norz.org>
parents:
733
diff
changeset
|
643 else |
9 | 644 { |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
645 c_options->thumbnails.max_width = options->thumbnails.max_width; |
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
646 c_options->thumbnails.max_height = options->thumbnails.max_height; |
9 | 647 } |
648 } | |
649 | |
650 static void add_thumb_size_menu(GtkWidget *table, gint column, gint row, gchar *text) | |
651 { | |
652 GtkWidget *combo; | |
653 gint current; | |
654 gint i; | |
655 | |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
656 c_options->thumbnails.max_width = options->thumbnails.max_width; |
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
657 c_options->thumbnails.max_height = options->thumbnails.max_height; |
9 | 658 |
659 pref_table_label(table, column, row, text, 0.0); | |
660 | |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
661 combo = gtk_combo_box_text_new(); |
9 | 662 |
663 current = -1; | |
736
31d858f3272d
Fix signed vs unsigned warnings.
Laurent Monin <geeqie@norz.org>
parents:
733
diff
changeset
|
664 for (i = 0; (guint) i < sizeof(thumb_size_list) / sizeof(ThumbSize); i++) |
9 | 665 { |
666 gint w, h; | |
226
6b9e4c9e5596
Fix and simplify thumbnails size combo box related code.
Laurent Monin <geeqie@norz.org>
parents:
225
diff
changeset
|
667 gchar *buf; |
9 | 668 |
669 w = thumb_size_list[i].w; | |
670 h = thumb_size_list[i].h; | |
671 | |
226
6b9e4c9e5596
Fix and simplify thumbnails size combo box related code.
Laurent Monin <geeqie@norz.org>
parents:
225
diff
changeset
|
672 buf = g_strdup_printf("%d x %d", w, h); |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
673 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), buf); |
226
6b9e4c9e5596
Fix and simplify thumbnails size combo box related code.
Laurent Monin <geeqie@norz.org>
parents:
225
diff
changeset
|
674 g_free(buf); |
442 | 675 |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
676 if (w == options->thumbnails.max_width && h == options->thumbnails.max_height) current = i; |
9 | 677 } |
678 | |
679 if (current == -1) | |
680 { | |
681 gchar *buf; | |
682 | |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
683 buf = g_strdup_printf("%s %d x %d", _("Custom"), options->thumbnails.max_width, options->thumbnails.max_height); |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
684 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), buf); |
9 | 685 g_free(buf); |
686 | |
226
6b9e4c9e5596
Fix and simplify thumbnails size combo box related code.
Laurent Monin <geeqie@norz.org>
parents:
225
diff
changeset
|
687 current = i; |
9 | 688 } |
689 | |
690 gtk_combo_box_set_active(GTK_COMBO_BOX(combo), current); | |
691 g_signal_connect(G_OBJECT(combo), "changed", | |
692 G_CALLBACK(thumb_size_menu_cb), NULL); | |
693 | |
694 gtk_table_attach(GTK_TABLE(table), combo, column + 1, column + 2, row, row + 1, | |
113
f2109493004f
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
91
diff
changeset
|
695 GTK_EXPAND | GTK_FILL, 0, 0, 0); |
9 | 696 gtk_widget_show(combo); |
697 } | |
698 | |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
699 static void stereo_mode_menu_cb(GtkWidget *combo, gpointer data) |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
700 { |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
701 gint *option = data; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
702 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
703 switch (gtk_combo_box_get_active(GTK_COMBO_BOX(combo))) |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
704 { |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
705 case 0: |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
706 default: |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
707 *option = PR_STEREO_NONE; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
708 break; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
709 case 1: |
1896
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
710 *option = PR_STEREO_ANAGLYPH_RC; |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
711 break; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
712 case 2: |
2255
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
713 *option = PR_STEREO_ANAGLYPH_GM; |
1896
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
714 break; |
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
715 case 3: |
2255
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
716 *option = PR_STEREO_ANAGLYPH_YB; |
1896
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
717 break; |
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
718 case 4: |
2255
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
719 *option = PR_STEREO_ANAGLYPH_GRAY_RC; |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
720 break; |
1896
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
721 case 5: |
2255
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
722 *option = PR_STEREO_ANAGLYPH_GRAY_GM; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
723 break; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
724 case 6: |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
725 *option = PR_STEREO_ANAGLYPH_GRAY_YB; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
726 break; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
727 case 7: |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
728 *option = PR_STEREO_ANAGLYPH_DB_RC; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
729 break; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
730 case 8: |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
731 *option = PR_STEREO_ANAGLYPH_DB_GM; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
732 break; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
733 case 9: |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
734 *option = PR_STEREO_ANAGLYPH_DB_YB; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
735 break; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
736 case 10: |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
737 *option = PR_STEREO_HORIZ; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
738 break; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
739 case 11: |
1895
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
740 *option = PR_STEREO_HORIZ | PR_STEREO_HALF; |
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
741 break; |
2255
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
742 case 12: |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
743 *option = PR_STEREO_VERT; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
744 break; |
2255
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
745 case 13: |
1895
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
746 *option = PR_STEREO_VERT | PR_STEREO_HALF; |
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
747 break; |
2255
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
748 case 14: |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
749 *option = PR_STEREO_FIXED; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
750 break; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
751 } |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
752 } |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
753 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
754 static void add_stereo_mode_menu(GtkWidget *table, gint column, gint row, const gchar *text, |
2181
8addfcef82af
Clear few more warnings, unused variables mostly.
Laurent Monin <zas@norz.org>
parents:
2169
diff
changeset
|
755 gint option, gint *option_c, gboolean add_fixed) |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
756 { |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
757 GtkWidget *combo; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
758 gint current = 0; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
759 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
760 *option_c = option; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
761 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
762 pref_table_label(table, column, row, text, 0.0); |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
763 |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
764 combo = gtk_combo_box_text_new(); |
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
765 |
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
766 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Single image")); |
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
767 |
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
768 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Anaglyph Red-Cyan")); |
1896
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
769 if (option & PR_STEREO_ANAGLYPH_RC) current = 1; |
2255
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
770 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Anaglyph Green-Magenta")); |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
771 if (option & PR_STEREO_ANAGLYPH_GM) current = 2; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
772 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Anaglyph Yellow-Blue")); |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
773 if (option & PR_STEREO_ANAGLYPH_YB) current = 3; |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
774 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Anaglyph Gray Red-Cyan")); |
2255
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
775 if (option & PR_STEREO_ANAGLYPH_GRAY_RC) current = 4; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
776 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Anaglyph Gray Green-Magenta")); |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
777 if (option & PR_STEREO_ANAGLYPH_GRAY_GM) current = 5; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
778 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Anaglyph Gray Yellow-Blue")); |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
779 if (option & PR_STEREO_ANAGLYPH_GRAY_YB) current = 6; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
780 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Anaglyph Dubois Red-Cyan")); |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
781 if (option & PR_STEREO_ANAGLYPH_DB_RC) current = 7; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
782 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Anaglyph Dubois Green-Magenta")); |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
783 if (option & PR_STEREO_ANAGLYPH_DB_GM) current = 8; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
784 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Anaglyph Dubois Yellow-Blue")); |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
785 if (option & PR_STEREO_ANAGLYPH_DB_YB) current = 9; |
1889
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
786 |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
787 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Side by Side")); |
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
788 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Side by Side Half size")); |
2184 | 789 if (option & PR_STEREO_HORIZ) |
1895
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
790 { |
2255
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
791 current = 10; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
792 if (option & PR_STEREO_HALF) current = 11; |
1895
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
793 } |
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
794 |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
795 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Top - Bottom")); |
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
796 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Top - Bottom Half size")); |
2184 | 797 if (option & PR_STEREO_VERT) |
1895
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
798 { |
2255
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
799 current = 12; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
800 if (option & PR_STEREO_HALF) current = 13; |
1895
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
801 } |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
802 |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
803 if (add_fixed) |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
804 { |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
805 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Fixed position")); |
2255
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
806 if (option & PR_STEREO_FIXED) current = 14; |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
807 } |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
808 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
809 gtk_combo_box_set_active(GTK_COMBO_BOX(combo), current); |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
810 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
811 g_signal_connect(G_OBJECT(combo), "changed", |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
812 G_CALLBACK(stereo_mode_menu_cb), option_c); |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
813 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
814 gtk_table_attach(GTK_TABLE(table), combo, column + 1, column + 2, row, row + 1, |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
815 GTK_EXPAND | GTK_FILL, 0, 0, 0); |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
816 gtk_widget_show(combo); |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
817 } |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
818 |
2631
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
819 static void video_menu_cb(GtkWidget *combo, gpointer data) |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
820 { |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
821 gchar **option = data; |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
822 |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
823 EditorDescription *ed = g_list_nth_data(editor_list_get(), gtk_combo_box_get_active(GTK_COMBO_BOX(combo))); |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
824 *option = ed->key; |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
825 } |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
826 |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
827 static void video_menu_populate(gpointer data, gpointer user_data) |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
828 { |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
829 GtkWidget *combo = user_data; |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
830 EditorDescription *ed = data; |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
831 |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
832 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), ed->name); |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
833 } |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
834 |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
835 static void add_video_menu(GtkWidget *table, gint column, gint row, const gchar *text, |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
836 gchar *option, gchar **option_c) |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
837 { |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
838 GtkWidget *combo; |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
839 gint current; |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
840 /* use lists since they are sorted */ |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
841 GList *eds = editor_list_get(); |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
842 |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
843 *option_c = option; |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
844 |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
845 pref_table_label(table, column, row, text, 0.0); |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
846 |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
847 combo = gtk_combo_box_text_new(); |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
848 g_list_foreach(eds,video_menu_populate,(gpointer)combo); |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
849 current = option ? g_list_index(eds,g_hash_table_lookup(editors,option)): -1; |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
850 |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
851 gtk_combo_box_set_active(GTK_COMBO_BOX(combo), current); |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
852 |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
853 g_signal_connect(G_OBJECT(combo), "changed", |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
854 G_CALLBACK(video_menu_cb), option_c); |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
855 |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
856 gtk_table_attach(GTK_TABLE(table), combo, column + 1, column + 2, row, row + 1, |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
857 GTK_EXPAND | GTK_FILL, 0, 0, 0); |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
858 gtk_widget_show(combo); |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
859 } |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
860 |
9 | 861 static void filter_store_populate(void) |
862 { | |
863 GList *work; | |
864 | |
865 if (!filter_store) return; | |
866 | |
867 gtk_list_store_clear(filter_store); | |
868 | |
869 work = filter_get_list(); | |
870 while (work) | |
871 { | |
872 FilterEntry *fe; | |
873 GtkTreeIter iter; | |
874 | |
875 fe = work->data; | |
876 work = work->next; | |
877 | |
878 gtk_list_store_append(filter_store, &iter); | |
879 gtk_list_store_set(filter_store, &iter, 0, fe, -1); | |
880 } | |
881 } | |
882 | |
883 static void filter_store_ext_edit_cb(GtkCellRendererText *cell, gchar *path_str, | |
884 gchar *new_text, gpointer data) | |
885 { | |
886 GtkWidget *model = data; | |
887 FilterEntry *fe = data; | |
888 GtkTreePath *tpath; | |
889 GtkTreeIter iter; | |
890 | |
891 if (!new_text || strlen(new_text) < 1) return; | |
892 | |
893 tpath = gtk_tree_path_new_from_string(path_str); | |
894 gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, tpath); | |
895 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 0, &fe, -1); | |
896 | |
897 g_free(fe->extensions); | |
898 fe->extensions = g_strdup(new_text); | |
899 | |
900 gtk_tree_path_free(tpath); | |
901 filter_rebuild(); | |
902 } | |
903 | |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
904 static void filter_store_class_edit_cb(GtkCellRendererText *cell, gchar *path_str, |
1443 | 905 gchar *new_text, gpointer data) |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
906 { |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
907 GtkWidget *model = data; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
908 FilterEntry *fe = data; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
909 GtkTreePath *tpath; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
910 GtkTreeIter iter; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
911 gint i; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
912 |
1443 | 913 if (!new_text || !new_text[0]) return; |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
914 |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
915 tpath = gtk_tree_path_new_from_string(path_str); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
916 gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, tpath); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
917 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 0, &fe, -1); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
918 |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
919 for (i = 0; i < FILE_FORMAT_CLASSES; i++) |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
920 { |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
921 if (strcmp(new_text, _(format_class_list[i])) == 0) |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
922 { |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
923 fe->file_class = i; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
924 break; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
925 } |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
926 } |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
927 |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
928 gtk_tree_path_free(tpath); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
929 filter_rebuild(); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
930 } |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
931 |
9 | 932 static void filter_store_desc_edit_cb(GtkCellRendererText *cell, gchar *path_str, |
933 gchar *new_text, gpointer data) | |
934 { | |
935 GtkWidget *model = data; | |
936 FilterEntry *fe; | |
937 GtkTreePath *tpath; | |
938 GtkTreeIter iter; | |
939 | |
1443 | 940 if (!new_text || !new_text[0]) return; |
9 | 941 |
942 tpath = gtk_tree_path_new_from_string(path_str); | |
943 gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, tpath); | |
944 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 0, &fe, -1); | |
945 | |
946 g_free(fe->description); | |
947 fe->description = g_strdup(new_text); | |
948 | |
949 gtk_tree_path_free(tpath); | |
950 } | |
951 | |
952 static void filter_store_enable_cb(GtkCellRendererToggle *renderer, | |
953 gchar *path_str, gpointer data) | |
954 { | |
955 GtkWidget *model = data; | |
956 FilterEntry *fe; | |
957 GtkTreePath *tpath; | |
958 GtkTreeIter iter; | |
959 | |
960 tpath = gtk_tree_path_new_from_string(path_str); | |
961 gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, tpath); | |
962 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 0, &fe, -1); | |
963 | |
964 fe->enabled = !fe->enabled; | |
965 | |
966 gtk_tree_path_free(tpath); | |
967 filter_rebuild(); | |
968 } | |
969 | |
1239
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
970 static void filter_store_writable_cb(GtkCellRendererToggle *renderer, |
1443 | 971 gchar *path_str, gpointer data) |
1239
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
972 { |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
973 GtkWidget *model = data; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
974 FilterEntry *fe; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
975 GtkTreePath *tpath; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
976 GtkTreeIter iter; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
977 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
978 tpath = gtk_tree_path_new_from_string(path_str); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
979 gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, tpath); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
980 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 0, &fe, -1); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
981 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
982 fe->writable = !fe->writable; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
983 if (fe->writable) fe->allow_sidecar = FALSE; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
984 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
985 gtk_tree_path_free(tpath); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
986 filter_rebuild(); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
987 } |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
988 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
989 static void filter_store_sidecar_cb(GtkCellRendererToggle *renderer, |
1443 | 990 gchar *path_str, gpointer data) |
1239
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
991 { |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
992 GtkWidget *model = data; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
993 FilterEntry *fe; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
994 GtkTreePath *tpath; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
995 GtkTreeIter iter; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
996 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
997 tpath = gtk_tree_path_new_from_string(path_str); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
998 gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, tpath); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
999 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 0, &fe, -1); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
1000 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
1001 fe->allow_sidecar = !fe->allow_sidecar; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
1002 if (fe->allow_sidecar) fe->writable = FALSE; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
1003 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
1004 gtk_tree_path_free(tpath); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
1005 filter_rebuild(); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
1006 } |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
1007 |
9 | 1008 static void filter_set_func(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, |
1009 GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data) | |
1010 { | |
1011 FilterEntry *fe; | |
1012 | |
1013 gtk_tree_model_get(tree_model, iter, 0, &fe, -1); | |
1014 | |
1347
84d289bde1ea
Add missing space between switch and first parenthesis.
Laurent Monin <geeqie@norz.org>
parents:
1346
diff
changeset
|
1015 switch (GPOINTER_TO_INT(data)) |
9 | 1016 { |
1017 case FE_ENABLE: | |
1018 g_object_set(GTK_CELL_RENDERER(cell), | |
1019 "active", fe->enabled, NULL); | |
1020 break; | |
1021 case FE_EXTENSION: | |
1022 g_object_set(GTK_CELL_RENDERER(cell), | |
1023 "text", fe->extensions, NULL); | |
1024 break; | |
1025 case FE_DESCRIPTION: | |
1026 g_object_set(GTK_CELL_RENDERER(cell), | |
1027 "text", fe->description, NULL); | |
1028 break; | |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1029 case FE_CLASS: |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1030 g_object_set(GTK_CELL_RENDERER(cell), |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1031 "text", _(format_class_list[fe->file_class]), NULL); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1032 break; |
1239
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
1033 case FE_WRITABLE: |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
1034 g_object_set(GTK_CELL_RENDERER(cell), |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
1035 "active", fe->writable, NULL); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
1036 break; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
1037 case FE_ALLOW_SIDECAR: |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
1038 g_object_set(GTK_CELL_RENDERER(cell), |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
1039 "active", fe->allow_sidecar, NULL); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
1040 break; |
9 | 1041 } |
1042 } | |
1043 | |
2058
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1044 static gboolean filter_add_scroll(gpointer data) |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1045 { |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1046 GtkTreePath *path; |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1047 GList *list_cells; |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1048 GtkCellRenderer *cell; |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1049 GtkTreeViewColumn *column; |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1050 GList *list_columns; |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1051 const gchar *title; |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1052 guint i = 0; |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1053 gint rows; |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1054 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1055 rows = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(filter_store), NULL); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1056 path = gtk_tree_path_new_from_indices(rows-1, -1); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1057 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1058 list_columns = gtk_tree_view_get_columns(GTK_TREE_VIEW(data)); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1059 do { |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1060 column = g_list_nth(list_columns,i)->data; |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1061 title = gtk_tree_view_column_get_title(GTK_TREE_VIEW_COLUMN(column)); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1062 i++; |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1063 } while (strcmp(title, "Filter") !=0 ); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1064 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1065 list_cells = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(column)); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1066 cell = g_list_last(list_cells)->data; |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1067 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1068 gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(data), |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1069 path, column, FALSE, 0.0, 0.0 ); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1070 gtk_tree_view_set_cursor_on_cell(GTK_TREE_VIEW(data), |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1071 path, column, cell, TRUE); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1072 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1073 gtk_tree_path_free(path); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1074 g_list_free(list_cells); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1075 g_list_free(list_columns); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1076 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1077 return(FALSE); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1078 } |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1079 |
9 | 1080 static void filter_add_cb(GtkWidget *widget, gpointer data) |
1081 { | |
1239
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
1082 filter_add_unique("description", ".new", FORMAT_CLASS_IMAGE, TRUE, FALSE, TRUE); |
9 | 1083 filter_store_populate(); |
1084 | |
2058
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1085 g_idle_add((GSourceFunc)filter_add_scroll, data); |
9 | 1086 } |
1087 | |
1088 static void filter_remove_cb(GtkWidget *widget, gpointer data) | |
1089 { | |
1090 GtkWidget *filter_view = data; | |
1091 GtkTreeSelection *selection; | |
1092 GtkTreeIter iter; | |
1093 FilterEntry *fe; | |
1094 | |
1095 if (!filter_store) return; | |
995 | 1096 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(filter_view)); |
9 | 1097 if (!gtk_tree_selection_get_selected(selection, NULL, &iter)) return; |
1098 gtk_tree_model_get(GTK_TREE_MODEL(filter_store), &iter, 0, &fe, -1); | |
1099 if (!fe) return; | |
1100 | |
1101 filter_remove_entry(fe); | |
1102 filter_rebuild(); | |
1103 filter_store_populate(); | |
1104 } | |
1105 | |
2058
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1106 static gboolean filter_default_ok_scroll(GtkTreeView *data) |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1107 { |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1108 GtkTreeIter iter; |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1109 GtkTreePath *path; |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1110 GtkTreeViewColumn *column; |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1111 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1112 gtk_tree_model_get_iter_first(GTK_TREE_MODEL(filter_store), &iter); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1113 path = gtk_tree_model_get_path(GTK_TREE_MODEL(filter_store), &iter); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1114 column = gtk_tree_view_get_column(GTK_TREE_VIEW(data),0); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1115 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1116 gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(data), |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1117 path, column, |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1118 FALSE, 0.0, 0.0); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1119 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1120 gtk_tree_path_free(path); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1121 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1122 return(FALSE); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1123 } |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1124 |
9 | 1125 static void filter_default_ok_cb(GenericDialog *gd, gpointer data) |
1126 { | |
1127 filter_reset(); | |
1128 filter_add_defaults(); | |
1129 filter_rebuild(); | |
1130 filter_store_populate(); | |
2058
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1131 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1132 g_idle_add((GSourceFunc)filter_default_ok_scroll, gd->data); |
9 | 1133 } |
1134 | |
1135 static void dummy_cancel_cb(GenericDialog *gd, gpointer data) | |
1136 { | |
1137 /* no op, only so cancel button appears */ | |
1138 } | |
1139 | |
1140 static void filter_default_cb(GtkWidget *widget, gpointer data) | |
1141 { | |
1142 GenericDialog *gd; | |
1143 | |
1144 gd = generic_dialog_new(_("Reset filters"), | |
1174
f809d57aed0c
Drop useless wmclass stuff. Gtk will take care of it and as said in the documentation using gtk_window_set_wmclass() is sort of pointless.
Laurent Monin <geeqie@norz.org>
parents:
1060
diff
changeset
|
1145 "reset_filter", widget, TRUE, |
2058
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1146 dummy_cancel_cb, data); |
9 | 1147 generic_dialog_add_message(gd, GTK_STOCK_DIALOG_QUESTION, _("Reset filters"), |
2587
c6f9494f6be1
Fix #508: Copy and Move windows scale incorrectly
cclark <colin.clark@cclark.uk>
parents:
2573
diff
changeset
|
1148 _("This will reset the file filters to the defaults.\nContinue?"), TRUE); |
9 | 1149 generic_dialog_add_button(gd, GTK_STOCK_OK, NULL, filter_default_ok_cb, TRUE); |
1150 gtk_widget_show(gd->dialog); | |
1151 } | |
1152 | |
1001
a1f0b2010ca1
Consistency: type * instead of type*.
Laurent Monin <geeqie@norz.org>
parents:
1000
diff
changeset
|
1153 static void filter_disable_cb(GtkWidget *widget, gpointer data) |
9 | 1154 { |
1155 GtkWidget *frame = data; | |
1156 | |
1157 gtk_widget_set_sensitive(frame, | |
1158 !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))); | |
1159 } | |
1160 | |
1001
a1f0b2010ca1
Consistency: type * instead of type*.
Laurent Monin <geeqie@norz.org>
parents:
1000
diff
changeset
|
1161 static void safe_delete_view_cb(GtkWidget *widget, gpointer data) |
9 | 1162 { |
1163 layout_set_path(NULL, gtk_entry_get_text(GTK_ENTRY(safe_delete_path_entry))); | |
1164 } | |
1165 | |
1166 static void safe_delete_clear_ok_cb(GenericDialog *gd, gpointer data) | |
1167 { | |
1168 file_util_trash_clear(); | |
1169 } | |
1170 | |
1001
a1f0b2010ca1
Consistency: type * instead of type*.
Laurent Monin <geeqie@norz.org>
parents:
1000
diff
changeset
|
1171 static void safe_delete_clear_cb(GtkWidget *widget, gpointer data) |
9 | 1172 { |
1173 GenericDialog *gd; | |
1174 GtkWidget *entry; | |
1175 gd = generic_dialog_new(_("Clear trash"), | |
1174
f809d57aed0c
Drop useless wmclass stuff. Gtk will take care of it and as said in the documentation using gtk_window_set_wmclass() is sort of pointless.
Laurent Monin <geeqie@norz.org>
parents:
1060
diff
changeset
|
1176 "clear_trash", widget, TRUE, |
9 | 1177 dummy_cancel_cb, NULL); |
1178 generic_dialog_add_message(gd, GTK_STOCK_DIALOG_QUESTION, _("Clear trash"), | |
2587
c6f9494f6be1
Fix #508: Copy and Move windows scale incorrectly
cclark <colin.clark@cclark.uk>
parents:
2573
diff
changeset
|
1179 _("This will remove the trash contents."), FALSE); |
9 | 1180 generic_dialog_add_button(gd, GTK_STOCK_OK, NULL, safe_delete_clear_ok_cb, TRUE); |
1181 entry = gtk_entry_new(); | |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
1182 gtk_widget_set_can_focus(entry, FALSE); |
9 | 1183 gtk_editable_set_editable(GTK_EDITABLE(entry), FALSE); |
341
3e0059a55671
Move safe_delete* and in place rename options to file_ops
Laurent Monin <geeqie@norz.org>
parents:
339
diff
changeset
|
1184 if (options->file_ops.safe_delete_path) gtk_entry_set_text(GTK_ENTRY(entry), options->file_ops.safe_delete_path); |
9 | 1185 gtk_box_pack_start(GTK_BOX(gd->vbox), entry, FALSE, FALSE, 0); |
1186 gtk_widget_show(entry); | |
1187 gtk_widget_show(gd->dialog); | |
1188 } | |
1189 | |
1001
a1f0b2010ca1
Consistency: type * instead of type*.
Laurent Monin <geeqie@norz.org>
parents:
1000
diff
changeset
|
1190 static void image_overlay_template_view_changed_cb(GtkWidget *widget, gpointer data) |
218
9ec9947e7682
Customizable info overlay in fullscreen, based on the patch posted to gqview-devel list by Timo on 2007-09-10.
Laurent Monin <geeqie@norz.org>
parents:
212
diff
changeset
|
1191 { |
9ec9947e7682
Customizable info overlay in fullscreen, based on the patch posted to gqview-devel list by Timo on 2007-09-10.
Laurent Monin <geeqie@norz.org>
parents:
212
diff
changeset
|
1192 GtkWidget *pTextView; |
1001
a1f0b2010ca1
Consistency: type * instead of type*.
Laurent Monin <geeqie@norz.org>
parents:
1000
diff
changeset
|
1193 GtkTextBuffer *pTextBuffer; |
218
9ec9947e7682
Customizable info overlay in fullscreen, based on the patch posted to gqview-devel list by Timo on 2007-09-10.
Laurent Monin <geeqie@norz.org>
parents:
212
diff
changeset
|
1194 GtkTextIter iStart; |
9ec9947e7682
Customizable info overlay in fullscreen, based on the patch posted to gqview-devel list by Timo on 2007-09-10.
Laurent Monin <geeqie@norz.org>
parents:
212
diff
changeset
|
1195 GtkTextIter iEnd; |
9ec9947e7682
Customizable info overlay in fullscreen, based on the patch posted to gqview-devel list by Timo on 2007-09-10.
Laurent Monin <geeqie@norz.org>
parents:
212
diff
changeset
|
1196 |
9ec9947e7682
Customizable info overlay in fullscreen, based on the patch posted to gqview-devel list by Timo on 2007-09-10.
Laurent Monin <geeqie@norz.org>
parents:
212
diff
changeset
|
1197 pTextView = GTK_WIDGET(data); |
9ec9947e7682
Customizable info overlay in fullscreen, based on the patch posted to gqview-devel list by Timo on 2007-09-10.
Laurent Monin <geeqie@norz.org>
parents:
212
diff
changeset
|
1198 |
9ec9947e7682
Customizable info overlay in fullscreen, based on the patch posted to gqview-devel list by Timo on 2007-09-10.
Laurent Monin <geeqie@norz.org>
parents:
212
diff
changeset
|
1199 pTextBuffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(pTextView)); |
9ec9947e7682
Customizable info overlay in fullscreen, based on the patch posted to gqview-devel list by Timo on 2007-09-10.
Laurent Monin <geeqie@norz.org>
parents:
212
diff
changeset
|
1200 gtk_text_buffer_get_start_iter(pTextBuffer, &iStart); |
9ec9947e7682
Customizable info overlay in fullscreen, based on the patch posted to gqview-devel list by Timo on 2007-09-10.
Laurent Monin <geeqie@norz.org>
parents:
212
diff
changeset
|
1201 gtk_text_buffer_get_end_iter(pTextBuffer, &iEnd); |
9ec9947e7682
Customizable info overlay in fullscreen, based on the patch posted to gqview-devel list by Timo on 2007-09-10.
Laurent Monin <geeqie@norz.org>
parents:
212
diff
changeset
|
1202 |
1336
7fe7536f02e1
fixed overlay configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1327
diff
changeset
|
1203 set_image_overlay_template_string(&c_options->image_overlay.template_string, |
733
3cf9cdf1ff65
Modify set_default_image_overlay_template_string() to accept the pointer to
Laurent Monin <geeqie@norz.org>
parents:
730
diff
changeset
|
1204 gtk_text_buffer_get_text(pTextBuffer, &iStart, &iEnd, TRUE)); |
218
9ec9947e7682
Customizable info overlay in fullscreen, based on the patch posted to gqview-devel list by Timo on 2007-09-10.
Laurent Monin <geeqie@norz.org>
parents:
212
diff
changeset
|
1205 } |
9ec9947e7682
Customizable info overlay in fullscreen, based on the patch posted to gqview-devel list by Timo on 2007-09-10.
Laurent Monin <geeqie@norz.org>
parents:
212
diff
changeset
|
1206 |
469
681796421193
Rename few functions and replace fullscreen info with image overlay template string.
Laurent Monin <geeqie@norz.org>
parents:
468
diff
changeset
|
1207 static void image_overlay_default_template_ok_cb(GenericDialog *gd, gpointer data) |
354
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1208 { |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1209 GtkTextView *text_view = data; |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1210 GtkTextBuffer *buffer; |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1211 |
1336
7fe7536f02e1
fixed overlay configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1327
diff
changeset
|
1212 set_default_image_overlay_template_string(&options->image_overlay.template_string); |
354
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1213 if (!configwindow) return; |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1214 |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1215 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_view)); |
1336
7fe7536f02e1
fixed overlay configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1327
diff
changeset
|
1216 gtk_text_buffer_set_text(buffer, options->image_overlay.template_string, -1); |
354
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1217 } |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1218 |
469
681796421193
Rename few functions and replace fullscreen info with image overlay template string.
Laurent Monin <geeqie@norz.org>
parents:
468
diff
changeset
|
1219 static void image_overlay_default_template_cb(GtkWidget *widget, gpointer data) |
354
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1220 { |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1221 GenericDialog *gd; |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1222 |
469
681796421193
Rename few functions and replace fullscreen info with image overlay template string.
Laurent Monin <geeqie@norz.org>
parents:
468
diff
changeset
|
1223 gd = generic_dialog_new(_("Reset image overlay template string"), |
1174
f809d57aed0c
Drop useless wmclass stuff. Gtk will take care of it and as said in the documentation using gtk_window_set_wmclass() is sort of pointless.
Laurent Monin <geeqie@norz.org>
parents:
1060
diff
changeset
|
1224 "reset_image_overlay_template_string", widget, TRUE, |
354
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1225 dummy_cancel_cb, data); |
469
681796421193
Rename few functions and replace fullscreen info with image overlay template string.
Laurent Monin <geeqie@norz.org>
parents:
468
diff
changeset
|
1226 generic_dialog_add_message(gd, GTK_STOCK_DIALOG_QUESTION, _("Reset image overlay template string"), |
2587
c6f9494f6be1
Fix #508: Copy and Move windows scale incorrectly
cclark <colin.clark@cclark.uk>
parents:
2573
diff
changeset
|
1227 _("This will reset the image overlay template string to the default.\nContinue?"), TRUE); |
469
681796421193
Rename few functions and replace fullscreen info with image overlay template string.
Laurent Monin <geeqie@norz.org>
parents:
468
diff
changeset
|
1228 generic_dialog_add_button(gd, GTK_STOCK_OK, NULL, image_overlay_default_template_ok_cb, TRUE); |
354
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1229 gtk_widget_show(gd->dialog); |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1230 } |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1231 |
625
96e360e5949d
Add an help button to OSD info configuration in Preferences dialog.
Laurent Monin <geeqie@norz.org>
parents:
597
diff
changeset
|
1232 static void image_overlay_help_cb(GtkWidget *widget, gpointer data) |
96e360e5949d
Add an help button to OSD info configuration in Preferences dialog.
Laurent Monin <geeqie@norz.org>
parents:
597
diff
changeset
|
1233 { |
2412 | 1234 help_window_show("GuideOptionsWindow.html#OverlayScreenDisplay"); |
625
96e360e5949d
Add an help button to OSD info configuration in Preferences dialog.
Laurent Monin <geeqie@norz.org>
parents:
597
diff
changeset
|
1235 } |
354
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1236 |
2334
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1237 static void image_overlay_set_font_cb(GtkWidget *widget, gpointer data) |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1238 { |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1239 #if GTK_CHECK_VERSION(3,4,0) |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1240 GtkWidget *dialog; |
2334
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1241 char *font; |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1242 PangoFontDescription *font_desc; |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1243 |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1244 dialog = gtk_font_chooser_dialog_new("Image Overlay Font", GTK_WINDOW(gtk_widget_get_toplevel(widget))); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1245 gtk_font_chooser_set_font(GTK_FONT_CHOOSER(dialog), options->image_overlay.font); |
2334
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1246 |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1247 if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_CANCEL) |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1248 { |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1249 font_desc = gtk_font_chooser_get_font_desc(GTK_FONT_CHOOSER(dialog)); |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1250 font = pango_font_description_to_string(font_desc); |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1251 g_free(c_options->image_overlay.font); |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1252 c_options->image_overlay.font = g_strdup(font); |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1253 g_free(font); |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1254 } |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1255 |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1256 gtk_widget_destroy(dialog); |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1257 #else |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1258 const char *font; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1259 |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1260 font = gtk_font_button_get_font_name(GTK_FONT_BUTTON(widget)); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1261 c_options->image_overlay.font = g_strdup(font); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1262 #endif |
2334
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1263 } |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1264 |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1265 static void image_overlay_set_text_colour_cb(GtkWidget *widget, gpointer data) |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1266 { |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1267 GtkWidget *dialog; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1268 #if GTK_CHECK_VERSION(3,4,0) |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1269 GdkRGBA colour; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1270 |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1271 dialog = gtk_color_chooser_dialog_new("Image Overlay Text Colour", GTK_WINDOW(gtk_widget_get_toplevel(widget))); |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1272 colour.red = options->image_overlay.text_red; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1273 colour.green = options->image_overlay.text_green; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1274 colour.blue = options->image_overlay.text_blue; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1275 colour.alpha = options->image_overlay.text_alpha; |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1276 gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(dialog), &colour); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1277 gtk_color_chooser_set_use_alpha(GTK_COLOR_CHOOSER(dialog), TRUE); |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1278 |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1279 if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_CANCEL) |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1280 { |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1281 gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(dialog), &colour); |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1282 c_options->image_overlay.text_red = colour.red*255; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1283 c_options->image_overlay.text_green = colour.green*255; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1284 c_options->image_overlay.text_blue = colour.blue*255; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1285 c_options->image_overlay.text_alpha = colour.alpha*255; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1286 } |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1287 gtk_widget_destroy(dialog); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1288 #else |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1289 GdkColor colour; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1290 GtkColorSelection *colorsel; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1291 |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1292 dialog = gtk_color_selection_dialog_new("Image Overlay Text Colour"); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1293 gtk_window_set_keep_above(GTK_WINDOW(dialog),TRUE); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1294 colour.red = options->image_overlay.text_red*257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1295 colour.green = options->image_overlay.text_green*257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1296 colour.blue = options->image_overlay.text_blue*257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1297 colorsel = GTK_COLOR_SELECTION(gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(dialog))); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1298 gtk_color_selection_set_has_opacity_control(colorsel, TRUE); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1299 gtk_color_selection_set_current_color(colorsel, &colour); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1300 gtk_color_selection_set_current_alpha(colorsel, options->image_overlay.text_alpha*257); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1301 |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1302 if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK) |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1303 { |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1304 gtk_color_selection_get_current_color(colorsel, &colour); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1305 c_options->image_overlay.text_red = colour.red/257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1306 c_options->image_overlay.text_green = colour.green/257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1307 c_options->image_overlay.text_blue = colour.blue/257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1308 c_options->image_overlay.text_alpha = gtk_color_selection_get_current_alpha(colorsel)/257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1309 } |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1310 gtk_widget_destroy (dialog); |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1311 #endif |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1312 } |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1313 |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1314 |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1315 static void image_overlay_set_background_colour_cb(GtkWidget *widget, gpointer data) |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1316 { |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1317 GtkWidget *dialog; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1318 #if GTK_CHECK_VERSION(3,4,0) |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1319 GdkRGBA colour; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1320 |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1321 dialog = gtk_color_chooser_dialog_new("Image Overlay Background Colour", GTK_WINDOW(gtk_widget_get_toplevel(widget))); |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1322 colour.red = options->image_overlay.background_red; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1323 colour.green = options->image_overlay.background_green; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1324 colour.blue = options->image_overlay.background_blue; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1325 colour.alpha = options->image_overlay.background_alpha; |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1326 gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(dialog), &colour); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1327 gtk_color_chooser_set_use_alpha(GTK_COLOR_CHOOSER(dialog), TRUE); |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1328 |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1329 if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_CANCEL) |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1330 { |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1331 gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(dialog), &colour); |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1332 c_options->image_overlay.background_red = colour.red*255; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1333 c_options->image_overlay.background_green = colour.green*255; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1334 c_options->image_overlay.background_blue = colour.blue*255; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1335 c_options->image_overlay.background_alpha = colour.alpha*255; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1336 } |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1337 gtk_widget_destroy(dialog); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1338 #else |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1339 GdkColor colour; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1340 GtkColorSelection *colorsel; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1341 |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1342 dialog = gtk_color_selection_dialog_new("Image Overlay Background Colour"); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1343 gtk_window_set_keep_above(GTK_WINDOW(dialog),TRUE); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1344 colour.red = options->image_overlay.background_red*257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1345 colour.green = options->image_overlay.background_green*257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1346 colour.blue = options->image_overlay.background_blue*257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1347 colorsel = GTK_COLOR_SELECTION(gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(dialog))); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1348 gtk_color_selection_set_has_opacity_control(colorsel, TRUE); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1349 gtk_color_selection_set_current_color(colorsel, &colour); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1350 gtk_color_selection_set_current_alpha(colorsel, options->image_overlay.background_alpha*257); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1351 |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1352 if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK) |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1353 { |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1354 gtk_color_selection_get_current_color(colorsel, &colour); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1355 c_options->image_overlay.background_red = colour.red/257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1356 c_options->image_overlay.background_green = colour.green/257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1357 c_options->image_overlay.background_blue = colour.blue/257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1358 c_options->image_overlay.background_alpha = gtk_color_selection_get_current_alpha(colorsel)/257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1359 } |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1360 gtk_widget_destroy(dialog); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1361 #endif |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1362 } |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1363 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1364 static void accel_store_populate(void) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1365 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1366 LayoutWindow *lw; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1367 GList *groups, *actions; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1368 GtkAction *action; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1369 const gchar *accel_path; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1370 GtkAccelKey key; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1371 GtkTreeIter iter; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1372 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1373 if (!accel_store || !layout_window_list || !layout_window_list->data) return; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1374 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1375 gtk_tree_store_clear(accel_store); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1376 lw = layout_window_list->data; /* get the actions from the first window, it should not matter, they should be the same in all windows */ |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1377 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1378 g_assert(lw && lw->ui_manager); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1379 groups = gtk_ui_manager_get_action_groups(lw->ui_manager); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1380 while (groups) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1381 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1382 actions = gtk_action_group_list_actions(GTK_ACTION_GROUP(groups->data)); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1383 while (actions) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1384 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1385 action = GTK_ACTION(actions->data); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1386 accel_path = gtk_action_get_accel_path(action); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1387 if (accel_path && gtk_accel_map_lookup_entry(accel_path, &key)) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1388 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1389 gchar *label, *label2, *tooltip, *accel; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1390 g_object_get(action, |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1391 "tooltip", &tooltip, |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1392 "label", &label, |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1393 NULL); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1394 |
2059 | 1395 if (pango_parse_markup(label, -1, '_', NULL, &label2, NULL, NULL) && label2) |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1396 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1397 g_free(label); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1398 label = label2; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1399 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1400 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1401 accel = gtk_accelerator_name(key.accel_key, key.accel_mods); |
2059 | 1402 |
1403 if (tooltip) | |
1619
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1606
diff
changeset
|
1404 { |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1606
diff
changeset
|
1405 gtk_tree_store_append(accel_store, &iter, NULL); |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1606
diff
changeset
|
1406 gtk_tree_store_set(accel_store, &iter, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1606
diff
changeset
|
1407 AE_ACTION, label, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1606
diff
changeset
|
1408 AE_KEY, accel, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1606
diff
changeset
|
1409 AE_TOOLTIP, tooltip ? tooltip : "", |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1606
diff
changeset
|
1410 AE_ACCEL, accel_path, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1606
diff
changeset
|
1411 -1); |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1606
diff
changeset
|
1412 } |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1413 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1414 g_free(accel); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1415 g_free(label); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1416 g_free(tooltip); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1417 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1418 actions = actions->next; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1419 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1420 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1421 groups = groups->next; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1422 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1423 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1424 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1425 static void accel_store_cleared_cb(GtkCellRendererAccel *accel, gchar *path_string, gpointer user_data) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1426 { |
2059 | 1427 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1428 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1429 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1430 static gboolean accel_remove_key_cb(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1431 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1432 gchar *accel1 = data; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1433 gchar *accel2; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1434 GtkAccelKey key1; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1435 GtkAccelKey key2; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1436 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1437 gtk_tree_model_get(model, iter, AE_KEY, &accel2, -1); |
2059 | 1438 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1439 gtk_accelerator_parse(accel1, &key1.accel_key, &key1.accel_mods); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1440 gtk_accelerator_parse(accel2, &key2.accel_key, &key2.accel_mods); |
2059 | 1441 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1442 if (key1.accel_key == key2.accel_key && key1.accel_mods == key2.accel_mods) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1443 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1444 gtk_tree_store_set(accel_store, iter, AE_KEY, "", -1); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1445 DEBUG_1("accelerator key '%s' is already used, removing.", accel1); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1446 } |
2059 | 1447 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1448 g_free(accel2); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1449 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1450 return FALSE; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1451 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1452 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1453 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1454 static void accel_store_edited_cb(GtkCellRendererAccel *accel, gchar *path_string, guint accel_key, GdkModifierType accel_mods, guint hardware_keycode, gpointer user_data) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1455 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1456 GtkTreeModel *model = (GtkTreeModel *)accel_store; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1457 GtkTreeIter iter; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1458 gchar *acc; |
1664
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1459 gchar *accel_path; |
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1460 GtkAccelKey old_key, key; |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1461 GtkTreePath *path = gtk_tree_path_new_from_string(path_string); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1462 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1463 gtk_tree_model_get_iter(model, &iter, path); |
1664
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1464 gtk_tree_model_get(model, &iter, AE_ACCEL, &accel_path, -1); |
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1465 |
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1466 /* test if the accelerator can be stored without conflicts*/ |
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1467 gtk_accel_map_lookup_entry(accel_path, &old_key); |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1468 |
1664
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1469 /* change the key and read it back (change may fail on keys hardcoded in gtk)*/ |
2059 | 1470 gtk_accel_map_change_entry(accel_path, accel_key, accel_mods, TRUE); |
1664
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1471 gtk_accel_map_lookup_entry(accel_path, &key); |
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1472 |
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1473 /* restore the original for now, the key will be really changed when the changes are confirmed */ |
2059 | 1474 gtk_accel_map_change_entry(accel_path, old_key.accel_key, old_key.accel_mods, TRUE); |
1664
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1475 |
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1476 acc = gtk_accelerator_name(key.accel_key, key.accel_mods); |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1477 gtk_tree_model_foreach(GTK_TREE_MODEL(accel_store), accel_remove_key_cb, acc); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1478 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1479 gtk_tree_store_set(accel_store, &iter, AE_KEY, acc, -1); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1480 gtk_tree_path_free(path); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1481 g_free(acc); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1482 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1483 |
2058
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1484 static gboolean accel_default_scroll(GtkTreeView *data) |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1485 { |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1486 GtkTreeIter iter; |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1487 GtkTreePath *path; |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1488 GtkTreeViewColumn *column; |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1489 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1490 gtk_tree_model_get_iter_first(GTK_TREE_MODEL(accel_store), &iter); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1491 path = gtk_tree_model_get_path(GTK_TREE_MODEL(accel_store), &iter); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1492 column = gtk_tree_view_get_column(GTK_TREE_VIEW(data),0); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1493 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1494 gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(data), |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1495 path, column, |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1496 FALSE, 0.0, 0.0); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1497 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1498 gtk_tree_path_free(path); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1499 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1500 return(FALSE); |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1501 } |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1502 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1503 static void accel_default_cb(GtkWidget *widget, gpointer data) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1504 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1505 accel_store_populate(); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1506 |
2058
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1507 g_idle_add((GSourceFunc)accel_default_scroll, data); |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1508 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1509 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1510 void accel_remove_selection(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1511 { |
2059 | 1512 gtk_tree_store_set(accel_store, iter, AE_KEY, "", -1); |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1513 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1514 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1515 void accel_reset_selection(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1516 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1517 GtkAccelKey key; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1518 gchar *accel_path, *accel; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1519 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1520 gtk_tree_model_get(model, iter, AE_ACCEL, &accel_path, -1); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1521 gtk_accel_map_lookup_entry(accel_path, &key); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1522 accel = gtk_accelerator_name(key.accel_key, key.accel_mods); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1523 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1524 gtk_tree_model_foreach(GTK_TREE_MODEL(accel_store), accel_remove_key_cb, accel); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1525 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1526 gtk_tree_store_set(accel_store, iter, AE_KEY, accel, -1); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1527 g_free(accel_path); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1528 g_free(accel); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1529 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1530 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1531 static void accel_reset_cb(GtkWidget *widget, gpointer data) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1532 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1533 GtkTreeSelection *selection; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1534 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1535 if (!accel_store) return; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1536 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(data)); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1537 gtk_tree_selection_selected_foreach(selection, &accel_reset_selection, NULL); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1538 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1539 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1540 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1541 |
1039
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1542 static GtkWidget *scrolled_notebook_page(GtkWidget *notebook, const gchar *title) |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1543 { |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1544 GtkWidget *label; |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1545 GtkWidget *vbox; |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1546 GtkWidget *scrolled; |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1547 GtkWidget *viewport; |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1548 |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1549 scrolled = gtk_scrolled_window_new(NULL, NULL); |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1550 gtk_container_set_border_width(GTK_CONTAINER(scrolled), PREF_PAD_BORDER); |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1551 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1552 GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1553 label = gtk_label_new(title); |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1554 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), scrolled, label); |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1555 gtk_widget_show(scrolled); |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1556 |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1557 viewport = gtk_viewport_new(NULL, NULL); |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1558 gtk_viewport_set_shadow_type(GTK_VIEWPORT(viewport), GTK_SHADOW_NONE); |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1559 gtk_container_add(GTK_CONTAINER(scrolled), viewport); |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1560 gtk_widget_show(viewport); |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1561 |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1562 vbox = gtk_vbox_new(FALSE, 0); |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1563 gtk_container_add(GTK_CONTAINER(viewport), vbox); |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1564 gtk_widget_show(vbox); |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1565 |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1566 return vbox; |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1567 } |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1568 |
2566
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1569 static void cache_standard_cb(GtkWidget *widget, gpointer data) |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1570 { |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1571 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1572 { |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1573 c_options->thumbnails.spec_standard =TRUE; |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1574 c_options->thumbnails.cache_into_dirs = FALSE; |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1575 } |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1576 } |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1577 |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1578 static void cache_geeqie_cb(GtkWidget *widget, gpointer data) |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1579 { |
2802
34fd30078c53
Bug fix: Preserve cache mode
Colin Clark <colin.clark@cclark.uk>
parents:
2800
diff
changeset
|
1580 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) |
2566
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1581 { |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1582 c_options->thumbnails.spec_standard =FALSE; |
2802
34fd30078c53
Bug fix: Preserve cache mode
Colin Clark <colin.clark@cclark.uk>
parents:
2800
diff
changeset
|
1583 c_options->thumbnails.cache_into_dirs = FALSE; |
2566
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1584 } |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1585 } |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1586 |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1587 static void cache_local_cb(GtkWidget *widget, gpointer data) |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1588 { |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1589 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1590 { |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1591 c_options->thumbnails.cache_into_dirs = TRUE; |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1592 c_options->thumbnails.spec_standard =FALSE; |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1593 } |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1594 } |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1595 |
2756
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1596 static void help_search_engine_entry_icon_cb(GtkEntry *entry, GtkEntryIconPosition pos, |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1597 GdkEvent *event, gpointer userdata) |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1598 { |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1599 if (pos == GTK_ENTRY_ICON_PRIMARY) |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1600 { |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1601 gtk_entry_set_text(GTK_ENTRY(userdata), HELP_SEARCH_ENGINE); |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1602 } |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1603 else |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1604 { |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1605 gtk_entry_set_text(GTK_ENTRY(userdata), ""); |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1606 } |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1607 } |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1608 |
2777
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1609 static void star_rating_star_icon_cb(GtkEntry *entry, GtkEntryIconPosition pos, |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1610 GdkEvent *event, gpointer userdata) |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1611 { |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1612 gchar *rating_symbol; |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1613 |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1614 if (pos == GTK_ENTRY_ICON_PRIMARY) |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1615 { |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1616 rating_symbol = g_strdup_printf("U+%X", STAR_RATING_STAR); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1617 gtk_entry_set_text(GTK_ENTRY(userdata), rating_symbol); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1618 g_free(rating_symbol); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1619 } |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1620 else |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1621 { |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1622 gtk_entry_set_text(GTK_ENTRY(userdata), "U+"); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1623 gtk_widget_grab_focus(GTK_WIDGET(userdata)); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1624 gtk_editable_select_region(GTK_EDITABLE(userdata), 2, 2); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1625 } |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1626 } |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1627 |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1628 static void star_rating_rejected_icon_cb(GtkEntry *entry, GtkEntryIconPosition pos, |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1629 GdkEvent *event, gpointer userdata) |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1630 { |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1631 gchar *rating_symbol; |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1632 |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1633 if (pos == GTK_ENTRY_ICON_PRIMARY) |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1634 { |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1635 rating_symbol = g_strdup_printf("U+%X", STAR_RATING_REJECTED); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1636 gtk_entry_set_text(GTK_ENTRY(userdata), rating_symbol); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1637 g_free(rating_symbol); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1638 } |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1639 else |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1640 { |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1641 gtk_entry_set_text(GTK_ENTRY(userdata), "U+"); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1642 gtk_widget_grab_focus(GTK_WIDGET(userdata)); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1643 gtk_editable_select_region(GTK_EDITABLE(userdata), 2, 2); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1644 } |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1645 } |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1646 |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1647 static guint star_rating_symbol_test(GtkWidget *widget, gpointer data) |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1648 { |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1649 GtkContainer *hbox = data; |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1650 GString *str = g_string_new(NULL); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1651 GtkEntry *hex_code_entry; |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1652 gchar *hex_code_full; |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1653 gchar **hex_code; |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1654 GList *list; |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1655 guint64 hex_value = 0; |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1656 |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1657 list = gtk_container_get_children(hbox); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1658 |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1659 hex_code_entry = g_list_nth_data(list, 2); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1660 hex_code_full = g_strdup(gtk_entry_get_text(hex_code_entry)); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1661 |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1662 hex_code = g_strsplit(hex_code_full, "+", 2); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1663 if (hex_code[0] && hex_code[1]) |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1664 { |
2784
03dd5a7bb410
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2777
diff
changeset
|
1665 hex_value = strtoull(hex_code[1], NULL, 16); |
2777
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1666 } |
2784
03dd5a7bb410
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2777
diff
changeset
|
1667 if (!hex_value || hex_value > 0x10FFFF) |
2777
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1668 { |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1669 hex_value = 0x003F; // Unicode 'Question Mark' |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1670 } |
2784
03dd5a7bb410
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2777
diff
changeset
|
1671 str = g_string_append_unichar(str, (gunichar)hex_value); |
2777
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1672 gtk_label_set_text(g_list_nth_data(list, 1), str->str); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1673 |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1674 g_strfreev(hex_code); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1675 g_string_free(str, TRUE); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1676 g_free(hex_code_full); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1677 |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1678 return hex_value; |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1679 } |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1680 |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1681 static void star_rating_star_test_cb(GtkWidget *widget, gpointer data) |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1682 { |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1683 guint64 star_symbol; |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1684 |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1685 star_symbol = star_rating_symbol_test(widget, data); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1686 c_options->star_rating.star = star_symbol; |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1687 } |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1688 |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1689 static void star_rating_rejected_test_cb(GtkWidget *widget, gpointer data) |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1690 { |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1691 guint64 rejected_symbol; |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1692 |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1693 rejected_symbol = star_rating_symbol_test(widget, data); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1694 c_options->star_rating.rejected = rejected_symbol; |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1695 } |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1696 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1697 /* general options tab */ |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1698 static void config_tab_general(GtkWidget *notebook) |
9 | 1699 { |
1700 GtkWidget *vbox; | |
2482
9b050f7e7b6c
Fix #445: Info sidebar section heights
Colin Clark <colin.clark@cclark.uk>
parents:
2474
diff
changeset
|
1701 GtkWidget *hbox; |
9 | 1702 GtkWidget *group; |
2566
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1703 GtkWidget *group_frame; |
9 | 1704 GtkWidget *subgroup; |
1705 GtkWidget *button; | |
1706 GtkWidget *ct_button; | |
1707 GtkWidget *table; | |
1708 GtkWidget *spin; | |
2612
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1709 gint hours, minutes, remainder; |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1710 gdouble seconds; |
2777
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1711 GtkWidget *star_rating_entry; |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1712 GString *str; |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1713 gchar *rating_symbol; |
9 | 1714 |
1039
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1715 vbox = scrolled_notebook_page(notebook, _("General")); |
9 | 1716 |
1717 group = pref_group_new(vbox, FALSE, _("Thumbnails"), GTK_ORIENTATION_VERTICAL); | |
1718 | |
1719 table = pref_table_new(group, 2, 2, FALSE, FALSE); | |
1720 add_thumb_size_menu(table, 0, 0, _("Size:")); | |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
1721 add_quality_menu(table, 0, 1, _("Quality:"), options->thumbnails.quality, &c_options->thumbnails.quality); |
9 | 1722 |
1723 ct_button = pref_checkbox_new_int(group, _("Cache thumbnails"), | |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
1724 options->thumbnails.enable_caching, &c_options->thumbnails.enable_caching); |
9 | 1725 |
1726 subgroup = pref_box_new(group, FALSE, GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP); | |
1727 pref_checkbox_link_sensitivity(ct_button, subgroup); | |
1728 | |
2802
34fd30078c53
Bug fix: Preserve cache mode
Colin Clark <colin.clark@cclark.uk>
parents:
2800
diff
changeset
|
1729 c_options->thumbnails.spec_standard = options->thumbnails.spec_standard; |
34fd30078c53
Bug fix: Preserve cache mode
Colin Clark <colin.clark@cclark.uk>
parents:
2800
diff
changeset
|
1730 c_options->thumbnails.cache_into_dirs = options->thumbnails.cache_into_dirs; |
2566
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1731 group_frame = pref_frame_new(subgroup, TRUE, _("Use Geeqie thumbnail style and cache"), |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1732 GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP); |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1733 button = pref_radiobutton_new(group_frame, NULL, get_thumbnails_cache_dir(), |
2802
34fd30078c53
Bug fix: Preserve cache mode
Colin Clark <colin.clark@cclark.uk>
parents:
2800
diff
changeset
|
1734 !options->thumbnails.spec_standard && !options->thumbnails.cache_into_dirs, |
2566
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1735 G_CALLBACK(cache_geeqie_cb), NULL); |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1736 |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1737 group_frame = pref_frame_new(subgroup, TRUE, |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1738 _("Store thumbnails local to image folder (non-standard)"), |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1739 GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP); |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1740 pref_radiobutton_new(group_frame, button, "*/.thumbnails", |
2802
34fd30078c53
Bug fix: Preserve cache mode
Colin Clark <colin.clark@cclark.uk>
parents:
2800
diff
changeset
|
1741 !options->thumbnails.spec_standard && options->thumbnails.cache_into_dirs, |
2566
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1742 G_CALLBACK(cache_local_cb), NULL); |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1743 |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1744 group_frame = pref_frame_new(subgroup, TRUE, |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1745 _("Use standard thumbnail style and cache, shared with other applications"), |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1746 GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP); |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1747 pref_radiobutton_new(group_frame, button, get_thumbnails_standard_cache_dir(), |
2802
34fd30078c53
Bug fix: Preserve cache mode
Colin Clark <colin.clark@cclark.uk>
parents:
2800
diff
changeset
|
1748 options->thumbnails.spec_standard && !options->thumbnails.cache_into_dirs, |
2566
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1749 G_CALLBACK(cache_standard_cb), NULL); |
9 | 1750 |
1522
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
1751 pref_checkbox_new_int(group, _("Use EXIF thumbnails when available (EXIF thumbnails may be outdated)"), |
1060
54806f8e4af5
added option to use exif thumbnails
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1055
diff
changeset
|
1752 options->thumbnails.use_exif, &c_options->thumbnails.use_exif); |
54806f8e4af5
added option to use exif thumbnails
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1055
diff
changeset
|
1753 |
2800
0ecd4885dc09
Bug fix: Collection preview
Colin Clark <colin.clark@cclark.uk>
parents:
2799
diff
changeset
|
1754 spin = pref_spin_new_int(group, _("Collection preview:"), NULL, |
0ecd4885dc09
Bug fix: Collection preview
Colin Clark <colin.clark@cclark.uk>
parents:
2799
diff
changeset
|
1755 1, 999, 1, |
0ecd4885dc09
Bug fix: Collection preview
Colin Clark <colin.clark@cclark.uk>
parents:
2799
diff
changeset
|
1756 options->thumbnails.collection_preview, &c_options->thumbnails.collection_preview); |
0ecd4885dc09
Bug fix: Collection preview
Colin Clark <colin.clark@cclark.uk>
parents:
2799
diff
changeset
|
1757 gtk_widget_set_tooltip_text(spin, _("The maximum number of thumbnails shown in a Collection preview montage")); |
0ecd4885dc09
Bug fix: Collection preview
Colin Clark <colin.clark@cclark.uk>
parents:
2799
diff
changeset
|
1758 |
2673
bef1f1a91df9
Fix #541: Showing existing, or maybe generating thumbnails for MP4 and WEBM
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2670
diff
changeset
|
1759 #ifdef HAVE_FFMPEGTHUMBNAILER_METADATA |
bef1f1a91df9
Fix #541: Showing existing, or maybe generating thumbnails for MP4 and WEBM
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2670
diff
changeset
|
1760 pref_checkbox_new_int(group, _("Use embedded metadata in video files as thumbnails when available"), |
bef1f1a91df9
Fix #541: Showing existing, or maybe generating thumbnails for MP4 and WEBM
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2670
diff
changeset
|
1761 options->thumbnails.use_ft_metadata, &c_options->thumbnails.use_ft_metadata); |
bef1f1a91df9
Fix #541: Showing existing, or maybe generating thumbnails for MP4 and WEBM
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2670
diff
changeset
|
1762 |
bef1f1a91df9
Fix #541: Showing existing, or maybe generating thumbnails for MP4 and WEBM
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2670
diff
changeset
|
1763 // pref_checkbox_new_int(group, _("Ignore embedded metadata if size is too small"), |
bef1f1a91df9
Fix #541: Showing existing, or maybe generating thumbnails for MP4 and WEBM
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2670
diff
changeset
|
1764 // options->thumbnails.use_ft_metadata_small, &c_options->thumbnails.use_ft_metadata_small); |
bef1f1a91df9
Fix #541: Showing existing, or maybe generating thumbnails for MP4 and WEBM
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2670
diff
changeset
|
1765 #endif |
bef1f1a91df9
Fix #541: Showing existing, or maybe generating thumbnails for MP4 and WEBM
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2670
diff
changeset
|
1766 |
2777
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1767 group = pref_group_new(vbox, FALSE, _("Star Rating"), GTK_ORIENTATION_VERTICAL); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1768 |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1769 c_options->star_rating.star = options->star_rating.star; |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1770 c_options->star_rating.rejected = options->star_rating.rejected; |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1771 |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1772 str = g_string_new(NULL); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1773 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1774 pref_label_new(hbox, "Star character: "); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1775 str = g_string_append_unichar(str, options->star_rating.star); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1776 pref_label_new(hbox, g_strdup(str->str)); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1777 rating_symbol = g_strdup_printf("U+%X", options->star_rating.star); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1778 star_rating_entry = gtk_entry_new(); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1779 gtk_entry_set_text(GTK_ENTRY(star_rating_entry), rating_symbol); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1780 gtk_box_pack_start(GTK_BOX(hbox), star_rating_entry, FALSE, FALSE, 0); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1781 gtk_entry_set_width_chars(GTK_ENTRY(star_rating_entry), 15); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1782 gtk_widget_show(star_rating_entry); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1783 button = pref_button_new(NULL, NULL, _("Set"), FALSE, |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1784 G_CALLBACK(star_rating_star_test_cb), hbox); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1785 gtk_widget_set_tooltip_text(button, _("Display selected character")); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1786 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1787 gtk_widget_show(button); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1788 gtk_widget_set_tooltip_text(star_rating_entry, _("Hexadecimal representation of a Unicode character. A list of all Unicode characters may be found on the Internet.")); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1789 gtk_entry_set_icon_from_stock(GTK_ENTRY(star_rating_entry), |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1790 GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_CLEAR); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1791 gtk_entry_set_icon_tooltip_text (GTK_ENTRY(star_rating_entry), |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1792 GTK_ENTRY_ICON_SECONDARY, _("Clear")); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1793 gtk_entry_set_icon_from_stock(GTK_ENTRY(star_rating_entry), |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1794 GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_REVERT_TO_SAVED); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1795 gtk_entry_set_icon_tooltip_text (GTK_ENTRY(star_rating_entry), |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1796 GTK_ENTRY_ICON_PRIMARY, _("Default")); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1797 g_signal_connect(GTK_ENTRY(star_rating_entry), "icon-press", |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1798 G_CALLBACK(star_rating_star_icon_cb), |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1799 star_rating_entry); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1800 |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1801 g_string_free(str, TRUE); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1802 g_free(rating_symbol); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1803 |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1804 str = g_string_new(NULL); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1805 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1806 pref_label_new(hbox, "Rejected character: "); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1807 str = g_string_append_unichar(str, options->star_rating.rejected); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1808 pref_label_new(hbox, g_strdup(str->str)); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1809 rating_symbol = g_strdup_printf("U+%X", options->star_rating.rejected); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1810 star_rating_entry = gtk_entry_new(); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1811 gtk_entry_set_text(GTK_ENTRY(star_rating_entry), rating_symbol); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1812 gtk_box_pack_start(GTK_BOX(hbox), star_rating_entry, FALSE, FALSE, 0); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1813 gtk_entry_set_width_chars(GTK_ENTRY(star_rating_entry), 15); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1814 gtk_widget_show(star_rating_entry); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1815 button = pref_button_new(NULL, NULL, _("Set"), FALSE, |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1816 G_CALLBACK(star_rating_rejected_test_cb), hbox); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1817 gtk_widget_set_tooltip_text(button, _("Display selected character")); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1818 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1819 gtk_widget_show(button); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1820 gtk_widget_set_tooltip_text(star_rating_entry, _("Hexadecimal representation of a Unicode character. A list of all Unicode characters may be found on the Internet.")); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1821 gtk_entry_set_icon_from_stock(GTK_ENTRY(star_rating_entry), |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1822 GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_CLEAR); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1823 gtk_entry_set_icon_tooltip_text (GTK_ENTRY(star_rating_entry), |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1824 GTK_ENTRY_ICON_SECONDARY, _("Clear")); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1825 gtk_entry_set_icon_from_stock(GTK_ENTRY(star_rating_entry), |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1826 GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_REVERT_TO_SAVED); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1827 gtk_entry_set_icon_tooltip_text (GTK_ENTRY(star_rating_entry), |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1828 GTK_ENTRY_ICON_PRIMARY, _("Default")); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1829 g_signal_connect(GTK_ENTRY(star_rating_entry), "icon-press", |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1830 G_CALLBACK(star_rating_rejected_icon_cb), |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1831 star_rating_entry); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1832 |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1833 g_string_free(str, TRUE); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1834 g_free(rating_symbol); |
813be27b1cd5
Addl fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2770
diff
changeset
|
1835 |
9 | 1836 group = pref_group_new(vbox, FALSE, _("Slide show"), GTK_ORIENTATION_VERTICAL); |
1837 | |
326 | 1838 c_options->slideshow.delay = options->slideshow.delay; |
2612
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1839 hours = options->slideshow.delay / (3600 * SLIDESHOW_SUBSECOND_PRECISION); |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1840 remainder = options->slideshow.delay % (3600 * SLIDESHOW_SUBSECOND_PRECISION); |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1841 minutes = remainder / (60 * SLIDESHOW_SUBSECOND_PRECISION); |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1842 seconds = (gdouble)(remainder % (60 * SLIDESHOW_SUBSECOND_PRECISION)) / |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1843 SLIDESHOW_SUBSECOND_PRECISION; |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1844 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1845 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE); |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1846 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1847 spin = pref_spin_new(hbox, _("Delay between image change hrs:mins:secs.dec"), NULL, |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1848 0, 23, 1.0, 0, |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1849 options->slideshow.delay ? hours : 0.0, |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1850 G_CALLBACK(slideshow_delay_hours_cb), NULL); |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1851 gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(spin), GTK_UPDATE_ALWAYS); |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1852 spin = pref_spin_new(hbox, ":" , NULL, |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1853 0, 59, 1.0, 0, |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1854 options->slideshow.delay ? minutes: 0.0, |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1855 G_CALLBACK(slideshow_delay_minutes_cb), NULL); |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1856 gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(spin), GTK_UPDATE_ALWAYS); |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1857 spin = pref_spin_new(hbox, ":", NULL, |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1858 SLIDESHOW_MIN_SECONDS, 59, 1.0, 1, |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1859 options->slideshow.delay ? seconds : 10.0, |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1860 G_CALLBACK(slideshow_delay_seconds_cb), NULL); |
9 | 1861 gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(spin), GTK_UPDATE_ALWAYS); |
1862 | |
326 | 1863 pref_checkbox_new_int(group, _("Random"), options->slideshow.random, &c_options->slideshow.random); |
1864 pref_checkbox_new_int(group, _("Repeat"), options->slideshow.repeat, &c_options->slideshow.repeat); | |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1865 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1866 group = pref_group_new(vbox, FALSE, _("Image loading and caching"), GTK_ORIENTATION_VERTICAL); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1867 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1868 pref_spin_new_int(group, _("Decoded image cache size (Mb):"), NULL, |
2568
78518b422e23
Partial fix #504: Increase limit on Decoded Image Cache Size
Colin Clark <colin.clark@cclark.uk>
parents:
2566
diff
changeset
|
1869 0, 99999, 1, options->image.image_cache_max, &c_options->image.image_cache_max); |
1522
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
1870 pref_checkbox_new_int(group, _("Preload next image"), |
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
1871 options->image.enable_read_ahead, &c_options->image.enable_read_ahead); |
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
1872 |
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
1873 pref_checkbox_new_int(group, _("Refresh on file change"), |
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
1874 options->update_on_time_change, &c_options->update_on_time_change); |
2482
9b050f7e7b6c
Fix #445: Info sidebar section heights
Colin Clark <colin.clark@cclark.uk>
parents:
2474
diff
changeset
|
1875 |
2495
33571d08bc37
Fix #446: Minor text updates
Colin Clark <colin.clark@cclark.uk>
parents:
2482
diff
changeset
|
1876 group = pref_group_new(vbox, FALSE, _("Info sidebar heights"), GTK_ORIENTATION_VERTICAL); |
33571d08bc37
Fix #446: Minor text updates
Colin Clark <colin.clark@cclark.uk>
parents:
2482
diff
changeset
|
1877 pref_label_new(group, _("NOTE! Geeqie must be restarted for changes to take effect")); |
2482
9b050f7e7b6c
Fix #445: Info sidebar section heights
Colin Clark <colin.clark@cclark.uk>
parents:
2474
diff
changeset
|
1878 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE); |
2495
33571d08bc37
Fix #446: Minor text updates
Colin Clark <colin.clark@cclark.uk>
parents:
2482
diff
changeset
|
1879 pref_spin_new_int(hbox, _("Keywords:"), NULL, |
2482
9b050f7e7b6c
Fix #445: Info sidebar section heights
Colin Clark <colin.clark@cclark.uk>
parents:
2474
diff
changeset
|
1880 1, 9999, 1, |
9b050f7e7b6c
Fix #445: Info sidebar section heights
Colin Clark <colin.clark@cclark.uk>
parents:
2474
diff
changeset
|
1881 options->info_keywords.height, &c_options->info_keywords.height); |
2495
33571d08bc37
Fix #446: Minor text updates
Colin Clark <colin.clark@cclark.uk>
parents:
2482
diff
changeset
|
1882 pref_spin_new_int(hbox, _("Title:"), NULL, |
2482
9b050f7e7b6c
Fix #445: Info sidebar section heights
Colin Clark <colin.clark@cclark.uk>
parents:
2474
diff
changeset
|
1883 1, 9999, 1, |
9b050f7e7b6c
Fix #445: Info sidebar section heights
Colin Clark <colin.clark@cclark.uk>
parents:
2474
diff
changeset
|
1884 options->info_title.height, &c_options->info_title.height); |
2495
33571d08bc37
Fix #446: Minor text updates
Colin Clark <colin.clark@cclark.uk>
parents:
2482
diff
changeset
|
1885 pref_spin_new_int(hbox, _("Comment:"), NULL, |
2482
9b050f7e7b6c
Fix #445: Info sidebar section heights
Colin Clark <colin.clark@cclark.uk>
parents:
2474
diff
changeset
|
1886 1, 9999, 1, |
9b050f7e7b6c
Fix #445: Info sidebar section heights
Colin Clark <colin.clark@cclark.uk>
parents:
2474
diff
changeset
|
1887 options->info_comment.height, &c_options->info_comment.height); |
2500
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2495
diff
changeset
|
1888 pref_spin_new_int(hbox, _("Rating:"), NULL, |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2495
diff
changeset
|
1889 1, 9999, 1, |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2495
diff
changeset
|
1890 options->info_rating.height, &c_options->info_rating.height); |
2756
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1891 |
2826
d0c6c5ae586b
Option to hide predefined keyword tree
Colin Clark <colin.clark@cclark.uk>
parents:
2825
diff
changeset
|
1892 group = pref_group_new(vbox, FALSE, _("Show predefined keyword tree"), GTK_ORIENTATION_VERTICAL); |
d0c6c5ae586b
Option to hide predefined keyword tree
Colin Clark <colin.clark@cclark.uk>
parents:
2825
diff
changeset
|
1893 |
d0c6c5ae586b
Option to hide predefined keyword tree
Colin Clark <colin.clark@cclark.uk>
parents:
2825
diff
changeset
|
1894 pref_checkbox_new_int(group, _("Show predefined keyword tree (NOTE! Geeqie must be restarted for change to take effect)"), |
d0c6c5ae586b
Option to hide predefined keyword tree
Colin Clark <colin.clark@cclark.uk>
parents:
2825
diff
changeset
|
1895 options->show_predefined_keyword_tree, &c_options->show_predefined_keyword_tree); |
d0c6c5ae586b
Option to hide predefined keyword tree
Colin Clark <colin.clark@cclark.uk>
parents:
2825
diff
changeset
|
1896 |
2756
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1897 group = pref_group_new(vbox, FALSE, _("On-line help search engine"), GTK_ORIENTATION_VERTICAL); |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1898 |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1899 help_search_engine_entry = gtk_entry_new(); |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1900 gtk_entry_set_text(GTK_ENTRY(help_search_engine_entry), options->help_search_engine); |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1901 gtk_box_pack_start(GTK_BOX(group), help_search_engine_entry, FALSE, FALSE, 0); |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1902 gtk_widget_show(help_search_engine_entry); |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1903 |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1904 gtk_widget_set_tooltip_text(help_search_engine_entry, _("The format varies between search engines, e.g the format may be:\nhttps://www.search_engine.com/search?q=site:geeqie.org/help\nhttps://www.search_engine.com/?q=site:geeqie.org/help")); |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1905 |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1906 gtk_entry_set_icon_from_stock(GTK_ENTRY(help_search_engine_entry), |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1907 GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_CLEAR); |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1908 gtk_entry_set_icon_tooltip_text (GTK_ENTRY(help_search_engine_entry), |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1909 GTK_ENTRY_ICON_SECONDARY, _("Clear")); |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1910 gtk_entry_set_icon_from_stock(GTK_ENTRY(help_search_engine_entry), |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1911 GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_REVERT_TO_SAVED); |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1912 gtk_entry_set_icon_tooltip_text (GTK_ENTRY(help_search_engine_entry), |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1913 GTK_ENTRY_ICON_PRIMARY, _("Default")); |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1914 g_signal_connect(GTK_ENTRY(help_search_engine_entry), "icon-press", |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1915 G_CALLBACK(help_search_engine_entry_icon_cb), |
f2f01d556f51
Fix #597: Help file search
Colin Clark <colin.clark@cclark.uk>
parents:
2750
diff
changeset
|
1916 help_search_engine_entry); |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1917 } |
9 | 1918 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1919 /* image tab */ |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1920 static void config_tab_image(GtkWidget *notebook) |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1921 { |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1922 GtkWidget *hbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1923 GtkWidget *vbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1924 GtkWidget *group; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1925 GtkWidget *ct_button; |
2474
f591509cb3d3
Fix #123: Limit image expansion in Fit To Window
Colin Clark <colin.clark@cclark.uk>
parents:
2462
diff
changeset
|
1926 GtkWidget *enlargement_button; |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1927 GtkWidget *table; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1928 GtkWidget *spin; |
9 | 1929 |
1039
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1930 vbox = scrolled_notebook_page(notebook, _("Image")); |
9 | 1931 |
1932 group = pref_group_new(vbox, FALSE, _("Zoom"), GTK_ORIENTATION_VERTICAL); | |
1933 | |
1934 table = pref_table_new(group, 2, 1, FALSE, FALSE); | |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
1935 add_quality_menu(table, 0, 0, _("Quality:"), options->image.zoom_quality, &c_options->image.zoom_quality); |
9 | 1936 |
2084
1c712b43f063
added option for clutter renderer
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2066
diff
changeset
|
1937 #ifdef HAVE_CLUTTER |
1c712b43f063
added option for clutter renderer
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2066
diff
changeset
|
1938 pref_checkbox_new_int(group, _("Use GPU acceleration via Clutter library"), |
1c712b43f063
added option for clutter renderer
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2066
diff
changeset
|
1939 options->image.use_clutter_renderer, &c_options->image.use_clutter_renderer); |
1c712b43f063
added option for clutter renderer
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2066
diff
changeset
|
1940 #endif |
1c712b43f063
added option for clutter renderer
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2066
diff
changeset
|
1941 |
1515
99d03a6f394f
disabled 2-pass rendering also affect color correction
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1513
diff
changeset
|
1942 pref_checkbox_new_int(group, _("Two pass rendering (apply HQ zoom and color correction in second pass)"), |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
1943 options->image.zoom_2pass, &c_options->image.zoom_2pass); |
9 | 1944 |
2665
89f913549674
Update documentation for Fit image to window options
Colin Clark <colin.clark@cclark.uk>
parents:
2662
diff
changeset
|
1945 c_options->image.zoom_increment = options->image.zoom_increment; |
89f913549674
Update documentation for Fit image to window options
Colin Clark <colin.clark@cclark.uk>
parents:
2662
diff
changeset
|
1946 spin = pref_spin_new(group, _("Zoom increment:"), NULL, |
89f913549674
Update documentation for Fit image to window options
Colin Clark <colin.clark@cclark.uk>
parents:
2662
diff
changeset
|
1947 0.01, 4.0, 0.01, 2, (gdouble)options->image.zoom_increment / 100.0, |
89f913549674
Update documentation for Fit image to window options
Colin Clark <colin.clark@cclark.uk>
parents:
2662
diff
changeset
|
1948 G_CALLBACK(zoom_increment_cb), NULL); |
89f913549674
Update documentation for Fit image to window options
Colin Clark <colin.clark@cclark.uk>
parents:
2662
diff
changeset
|
1949 gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(spin), GTK_UPDATE_ALWAYS); |
89f913549674
Update documentation for Fit image to window options
Colin Clark <colin.clark@cclark.uk>
parents:
2662
diff
changeset
|
1950 |
89f913549674
Update documentation for Fit image to window options
Colin Clark <colin.clark@cclark.uk>
parents:
2662
diff
changeset
|
1951 group = pref_group_new(vbox, FALSE, _("Fit image to window"), GTK_ORIENTATION_VERTICAL); |
89f913549674
Update documentation for Fit image to window options
Colin Clark <colin.clark@cclark.uk>
parents:
2662
diff
changeset
|
1952 |
2474
f591509cb3d3
Fix #123: Limit image expansion in Fit To Window
Colin Clark <colin.clark@cclark.uk>
parents:
2462
diff
changeset
|
1953 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE); |
2665
89f913549674
Update documentation for Fit image to window options
Colin Clark <colin.clark@cclark.uk>
parents:
2662
diff
changeset
|
1954 enlargement_button = pref_checkbox_new_int(hbox, _("Allow enlargement of image (max. size in %)"), |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
1955 options->image.zoom_to_fit_allow_expand, &c_options->image.zoom_to_fit_allow_expand); |
2474
f591509cb3d3
Fix #123: Limit image expansion in Fit To Window
Colin Clark <colin.clark@cclark.uk>
parents:
2462
diff
changeset
|
1956 spin = pref_spin_new_int(hbox, NULL, NULL, |
f591509cb3d3
Fix #123: Limit image expansion in Fit To Window
Colin Clark <colin.clark@cclark.uk>
parents:
2462
diff
changeset
|
1957 100, 999, 1, |
f591509cb3d3
Fix #123: Limit image expansion in Fit To Window
Colin Clark <colin.clark@cclark.uk>
parents:
2462
diff
changeset
|
1958 options->image.max_enlargement_size, &c_options->image.max_enlargement_size); |
f591509cb3d3
Fix #123: Limit image expansion in Fit To Window
Colin Clark <colin.clark@cclark.uk>
parents:
2462
diff
changeset
|
1959 pref_checkbox_link_sensitivity(enlargement_button, spin); |
2665
89f913549674
Update documentation for Fit image to window options
Colin Clark <colin.clark@cclark.uk>
parents:
2662
diff
changeset
|
1960 gtk_widget_set_tooltip_text(GTK_WIDGET(hbox), _("Enable this to allow Geeqie to increase the image size for images that are smaller than the current view area when the zoom is set to \"Fit image to window\". This value sets the maximum expansion permitted in percent i.e. 100% is full-size.")); |
9 | 1961 |
209
ce89a8349d8b
configurable frame around image - geeqie_autofit_maxsize.patch by Laurent MONIN
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
208
diff
changeset
|
1962 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE); |
2665
89f913549674
Update documentation for Fit image to window options
Colin Clark <colin.clark@cclark.uk>
parents:
2662
diff
changeset
|
1963 ct_button = pref_checkbox_new_int(hbox, _("Virtual window size (% of actual window):"), |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
1964 options->image.limit_autofit_size, &c_options->image.limit_autofit_size); |
209
ce89a8349d8b
configurable frame around image - geeqie_autofit_maxsize.patch by Laurent MONIN
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
208
diff
changeset
|
1965 spin = pref_spin_new_int(hbox, NULL, NULL, |
ce89a8349d8b
configurable frame around image - geeqie_autofit_maxsize.patch by Laurent MONIN
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
208
diff
changeset
|
1966 10, 150, 1, |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
1967 options->image.max_autofit_size, &c_options->image.max_autofit_size); |
209
ce89a8349d8b
configurable frame around image - geeqie_autofit_maxsize.patch by Laurent MONIN
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
208
diff
changeset
|
1968 pref_checkbox_link_sensitivity(ct_button, spin); |
2665
89f913549674
Update documentation for Fit image to window options
Colin Clark <colin.clark@cclark.uk>
parents:
2662
diff
changeset
|
1969 gtk_widget_set_tooltip_text(GTK_WIDGET(hbox), _("This value will set the virtual size of the window when \"Fit image to window\" is set. Instead of using the actual size of the window, the specified percentage of the window will be used. It allows one to keep a border around the image (values lower than 100%) or to auto zoom the image (values greater than 100%). It affects fullscreen mode too.")); |
9 | 1970 |
1971 group = pref_group_new(vbox, FALSE, _("Appearance"), GTK_ORIENTATION_VERTICAL); | |
1972 | |
1644
2b10e2bee592
the options for custom border color were made independent
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1626
diff
changeset
|
1973 pref_checkbox_new_int(group, _("Use custom border color in window mode"), |
339
4b5f75e97d81
Rename user_specified_window_background and window_background_color
Laurent Monin <geeqie@norz.org>
parents:
338
diff
changeset
|
1974 options->image.use_custom_border_color, &c_options->image.use_custom_border_color); |
2059 | 1975 |
1644
2b10e2bee592
the options for custom border color were made independent
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1626
diff
changeset
|
1976 pref_checkbox_new_int(group, _("Use custom border color in fullscreen mode"), |
2b10e2bee592
the options for custom border color were made independent
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1626
diff
changeset
|
1977 options->image.use_custom_border_color_in_fullscreen, &c_options->image.use_custom_border_color_in_fullscreen); |
208
d74cfaa3d146
set user-defined color as image background - patch by Laurent MONIN
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
199
diff
changeset
|
1978 |
339
4b5f75e97d81
Rename user_specified_window_background and window_background_color
Laurent Monin <geeqie@norz.org>
parents:
338
diff
changeset
|
1979 pref_color_button_new(group, _("Border color"), &options->image.border_color, |
4b5f75e97d81
Rename user_specified_window_background and window_background_color
Laurent Monin <geeqie@norz.org>
parents:
338
diff
changeset
|
1980 G_CALLBACK(pref_color_button_set_cb), &c_options->image.border_color); |
9 | 1981 |
2457
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
1982 c_options->image.border_color = options->image.border_color; |
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
1983 |
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
1984 pref_color_button_new(group, _("Alpha channel color 1"), &options->image.alpha_color_1, |
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
1985 G_CALLBACK(pref_color_button_set_cb), &c_options->image.alpha_color_1); |
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
1986 |
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
1987 pref_color_button_new(group, _("Alpha channel color 2"), &options->image.alpha_color_2, |
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
1988 G_CALLBACK(pref_color_button_set_cb), &c_options->image.alpha_color_2); |
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
1989 |
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
1990 c_options->image.alpha_color_1 = options->image.alpha_color_1; |
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
1991 c_options->image.alpha_color_2 = options->image.alpha_color_2; |
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
1992 |
9 | 1993 group = pref_group_new(vbox, FALSE, _("Convenience"), GTK_ORIENTATION_VERTICAL); |
1994 | |
2066
01d2c966209e
exif autorotate for proofs
Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
parents:
2059
diff
changeset
|
1995 pref_checkbox_new_int(group, _("Auto rotate proofs using Exif information"), |
01d2c966209e
exif autorotate for proofs
Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
parents:
2059
diff
changeset
|
1996 options->image.exif_proof_rotate_enable, &c_options->image.exif_proof_rotate_enable); |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1997 } |
9 | 1998 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1999 /* windows tab */ |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2000 static void config_tab_windows(GtkWidget *notebook) |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2001 { |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2002 GtkWidget *hbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2003 GtkWidget *vbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2004 GtkWidget *group; |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2005 GtkWidget *button; |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2006 GtkWidget *ct_button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2007 GtkWidget *spin; |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2008 GtkWidget *image_overlay_template_view; |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2009 GtkWidget *scrolled; |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2010 GtkTextBuffer *buffer; |
9 | 2011 |
1039
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
2012 vbox = scrolled_notebook_page(notebook, _("Windows")); |
9 | 2013 |
2014 group = pref_group_new(vbox, FALSE, _("State"), GTK_ORIENTATION_VERTICAL); | |
2015 | |
2376
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
2016 ct_button = pref_checkbox_new_int(group, _("Remember window positions"), |
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
2017 options->save_window_positions, &c_options->save_window_positions); |
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
2018 |
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
2019 button = pref_checkbox_new_int(group, _("Use saved window positions also for new windows"), |
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
2020 options->use_saved_window_positions_for_new_windows, &c_options->use_saved_window_positions_for_new_windows); |
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
2021 pref_checkbox_link_sensitivity(ct_button, button); |
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
2022 |
9 | 2023 pref_checkbox_new_int(group, _("Remember tool state (float/hidden)"), |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1400
diff
changeset
|
2024 options->tools_restore_state, &c_options->tools_restore_state); |
9 | 2025 |
2670
ec21b78a088c
Fix #543: Size of dialog windows in the GTK3 version is too small
Colin Clark <colin.clark@cclark.uk>
parents:
2666
diff
changeset
|
2026 pref_checkbox_new_int(group, _("Remember dialog window positions"), |
ec21b78a088c
Fix #543: Size of dialog windows in the GTK3 version is too small
Colin Clark <colin.clark@cclark.uk>
parents:
2666
diff
changeset
|
2027 options->save_dialog_window_positions, &c_options->save_dialog_window_positions); |
ec21b78a088c
Fix #543: Size of dialog windows in the GTK3 version is too small
Colin Clark <colin.clark@cclark.uk>
parents:
2666
diff
changeset
|
2028 |
2740
808983eb036e
Option to display window ID
Colin Clark <colin.clark@cclark.uk>
parents:
2723
diff
changeset
|
2029 pref_checkbox_new_int(group, _("Show window IDs"), |
808983eb036e
Option to display window ID
Colin Clark <colin.clark@cclark.uk>
parents:
2723
diff
changeset
|
2030 options->show_window_ids, &c_options->show_window_ids); |
808983eb036e
Option to display window ID
Colin Clark <colin.clark@cclark.uk>
parents:
2723
diff
changeset
|
2031 |
9 | 2032 group = pref_group_new(vbox, FALSE, _("Size"), GTK_ORIENTATION_VERTICAL); |
2033 | |
2034 pref_checkbox_new_int(group, _("Fit window to image when tools are hidden/floating"), | |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
2035 options->image.fit_window_to_image, &c_options->image.fit_window_to_image); |
9 | 2036 |
2037 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE); | |
2038 ct_button = pref_checkbox_new_int(hbox, _("Limit size when auto-sizing window (%):"), | |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
2039 options->image.limit_window_size, &c_options->image.limit_window_size); |
9 | 2040 spin = pref_spin_new_int(hbox, NULL, NULL, |
2041 10, 150, 1, | |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
2042 options->image.max_window_size, &c_options->image.max_window_size); |
9 | 2043 pref_checkbox_link_sensitivity(ct_button, spin); |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2044 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2045 group = pref_group_new(vbox, FALSE, _("Full screen"), GTK_ORIENTATION_VERTICAL); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2046 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2047 c_options->fullscreen.screen = options->fullscreen.screen; |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2048 c_options->fullscreen.above = options->fullscreen.above; |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2049 hbox = fullscreen_prefs_selection_new(_("Location:"), &c_options->fullscreen.screen, &c_options->fullscreen.above); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2050 gtk_box_pack_start(GTK_BOX(group), hbox, FALSE, FALSE, 0); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2051 gtk_widget_show(hbox); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2052 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2053 pref_checkbox_new_int(group, _("Smooth image flip"), |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2054 options->fullscreen.clean_flip, &c_options->fullscreen.clean_flip); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2055 pref_checkbox_new_int(group, _("Disable screen saver"), |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2056 options->fullscreen.disable_saver, &c_options->fullscreen.disable_saver); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2057 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2058 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2059 group = pref_group_new(vbox, FALSE, _("Overlay Screen Display"), GTK_ORIENTATION_VERTICAL); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2060 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2061 pref_label_new(group, _("Image overlay template")); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2062 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2063 scrolled = gtk_scrolled_window_new(NULL, NULL); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2064 gtk_widget_set_size_request(scrolled, 200, 150); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2065 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled), GTK_SHADOW_IN); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2066 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2067 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2068 gtk_box_pack_start(GTK_BOX(group), scrolled, TRUE, TRUE, 5); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2069 gtk_widget_show(scrolled); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2070 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2071 image_overlay_template_view = gtk_text_view_new(); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2072 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2073 gtk_widget_set_tooltip_markup(image_overlay_template_view, |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2074 _("<i>%name%</i> results in the filename of the picture.\n" |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2075 "Also available: <i>%collection%</i>, <i>%number%</i>, <i>%total%</i>, <i>%date%</i>,\n" |
2721
bd779e9f82fc
Ref #584: There is no way to show the rating of an image
Colin Clark <colin.clark@cclark.uk>
parents:
2673
diff
changeset
|
2076 "<i>%size%</i> (filesize), <i>%width%</i>, <i>%height%</i>, <i>%res%</i> (resolution),\n" |
bd779e9f82fc
Ref #584: There is no way to show the rating of an image
Colin Clark <colin.clark@cclark.uk>
parents:
2673
diff
changeset
|
2077 "<i>%rating%</i>, <i>%keywords%</i>, <i>%comment%</i> (XMP), <i>%imagecomment%</i> (JPEG)\n" |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2078 "To access exif data use the exif name, e. g. <i>%formatted.Camera%</i> is the formatted camera name,\n" |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2079 "<i>%Exif.Photo.DateTimeOriginal%</i> the date of the original shot.\n" |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2080 "<i>%formatted.Camera:20</i> notation will truncate the displayed data to 20 characters and will add 3 dots at the end to denote the truncation.\n" |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2081 "If two or more variables are connected with the |-sign, it prints available variables with a separator.\n" |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2082 "<i>%formatted.ShutterSpeed%</i>|<i>%formatted.ISOSpeedRating%</i>|<i>%formatted.FocalLength%</i> could show \"1/20s - 400 - 80 mm\" or \"1/200 - 80 mm\",\n" |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2083 "if there's no ISO information in the Exif data.\n" |
2052
80e7f49e008f
Typo fix: s/allows to/allows one to/
Andreas Metzler <ametzler@downhill.at.eu.org>
parents:
2049
diff
changeset
|
2084 "If a line is empty, it is removed. This allows one to add lines that totally disappear when no data is available.\n" |
2095
e4aa52cbbecb
dropped support for gtk < 2.20
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2084
diff
changeset
|
2085 )); |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2086 gtk_container_add(GTK_CONTAINER(scrolled), image_overlay_template_view); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2087 gtk_widget_show(image_overlay_template_view); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2088 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2089 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_BUTTON_GAP); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2090 |
2337
7ff7000c458c
Image overlay configurable items
Colin Clark <cclark@mcb.net>
parents:
2335
diff
changeset
|
2091 #if GTK_CHECK_VERSION(3,4,0) |
2334
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
2092 button = pref_button_new(NULL, GTK_STOCK_SELECT_FONT, _("Font"), FALSE, |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
2093 G_CALLBACK(image_overlay_set_font_cb), notebook); |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
2094 #else |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
2095 button = gtk_font_button_new(); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
2096 gtk_font_button_set_title(GTK_FONT_BUTTON(button), "Image Overlay Font"); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
2097 gtk_font_button_set_font_name(GTK_FONT_BUTTON(button), options->image_overlay.font); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
2098 g_signal_connect(G_OBJECT(button), "font-set", |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
2099 G_CALLBACK(image_overlay_set_font_cb),NULL); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
2100 #endif |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
2101 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
2334
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
2102 gtk_widget_show(button); |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
2103 |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
2104 button = pref_button_new(NULL, GTK_STOCK_COLOR_PICKER, _("Text"), FALSE, |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
2105 G_CALLBACK(image_overlay_set_text_colour_cb), NULL); |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
2106 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
2107 gtk_widget_show(button); |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
2108 |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
2109 button = pref_button_new(NULL, GTK_STOCK_COLOR_PICKER, _("Background"), FALSE, |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
2110 G_CALLBACK(image_overlay_set_background_colour_cb), NULL); |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
2111 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
2112 gtk_widget_show(button); |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
2113 image_overlay_set_text_colours(); |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
2114 |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2115 button = pref_button_new(NULL, NULL, _("Defaults"), FALSE, |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2116 G_CALLBACK(image_overlay_default_template_cb), image_overlay_template_view); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2117 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2118 gtk_widget_show(button); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2119 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2120 button = pref_button_new(NULL, GTK_STOCK_HELP, NULL, FALSE, |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2121 G_CALLBACK(image_overlay_help_cb), NULL); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2122 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2123 gtk_widget_show(button); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2124 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2125 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(image_overlay_template_view)); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2126 if (options->image_overlay.template_string) gtk_text_buffer_set_text(buffer, options->image_overlay.template_string, -1); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2127 g_signal_connect(G_OBJECT(buffer), "changed", |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2128 G_CALLBACK(image_overlay_template_view_changed_cb), image_overlay_template_view); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2129 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2130 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2131 } |
9 | 2132 |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2133 static GtkTreeModel *create_class_model(void) |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2134 { |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2135 GtkListStore *model; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2136 GtkTreeIter iter; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2137 gint i; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2138 |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2139 /* create list store */ |
1346
b3378273091e
No space between function name and first parenthesis, it eases greping (see CODING).
Laurent Monin <geeqie@norz.org>
parents:
1336
diff
changeset
|
2140 model = gtk_list_store_new(1, G_TYPE_STRING); |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2141 for (i = 0; i < FILE_FORMAT_CLASSES; i++) |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2142 { |
1346
b3378273091e
No space between function name and first parenthesis, it eases greping (see CODING).
Laurent Monin <geeqie@norz.org>
parents:
1336
diff
changeset
|
2143 gtk_list_store_append(model, &iter); |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2144 gtk_list_store_set(model, &iter, 0, _(format_class_list[i]), -1); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2145 } |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2146 return GTK_TREE_MODEL (model); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2147 } |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2148 |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2149 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2150 /* filtering tab */ |
1522
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
2151 static void config_tab_files(GtkWidget *notebook) |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2152 { |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2153 GtkWidget *hbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2154 GtkWidget *frame; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2155 GtkWidget *vbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2156 GtkWidget *group; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2157 GtkWidget *button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2158 GtkWidget *ct_button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2159 GtkWidget *scrolled; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2160 GtkWidget *filter_view; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2161 GtkCellRenderer *renderer; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2162 GtkTreeSelection *selection; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2163 GtkTreeViewColumn *column; |
9 | 2164 |
1522
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
2165 vbox = scrolled_notebook_page(notebook, _("Files")); |
9 | 2166 |
2167 group = pref_box_new(vbox, FALSE, GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP); | |
2168 | |
356
ba4edae270d6
Rename show_dot_files to show_hidden_files.
Laurent Monin <geeqie@norz.org>
parents:
354
diff
changeset
|
2169 pref_checkbox_new_int(group, _("Show hidden files or folders"), |
ba4edae270d6
Rename show_dot_files to show_hidden_files.
Laurent Monin <geeqie@norz.org>
parents:
354
diff
changeset
|
2170 options->file_filter.show_hidden_files, &c_options->file_filter.show_hidden_files); |
2265
15d51cf8ff3d
Allow to choose to show parent folder
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2255
diff
changeset
|
2171 pref_checkbox_new_int(group, _("Show parent folder (..)"), |
15d51cf8ff3d
Allow to choose to show parent folder
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2255
diff
changeset
|
2172 options->file_filter.show_parent_directory, &c_options->file_filter.show_parent_directory); |
9 | 2173 pref_checkbox_new_int(group, _("Case sensitive sort"), |
329
056872a2bdf7
Rename file sorting options.
Laurent Monin <geeqie@norz.org>
parents:
327
diff
changeset
|
2174 options->file_sort.case_sensitive, &c_options->file_sort.case_sensitive); |
2406 | 2175 pref_checkbox_new_int(group, _("Natural sort order"), |
2176 options->file_sort.natural, &c_options->file_sort.natural); | |
2301
dec8d9db5770
Fix #333 Renaming file extensions
Colin Clark <cclark@mcb.net>
parents:
2265
diff
changeset
|
2177 pref_checkbox_new_int(group, _("Disable file extension checks"), |
dec8d9db5770
Fix #333 Renaming file extensions
Colin Clark <cclark@mcb.net>
parents:
2265
diff
changeset
|
2178 options->file_filter.disable_file_extension_checks, &c_options->file_filter.disable_file_extension_checks); |
9 | 2179 |
2180 ct_button = pref_checkbox_new_int(group, _("Disable File Filtering"), | |
332
e0907717f749
Rename file filtering options.
Laurent Monin <geeqie@norz.org>
parents:
330
diff
changeset
|
2181 options->file_filter.disable, &c_options->file_filter.disable); |
9 | 2182 |
170
34d0013592f5
basic sidecar files configuration via preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
134
diff
changeset
|
2183 |
34d0013592f5
basic sidecar files configuration via preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
134
diff
changeset
|
2184 group = pref_group_new(vbox, FALSE, _("Grouping sidecar extensions"), GTK_ORIENTATION_VERTICAL); |
34d0013592f5
basic sidecar files configuration via preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
134
diff
changeset
|
2185 |
34d0013592f5
basic sidecar files configuration via preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
134
diff
changeset
|
2186 sidecar_ext_entry = gtk_entry_new(); |
1229
2f11fec715ca
sidecar files grouping was made case-insensitive
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1216
diff
changeset
|
2187 gtk_entry_set_text(GTK_ENTRY(sidecar_ext_entry), options->sidecar.ext); |
170
34d0013592f5
basic sidecar files configuration via preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
134
diff
changeset
|
2188 gtk_box_pack_start(GTK_BOX(group), sidecar_ext_entry, FALSE, FALSE, 0); |
34d0013592f5
basic sidecar files configuration via preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
134
diff
changeset
|
2189 gtk_widget_show(sidecar_ext_entry); |
34d0013592f5
basic sidecar files configuration via preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
134
diff
changeset
|
2190 |
9 | 2191 group = pref_group_new(vbox, TRUE, _("File types"), GTK_ORIENTATION_VERTICAL); |
2192 | |
2193 frame = pref_group_parent(group); | |
2194 g_signal_connect(G_OBJECT(ct_button), "toggled", | |
2195 G_CALLBACK(filter_disable_cb), frame); | |
332
e0907717f749
Rename file filtering options.
Laurent Monin <geeqie@norz.org>
parents:
330
diff
changeset
|
2196 gtk_widget_set_sensitive(frame, !options->file_filter.disable); |
9 | 2197 |
2198 scrolled = gtk_scrolled_window_new(NULL, NULL); | |
2199 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled), GTK_SHADOW_IN); | |
513
6743a5928e09
Remove whitespace between function name and first parenthesis for the sake of consistency. (pass 2)
Laurent Monin <geeqie@norz.org>
parents:
512
diff
changeset
|
2200 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); |
9 | 2201 gtk_box_pack_start(GTK_BOX(group), scrolled, TRUE, TRUE, 0); |
2202 gtk_widget_show(scrolled); | |
2203 | |
2204 filter_store = gtk_list_store_new(1, G_TYPE_POINTER); | |
2205 filter_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(filter_store)); | |
2206 g_object_unref(filter_store); | |
2207 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(filter_view)); | |
2208 gtk_tree_selection_set_mode(GTK_TREE_SELECTION(selection), GTK_SELECTION_SINGLE); | |
2209 | |
2210 gtk_tree_view_set_enable_search(GTK_TREE_VIEW(filter_view), FALSE); | |
2211 | |
2212 column = gtk_tree_view_column_new(); | |
2213 gtk_tree_view_column_set_title(column, _("Filter")); | |
2214 gtk_tree_view_column_set_resizable(column, TRUE); | |
2215 | |
2216 renderer = gtk_cell_renderer_toggle_new(); | |
2217 g_signal_connect(G_OBJECT(renderer), "toggled", | |
2218 G_CALLBACK(filter_store_enable_cb), filter_store); | |
2219 gtk_tree_view_column_pack_start(column, renderer, FALSE); | |
2220 gtk_tree_view_column_set_cell_data_func(column, renderer, filter_set_func, | |
2221 GINT_TO_POINTER(FE_ENABLE), NULL); | |
442 | 2222 |
9 | 2223 renderer = gtk_cell_renderer_text_new(); |
2224 g_signal_connect(G_OBJECT(renderer), "edited", | |
2225 G_CALLBACK(filter_store_ext_edit_cb), filter_store); | |
2226 gtk_tree_view_column_pack_start(column, renderer, TRUE); | |
2227 g_object_set(G_OBJECT(renderer), "editable", (gboolean)TRUE, NULL); | |
2228 gtk_tree_view_column_set_cell_data_func(column, renderer, filter_set_func, | |
2229 GINT_TO_POINTER(FE_EXTENSION), NULL); | |
2230 gtk_tree_view_append_column(GTK_TREE_VIEW(filter_view), column); | |
2231 | |
2232 column = gtk_tree_view_column_new(); | |
2233 gtk_tree_view_column_set_title(column, _("Description")); | |
2234 gtk_tree_view_column_set_resizable(column, TRUE); | |
2056
f59b27312a31
Set fixed (but resizeable) width for Description column in Preferences > Files table
Laurent Monin <geeqie@norz.org>
parents:
2052
diff
changeset
|
2235 gtk_tree_view_column_set_fixed_width(column, 200); |
f59b27312a31
Set fixed (but resizeable) width for Description column in Preferences > Files table
Laurent Monin <geeqie@norz.org>
parents:
2052
diff
changeset
|
2236 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); |
2059 | 2237 |
9 | 2238 renderer = gtk_cell_renderer_text_new(); |
2239 g_signal_connect(G_OBJECT(renderer), "edited", | |
2240 G_CALLBACK(filter_store_desc_edit_cb), filter_store); | |
2241 g_object_set(G_OBJECT(renderer), "editable", (gboolean)TRUE, NULL); | |
2242 gtk_tree_view_column_pack_start(column, renderer, FALSE); | |
2243 gtk_tree_view_column_set_cell_data_func(column, renderer, filter_set_func, | |
2244 GINT_TO_POINTER(FE_DESCRIPTION), NULL); | |
2245 gtk_tree_view_append_column(GTK_TREE_VIEW(filter_view), column); | |
2246 | |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2247 column = gtk_tree_view_column_new(); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2248 gtk_tree_view_column_set_title(column, _("Class")); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2249 gtk_tree_view_column_set_resizable(column, TRUE); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2250 renderer = gtk_cell_renderer_combo_new(); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2251 g_object_set(G_OBJECT(renderer), "editable", (gboolean)TRUE, |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2252 "model", create_class_model(), |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2253 "text-column", 0, |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2254 "has-entry", FALSE, |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2255 NULL); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2256 |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2257 g_signal_connect(G_OBJECT(renderer), "edited", |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2258 G_CALLBACK(filter_store_class_edit_cb), filter_store); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2259 gtk_tree_view_column_pack_start(column, renderer, TRUE); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2260 gtk_tree_view_column_set_cell_data_func(column, renderer, filter_set_func, |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2261 GINT_TO_POINTER(FE_CLASS), NULL); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2262 gtk_tree_view_append_column(GTK_TREE_VIEW(filter_view), column); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2263 |
1239
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
2264 column = gtk_tree_view_column_new(); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
2265 gtk_tree_view_column_set_title(column, _("Writable")); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
2266 gtk_tree_view_column_set_resizable(column, FALSE); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
2267 renderer = gtk_cell_renderer_toggle_new(); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
2268 g_signal_connect(G_OBJECT(renderer), "toggled", |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
2269 G_CALLBACK(filter_store_writable_cb), filter_store); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
2270 gtk_tree_view_column_pack_start(column, renderer, FALSE); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
2271 gtk_tree_view_column_set_cell_data_func(column, renderer, filter_set_func, |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
2272 GINT_TO_POINTER(FE_WRITABLE), NULL); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
2273 gtk_tree_view_append_column(GTK_TREE_VIEW(filter_view), column); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
2274 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
2275 column = gtk_tree_view_column_new(); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
2276 gtk_tree_view_column_set_title(column, _("Sidecar is allowed")); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
2277 gtk_tree_view_column_set_resizable(column, FALSE); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
2278 renderer = gtk_cell_renderer_toggle_new(); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
2279 g_signal_connect(G_OBJECT(renderer), "toggled", |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
2280 G_CALLBACK(filter_store_sidecar_cb), filter_store); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
2281 gtk_tree_view_column_pack_start(column, renderer, FALSE); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
2282 gtk_tree_view_column_set_cell_data_func(column, renderer, filter_set_func, |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
2283 GINT_TO_POINTER(FE_ALLOW_SIDECAR), NULL); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
2284 gtk_tree_view_append_column(GTK_TREE_VIEW(filter_view), column); |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2285 |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2286 |
9 | 2287 filter_store_populate(); |
2288 gtk_container_add(GTK_CONTAINER(scrolled), filter_view); | |
2289 gtk_widget_show(filter_view); | |
2290 | |
2291 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_BUTTON_GAP); | |
2292 | |
2293 button = pref_button_new(NULL, NULL, _("Defaults"), FALSE, | |
2058
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
2294 G_CALLBACK(filter_default_cb), filter_view); |
9 | 2295 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
2296 gtk_widget_show(button); | |
2297 | |
2298 button = pref_button_new(NULL, GTK_STOCK_REMOVE, NULL, FALSE, | |
2299 G_CALLBACK(filter_remove_cb), filter_view); | |
2300 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | |
2301 gtk_widget_show(button); | |
2302 | |
2303 button = pref_button_new(NULL, GTK_STOCK_ADD, NULL, FALSE, | |
2058
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
2304 G_CALLBACK(filter_add_cb), filter_view); |
9 | 2305 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
2306 gtk_widget_show(button); | |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2307 } |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2308 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2309 /* metadata tab */ |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2310 static void config_tab_metadata(GtkWidget *notebook) |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2311 { |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2312 GtkWidget *vbox; |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2313 GtkWidget *hbox; |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2314 GtkWidget *group; |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2315 GtkWidget *ct_button; |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2316 GtkWidget *label; |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2317 gchar *text; |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2318 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2319 vbox = scrolled_notebook_page(notebook, _("Metadata")); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2320 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2321 |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2322 group = pref_group_new(vbox, FALSE, _("Metadata writing process"), GTK_ORIENTATION_VERTICAL); |
1686
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2323 #ifndef HAVE_EXIV2 |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2324 label = pref_label_new(group, _("Warning: Geeqie is built without Exiv2. Some options are disabled.")); |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2325 #endif |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2326 label = pref_label_new(group, _("Metadata are written in the following order. The process ends after first success.")); |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2327 gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2328 |
2495
33571d08bc37
Fix #446: Minor text updates
Colin Clark <colin.clark@cclark.uk>
parents:
2482
diff
changeset
|
2329 ct_button = pref_checkbox_new_int(group, _("1) Save metadata in image files, or sidecar files, according to the XMP standard"), |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2330 options->metadata.save_in_image_file, &c_options->metadata.save_in_image_file); |
1686
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2331 #ifndef HAVE_EXIV2 |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2332 gtk_widget_set_sensitive(ct_button, FALSE); |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2333 #endif |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2334 |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2335 pref_checkbox_new_int(group, _("2) Save metadata in '.metadata' folder, local to image folder (non-standard)"), |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2336 options->metadata.enable_metadata_dirs, &c_options->metadata.enable_metadata_dirs); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2337 |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2338 text = g_strdup_printf(_("3) Save metadata in Geeqie private directory '%s'"), get_metadata_cache_dir()); |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2339 label = pref_label_new(group, text); |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2340 gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); |
2057
9d8b56fde03c
Align "3) Save metadata in Geeqie private directory" with previous entries.
Laurent Monin <geeqie@norz.org>
parents:
2056
diff
changeset
|
2341 gtk_misc_set_padding(GTK_MISC(label), 22, 0); |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2342 g_free(text); |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2343 |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2344 group = pref_group_new(vbox, FALSE, _("Step 1: Write to image files"), GTK_ORIENTATION_VERTICAL); |
1686
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2345 #ifndef HAVE_EXIV2 |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2346 gtk_widget_set_sensitive(group, FALSE); |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2347 #endif |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2348 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2349 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_VERTICAL, PREF_PAD_SPACE); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2350 pref_checkbox_link_sensitivity(ct_button, hbox); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2351 |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2352 pref_checkbox_new_int(hbox, _("Store metadata also in legacy IPTC tags (converted according to IPTC4XMP standard)"), |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2353 options->metadata.save_legacy_IPTC, &c_options->metadata.save_legacy_IPTC); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2354 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2355 pref_checkbox_new_int(hbox, _("Warn if the image files are unwritable"), |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2356 options->metadata.warn_on_write_problems, &c_options->metadata.warn_on_write_problems); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2357 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2358 pref_checkbox_new_int(hbox, _("Ask before writing to image files"), |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2359 options->metadata.confirm_write, &c_options->metadata.confirm_write); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2360 |
2454
93d1c77a312b
Fix #147: Alternative format for sidecar extension
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2444
diff
changeset
|
2361 pref_checkbox_new_int(hbox, _("Create sidecar files named image.ext.xmp (as opposed to image.xmp)"), |
93d1c77a312b
Fix #147: Alternative format for sidecar extension
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2444
diff
changeset
|
2362 options->metadata.sidecar_extended_name, &c_options->metadata.sidecar_extended_name); |
93d1c77a312b
Fix #147: Alternative format for sidecar extension
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2444
diff
changeset
|
2363 |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2364 group = pref_group_new(vbox, FALSE, _("Step 2 and 3: write to Geeqie private files"), GTK_ORIENTATION_VERTICAL); |
1686
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2365 #ifndef HAVE_EXIV2 |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2366 gtk_widget_set_sensitive(group, FALSE); |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2367 #endif |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2368 |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2369 pref_checkbox_new_int(group, _("Use GQview legacy metadata format (supports only keywords and comments) instead of XMP"), |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2370 options->metadata.save_legacy_format, &c_options->metadata.save_legacy_format); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2371 |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2372 |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2373 group = pref_group_new(vbox, FALSE, _("Miscellaneous"), GTK_ORIENTATION_VERTICAL); |
1663
c39c4ee5d94c
improved description string
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1644
diff
changeset
|
2374 pref_checkbox_new_int(group, _("Write the same description tags (keywords, comment, etc.) to all grouped sidecars"), |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2375 options->metadata.sync_grouped_files, &c_options->metadata.sync_grouped_files); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2376 |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2377 pref_checkbox_new_int(group, _("Allow keywords to differ only in case"), |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2378 options->metadata.keywords_case_sensitive, &c_options->metadata.keywords_case_sensitive); |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2379 |
1686
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2380 ct_button = pref_checkbox_new_int(group, _("Write altered image orientation to the metadata"), |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2381 options->metadata.write_orientation, &c_options->metadata.write_orientation); |
1686
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2382 #ifndef HAVE_EXIV2 |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2383 gtk_widget_set_sensitive(ct_button, FALSE); |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2384 #endif |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2385 |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2386 group = pref_group_new(vbox, FALSE, _("Auto-save options"), GTK_ORIENTATION_VERTICAL); |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2387 |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2388 ct_button = pref_checkbox_new_int(group, _("Write metadata after timeout"), |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2389 options->metadata.confirm_after_timeout, &c_options->metadata.confirm_after_timeout); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2390 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2391 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2392 pref_checkbox_link_sensitivity(ct_button, hbox); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2393 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2394 pref_spin_new_int(hbox, _("Timeout (seconds):"), NULL, 0, 900, 1, |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2395 options->metadata.confirm_timeout, &c_options->metadata.confirm_timeout); |
2059 | 2396 |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2397 pref_checkbox_new_int(group, _("Write metadata on image change"), |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2398 options->metadata.confirm_on_image_change, &c_options->metadata.confirm_on_image_change); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2399 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2400 pref_checkbox_new_int(group, _("Write metadata on directory change"), |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2401 options->metadata.confirm_on_dir_change, &c_options->metadata.confirm_on_dir_change); |
2770
2e819f4a7a41
Read metadata in the idle loop
Colin Clark <colin.clark@cclark.uk>
parents:
2769
diff
changeset
|
2402 |
2e819f4a7a41
Read metadata in the idle loop
Colin Clark <colin.clark@cclark.uk>
parents:
2769
diff
changeset
|
2403 group = pref_group_new(vbox, FALSE, _("Pre-load metadata"), GTK_ORIENTATION_VERTICAL); |
2e819f4a7a41
Read metadata in the idle loop
Colin Clark <colin.clark@cclark.uk>
parents:
2769
diff
changeset
|
2404 |
2e819f4a7a41
Read metadata in the idle loop
Colin Clark <colin.clark@cclark.uk>
parents:
2769
diff
changeset
|
2405 ct_button = pref_checkbox_new_int(group, _("Read metadata in background"), |
2e819f4a7a41
Read metadata in the idle loop
Colin Clark <colin.clark@cclark.uk>
parents:
2769
diff
changeset
|
2406 options->read_metadata_in_idle, &c_options->read_metadata_in_idle); |
2e819f4a7a41
Read metadata in the idle loop
Colin Clark <colin.clark@cclark.uk>
parents:
2769
diff
changeset
|
2407 gtk_widget_set_tooltip_text(ct_button,"On folder change, read DateTimeOriginal, DateTimeDigitized and Star Rating in the idle loop.\nIf this is not selected, initial loading of the folder will be faster but sorting on these items will be slower"); |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2408 } |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2409 |
2824
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2410 /* keywords tab */ |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2411 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2412 typedef struct _KeywordFindData KeywordFindData; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2413 struct _KeywordFindData |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2414 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2415 GenericDialog *gd; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2416 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2417 GList *list; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2418 GList *list_dir; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2419 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2420 GtkWidget *button_close; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2421 GtkWidget *button_stop; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2422 GtkWidget *button_start; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2423 GtkWidget *progress; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2424 GtkWidget *spinner; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2425 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2426 GtkWidget *group; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2427 GtkWidget *entry; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2428 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2429 gboolean recurse; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2430 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2431 guint idle_id; /* event source id */ |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2432 }; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2433 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2434 #define KEYWORD_DIALOG_WIDTH 400 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2435 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2436 static void keywords_find_folder(KeywordFindData *kfd, FileData *dir_fd) |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2437 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2438 GList *list_d = NULL; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2439 GList *list_f = NULL; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2440 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2441 if (kfd->recurse) |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2442 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2443 filelist_read(dir_fd, &list_f, &list_d); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2444 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2445 else |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2446 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2447 filelist_read(dir_fd, &list_f, NULL); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2448 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2449 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2450 list_f = filelist_filter(list_f, FALSE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2451 list_d = filelist_filter(list_d, TRUE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2452 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2453 kfd->list = g_list_concat(list_f, kfd->list); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2454 kfd->list_dir = g_list_concat(list_d, kfd->list_dir); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2455 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2456 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2457 static void keywords_find_reset(KeywordFindData *kfd) |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2458 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2459 filelist_free(kfd->list); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2460 kfd->list = NULL; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2461 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2462 filelist_free(kfd->list_dir); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2463 kfd->list_dir = NULL; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2464 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2465 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2466 static void keywords_find_close_cb(GenericDialog *fd, gpointer data) |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2467 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2468 KeywordFindData *kfd = data; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2469 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2470 if (!gtk_widget_get_sensitive(kfd->button_close)) return; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2471 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2472 keywords_find_reset(kfd); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2473 generic_dialog_close(kfd->gd); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2474 g_free(kfd); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2475 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2476 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2477 static void keywords_find_finish(KeywordFindData *kfd) |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2478 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2479 keywords_find_reset(kfd); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2480 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2481 gtk_entry_set_text(GTK_ENTRY(kfd->progress), _("done")); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2482 spinner_set_interval(kfd->spinner, -1); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2483 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2484 gtk_widget_set_sensitive(kfd->group, TRUE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2485 gtk_widget_set_sensitive(kfd->button_start, TRUE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2486 gtk_widget_set_sensitive(kfd->button_stop, FALSE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2487 gtk_widget_set_sensitive(kfd->button_close, TRUE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2488 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2489 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2490 static void keywords_find_stop_cb(GenericDialog *fd, gpointer data) |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2491 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2492 KeywordFindData *kfd = data; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2493 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2494 g_idle_remove_by_data(kfd); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2495 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2496 keywords_find_finish(kfd); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2497 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2498 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2499 static gboolean keywords_find_file(gpointer data) |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2500 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2501 KeywordFindData *kfd = data; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2502 GtkTextIter iter; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2503 GtkTextBuffer *buffer; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2504 gchar *tmp; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2505 GList *keywords; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2506 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2507 if (kfd->list) |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2508 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2509 FileData *fd; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2510 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2511 fd = kfd->list->data; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2512 kfd->list = g_list_remove(kfd->list, fd); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2513 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2514 keywords = metadata_read_list(fd, KEYWORD_KEY, METADATA_PLAIN); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2515 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(keyword_text)); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2516 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2517 while (keywords) |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2518 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2519 gtk_text_buffer_get_end_iter(buffer, &iter); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2520 tmp = g_strconcat(keywords->data, "\n", NULL); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2521 gtk_text_buffer_insert(buffer, &iter, tmp, -1); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2522 g_free(tmp); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2523 keywords = keywords->next; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2524 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2525 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2526 gtk_entry_set_text(GTK_ENTRY(kfd->progress), fd->path); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2527 file_data_unref(fd); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2528 string_list_free(keywords); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2529 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2530 return (TRUE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2531 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2532 else if (kfd->list_dir) |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2533 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2534 FileData *fd; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2535 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2536 fd = kfd->list_dir->data; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2537 kfd->list_dir = g_list_remove(kfd->list_dir, fd); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2538 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2539 keywords_find_folder(kfd, fd); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2540 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2541 file_data_unref(fd); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2542 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2543 return TRUE; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2544 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2545 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2546 keywords_find_finish(kfd); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2547 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2548 return FALSE; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2549 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2550 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2551 static void keywords_find_start_cb(GenericDialog *fd, gpointer data) |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2552 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2553 KeywordFindData *kfd = data; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2554 gchar *path; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2555 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2556 if (kfd->list || !gtk_widget_get_sensitive(kfd->button_start)) return; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2557 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2558 path = remove_trailing_slash((gtk_entry_get_text(GTK_ENTRY(kfd->entry)))); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2559 parse_out_relatives(path); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2560 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2561 if (!isdir(path)) |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2562 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2563 warning_dialog(_("Invalid folder"), |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2564 _("The specified folder can not be found."), |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2565 GTK_STOCK_DIALOG_WARNING, kfd->gd->dialog); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2566 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2567 else |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2568 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2569 FileData *dir_fd; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2570 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2571 gtk_widget_set_sensitive(kfd->group, FALSE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2572 gtk_widget_set_sensitive(kfd->button_start, FALSE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2573 gtk_widget_set_sensitive(kfd->button_stop, TRUE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2574 gtk_widget_set_sensitive(kfd->button_close, FALSE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2575 spinner_set_interval(kfd->spinner, SPINNER_SPEED); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2576 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2577 dir_fd = file_data_new_dir(path); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2578 keywords_find_folder(kfd, dir_fd); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2579 file_data_unref(dir_fd); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2580 kfd->idle_id = g_idle_add(keywords_find_file, kfd); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2581 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2582 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2583 g_free(path); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2584 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2585 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2586 static void keywords_find_dialog(GtkWidget *widget, const gchar *path) |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2587 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2588 KeywordFindData *kfd; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2589 GtkWidget *hbox; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2590 GtkWidget *label; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2591 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2592 kfd = g_new0(KeywordFindData, 1); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2593 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2594 kfd->gd = generic_dialog_new(_("Search for keywords"), |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2595 "search_for_keywords", |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2596 widget, FALSE, |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2597 NULL, kfd); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2598 gtk_window_set_default_size(GTK_WINDOW(kfd->gd->dialog), KEYWORD_DIALOG_WIDTH, -1); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2599 kfd->gd->cancel_cb = keywords_find_close_cb; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2600 kfd->button_close = generic_dialog_add_button(kfd->gd, GTK_STOCK_CLOSE, NULL, |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2601 keywords_find_close_cb, FALSE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2602 kfd->button_start = generic_dialog_add_button(kfd->gd, GTK_STOCK_OK, _("S_tart"), |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2603 keywords_find_start_cb, FALSE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2604 kfd->button_stop = generic_dialog_add_button(kfd->gd, GTK_STOCK_STOP, NULL, |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2605 keywords_find_stop_cb, FALSE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2606 gtk_widget_set_sensitive(kfd->button_stop, FALSE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2607 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2608 generic_dialog_add_message(kfd->gd, NULL, _("Search for keywords"), NULL, FALSE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2609 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2610 hbox = pref_box_new(kfd->gd->vbox, FALSE, GTK_ORIENTATION_HORIZONTAL, 0); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2611 pref_spacer(hbox, PREF_PAD_INDENT); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2612 kfd->group = pref_box_new(hbox, TRUE, GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2613 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2614 hbox = pref_box_new(kfd->group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2615 pref_label_new(hbox, _("Folder:")); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2616 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2617 label = tab_completion_new(&kfd->entry, path, NULL, NULL, NULL, NULL); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2618 tab_completion_add_select_button(kfd->entry,_("Select folder") , TRUE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2619 gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2620 gtk_widget_show(label); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2621 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2622 pref_checkbox_new_int(kfd->group, _("Include subfolders"), FALSE, &kfd->recurse); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2623 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2624 pref_line(kfd->gd->vbox, PREF_PAD_SPACE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2625 hbox = pref_box_new(kfd->gd->vbox, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2626 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2627 kfd->progress = gtk_entry_new(); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2628 gtk_widget_set_can_focus(kfd->progress, FALSE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2629 gtk_editable_set_editable(GTK_EDITABLE(kfd->progress), FALSE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2630 gtk_entry_set_text(GTK_ENTRY(kfd->progress), _("click start to begin")); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2631 gtk_box_pack_start(GTK_BOX(hbox), kfd->progress, TRUE, TRUE, 0); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2632 gtk_widget_show(kfd->progress); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2633 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2634 kfd->spinner = spinner_new(NULL, -1); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2635 gtk_box_pack_start(GTK_BOX(hbox), kfd->spinner, FALSE, FALSE, 0); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2636 gtk_widget_show(kfd->spinner); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2637 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2638 kfd->list = NULL; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2639 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2640 gtk_widget_show(kfd->gd->dialog); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2641 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2642 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2643 static void keywords_find_cb(GtkWidget *widget, gpointer data) |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2644 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2645 const gchar *path = layout_get_path(NULL); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2646 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2647 if (!path || !*path) path = homedir(); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2648 keywords_find_dialog(widget, path); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2649 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2650 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2651 static void config_tab_keywords_save() |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2652 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2653 GtkTextIter start, end; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2654 GtkTextBuffer *buffer; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2655 GList *kw_list = NULL; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2656 GList *work; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2657 gchar *buffer_text; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2658 gchar *kw_split; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2659 gboolean found; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2660 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2661 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(keyword_text)); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2662 gtk_text_buffer_get_bounds(buffer, &start, &end); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2663 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2664 buffer_text = gtk_text_buffer_get_text(buffer, &start, &end, FALSE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2665 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2666 kw_split = strtok(buffer_text, "\n"); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2667 while (kw_split != NULL) |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2668 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2669 work = kw_list; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2670 found = FALSE; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2671 while (work) |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2672 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2673 if (g_strcmp0(work->data, kw_split) == 0) |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2674 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2675 found = TRUE; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2676 break; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2677 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2678 work = work->next; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2679 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2680 if (!found) |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2681 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2682 kw_list = g_list_append(kw_list, g_strdup(kw_split)); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2683 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2684 kw_split = strtok(NULL, "\n"); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2685 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2686 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2687 keyword_list_set(kw_list); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2688 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2689 string_list_free(kw_list); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2690 g_free(buffer_text); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2691 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2692 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2693 static void config_tab_keywords(GtkWidget *notebook) |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2694 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2695 GtkWidget *hbox; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2696 GtkWidget *vbox; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2697 GtkWidget *group; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2698 GtkWidget *button; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2699 GtkWidget *scrolled; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2700 GtkTextIter iter; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2701 GtkTextBuffer *buffer; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2702 gchar *tmp; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2703 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2704 vbox = scrolled_notebook_page(notebook, _("Keywords")); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2705 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2706 group = pref_group_new(vbox, TRUE, _("Edit keywords autocompletion list"), GTK_ORIENTATION_VERTICAL); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2707 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2708 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_BUTTON_GAP); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2709 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2710 button = pref_button_new(hbox, GTK_STOCK_EXECUTE, _("Search"), FALSE, |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2711 G_CALLBACK(keywords_find_cb), keyword_text); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2712 gtk_widget_set_tooltip_text(button, "Search for existing keywords"); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2713 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2714 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2715 keyword_text = gtk_text_view_new(); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2716 gtk_widget_set_size_request(keyword_text, 20, 20); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2717 scrolled = gtk_scrolled_window_new(NULL, NULL); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2718 gtk_box_pack_start(GTK_BOX(group), scrolled, TRUE, TRUE, 0); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2719 gtk_widget_show(scrolled); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2720 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2721 gtk_container_add(GTK_CONTAINER(scrolled), keyword_text); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2722 gtk_widget_show(keyword_text); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2723 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2724 gtk_text_view_set_editable(GTK_TEXT_VIEW(keyword_text), TRUE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2725 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2726 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(keyword_text)); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2727 gtk_text_buffer_create_tag(buffer, "monospace", |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2728 "family", "monospace", NULL); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2729 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2730 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(keyword_text), GTK_WRAP_WORD); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2731 gtk_text_buffer_get_start_iter(buffer, &iter); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2732 gtk_text_buffer_create_mark(buffer, "end", &iter, FALSE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2733 gchar *path; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2734 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2735 path = g_build_filename(get_rc_dir(), "keywords", NULL); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2736 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2737 GList *kwl = keyword_list_get(); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2738 kwl = g_list_first(kwl); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2739 while (kwl) |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2740 { |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2741 gtk_text_buffer_get_end_iter (buffer, &iter); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2742 tmp = g_strconcat(kwl->data, "\n", NULL); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2743 gtk_text_buffer_insert(buffer, &iter, tmp, -1); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2744 kwl = kwl->next; |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2745 g_free(tmp); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2746 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2747 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2748 gtk_text_buffer_set_modified(buffer, FALSE); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2749 |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2750 g_free(path); |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2751 } |
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
2752 |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2753 /* metadata tab */ |
2386 | 2754 #ifdef HAVE_LCMS |
2755 static void intent_menu_cb(GtkWidget *combo, gpointer data) | |
2756 { | |
2757 gint *option = data; | |
2758 | |
2759 switch (gtk_combo_box_get_active(GTK_COMBO_BOX(combo))) | |
2760 { | |
2761 case 0: | |
2762 default: | |
2763 *option = INTENT_PERCEPTUAL; | |
2764 break; | |
2765 case 1: | |
2766 *option = INTENT_RELATIVE_COLORIMETRIC; | |
2767 break; | |
2768 case 2: | |
2769 *option = INTENT_SATURATION; | |
2770 break; | |
2771 case 3: | |
2772 *option = INTENT_ABSOLUTE_COLORIMETRIC; | |
2773 break; | |
2774 } | |
2775 } | |
2776 | |
2777 static void add_intent_menu(GtkWidget *table, gint column, gint row, const gchar *text, | |
2441
a2d4729a3b2d
Fix GCC and Clang compile warnings.
Omari Stephens <xsdg@google.com>
parents:
2412
diff
changeset
|
2778 gint option, gint *option_c) |
2386 | 2779 { |
2780 GtkWidget *combo; | |
2781 gint current = 0; | |
2782 | |
2783 *option_c = option; | |
2784 | |
2785 pref_table_label(table, column, row, text, 0.0); | |
2786 | |
2787 combo = gtk_combo_box_text_new(); | |
2788 | |
2789 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Perceptual")); | |
2790 if (option == INTENT_PERCEPTUAL) current = 0; | |
2791 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Relative Colorimetric")); | |
2792 if (option == INTENT_RELATIVE_COLORIMETRIC) current = 1; | |
2793 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Saturation")); | |
2794 if (option == INTENT_SATURATION) current = 2; | |
2795 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Absolute Colorimetric")); | |
2796 if (option == INTENT_ABSOLUTE_COLORIMETRIC) current = 3; | |
2797 | |
2798 gtk_combo_box_set_active(GTK_COMBO_BOX(combo), current); | |
2799 | |
2800 gtk_widget_set_tooltip_text(combo,"Refer to the lcms documentation for the defaults used when the selected Intent is not available"); | |
2801 | |
2802 g_signal_connect(G_OBJECT(combo), "changed", | |
2803 G_CALLBACK(intent_menu_cb), option_c); | |
2804 | |
2805 gtk_table_attach(GTK_TABLE(table), combo, column + 1, column + 2, row, row + 1, | |
2806 GTK_EXPAND | GTK_FILL, 0, 0, 0); | |
2807 gtk_widget_show(combo); | |
2808 } | |
2809 #endif | |
2810 | |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2811 static void config_tab_color(GtkWidget *notebook) |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2812 { |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2813 GtkWidget *label; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2814 GtkWidget *vbox; |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2815 GtkWidget *group; |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2816 GtkWidget *tabcomp; |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2817 GtkWidget *table; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2818 gint i; |
9 | 2819 |
1522
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
2820 vbox = scrolled_notebook_page(notebook, _("Color management")); |
9 | 2821 |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2822 group = pref_group_new(vbox, FALSE, _("Input profiles"), GTK_ORIENTATION_VERTICAL); |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2823 #ifndef HAVE_LCMS |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2824 gtk_widget_set_sensitive(pref_group_parent(group), FALSE); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2825 #endif |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2826 |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2827 table = pref_table_new(group, 3, COLOR_PROFILE_INPUTS + 1, FALSE, FALSE); |
9 | 2828 gtk_table_set_col_spacings(GTK_TABLE(table), PREF_PAD_GAP); |
2829 | |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2830 label = pref_table_label(table, 0, 0, _("Type"), 0.0); |
9 | 2831 pref_label_bold(label, TRUE, FALSE); |
2832 | |
2833 label = pref_table_label(table, 1, 0, _("Menu name"), 0.0); | |
2834 pref_label_bold(label, TRUE, FALSE); | |
2835 | |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2836 label = pref_table_label(table, 2, 0, _("File"), 0.0); |
9 | 2837 pref_label_bold(label, TRUE, FALSE); |
2838 | |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2839 for (i = 0; i < COLOR_PROFILE_INPUTS; i++) |
9 | 2840 { |
224
bb39a088c56e
Tidy up. Fix indentation and missing whitespaces.
Laurent Monin <geeqie@norz.org>
parents:
223
diff
changeset
|
2841 GtkWidget *entry; |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2842 gchar *buf; |
442 | 2843 |
1625 | 2844 buf = g_strdup_printf(_("Input %d:"), i + COLOR_PROFILE_FILE); |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2845 pref_table_label(table, 0, i + 1, buf, 1.0); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2846 g_free(buf); |
9 | 2847 |
224
bb39a088c56e
Tidy up. Fix indentation and missing whitespaces.
Laurent Monin <geeqie@norz.org>
parents:
223
diff
changeset
|
2848 entry = gtk_entry_new(); |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2849 gtk_entry_set_max_length(GTK_ENTRY(entry), EDITOR_NAME_MAX_LENGTH); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2850 if (options->color_profile.input_name[i]) |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2851 { |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2852 gtk_entry_set_text(GTK_ENTRY(entry), options->color_profile.input_name[i]); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2853 } |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2854 gtk_table_attach(GTK_TABLE(table), entry, 1, 2, i + 1, i + 2, |
113
f2109493004f
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
91
diff
changeset
|
2855 GTK_FILL | GTK_EXPAND, 0, 0, 0); |
224
bb39a088c56e
Tidy up. Fix indentation and missing whitespaces.
Laurent Monin <geeqie@norz.org>
parents:
223
diff
changeset
|
2856 gtk_widget_show(entry); |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2857 color_profile_input_name_entry[i] = entry; |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2858 |
2723
c3417ff92722
Show .icc files when selecting color profiles
Colin Clark <colin.clark@cclark.uk>
parents:
2721
diff
changeset
|
2859 tabcomp = tab_completion_new(&entry, options->color_profile.input_file[i], NULL, ".icc", "ICC Files", NULL); |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2860 tab_completion_add_select_button(entry, _("Select color profile"), FALSE); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2861 gtk_widget_set_size_request(entry, 160, -1); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2862 gtk_table_attach(GTK_TABLE(table), tabcomp, 2, 3, i + 1, i + 2, |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2863 GTK_FILL | GTK_EXPAND, 0, 0, 0); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2864 gtk_widget_show(tabcomp); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2865 color_profile_input_file_entry[i] = entry; |
9 | 2866 } |
2867 | |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2868 group = pref_group_new(vbox, FALSE, _("Screen profile"), GTK_ORIENTATION_VERTICAL); |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2869 #ifndef HAVE_LCMS |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2870 gtk_widget_set_sensitive(pref_group_parent(group), FALSE); |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2871 #endif |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2872 pref_checkbox_new_int(group, _("Use system screen profile if available"), |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2873 options->color_profile.use_x11_screen_profile, &c_options->color_profile.use_x11_screen_profile); |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2874 |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2875 table = pref_table_new(group, 2, 1, FALSE, FALSE); |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2876 |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2877 pref_table_label(table, 0, 0, _("Screen:"), 1.0); |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2878 tabcomp = tab_completion_new(&color_profile_screen_file_entry, |
2723
c3417ff92722
Show .icc files when selecting color profiles
Colin Clark <colin.clark@cclark.uk>
parents:
2721
diff
changeset
|
2879 options->color_profile.screen_file, NULL, ".icc", "ICC Files", NULL); |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2880 tab_completion_add_select_button(color_profile_screen_file_entry, _("Select color profile"), FALSE); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2881 gtk_widget_set_size_request(color_profile_screen_file_entry, 160, -1); |
2386 | 2882 #ifdef HAVE_LCMS |
2883 add_intent_menu(table, 0, 1, _("Render Intent:"), options->color_profile.render_intent, &c_options->color_profile.render_intent); | |
2884 #endif | |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2885 gtk_table_attach(GTK_TABLE(table), tabcomp, 1, 2, |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2886 0, 1, |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2887 GTK_FILL | GTK_EXPAND, 0, 0, 0); |
2386 | 2888 |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2889 gtk_widget_show(tabcomp); |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2890 } |
222
fe6cb572a798
various exif improvements based on patch by Uwe Ohse
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
218
diff
changeset
|
2891 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2892 /* advanced entry tab */ |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2893 static void config_tab_behavior(GtkWidget *notebook) |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2894 { |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2895 GtkWidget *hbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2896 GtkWidget *vbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2897 GtkWidget *group; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2898 GtkWidget *button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2899 GtkWidget *tabcomp; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2900 GtkWidget *ct_button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2901 GtkWidget *spin; |
2631
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
2902 GtkWidget *table; |
2750
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2746
diff
changeset
|
2903 GtkWidget *marks; |
2769
ed8cc78cb9dd
Option to change default button for copy/move dialogs
Colin Clark <colin.clark@cclark.uk>
parents:
2768
diff
changeset
|
2904 GtkWidget *with_rename; |
2793 | 2905 GtkWidget *collections_on_top; |
218
9ec9947e7682
Customizable info overlay in fullscreen, based on the patch posted to gqview-devel list by Timo on 2007-09-10.
Laurent Monin <geeqie@norz.org>
parents:
212
diff
changeset
|
2906 |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2907 vbox = scrolled_notebook_page(notebook, _("Behavior")); |
218
9ec9947e7682
Customizable info overlay in fullscreen, based on the patch posted to gqview-devel list by Timo on 2007-09-10.
Laurent Monin <geeqie@norz.org>
parents:
212
diff
changeset
|
2908 |
1685
041cdca65160
Revert "Add pgettext for some ambiguous strings"
Klaus Ethgen <Klaus@Ethgen.de>
parents:
1678
diff
changeset
|
2909 group = pref_group_new(vbox, FALSE, _("Delete"), GTK_ORIENTATION_VERTICAL); |
9 | 2910 |
2911 pref_checkbox_new_int(group, _("Confirm file delete"), | |
341
3e0059a55671
Move safe_delete* and in place rename options to file_ops
Laurent Monin <geeqie@norz.org>
parents:
339
diff
changeset
|
2912 options->file_ops.confirm_delete, &c_options->file_ops.confirm_delete); |
9 | 2913 pref_checkbox_new_int(group, _("Enable Delete key"), |
341
3e0059a55671
Move safe_delete* and in place rename options to file_ops
Laurent Monin <geeqie@norz.org>
parents:
339
diff
changeset
|
2914 options->file_ops.enable_delete_key, &c_options->file_ops.enable_delete_key); |
9 | 2915 |
2916 ct_button = pref_checkbox_new_int(group, _("Safe delete"), | |
341
3e0059a55671
Move safe_delete* and in place rename options to file_ops
Laurent Monin <geeqie@norz.org>
parents:
339
diff
changeset
|
2917 options->file_ops.safe_delete_enable, &c_options->file_ops.safe_delete_enable); |
9 | 2918 |
2919 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE); | |
2920 pref_checkbox_link_sensitivity(ct_button, hbox); | |
2921 | |
2922 pref_spacer(hbox, PREF_PAD_INDENT - PREF_PAD_SPACE); | |
2923 pref_label_new(hbox, _("Folder:")); | |
2924 | |
2723
c3417ff92722
Show .icc files when selecting color profiles
Colin Clark <colin.clark@cclark.uk>
parents:
2721
diff
changeset
|
2925 tabcomp = tab_completion_new(&safe_delete_path_entry, options->file_ops.safe_delete_path, NULL, NULL, NULL, NULL); |
9 | 2926 tab_completion_add_select_button(safe_delete_path_entry, NULL, TRUE); |
2927 gtk_box_pack_start(GTK_BOX(hbox), tabcomp, TRUE, TRUE, 0); | |
2928 gtk_widget_show(tabcomp); | |
2929 | |
2930 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_BUTTON_GAP); | |
2931 pref_checkbox_link_sensitivity(ct_button, hbox); | |
2932 | |
2933 pref_spacer(hbox, PREF_PAD_INDENT - PREF_PAD_GAP); | |
223
d4652e8e4239
Setting no limit size to trash directory is now possible using zero as value.
Laurent Monin <geeqie@norz.org>
parents:
222
diff
changeset
|
2934 spin = pref_spin_new_int(hbox, _("Maximum size:"), _("MB"), |
442 | 2935 0, 2048, 1, options->file_ops.safe_delete_folder_maxsize, &c_options->file_ops.safe_delete_folder_maxsize); |
223
d4652e8e4239
Setting no limit size to trash directory is now possible using zero as value.
Laurent Monin <geeqie@norz.org>
parents:
222
diff
changeset
|
2936 gtk_widget_set_tooltip_markup(spin, _("Set to 0 for unlimited size")); |
9 | 2937 button = pref_button_new(NULL, NULL, _("View"), FALSE, |
2938 G_CALLBACK(safe_delete_view_cb), NULL); | |
2939 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | |
2940 gtk_widget_show(button); | |
2941 | |
2942 button = pref_button_new(NULL, GTK_STOCK_CLEAR, NULL, FALSE, | |
2943 G_CALLBACK(safe_delete_clear_cb), NULL); | |
2944 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | |
2945 gtk_widget_show(button); | |
2946 | |
497
29dc838f7d6b
Allow the copy of file paths to clipboard.
Laurent Monin <geeqie@norz.org>
parents:
475
diff
changeset
|
2947 |
9 | 2948 group = pref_group_new(vbox, FALSE, _("Behavior"), GTK_ORIENTATION_VERTICAL); |
2949 | |
2950 pref_checkbox_new_int(group, _("Descend folders in tree view"), | |
321 | 2951 options->tree_descend_subdirs, &c_options->tree_descend_subdirs); |
9 | 2952 |
2953 pref_checkbox_new_int(group, _("In place renaming"), | |
341
3e0059a55671
Move safe_delete* and in place rename options to file_ops
Laurent Monin <geeqie@norz.org>
parents:
339
diff
changeset
|
2954 options->file_ops.enable_in_place_rename, &c_options->file_ops.enable_in_place_rename); |
9 | 2955 |
2376
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
2956 pref_checkbox_new_int(group, _("List directory view uses single click to enter"), |
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
2957 options->view_dir_list_single_click_enter, &c_options->view_dir_list_single_click_enter); |
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
2958 |
2750
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2746
diff
changeset
|
2959 marks = pref_checkbox_new_int(group, _("Save marks on exit"), |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2746
diff
changeset
|
2960 options->marks_save, &c_options->marks_save); |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2746
diff
changeset
|
2961 gtk_widget_set_tooltip_text(marks,"Note that marks linked to a keyword will be saved irrespective of this setting"); |
0eac8ea9b1be
Fix #220, 269: marks do not persist
Colin Clark <colin.clark@cclark.uk>
parents:
2746
diff
changeset
|
2962 |
2769
ed8cc78cb9dd
Option to change default button for copy/move dialogs
Colin Clark <colin.clark@cclark.uk>
parents:
2768
diff
changeset
|
2963 with_rename = pref_checkbox_new_int(group, _("Use \"With Rename\" as default for Copy/Move dialogs"), |
ed8cc78cb9dd
Option to change default button for copy/move dialogs
Colin Clark <colin.clark@cclark.uk>
parents:
2768
diff
changeset
|
2964 options->with_rename, &c_options->with_rename); |
ed8cc78cb9dd
Option to change default button for copy/move dialogs
Colin Clark <colin.clark@cclark.uk>
parents:
2768
diff
changeset
|
2965 gtk_widget_set_tooltip_text(with_rename,"Change the default button for Copy/Move dialogs"); |
ed8cc78cb9dd
Option to change default button for copy/move dialogs
Colin Clark <colin.clark@cclark.uk>
parents:
2768
diff
changeset
|
2966 |
2793 | 2967 collections_on_top = pref_checkbox_new_int(group, _("Open collections on top"), |
2968 options->collections_on_top, &c_options->collections_on_top); | |
2969 gtk_widget_set_tooltip_text(collections_on_top,"Open collections window on top"); | |
2970 | |
2424
83d9886b9bcb
Preferences: Open recent list maximum size
Colin Clark <cclark@mcb.net>
parents:
2423
diff
changeset
|
2971 pref_spin_new_int(group, _("Recent folder list maximum size"), NULL, |
441
3cc6ee2e3e21
Allow the user to change open_recent_list_maxsize option through
Laurent Monin <geeqie@norz.org>
parents:
426
diff
changeset
|
2972 1, 50, 1, options->open_recent_list_maxsize, &c_options->open_recent_list_maxsize); |
2059 | 2973 |
458
1397463b9c74
Allow the user to set the drag'n drop icon size through
Laurent Monin <geeqie@norz.org>
parents:
446
diff
changeset
|
2974 pref_spin_new_int(group, _("Drag'n drop icon size"), NULL, |
1397463b9c74
Allow the user to set the drag'n drop icon size through
Laurent Monin <geeqie@norz.org>
parents:
446
diff
changeset
|
2975 16, 256, 16, options->dnd_icon_size, &c_options->dnd_icon_size); |
441
3cc6ee2e3e21
Allow the user to change open_recent_list_maxsize option through
Laurent Monin <geeqie@norz.org>
parents:
426
diff
changeset
|
2976 |
2662
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
2977 table = pref_table_new(group, 2, 1, FALSE, FALSE); |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
2978 add_clipboard_selection_menu(table, 0, 0, _("Copy path clipboard selection:"), options->clipboard_selection, &c_options->clipboard_selection); |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
2979 |
9 | 2980 group = pref_group_new(vbox, FALSE, _("Navigation"), GTK_ORIENTATION_VERTICAL); |
2981 | |
2982 pref_checkbox_new_int(group, _("Progressive keyboard scrolling"), | |
321 | 2983 options->progressive_key_scrolling, &c_options->progressive_key_scrolling); |
2376
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
2984 pref_spin_new_int(group, _("Keyboard scrolling step multiplier:"), NULL, |
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
2985 1, 32, 1, options->keyboard_scroll_step, (int *)&c_options->keyboard_scroll_step); |
9 | 2986 pref_checkbox_new_int(group, _("Mouse wheel scrolls image"), |
321 | 2987 options->mousewheel_scrolls, &c_options->mousewheel_scrolls); |
2376
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
2988 pref_checkbox_new_int(group, _("Navigation by left or middle click on image"), |
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
2989 options->image_lm_click_nav, &c_options->image_lm_click_nav); |
2631
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
2990 pref_checkbox_new_int(group, _("Play video by left click on image"), |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
2991 options->image_l_click_video, &c_options->image_l_click_video); |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
2992 table = pref_table_new(group, 2, 1, FALSE, FALSE); |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
2993 add_video_menu(table, 0, 0, _("Play with:"), options->image_l_click_video_editor, &c_options->image_l_click_video_editor); |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
2994 |
9 | 2995 |
227
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
2996 #ifdef DEBUG |
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
2997 group = pref_group_new(vbox, FALSE, _("Debugging"), GTK_ORIENTATION_VERTICAL); |
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
2998 |
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
2999 pref_spin_new_int(group, _("Debug level:"), NULL, |
507
7408e89b601d
Move debug macros from main.h to new debug.h.
Laurent Monin <geeqie@norz.org>
parents:
497
diff
changeset
|
3000 DEBUG_LEVEL_MIN, DEBUG_LEVEL_MAX, 1, get_debug_level(), &debug_c); |
2505
d01e5b8e80d9
Eliminate FIXME: Log window line limit
Colin Clark <colin.clark@cclark.uk>
parents:
2501
diff
changeset
|
3001 |
2596
9c435c86a296
Optional timer data in log window
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
3002 pref_checkbox_new_int(group, _("Timer data"), |
9c435c86a296
Optional timer data in log window
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
3003 options->log_window.timer_data, &c_options->log_window.timer_data); |
9c435c86a296
Optional timer data in log window
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
3004 |
2505
d01e5b8e80d9
Eliminate FIXME: Log window line limit
Colin Clark <colin.clark@cclark.uk>
parents:
2501
diff
changeset
|
3005 pref_spin_new_int(group, _("Log Window max. lines:"), NULL, |
d01e5b8e80d9
Eliminate FIXME: Log window line limit
Colin Clark <colin.clark@cclark.uk>
parents:
2501
diff
changeset
|
3006 1, 99999, 1, options->log_window_lines, &options->log_window_lines); |
227
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
3007 #endif |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3008 } |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3009 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3010 /* accelerators tab */ |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3011 static void config_tab_accelerators(GtkWidget *notebook) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3012 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3013 GtkWidget *hbox; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3014 GtkWidget *vbox; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3015 GtkWidget *group; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3016 GtkWidget *button; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3017 GtkWidget *scrolled; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3018 GtkWidget *accel_view; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3019 GtkCellRenderer *renderer; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3020 GtkTreeSelection *selection; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3021 GtkTreeViewColumn *column; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3022 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3023 vbox = scrolled_notebook_page(notebook, _("Keyboard")); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3024 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3025 group = pref_group_new(vbox, TRUE, _("Accelerators"), GTK_ORIENTATION_VERTICAL); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3026 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3027 scrolled = gtk_scrolled_window_new(NULL, NULL); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3028 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled), GTK_SHADOW_IN); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3029 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3030 gtk_box_pack_start(GTK_BOX(group), scrolled, TRUE, TRUE, 0); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3031 gtk_widget_show(scrolled); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3032 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3033 accel_store = gtk_tree_store_new(4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3034 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3035 accel_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(accel_store)); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3036 g_object_unref(accel_store); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3037 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(accel_view)); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3038 gtk_tree_selection_set_mode(GTK_TREE_SELECTION(selection), GTK_SELECTION_MULTIPLE); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3039 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3040 gtk_tree_view_set_enable_search(GTK_TREE_VIEW(accel_view), FALSE); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3041 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3042 renderer = gtk_cell_renderer_text_new(); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3043 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3044 column = gtk_tree_view_column_new_with_attributes(_("Action"), |
2059 | 3045 renderer, |
3046 "text", AE_ACTION, | |
3047 NULL); | |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3048 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3049 gtk_tree_view_column_set_sort_column_id(column, AE_ACTION); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3050 gtk_tree_view_column_set_resizable(column, TRUE); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3051 gtk_tree_view_append_column(GTK_TREE_VIEW(accel_view), column); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3052 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3053 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3054 renderer = gtk_cell_renderer_accel_new(); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3055 g_signal_connect(G_OBJECT(renderer), "accel-cleared", |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3056 G_CALLBACK(accel_store_cleared_cb), accel_store); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3057 g_signal_connect(G_OBJECT(renderer), "accel-edited", |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3058 G_CALLBACK(accel_store_edited_cb), accel_store); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3059 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3060 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3061 g_object_set (renderer, |
2059 | 3062 "editable", TRUE, |
3063 "accel-mode", GTK_CELL_RENDERER_ACCEL_MODE_OTHER, | |
3064 NULL); | |
3065 | |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3066 column = gtk_tree_view_column_new_with_attributes(_("KEY"), |
2059 | 3067 renderer, |
3068 "text", AE_KEY, | |
3069 NULL); | |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3070 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3071 gtk_tree_view_column_set_sort_column_id(column, AE_KEY); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3072 gtk_tree_view_column_set_resizable(column, TRUE); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3073 gtk_tree_view_append_column(GTK_TREE_VIEW(accel_view), column); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3074 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3075 renderer = gtk_cell_renderer_text_new(); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3076 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3077 column = gtk_tree_view_column_new_with_attributes(_("Tooltip"), |
2059 | 3078 renderer, |
3079 "text", AE_TOOLTIP, | |
3080 NULL); | |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3081 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3082 gtk_tree_view_column_set_sort_column_id(column, AE_TOOLTIP); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3083 gtk_tree_view_column_set_resizable(column, TRUE); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3084 gtk_tree_view_append_column(GTK_TREE_VIEW(accel_view), column); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3085 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3086 renderer = gtk_cell_renderer_text_new(); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3087 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3088 column = gtk_tree_view_column_new_with_attributes("Accel", |
2059 | 3089 renderer, |
3090 "text", AE_ACCEL, | |
3091 NULL); | |
3092 | |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3093 gtk_tree_view_column_set_sort_column_id(column, AE_ACCEL); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3094 gtk_tree_view_column_set_resizable(column, TRUE); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3095 gtk_tree_view_append_column(GTK_TREE_VIEW(accel_view), column); |
2059 | 3096 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3097 accel_store_populate(); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3098 gtk_container_add(GTK_CONTAINER(scrolled), accel_view); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3099 gtk_widget_show(accel_view); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3100 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3101 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_BUTTON_GAP); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3102 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3103 button = pref_button_new(NULL, NULL, _("Defaults"), FALSE, |
2058
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
3104 G_CALLBACK(accel_default_cb), accel_view); |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3105 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3106 gtk_widget_show(button); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3107 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3108 button = pref_button_new(NULL, NULL, _("Reset selected"), FALSE, |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3109 G_CALLBACK(accel_reset_cb), accel_view); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3110 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3111 gtk_widget_show(button); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3112 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
3113 |
2623
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
3114 /* toolbar tab */ |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
3115 static void config_tab_toolbar(GtkWidget *notebook) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
3116 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
3117 GtkWidget *vbox; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
3118 GtkWidget *toolbardata; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
3119 LayoutWindow *lw; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
3120 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
3121 lw = layout_window_list->data; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
3122 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
3123 vbox = scrolled_notebook_page(notebook, _("Toolbar")); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
3124 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
3125 toolbardata = toolbar_select_new(lw); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
3126 gtk_box_pack_start(GTK_BOX(vbox), toolbardata, TRUE, TRUE, 0); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
3127 gtk_widget_show(vbox); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
3128 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
3129 |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
3130 /* stereo tab */ |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
3131 static void config_tab_stereo(GtkWidget *notebook) |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
3132 { |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
3133 GtkWidget *vbox; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
3134 GtkWidget *group; |
1891
25645af65caf
added fixed stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1889
diff
changeset
|
3135 GtkWidget *group2; |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
3136 GtkWidget *table; |
1892
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3137 GtkWidget *box; |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3138 GtkWidget *box2; |
1891
25645af65caf
added fixed stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1889
diff
changeset
|
3139 GtkWidget *fs_button; |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
3140 vbox = scrolled_notebook_page(notebook, _("Stereo")); |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
3141 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
3142 group = pref_group_new(vbox, FALSE, _("Windowed stereo mode"), GTK_ORIENTATION_VERTICAL); |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
3143 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
3144 table = pref_table_new(group, 2, 1, FALSE, FALSE); |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
3145 add_stereo_mode_menu(table, 0, 0, _("Windowed stereo mode"), options->stereo.mode, &c_options->stereo.mode, FALSE); |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
3146 |
1892
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3147 table = pref_table_new(group, 2, 2, TRUE, FALSE); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3148 box = pref_table_box(table, 0, 0, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3149 pref_checkbox_new_int(box, _("Mirror left image"), |
1889
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
3150 options->stereo.mode & PR_STEREO_MIRROR_LEFT, &c_options->stereo.tmp.mirror_left); |
1892
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3151 box = pref_table_box(table, 1, 0, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3152 pref_checkbox_new_int(box, _("Flip left image"), |
1889
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
3153 options->stereo.mode & PR_STEREO_FLIP_LEFT, &c_options->stereo.tmp.flip_left); |
1892
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3154 box = pref_table_box(table, 0, 1, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3155 pref_checkbox_new_int(box, _("Mirror right image"), |
1889
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
3156 options->stereo.mode & PR_STEREO_MIRROR_RIGHT, &c_options->stereo.tmp.mirror_right); |
1892
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3157 box = pref_table_box(table, 1, 1, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3158 pref_checkbox_new_int(box, _("Flip right image"), |
1889
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
3159 options->stereo.mode & PR_STEREO_FLIP_RIGHT, &c_options->stereo.tmp.flip_right); |
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
3160 pref_checkbox_new_int(group, _("Swap left and right images"), |
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
3161 options->stereo.mode & PR_STEREO_SWAP, &c_options->stereo.tmp.swap); |
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
3162 pref_checkbox_new_int(group, _("Disable stereo mode on single image source"), |
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
3163 options->stereo.mode & PR_STEREO_TEMP_DISABLE, &c_options->stereo.tmp.temp_disable); |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
3164 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
3165 group = pref_group_new(vbox, FALSE, _("Fullscreen stereo mode"), GTK_ORIENTATION_VERTICAL); |
1891
25645af65caf
added fixed stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1889
diff
changeset
|
3166 fs_button = pref_checkbox_new_int(group, _("Use different settings for fullscreen"), |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
3167 options->stereo.enable_fsmode, &c_options->stereo.enable_fsmode); |
1892
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3168 box2 = pref_box_new(group, FALSE, GTK_ORIENTATION_VERTICAL, PREF_PAD_SPACE); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3169 pref_checkbox_link_sensitivity(fs_button, box2); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3170 table = pref_table_new(box2, 2, 1, FALSE, FALSE); |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
3171 add_stereo_mode_menu(table, 0, 0, _("Fullscreen stereo mode"), options->stereo.fsmode, &c_options->stereo.fsmode, TRUE); |
1892
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3172 table = pref_table_new(box2, 2, 2, TRUE, FALSE); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3173 box = pref_table_box(table, 0, 0, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3174 pref_checkbox_new_int(box, _("Mirror left image"), |
1889
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
3175 options->stereo.fsmode & PR_STEREO_MIRROR_LEFT, &c_options->stereo.tmp.fs_mirror_left); |
1892
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3176 box = pref_table_box(table, 1, 0, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3177 pref_checkbox_new_int(box, _("Flip left image"), |
1889
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
3178 options->stereo.fsmode & PR_STEREO_FLIP_LEFT, &c_options->stereo.tmp.fs_flip_left); |
1892
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3179 box = pref_table_box(table, 0, 1, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3180 pref_checkbox_new_int(box, _("Mirror right image"), |
1889
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
3181 options->stereo.fsmode & PR_STEREO_MIRROR_RIGHT, &c_options->stereo.tmp.fs_mirror_right); |
1892
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3182 box = pref_table_box(table, 1, 1, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3183 pref_checkbox_new_int(box, _("Flip right image"), |
1889
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
3184 options->stereo.fsmode & PR_STEREO_FLIP_RIGHT, &c_options->stereo.tmp.fs_flip_right); |
1892
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3185 pref_checkbox_new_int(box2, _("Swap left and right images"), |
1889
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
3186 options->stereo.fsmode & PR_STEREO_SWAP, &c_options->stereo.tmp.fs_swap); |
1892
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3187 pref_checkbox_new_int(box2, _("Disable stereo mode on single image source"), |
1889
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
3188 options->stereo.fsmode & PR_STEREO_TEMP_DISABLE, &c_options->stereo.tmp.fs_temp_disable); |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
3189 |
1892
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3190 group2 = pref_group_new(box2, FALSE, _("Fixed position"), GTK_ORIENTATION_VERTICAL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
3191 table = pref_table_new(group2, 5, 3, FALSE, FALSE); |
1921
9a82e917c61d
fixed stereo.fixed preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1896
diff
changeset
|
3192 pref_table_spin_new_int(table, 0, 0, _("Width"), NULL, |
9a82e917c61d
fixed stereo.fixed preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1896
diff
changeset
|
3193 1, 5000, 1, options->stereo.fixed_w, &c_options->stereo.fixed_w); |
9a82e917c61d
fixed stereo.fixed preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1896
diff
changeset
|
3194 pref_table_spin_new_int(table, 3, 0, _("Height"), NULL, |
9a82e917c61d
fixed stereo.fixed preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1896
diff
changeset
|
3195 1, 5000, 1, options->stereo.fixed_h, &c_options->stereo.fixed_h); |
9a82e917c61d
fixed stereo.fixed preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1896
diff
changeset
|
3196 pref_table_spin_new_int(table, 0, 1, _("Left X"), NULL, |
9a82e917c61d
fixed stereo.fixed preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1896
diff
changeset
|
3197 0, 5000, 1, options->stereo.fixed_x1, &c_options->stereo.fixed_x1); |
9a82e917c61d
fixed stereo.fixed preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1896
diff
changeset
|
3198 pref_table_spin_new_int(table, 3, 1, _("Left Y"), NULL, |
9a82e917c61d
fixed stereo.fixed preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1896
diff
changeset
|
3199 0, 5000, 1, options->stereo.fixed_y1, &c_options->stereo.fixed_y1); |
9a82e917c61d
fixed stereo.fixed preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1896
diff
changeset
|
3200 pref_table_spin_new_int(table, 0, 2, _("Right X"), NULL, |
9a82e917c61d
fixed stereo.fixed preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1896
diff
changeset
|
3201 0, 5000, 1, options->stereo.fixed_x2, &c_options->stereo.fixed_x2); |
9a82e917c61d
fixed stereo.fixed preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1896
diff
changeset
|
3202 pref_table_spin_new_int(table, 3, 2, _("Right Y"), NULL, |
9a82e917c61d
fixed stereo.fixed preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1896
diff
changeset
|
3203 0, 5000, 1, options->stereo.fixed_y2, &c_options->stereo.fixed_y2); |
1891
25645af65caf
added fixed stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1889
diff
changeset
|
3204 |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
3205 } |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
3206 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3207 /* Main preferences window */ |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3208 static void config_window_create(void) |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3209 { |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3210 GtkWidget *win_vbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3211 GtkWidget *hbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3212 GtkWidget *notebook; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3213 GtkWidget *button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3214 GtkWidget *ct_button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3215 |
321 | 3216 if (!c_options) c_options = init_options(NULL); |
318
e8261920c720
Add a new struct ConfOptions to handle options.
Laurent Monin <geeqie@norz.org>
parents:
298
diff
changeset
|
3217 |
289
d4d7e7aa0d88
Simplify and unify gtk_window creation with the help of
Laurent Monin <geeqie@norz.org>
parents:
288
diff
changeset
|
3218 configwindow = window_new(GTK_WINDOW_TOPLEVEL, "preferences", PIXBUF_INLINE_ICON_CONFIG, NULL, _("Preferences")); |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3219 gtk_window_set_type_hint(GTK_WINDOW(configwindow), GDK_WINDOW_TYPE_HINT_DIALOG); |
513
6743a5928e09
Remove whitespace between function name and first parenthesis for the sake of consistency. (pass 2)
Laurent Monin <geeqie@norz.org>
parents:
512
diff
changeset
|
3220 g_signal_connect(G_OBJECT(configwindow), "delete_event", |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3221 G_CALLBACK(config_window_delete), NULL); |
442 | 3222 gtk_window_set_default_size(GTK_WINDOW(configwindow), CONFIG_WINDOW_DEF_WIDTH, CONFIG_WINDOW_DEF_HEIGHT); |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3223 gtk_window_set_resizable(GTK_WINDOW(configwindow), TRUE); |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3224 gtk_container_set_border_width(GTK_CONTAINER(configwindow), PREF_PAD_BORDER); |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3225 |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3226 win_vbox = gtk_vbox_new(FALSE, PREF_PAD_SPACE); |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3227 gtk_container_add(GTK_CONTAINER(configwindow), win_vbox); |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3228 gtk_widget_show(win_vbox); |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3229 |
2412 | 3230 notebook = gtk_notebook_new(); |
3231 gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_TOP); | |
3232 gtk_box_pack_start(GTK_BOX(win_vbox), notebook, TRUE, TRUE, 0); | |
3233 | |
3234 config_tab_general(notebook); | |
3235 config_tab_image(notebook); | |
3236 config_tab_windows(notebook); | |
3237 config_tab_accelerators(notebook); | |
3238 config_tab_files(notebook); | |
3239 config_tab_metadata(notebook); | |
2824
c9eded8ad4e0
Fix #305: Faster Tagging (Keywords)
Colin Clark <colin.clark@cclark.uk>
parents:
2802
diff
changeset
|
3240 config_tab_keywords(notebook); |
2412 | 3241 config_tab_color(notebook); |
3242 config_tab_stereo(notebook); | |
3243 config_tab_behavior(notebook); | |
2623
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
3244 config_tab_toolbar(notebook); |
2412 | 3245 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3246 hbox = gtk_hbutton_box_new(); |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3247 gtk_button_box_set_layout(GTK_BUTTON_BOX(hbox), GTK_BUTTONBOX_END); |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3248 gtk_box_set_spacing(GTK_BOX(hbox), PREF_PAD_BUTTON_GAP); |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3249 gtk_box_pack_end(GTK_BOX(win_vbox), hbox, FALSE, FALSE, 0); |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3250 gtk_widget_show(hbox); |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3251 |
2412 | 3252 button = pref_button_new(NULL, GTK_STOCK_HELP, NULL, FALSE, |
3253 G_CALLBACK(config_window_help_cb), notebook); | |
3254 gtk_container_add(GTK_CONTAINER(hbox), button); | |
3255 gtk_widget_set_can_default(button, TRUE); | |
3256 gtk_widget_show(button); | |
3257 | |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3258 button = pref_button_new(NULL, GTK_STOCK_OK, NULL, FALSE, |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3259 G_CALLBACK(config_window_ok_cb), NULL); |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3260 gtk_container_add(GTK_CONTAINER(hbox), button); |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
3261 gtk_widget_set_can_default(button, TRUE); |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3262 gtk_widget_grab_default(button); |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3263 gtk_widget_show(button); |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3264 |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3265 ct_button = button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3266 |
1024
32e69d16dc5c
Add a Save button to Preferences dialog, which allow to save options to file without quitting the application.
Laurent Monin <geeqie@norz.org>
parents:
1001
diff
changeset
|
3267 button = pref_button_new(NULL, GTK_STOCK_SAVE, NULL, FALSE, |
32e69d16dc5c
Add a Save button to Preferences dialog, which allow to save options to file without quitting the application.
Laurent Monin <geeqie@norz.org>
parents:
1001
diff
changeset
|
3268 G_CALLBACK(config_window_save_cb), NULL); |
32e69d16dc5c
Add a Save button to Preferences dialog, which allow to save options to file without quitting the application.
Laurent Monin <geeqie@norz.org>
parents:
1001
diff
changeset
|
3269 gtk_container_add(GTK_CONTAINER(hbox), button); |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
3270 gtk_widget_set_can_default(button, TRUE); |
1024
32e69d16dc5c
Add a Save button to Preferences dialog, which allow to save options to file without quitting the application.
Laurent Monin <geeqie@norz.org>
parents:
1001
diff
changeset
|
3271 gtk_widget_show(button); |
2059 | 3272 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3273 button = pref_button_new(NULL, GTK_STOCK_APPLY, NULL, FALSE, |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3274 G_CALLBACK(config_window_apply_cb), NULL); |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3275 gtk_container_add(GTK_CONTAINER(hbox), button); |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
3276 gtk_widget_set_can_default(button, TRUE); |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3277 gtk_widget_show(button); |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3278 |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3279 button = pref_button_new(NULL, GTK_STOCK_CANCEL, NULL, FALSE, |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3280 G_CALLBACK(config_window_close_cb), NULL); |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3281 gtk_container_add(GTK_CONTAINER(hbox), button); |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
3282 gtk_widget_set_can_default(button, TRUE); |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3283 gtk_widget_show(button); |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3284 |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3285 if (!generic_dialog_get_alternative_button_order(configwindow)) |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3286 { |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3287 gtk_box_reorder_child(GTK_BOX(hbox), ct_button, -1); |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3288 } |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
3289 |
9 | 3290 gtk_widget_show(notebook); |
3291 | |
3292 gtk_widget_show(configwindow); | |
3293 } | |
3294 | |
3295 /* | |
3296 *----------------------------------------------------------------------------- | |
3297 * config window show (public) | |
3298 *----------------------------------------------------------------------------- | |
442 | 3299 */ |
9 | 3300 |
3301 void show_config_window(void) | |
3302 { | |
3303 if (configwindow) | |
3304 { | |
3305 gtk_window_present(GTK_WINDOW(configwindow)); | |
3306 return; | |
3307 } | |
3308 | |
3309 config_window_create(); | |
3310 } | |
3311 | |
3312 /* | |
3313 *----------------- | |
3314 * about window | |
3315 *----------------- | |
3316 */ | |
3317 | |
2573
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3318 void show_about_window(LayoutWindow *lw) |
9 | 3319 { |
2573
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3320 GdkPixbuf *pixbuf_logo; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3321 GdkPixbuf *pixbuf_icon; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3322 gchar *authors[1000]; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3323 gchar *comment; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3324 gint i_authors = 0; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3325 gchar *path; |
2746
8bab8ac8ade0
Local time - UTC offset and daylight saving correction
Colin Clark <colin.clark@cclark.uk>
parents:
2740
diff
changeset
|
3326 GString *copyright; |
8bab8ac8ade0
Local time - UTC offset and daylight saving correction
Colin Clark <colin.clark@cclark.uk>
parents:
2740
diff
changeset
|
3327 gchar *zd_path; |
8bab8ac8ade0
Local time - UTC offset and daylight saving correction
Colin Clark <colin.clark@cclark.uk>
parents:
2740
diff
changeset
|
3328 ZoneDetect *cd; |
2573
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3329 FILE *fp = NULL; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3330 #define LINE_LENGTH 1000 |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3331 gchar line[LINE_LENGTH]; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3332 |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3333 copyright = g_string_new(NULL); |
2746
8bab8ac8ade0
Local time - UTC offset and daylight saving correction
Colin Clark <colin.clark@cclark.uk>
parents:
2740
diff
changeset
|
3334 copyright = g_string_append(copyright, "This program comes with absolutely no warranty.\nGNU General Public License, version 2 or later.\nSee https://www.gnu.org/licenses/old-licenses/gpl-2.0.html\n\n"); |
8bab8ac8ade0
Local time - UTC offset and daylight saving correction
Colin Clark <colin.clark@cclark.uk>
parents:
2740
diff
changeset
|
3335 |
8bab8ac8ade0
Local time - UTC offset and daylight saving correction
Colin Clark <colin.clark@cclark.uk>
parents:
2740
diff
changeset
|
3336 zd_path = g_build_filename(GQ_BIN_DIR, TIMEZONE_DATABASE, NULL); |
8bab8ac8ade0
Local time - UTC offset and daylight saving correction
Colin Clark <colin.clark@cclark.uk>
parents:
2740
diff
changeset
|
3337 cd = ZDOpenDatabase(zd_path); |
8bab8ac8ade0
Local time - UTC offset and daylight saving correction
Colin Clark <colin.clark@cclark.uk>
parents:
2740
diff
changeset
|
3338 if (cd) |
9 | 3339 { |
2746
8bab8ac8ade0
Local time - UTC offset and daylight saving correction
Colin Clark <colin.clark@cclark.uk>
parents:
2740
diff
changeset
|
3340 copyright = g_string_append(copyright, ZDGetNotice(cd)); |
9 | 3341 } |
2746
8bab8ac8ade0
Local time - UTC offset and daylight saving correction
Colin Clark <colin.clark@cclark.uk>
parents:
2740
diff
changeset
|
3342 ZDCloseDatabase(cd); |
8bab8ac8ade0
Local time - UTC offset and daylight saving correction
Colin Clark <colin.clark@cclark.uk>
parents:
2740
diff
changeset
|
3343 g_free(zd_path); |
2573
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3344 |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3345 authors[0] = NULL; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3346 path = g_build_filename(GQ_HELPDIR, "AUTHORS", NULL); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3347 fp = fopen(path, "r"); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3348 if (fp) |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3349 { |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3350 while(fgets(line, LINE_LENGTH, fp)) |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3351 { |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3352 /* get rid of ending \n from fgets */ |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3353 line[strlen(line) - 1] = '\0'; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3354 authors[i_authors] = g_strdup(line); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3355 i_authors++; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3356 } |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3357 authors[i_authors] = NULL; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3358 fclose(fp); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3359 } |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3360 g_free(path); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3361 |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3362 comment = g_strconcat("Development and bug reports:\n", GQ_EMAIL_ADDRESS, |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3363 "\nhttps://github.com/BestImageViewer/geeqie/issues",NULL); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3364 |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3365 pixbuf_logo = pixbuf_inline(PIXBUF_INLINE_LOGO); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3366 pixbuf_icon = pixbuf_inline(PIXBUF_INLINE_ICON); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3367 gtk_show_about_dialog(GTK_WINDOW(lw->window), |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3368 "title", _("About Geeqie"), |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3369 "resizable", TRUE, |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3370 "program-name", GQ_APPNAME, |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3371 "version", VERSION, |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3372 "logo", pixbuf_logo, |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3373 "icon", pixbuf_icon, |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3374 "website", GQ_WEBSITE, |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3375 "website-label", "Website", |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3376 "comments", comment, |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3377 "authors", authors, |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3378 "translator-credits", _("translator-credits"), |
2746
8bab8ac8ade0
Local time - UTC offset and daylight saving correction
Colin Clark <colin.clark@cclark.uk>
parents:
2740
diff
changeset
|
3379 "wrap-license", TRUE, |
8bab8ac8ade0
Local time - UTC offset and daylight saving correction
Colin Clark <colin.clark@cclark.uk>
parents:
2740
diff
changeset
|
3380 "license", copyright->str, |
2573
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3381 NULL); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3382 |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3383 g_string_free(copyright, TRUE); |
2746
8bab8ac8ade0
Local time - UTC offset and daylight saving correction
Colin Clark <colin.clark@cclark.uk>
parents:
2740
diff
changeset
|
3384 |
2573
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3385 gint n = 0; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3386 while(n < i_authors) |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3387 { |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3388 g_free(authors[n]); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3389 n++; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3390 } |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3391 g_free(comment); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3392 |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
3393 return; |
9 | 3394 } |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
3395 |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
3396 static void image_overlay_set_text_colours() |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
3397 { |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
3398 c_options->image_overlay.text_red = options->image_overlay.text_red; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
3399 c_options->image_overlay.text_green = options->image_overlay.text_green; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
3400 c_options->image_overlay.text_blue = options->image_overlay.text_blue; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
3401 c_options->image_overlay.text_alpha = options->image_overlay.text_alpha; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
3402 c_options->image_overlay.background_red = options->image_overlay.background_red; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
3403 c_options->image_overlay.background_green = options->image_overlay.background_green; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
3404 c_options->image_overlay.background_blue = options->image_overlay.background_blue; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
3405 c_options->image_overlay.background_alpha = options->image_overlay.background_alpha; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
3406 } |
1055
4bbdfab3c89a
Adding a vim modeline to all files - patch by Klaus Ethgen
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1053
diff
changeset
|
3407 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */ |