Mercurial > hg > forks > geeqie
annotate src/preferences.c @ 2740:808983eb036e
Option to display window ID
Additional Preferences/Windows option to show the window ID in the
titlebar. Off by default.
author | Colin Clark <colin.clark@cclark.uk> |
---|---|
date | Tue, 03 Apr 2018 12:41:35 +0100 |
parents | c3417ff92722 |
children | 8bab8ac8ade0 |
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" |
1599
ec811624c949
Include missing header file.
Laurent Monin <geeqie@norz.org>
parents:
1596
diff
changeset
|
26 #include "cache.h" |
9 | 27 #include "cache_maint.h" |
28 #include "editors.h" | |
648
36e8da5a771d
Move some functions from main.[ch] to new window.[ch].
Laurent Monin <geeqie@norz.org>
parents:
630
diff
changeset
|
29 #include "exif.h" |
586
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
566
diff
changeset
|
30 #include "filedata.h" |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
566
diff
changeset
|
31 #include "filefilter.h" |
9 | 32 #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
|
33 #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
|
34 #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
|
35 #include "color-man.h" |
9 | 36 #include "img-view.h" |
37 #include "layout_config.h" | |
38 #include "layout_util.h" | |
39 #include "pixbuf_util.h" | |
40 #include "slideshow.h" | |
2623
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
41 #include "toolbar.h" |
597
471697db9e6b
moved safe delete functions to separate file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
594
diff
changeset
|
42 #include "trash.h" |
9 | 43 #include "utilops.h" |
44 #include "ui_fileops.h" | |
45 #include "ui_misc.h" | |
46 #include "ui_tabcomp.h" | |
47 #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
|
48 #include "window.h" |
9 | 49 |
50 #include <math.h> | |
51 | |
2386 | 52 #ifdef HAVE_LCMS |
53 #ifdef HAVE_LCMS2 | |
54 #include <lcms2.h> | |
55 #else | |
56 #include <lcms.h> | |
57 #endif | |
58 #endif | |
9 | 59 |
60 #define EDITOR_NAME_MAX_LENGTH 32 | |
61 #define EDITOR_COMMAND_MAX_LENGTH 1024 | |
62 | |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
63 static void image_overlay_set_text_colours(); |
9 | 64 |
65 typedef struct _ThumbSize ThumbSize; | |
66 struct _ThumbSize | |
67 { | |
68 gint w; | |
69 gint h; | |
70 }; | |
71 | |
72 static ThumbSize thumb_size_list[] = | |
73 { | |
74 { 24, 24 }, | |
75 { 32, 32 }, | |
76 { 48, 48 }, | |
77 { 64, 64 }, | |
78 { 96, 72 }, | |
79 { 96, 96 }, | |
80 { 128, 96 }, | |
81 { 128, 128 }, | |
82 { 160, 120 }, | |
83 { 160, 160 }, | |
84 { 192, 144 }, | |
85 { 192, 192 }, | |
86 { 256, 192 }, | |
87 { 256, 256 } | |
88 }; | |
89 | |
90 enum { | |
91 FE_ENABLE, | |
92 FE_EXTENSION, | |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
93 FE_DESCRIPTION, |
1239
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
94 FE_CLASS, |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
95 FE_WRITABLE, |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
96 FE_ALLOW_SIDECAR |
9 | 97 }; |
98 | |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
99 enum { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
100 AE_ACTION, |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
101 AE_KEY, |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
102 AE_TOOLTIP, |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
103 AE_ACCEL |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
104 }; |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
105 |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
106 static gchar *format_class_list[] = { |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
107 N_("Unknown"), |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
108 N_("Image"), |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
109 N_("RAW Image"), |
2597
e65df743a5a1
Ref #510: Rudimentary video support
Colin Clark <colin.clark@cclark.uk>
parents:
2596
diff
changeset
|
110 N_("Metadata"), |
e65df743a5a1
Ref #510: Rudimentary video support
Colin Clark <colin.clark@cclark.uk>
parents:
2596
diff
changeset
|
111 N_("Video") |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
112 }; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
113 |
9 | 114 /* config memory values */ |
321 | 115 static ConfOptions *c_options = NULL; |
9 | 116 |
117 | |
227
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
118 #ifdef DEBUG |
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
119 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
|
120 #endif |
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
121 |
9 | 122 static GtkWidget *configwindow = NULL; |
123 static GtkListStore *filter_store = NULL; | |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
124 static GtkTreeStore *accel_store = NULL; |
9 | 125 |
126 static GtkWidget *safe_delete_path_entry; | |
127 | |
113
f2109493004f
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
91
diff
changeset
|
128 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
|
129 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
|
130 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
|
131 |
170
34d0013592f5
basic sidecar files configuration via preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
134
diff
changeset
|
132 static GtkWidget *sidecar_ext_entry; |
225
5794f581eafc
Make the preferences window resizeable, and try to improve
Laurent Monin <geeqie@norz.org>
parents:
224
diff
changeset
|
133 |
5794f581eafc
Make the preferences window resizeable, and try to improve
Laurent Monin <geeqie@norz.org>
parents:
224
diff
changeset
|
134 |
5794f581eafc
Make the preferences window resizeable, and try to improve
Laurent Monin <geeqie@norz.org>
parents:
224
diff
changeset
|
135 #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
|
136 #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
|
137 |
9 | 138 /* |
139 *----------------------------------------------------------------------------- | |
140 * option widget callbacks (private) | |
141 *----------------------------------------------------------------------------- | |
442 | 142 */ |
9 | 143 |
144 static void zoom_increment_cb(GtkWidget *spin, gpointer data) | |
145 { | |
2341 | 146 c_options->image.zoom_increment = (gint)(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin)) * 100.0 + 0.01); |
9 | 147 } |
148 | |
2612
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
149 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
|
150 { |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
151 gint mins_secs_tenths, delay; |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
152 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
153 mins_secs_tenths = c_options->slideshow.delay % |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
154 (3600 * SLIDESHOW_SUBSECOND_PRECISION); |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
155 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
156 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
|
157 (3600 * SLIDESHOW_SUBSECOND_PRECISION) + |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
158 mins_secs_tenths); |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
159 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
160 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
|
161 SLIDESHOW_SUBSECOND_PRECISION; |
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 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
164 static void slideshow_delay_minutes_cb(GtkWidget *spin, gpointer data) |
9 | 165 { |
2612
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
166 gint hours, secs_tenths, delay; |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
167 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
168 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
|
169 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
|
170 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
171 delay = hours * (3600 * SLIDESHOW_SUBSECOND_PRECISION) + |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
172 (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
|
173 (60 * SLIDESHOW_SUBSECOND_PRECISION) + secs_tenths); |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
174 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
175 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
|
176 SLIDESHOW_SUBSECOND_PRECISION; |
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 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
179 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
|
180 { |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
181 gint hours_mins, delay; |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
182 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
183 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
|
184 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
185 delay = (hours_mins * (60 * SLIDESHOW_SUBSECOND_PRECISION)) + |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
186 (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
|
187 (gdouble)(SLIDESHOW_SUBSECOND_PRECISION) + 0.01); |
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 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
|
190 SLIDESHOW_SUBSECOND_PRECISION; |
9 | 191 } |
192 | |
193 /* | |
194 *----------------------------------------------------------------------------- | |
195 * sync progam to config window routine (private) | |
196 *----------------------------------------------------------------------------- | |
442 | 197 */ |
9 | 198 |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1400
diff
changeset
|
199 void config_entry_to_option(GtkWidget *entry, gchar **option, gchar *(*func)(const gchar *)) |
9 | 200 { |
201 const gchar *buf; | |
1042
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
202 |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
203 g_free(*option); |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
204 *option = NULL; |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
205 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
|
206 if (buf && strlen(buf) > 0) |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
207 { |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
208 if (func) |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
209 *option = func(buf); |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
210 else |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
211 *option = g_strdup(buf); |
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 } |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
214 |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
215 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
216 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
|
217 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
218 gchar *accel_path, *accel; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
219 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
220 gtk_tree_model_get(model, iter, AE_ACCEL, &accel_path, AE_KEY, &accel, -1); |
2059 | 221 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
222 if (accel_path && accel_path[0]) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
223 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
224 GtkAccelKey key; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
225 gtk_accelerator_parse(accel, &key.accel_key, &key.accel_mods); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
226 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
|
227 } |
2059 | 228 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
229 g_free(accel_path); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
230 g_free(accel); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
231 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
232 return FALSE; |
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 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
235 |
1042
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
236 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
|
237 { |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
238 gint i; |
1437 | 239 gboolean refresh = FALSE; |
1042
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
240 |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
241 config_entry_to_option(safe_delete_path_entry, &options->file_ops.safe_delete_path, remove_trailing_slash); |
2059 | 242 |
356
ba4edae270d6
Rename show_dot_files to show_hidden_files.
Laurent Monin <geeqie@norz.org>
parents:
354
diff
changeset
|
243 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
|
244 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
|
245 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
|
246 if (options->file_sort.case_sensitive != c_options->file_sort.case_sensitive) refresh = TRUE; |
2406 | 247 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
|
248 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
|
249 if (options->file_filter.disable != c_options->file_filter.disable) refresh = TRUE; |
9 | 250 |
341
3e0059a55671
Move safe_delete* and in place rename options to file_ops
Laurent Monin <geeqie@norz.org>
parents:
339
diff
changeset
|
251 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
|
252 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
|
253 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
|
254 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
|
255 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
|
256 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
|
257 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
|
258 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
|
259 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
|
260 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
|
261 options->image.zoom_2pass = c_options->image.zoom_2pass; |
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
262 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
|
263 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
|
264 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
|
265 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
|
266 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
|
267 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
|
268 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
|
269 options->image.use_clutter_renderer = c_options->image.use_clutter_renderer; |
321 | 270 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
|
271 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
|
272 |
1506
6e235e3ba076
Force thumbnails refreshing when thumbnails dimensions are modified through Preferences.
Laurent Monin <geeqie@norz.org>
parents:
1443
diff
changeset
|
273 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
|
274 || 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
|
275 || 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
|
276 { |
6e235e3ba076
Force thumbnails refreshing when thumbnails dimensions are modified through Preferences.
Laurent Monin <geeqie@norz.org>
parents:
1443
diff
changeset
|
277 thumb_format_changed = TRUE; |
6e235e3ba076
Force thumbnails refreshing when thumbnails dimensions are modified through Preferences.
Laurent Monin <geeqie@norz.org>
parents:
1443
diff
changeset
|
278 refresh = TRUE; |
6e235e3ba076
Force thumbnails refreshing when thumbnails dimensions are modified through Preferences.
Laurent Monin <geeqie@norz.org>
parents:
1443
diff
changeset
|
279 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
|
280 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
|
281 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
|
282 } |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
283 options->thumbnails.enable_caching = c_options->thumbnails.enable_caching; |
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
284 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
|
285 options->thumbnails.use_exif = c_options->thumbnails.use_exif; |
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
|
286 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
|
287 // 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
|
288 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
|
289 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
|
290 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
|
291 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
|
292 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
|
293 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
|
294 |
329
056872a2bdf7
Rename file sorting options.
Laurent Monin <geeqie@norz.org>
parents:
327
diff
changeset
|
295 options->file_sort.case_sensitive = c_options->file_sort.case_sensitive; |
2406 | 296 options->file_sort.natural = c_options->file_sort.natural; |
332
e0907717f749
Rename file filtering options.
Laurent Monin <geeqie@norz.org>
parents:
330
diff
changeset
|
297 options->file_filter.disable = c_options->file_filter.disable; |
9 | 298 |
1229
2f11fec715ca
sidecar files grouping was made case-insensitive
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1216
diff
changeset
|
299 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
|
300 sidecar_ext_parse(options->sidecar.ext); |
170
34d0013592f5
basic sidecar files configuration via preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
134
diff
changeset
|
301 |
326 | 302 options->slideshow.random = c_options->slideshow.random; |
303 options->slideshow.repeat = c_options->slideshow.repeat; | |
304 options->slideshow.delay = c_options->slideshow.delay; | |
9 | 305 |
321 | 306 options->mousewheel_scrolls = c_options->mousewheel_scrolls; |
2376
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
307 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
|
308 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
|
309 options->image_l_click_video_editor = c_options->image_l_click_video_editor; |
9 | 310 |
341
3e0059a55671
Move safe_delete* and in place rename options to file_ops
Laurent Monin <geeqie@norz.org>
parents:
339
diff
changeset
|
311 options->file_ops.enable_in_place_rename = c_options->file_ops.enable_in_place_rename; |
9 | 312 |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
313 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
|
314 options->image.image_cache_max = c_options->image.image_cache_max; |
442 | 315 |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
316 options->image.zoom_quality = c_options->image.zoom_quality; |
9 | 317 |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
318 options->image.zoom_increment = c_options->image.zoom_increment; |
9 | 319 |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
320 options->image.enable_read_ahead = c_options->image.enable_read_ahead; |
9 | 321 |
2059 | 322 |
339
4b5f75e97d81
Rename user_specified_window_background and window_background_color
Laurent Monin <geeqie@norz.org>
parents:
338
diff
changeset
|
323 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
|
324 || 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
|
325 || !gdk_color_equal(&options->image.border_color, &c_options->image.border_color)) |
9 | 326 { |
1644
2b10e2bee592
the options for custom border color were made independent
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1626
diff
changeset
|
327 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
|
328 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
|
329 options->image.border_color = c_options->image.border_color; |
9 | 330 layout_colors_update(); |
331 view_window_colors_update(); | |
332 } | |
333 | |
2457
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
334 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
|
335 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
|
336 |
322
a4fd6dd48d9b
Rationalize fullscreen options naming.
Laurent Monin <geeqie@norz.org>
parents:
321
diff
changeset
|
337 options->fullscreen.screen = c_options->fullscreen.screen; |
a4fd6dd48d9b
Rationalize fullscreen options naming.
Laurent Monin <geeqie@norz.org>
parents:
321
diff
changeset
|
338 options->fullscreen.clean_flip = c_options->fullscreen.clean_flip; |
a4fd6dd48d9b
Rationalize fullscreen options naming.
Laurent Monin <geeqie@norz.org>
parents:
321
diff
changeset
|
339 options->fullscreen.disable_saver = c_options->fullscreen.disable_saver; |
a4fd6dd48d9b
Rationalize fullscreen options naming.
Laurent Monin <geeqie@norz.org>
parents:
321
diff
changeset
|
340 options->fullscreen.above = c_options->fullscreen.above; |
1336
7fe7536f02e1
fixed overlay configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1327
diff
changeset
|
341 if (c_options->image_overlay.template_string) |
7fe7536f02e1
fixed overlay configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1327
diff
changeset
|
342 set_image_overlay_template_string(&options->image_overlay.template_string, |
7fe7536f02e1
fixed overlay configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1327
diff
changeset
|
343 c_options->image_overlay.template_string); |
2334
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
344 if (c_options->image_overlay.font) |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
345 set_image_overlay_font_string(&options->image_overlay.font, |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
346 c_options->image_overlay.font); |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
347 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
|
348 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
|
349 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
|
350 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
|
351 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
|
352 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
|
353 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
|
354 options->image_overlay.background_alpha = c_options->image_overlay.background_alpha; |
321 | 355 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
|
356 options->image.exif_proof_rotate_enable = c_options->image.exif_proof_rotate_enable; |
9 | 357 |
342
de6de19bd03a
Rename dupe_custom_threshold option to duplicates_similarity_threshold.
Laurent Monin <geeqie@norz.org>
parents:
341
diff
changeset
|
358 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
|
359 options->rot_invariant_sim = c_options->rot_invariant_sim; |
9 | 360 |
321 | 361 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
|
362 |
2376
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
363 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
|
364 |
441
3cc6ee2e3e21
Allow the user to change open_recent_list_maxsize option through
Laurent Monin <geeqie@norz.org>
parents:
426
diff
changeset
|
365 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
|
366 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
|
367 options->clipboard_selection = c_options->clipboard_selection; |
2059 | 368 |
1208
338afd22a394
added options for metadata - not yet used
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1188
diff
changeset
|
369 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
|
370 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
|
371 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
|
372 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
|
373 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
|
374 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
|
375 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
|
376 options->metadata.confirm_timeout = c_options->metadata.confirm_timeout; |
1244
eeefa0f10d39
improved metadata preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1239
diff
changeset
|
377 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
|
378 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
|
379 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
|
380 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
|
381 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
|
382 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
|
383 (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
|
384 (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
|
385 (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
|
386 (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
|
387 (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
|
388 (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
|
389 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
|
390 (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
|
391 (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
|
392 (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
|
393 (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
|
394 (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
|
395 (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
|
396 options->stereo.enable_fsmode = c_options->stereo.enable_fsmode; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
397 options->stereo.fixed_w = c_options->stereo.fixed_w; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
398 options->stereo.fixed_h = c_options->stereo.fixed_h; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
399 options->stereo.fixed_x1 = c_options->stereo.fixed_x1; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
400 options->stereo.fixed_y1 = c_options->stereo.fixed_y1; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
401 options->stereo.fixed_x2 = c_options->stereo.fixed_x2; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
402 options->stereo.fixed_y2 = c_options->stereo.fixed_y2; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
403 |
2482
9b050f7e7b6c
Fix #445: Info sidebar section heights
Colin Clark <colin.clark@cclark.uk>
parents:
2474
diff
changeset
|
404 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
|
405 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
|
406 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
|
407 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
|
408 |
227
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
409 #ifdef DEBUG |
507
7408e89b601d
Move debug macros from main.h to new debug.h.
Laurent Monin <geeqie@norz.org>
parents:
497
diff
changeset
|
410 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
|
411 #endif |
9 | 412 |
113
f2109493004f
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
91
diff
changeset
|
413 #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
|
414 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
|
415 { |
1042
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
416 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
|
417 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
|
418 } |
1042
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
419 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
|
420 options->color_profile.use_x11_screen_profile = c_options->color_profile.use_x11_screen_profile; |
2386 | 421 if (options->color_profile.render_intent != c_options->color_profile.render_intent) |
422 { | |
423 options->color_profile.render_intent = c_options->color_profile.render_intent; | |
424 color_man_update(); | |
425 } | |
113
f2109493004f
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
91
diff
changeset
|
426 #endif |
f2109493004f
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
91
diff
changeset
|
427 |
26
f1fe26e637e9
Mon Mar 28 20:23:34 2005 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
15
diff
changeset
|
428 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
|
429 |
9 | 430 if (refresh) |
431 { | |
432 filter_rebuild(); | |
433 layout_refresh(NULL); | |
434 } | |
2059 | 435 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
436 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
|
437 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
438 toolbar_apply(); |
9 | 439 } |
440 | |
441 /* | |
442 *----------------------------------------------------------------------------- | |
443 * config window main button callbacks (private) | |
444 *----------------------------------------------------------------------------- | |
442 | 445 */ |
9 | 446 |
447 static void config_window_close_cb(GtkWidget *widget, gpointer data) | |
448 { | |
449 gtk_widget_destroy(configwindow); | |
450 configwindow = NULL; | |
451 filter_store = NULL; | |
452 } | |
453 | |
2412 | 454 static void config_window_help_cb(GtkWidget *widget, gpointer data) |
455 { | |
2431 | 456 GtkWidget *notebook = data; |
2412 | 457 gint i; |
458 | |
459 static gchar *html_section[] = | |
460 { | |
461 "GuideOptionsGeneral.html", | |
462 "GuideOptionsImage.html", | |
463 "GuideOptionsWindow.html", | |
464 "GuideOptionsKeyboard.html", | |
465 "GuideOptionsFiltering.html", | |
466 "GuideOptionsMetadata.html", | |
467 "GuideOptionsColor.html", | |
2628
3685b630d2e4
Fix documentation errors
Colin Clark <colin.clark@cclark.uk>
parents:
2623
diff
changeset
|
468 "GuideOptionsStereo.html", |
3685b630d2e4
Fix documentation errors
Colin Clark <colin.clark@cclark.uk>
parents:
2623
diff
changeset
|
469 "GuideOptionsBehavior.html", |
3685b630d2e4
Fix documentation errors
Colin Clark <colin.clark@cclark.uk>
parents:
2623
diff
changeset
|
470 "GuideOptionsToolbar.html" |
2412 | 471 }; |
472 | |
2441
a2d4729a3b2d
Fix GCC and Clang compile warnings.
Omari Stephens <xsdg@google.com>
parents:
2412
diff
changeset
|
473 i = gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)); |
2412 | 474 help_window_show(html_section[i]); |
475 } | |
476 | |
1443 | 477 static gboolean config_window_delete(GtkWidget *widget, GdkEventAny *event, gpointer data) |
9 | 478 { |
479 config_window_close_cb(NULL, NULL); | |
480 return TRUE; | |
481 } | |
482 | |
483 static void config_window_ok_cb(GtkWidget *widget, gpointer data) | |
484 { | |
485 config_window_apply(); | |
486 config_window_close_cb(NULL, NULL); | |
487 } | |
488 | |
489 static void config_window_apply_cb(GtkWidget *widget, gpointer data) | |
490 { | |
2501
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
491 LayoutWindow *lw; |
b5cec98159e7
Fix #264, 274, 285, 436: Add 'Losslessly rotate image' keyboard shortcuts
Colin Clark <colin.clark@cclark.uk>
parents:
2500
diff
changeset
|
492 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
|
493 |
9 | 494 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
|
495 layout_util_sync(lw); |
9 | 496 } |
497 | |
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
|
498 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
|
499 { |
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
|
500 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
|
501 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
|
502 } |
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
|
503 |
9 | 504 /* |
505 *----------------------------------------------------------------------------- | |
506 * config window setup (private) | |
507 *----------------------------------------------------------------------------- | |
442 | 508 */ |
9 | 509 |
510 static void quality_menu_cb(GtkWidget *combo, gpointer data) | |
511 { | |
512 gint *option = data; | |
513 | |
514 switch (gtk_combo_box_get_active(GTK_COMBO_BOX(combo))) | |
515 { | |
516 case 0: | |
517 default: | |
518 *option = GDK_INTERP_NEAREST; | |
519 break; | |
520 case 1: | |
521 *option = GDK_INTERP_TILES; | |
522 break; | |
523 case 2: | |
524 *option = GDK_INTERP_BILINEAR; | |
525 break; | |
526 case 3: | |
527 *option = GDK_INTERP_HYPER; | |
528 break; | |
529 } | |
530 } | |
531 | |
2662
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
532 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
|
533 { |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
534 gint *option = data; |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
535 |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
536 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
|
537 { |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
538 case 0: |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
539 default: |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
540 *option = PRIMARY; |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
541 break; |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
542 case 1: |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
543 *option = CLIPBOARD; |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
544 break; |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
545 } |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
546 } |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
547 |
9 | 548 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
|
549 guint option, guint *option_c) |
9 | 550 { |
551 GtkWidget *combo; | |
552 gint current = 0; | |
553 | |
554 *option_c = option; | |
555 | |
556 pref_table_label(table, column, row, text, 0.0); | |
557 | |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
558 combo = gtk_combo_box_text_new(); |
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
559 |
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
560 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Nearest (worst, but fastest)")); |
9 | 561 if (option == GDK_INTERP_NEAREST) current = 0; |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
562 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Tiles")); |
9 | 563 if (option == GDK_INTERP_TILES) current = 1; |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
564 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Bilinear")); |
9 | 565 if (option == GDK_INTERP_BILINEAR) current = 2; |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
566 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Hyper (best, but slowest)")); |
9 | 567 if (option == GDK_INTERP_HYPER) current = 3; |
568 | |
569 gtk_combo_box_set_active(GTK_COMBO_BOX(combo), current); | |
570 | |
571 g_signal_connect(G_OBJECT(combo), "changed", | |
572 G_CALLBACK(quality_menu_cb), option_c); | |
573 | |
574 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
|
575 GTK_EXPAND | GTK_FILL, 0, 0, 0); |
9 | 576 gtk_widget_show(combo); |
577 } | |
578 | |
2662
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
579 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
|
580 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
|
581 { |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
582 GtkWidget *combo; |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
583 gint current = 0; |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
584 |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
585 *option_c = option; |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
586 |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
587 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
|
588 |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
589 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
|
590 |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
591 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
|
592 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
|
593 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
|
594 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
|
595 |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
596 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
|
597 |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
598 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
|
599 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
|
600 |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
601 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
|
602 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
|
603 gtk_widget_show(combo); |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
604 } |
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
605 |
9 | 606 static void thumb_size_menu_cb(GtkWidget *combo, gpointer data) |
607 { | |
608 gint n; | |
609 | |
610 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
|
611 if (n < 0) return; |
9 | 612 |
736
31d858f3272d
Fix signed vs unsigned warnings.
Laurent Monin <geeqie@norz.org>
parents:
733
diff
changeset
|
613 if ((guint) n < sizeof(thumb_size_list) / sizeof(ThumbSize)) |
9 | 614 { |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
615 c_options->thumbnails.max_width = thumb_size_list[n].w; |
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
616 c_options->thumbnails.max_height = thumb_size_list[n].h; |
9 | 617 } |
736
31d858f3272d
Fix signed vs unsigned warnings.
Laurent Monin <geeqie@norz.org>
parents:
733
diff
changeset
|
618 else |
9 | 619 { |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
620 c_options->thumbnails.max_width = options->thumbnails.max_width; |
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
621 c_options->thumbnails.max_height = options->thumbnails.max_height; |
9 | 622 } |
623 } | |
624 | |
625 static void add_thumb_size_menu(GtkWidget *table, gint column, gint row, gchar *text) | |
626 { | |
627 GtkWidget *combo; | |
628 gint current; | |
629 gint i; | |
630 | |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
631 c_options->thumbnails.max_width = options->thumbnails.max_width; |
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
632 c_options->thumbnails.max_height = options->thumbnails.max_height; |
9 | 633 |
634 pref_table_label(table, column, row, text, 0.0); | |
635 | |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
636 combo = gtk_combo_box_text_new(); |
9 | 637 |
638 current = -1; | |
736
31d858f3272d
Fix signed vs unsigned warnings.
Laurent Monin <geeqie@norz.org>
parents:
733
diff
changeset
|
639 for (i = 0; (guint) i < sizeof(thumb_size_list) / sizeof(ThumbSize); i++) |
9 | 640 { |
641 gint w, h; | |
226
6b9e4c9e5596
Fix and simplify thumbnails size combo box related code.
Laurent Monin <geeqie@norz.org>
parents:
225
diff
changeset
|
642 gchar *buf; |
9 | 643 |
644 w = thumb_size_list[i].w; | |
645 h = thumb_size_list[i].h; | |
646 | |
226
6b9e4c9e5596
Fix and simplify thumbnails size combo box related code.
Laurent Monin <geeqie@norz.org>
parents:
225
diff
changeset
|
647 buf = g_strdup_printf("%d x %d", w, h); |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
648 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
|
649 g_free(buf); |
442 | 650 |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
651 if (w == options->thumbnails.max_width && h == options->thumbnails.max_height) current = i; |
9 | 652 } |
653 | |
654 if (current == -1) | |
655 { | |
656 gchar *buf; | |
657 | |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
658 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
|
659 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), buf); |
9 | 660 g_free(buf); |
661 | |
226
6b9e4c9e5596
Fix and simplify thumbnails size combo box related code.
Laurent Monin <geeqie@norz.org>
parents:
225
diff
changeset
|
662 current = i; |
9 | 663 } |
664 | |
665 gtk_combo_box_set_active(GTK_COMBO_BOX(combo), current); | |
666 g_signal_connect(G_OBJECT(combo), "changed", | |
667 G_CALLBACK(thumb_size_menu_cb), NULL); | |
668 | |
669 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
|
670 GTK_EXPAND | GTK_FILL, 0, 0, 0); |
9 | 671 gtk_widget_show(combo); |
672 } | |
673 | |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
674 static void stereo_mode_menu_cb(GtkWidget *combo, gpointer data) |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
675 { |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
676 gint *option = data; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
677 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
678 switch (gtk_combo_box_get_active(GTK_COMBO_BOX(combo))) |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
679 { |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
680 case 0: |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
681 default: |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
682 *option = PR_STEREO_NONE; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
683 break; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
684 case 1: |
1896
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
685 *option = PR_STEREO_ANAGLYPH_RC; |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
686 break; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
687 case 2: |
2255
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
688 *option = PR_STEREO_ANAGLYPH_GM; |
1896
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
689 break; |
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
690 case 3: |
2255
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
691 *option = PR_STEREO_ANAGLYPH_YB; |
1896
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
692 break; |
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
693 case 4: |
2255
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
694 *option = PR_STEREO_ANAGLYPH_GRAY_RC; |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
695 break; |
1896
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
696 case 5: |
2255
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
697 *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
|
698 break; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
699 case 6: |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
700 *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
|
701 break; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
702 case 7: |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
703 *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
|
704 break; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
705 case 8: |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
706 *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
|
707 break; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
708 case 9: |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
709 *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
|
710 break; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
711 case 10: |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
712 *option = PR_STEREO_HORIZ; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
713 break; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
714 case 11: |
1895
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
715 *option = PR_STEREO_HORIZ | PR_STEREO_HALF; |
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
716 break; |
2255
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
717 case 12: |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
718 *option = PR_STEREO_VERT; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
719 break; |
2255
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
720 case 13: |
1895
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
721 *option = PR_STEREO_VERT | PR_STEREO_HALF; |
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
722 break; |
2255
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
723 case 14: |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
724 *option = PR_STEREO_FIXED; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
725 break; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
726 } |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
727 } |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
728 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
729 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
|
730 gint option, gint *option_c, gboolean add_fixed) |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
731 { |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
732 GtkWidget *combo; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
733 gint current = 0; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
734 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
735 *option_c = option; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
736 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
737 pref_table_label(table, column, row, text, 0.0); |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
738 |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
739 combo = gtk_combo_box_text_new(); |
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
740 |
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
741 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
|
742 |
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
743 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
|
744 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
|
745 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
|
746 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
|
747 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
|
748 if (option & PR_STEREO_ANAGLYPH_YB) current = 3; |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
749 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
|
750 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
|
751 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
|
752 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
|
753 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
|
754 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
|
755 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
|
756 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
|
757 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
|
758 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
|
759 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
|
760 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
|
761 |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
762 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
|
763 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Side by Side Half size")); |
2184 | 764 if (option & PR_STEREO_HORIZ) |
1895
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
765 { |
2255
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
766 current = 10; |
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
767 if (option & PR_STEREO_HALF) current = 11; |
1895
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
768 } |
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
769 |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
770 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
|
771 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Top - Bottom Half size")); |
2184 | 772 if (option & PR_STEREO_VERT) |
1895
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
773 { |
2255
c67b4f60c4b1
Add support for Green-Magenta and Yellow-Blue anaglyph modes
Alexey Akishin <alex@science.su>
parents:
2221
diff
changeset
|
774 current = 12; |
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_HALF) current = 13; |
1895
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
776 } |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2184
diff
changeset
|
777 |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
778 if (add_fixed) |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
779 { |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
780 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
|
781 if (option & PR_STEREO_FIXED) current = 14; |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
782 } |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
783 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
784 gtk_combo_box_set_active(GTK_COMBO_BOX(combo), current); |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
785 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
786 g_signal_connect(G_OBJECT(combo), "changed", |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
787 G_CALLBACK(stereo_mode_menu_cb), option_c); |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
788 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
789 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
|
790 GTK_EXPAND | GTK_FILL, 0, 0, 0); |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
791 gtk_widget_show(combo); |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
792 } |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
793 |
2631
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
794 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
|
795 { |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
796 gchar **option = data; |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
797 |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
798 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
|
799 *option = ed->key; |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
800 } |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
801 |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
802 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
|
803 { |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
804 GtkWidget *combo = user_data; |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
805 EditorDescription *ed = data; |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
806 |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
807 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
|
808 } |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
809 |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
810 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
|
811 gchar *option, gchar **option_c) |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
812 { |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
813 GtkWidget *combo; |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
814 gint current; |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
815 /* use lists since they are sorted */ |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
816 GList *eds = editor_list_get(); |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
817 |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
818 *option_c = option; |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
819 |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
820 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
|
821 |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
822 combo = gtk_combo_box_text_new(); |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
823 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
|
824 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
|
825 |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
826 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
|
827 |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
828 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
|
829 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
|
830 |
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
831 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
|
832 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
|
833 gtk_widget_show(combo); |
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 |
9 | 836 static void filter_store_populate(void) |
837 { | |
838 GList *work; | |
839 | |
840 if (!filter_store) return; | |
841 | |
842 gtk_list_store_clear(filter_store); | |
843 | |
844 work = filter_get_list(); | |
845 while (work) | |
846 { | |
847 FilterEntry *fe; | |
848 GtkTreeIter iter; | |
849 | |
850 fe = work->data; | |
851 work = work->next; | |
852 | |
853 gtk_list_store_append(filter_store, &iter); | |
854 gtk_list_store_set(filter_store, &iter, 0, fe, -1); | |
855 } | |
856 } | |
857 | |
858 static void filter_store_ext_edit_cb(GtkCellRendererText *cell, gchar *path_str, | |
859 gchar *new_text, gpointer data) | |
860 { | |
861 GtkWidget *model = data; | |
862 FilterEntry *fe = data; | |
863 GtkTreePath *tpath; | |
864 GtkTreeIter iter; | |
865 | |
866 if (!new_text || strlen(new_text) < 1) return; | |
867 | |
868 tpath = gtk_tree_path_new_from_string(path_str); | |
869 gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, tpath); | |
870 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 0, &fe, -1); | |
871 | |
872 g_free(fe->extensions); | |
873 fe->extensions = g_strdup(new_text); | |
874 | |
875 gtk_tree_path_free(tpath); | |
876 filter_rebuild(); | |
877 } | |
878 | |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
879 static void filter_store_class_edit_cb(GtkCellRendererText *cell, gchar *path_str, |
1443 | 880 gchar *new_text, gpointer data) |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
881 { |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
882 GtkWidget *model = data; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
883 FilterEntry *fe = data; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
884 GtkTreePath *tpath; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
885 GtkTreeIter iter; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
886 gint i; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
887 |
1443 | 888 if (!new_text || !new_text[0]) return; |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
889 |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
890 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
|
891 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
|
892 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
|
893 |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
894 for (i = 0; i < FILE_FORMAT_CLASSES; i++) |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
895 { |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
896 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
|
897 { |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
898 fe->file_class = i; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
899 break; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
900 } |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
901 } |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
902 |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
903 gtk_tree_path_free(tpath); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
904 filter_rebuild(); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
905 } |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
906 |
9 | 907 static void filter_store_desc_edit_cb(GtkCellRendererText *cell, gchar *path_str, |
908 gchar *new_text, gpointer data) | |
909 { | |
910 GtkWidget *model = data; | |
911 FilterEntry *fe; | |
912 GtkTreePath *tpath; | |
913 GtkTreeIter iter; | |
914 | |
1443 | 915 if (!new_text || !new_text[0]) return; |
9 | 916 |
917 tpath = gtk_tree_path_new_from_string(path_str); | |
918 gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, tpath); | |
919 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 0, &fe, -1); | |
920 | |
921 g_free(fe->description); | |
922 fe->description = g_strdup(new_text); | |
923 | |
924 gtk_tree_path_free(tpath); | |
925 } | |
926 | |
927 static void filter_store_enable_cb(GtkCellRendererToggle *renderer, | |
928 gchar *path_str, gpointer data) | |
929 { | |
930 GtkWidget *model = data; | |
931 FilterEntry *fe; | |
932 GtkTreePath *tpath; | |
933 GtkTreeIter iter; | |
934 | |
935 tpath = gtk_tree_path_new_from_string(path_str); | |
936 gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, tpath); | |
937 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 0, &fe, -1); | |
938 | |
939 fe->enabled = !fe->enabled; | |
940 | |
941 gtk_tree_path_free(tpath); | |
942 filter_rebuild(); | |
943 } | |
944 | |
1239
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
945 static void filter_store_writable_cb(GtkCellRendererToggle *renderer, |
1443 | 946 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
|
947 { |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
948 GtkWidget *model = data; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
949 FilterEntry *fe; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
950 GtkTreePath *tpath; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
951 GtkTreeIter iter; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
952 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
953 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
|
954 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
|
955 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
|
956 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
957 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
|
958 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
|
959 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
960 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
|
961 filter_rebuild(); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
962 } |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
963 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
964 static void filter_store_sidecar_cb(GtkCellRendererToggle *renderer, |
1443 | 965 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
|
966 { |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
967 GtkWidget *model = data; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
968 FilterEntry *fe; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
969 GtkTreePath *tpath; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
970 GtkTreeIter iter; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
971 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
972 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
|
973 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
|
974 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
|
975 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
976 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
|
977 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
|
978 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
979 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
|
980 filter_rebuild(); |
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 |
9 | 983 static void filter_set_func(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, |
984 GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data) | |
985 { | |
986 FilterEntry *fe; | |
987 | |
988 gtk_tree_model_get(tree_model, iter, 0, &fe, -1); | |
989 | |
1347
84d289bde1ea
Add missing space between switch and first parenthesis.
Laurent Monin <geeqie@norz.org>
parents:
1346
diff
changeset
|
990 switch (GPOINTER_TO_INT(data)) |
9 | 991 { |
992 case FE_ENABLE: | |
993 g_object_set(GTK_CELL_RENDERER(cell), | |
994 "active", fe->enabled, NULL); | |
995 break; | |
996 case FE_EXTENSION: | |
997 g_object_set(GTK_CELL_RENDERER(cell), | |
998 "text", fe->extensions, NULL); | |
999 break; | |
1000 case FE_DESCRIPTION: | |
1001 g_object_set(GTK_CELL_RENDERER(cell), | |
1002 "text", fe->description, NULL); | |
1003 break; | |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1004 case FE_CLASS: |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1005 g_object_set(GTK_CELL_RENDERER(cell), |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1006 "text", _(format_class_list[fe->file_class]), NULL); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1007 break; |
1239
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
1008 case FE_WRITABLE: |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
1009 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
|
1010 "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
|
1011 break; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
1012 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
|
1013 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
|
1014 "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
|
1015 break; |
9 | 1016 } |
1017 } | |
1018 | |
2058
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1019 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
|
1020 { |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1021 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
|
1022 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
|
1023 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
|
1024 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
|
1025 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
|
1026 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
|
1027 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
|
1028 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
|
1029 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1030 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
|
1031 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
|
1032 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1033 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
|
1034 do { |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1035 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
|
1036 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
|
1037 i++; |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1038 } 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
|
1039 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1040 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
|
1041 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
|
1042 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1043 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
|
1044 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
|
1045 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
|
1046 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
|
1047 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1048 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
|
1049 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
|
1050 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
|
1051 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1052 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
|
1053 } |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1054 |
9 | 1055 static void filter_add_cb(GtkWidget *widget, gpointer data) |
1056 { | |
1239
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
1057 filter_add_unique("description", ".new", FORMAT_CLASS_IMAGE, TRUE, FALSE, TRUE); |
9 | 1058 filter_store_populate(); |
1059 | |
2058
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1060 g_idle_add((GSourceFunc)filter_add_scroll, data); |
9 | 1061 } |
1062 | |
1063 static void filter_remove_cb(GtkWidget *widget, gpointer data) | |
1064 { | |
1065 GtkWidget *filter_view = data; | |
1066 GtkTreeSelection *selection; | |
1067 GtkTreeIter iter; | |
1068 FilterEntry *fe; | |
1069 | |
1070 if (!filter_store) return; | |
995 | 1071 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(filter_view)); |
9 | 1072 if (!gtk_tree_selection_get_selected(selection, NULL, &iter)) return; |
1073 gtk_tree_model_get(GTK_TREE_MODEL(filter_store), &iter, 0, &fe, -1); | |
1074 if (!fe) return; | |
1075 | |
1076 filter_remove_entry(fe); | |
1077 filter_rebuild(); | |
1078 filter_store_populate(); | |
1079 } | |
1080 | |
2058
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1081 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
|
1082 { |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1083 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
|
1084 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
|
1085 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
|
1086 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1087 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
|
1088 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
|
1089 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
|
1090 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1091 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
|
1092 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
|
1093 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
|
1094 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1095 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
|
1096 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1097 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
|
1098 } |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1099 |
9 | 1100 static void filter_default_ok_cb(GenericDialog *gd, gpointer data) |
1101 { | |
1102 filter_reset(); | |
1103 filter_add_defaults(); | |
1104 filter_rebuild(); | |
1105 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
|
1106 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1107 g_idle_add((GSourceFunc)filter_default_ok_scroll, gd->data); |
9 | 1108 } |
1109 | |
1110 static void dummy_cancel_cb(GenericDialog *gd, gpointer data) | |
1111 { | |
1112 /* no op, only so cancel button appears */ | |
1113 } | |
1114 | |
1115 static void filter_default_cb(GtkWidget *widget, gpointer data) | |
1116 { | |
1117 GenericDialog *gd; | |
1118 | |
1119 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
|
1120 "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
|
1121 dummy_cancel_cb, data); |
9 | 1122 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
|
1123 _("This will reset the file filters to the defaults.\nContinue?"), TRUE); |
9 | 1124 generic_dialog_add_button(gd, GTK_STOCK_OK, NULL, filter_default_ok_cb, TRUE); |
1125 gtk_widget_show(gd->dialog); | |
1126 } | |
1127 | |
1001
a1f0b2010ca1
Consistency: type * instead of type*.
Laurent Monin <geeqie@norz.org>
parents:
1000
diff
changeset
|
1128 static void filter_disable_cb(GtkWidget *widget, gpointer data) |
9 | 1129 { |
1130 GtkWidget *frame = data; | |
1131 | |
1132 gtk_widget_set_sensitive(frame, | |
1133 !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))); | |
1134 } | |
1135 | |
1001
a1f0b2010ca1
Consistency: type * instead of type*.
Laurent Monin <geeqie@norz.org>
parents:
1000
diff
changeset
|
1136 static void safe_delete_view_cb(GtkWidget *widget, gpointer data) |
9 | 1137 { |
1138 layout_set_path(NULL, gtk_entry_get_text(GTK_ENTRY(safe_delete_path_entry))); | |
1139 } | |
1140 | |
1141 static void safe_delete_clear_ok_cb(GenericDialog *gd, gpointer data) | |
1142 { | |
1143 file_util_trash_clear(); | |
1144 } | |
1145 | |
1001
a1f0b2010ca1
Consistency: type * instead of type*.
Laurent Monin <geeqie@norz.org>
parents:
1000
diff
changeset
|
1146 static void safe_delete_clear_cb(GtkWidget *widget, gpointer data) |
9 | 1147 { |
1148 GenericDialog *gd; | |
1149 GtkWidget *entry; | |
1150 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
|
1151 "clear_trash", widget, TRUE, |
9 | 1152 dummy_cancel_cb, NULL); |
1153 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
|
1154 _("This will remove the trash contents."), FALSE); |
9 | 1155 generic_dialog_add_button(gd, GTK_STOCK_OK, NULL, safe_delete_clear_ok_cb, TRUE); |
1156 entry = gtk_entry_new(); | |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
1157 gtk_widget_set_can_focus(entry, FALSE); |
9 | 1158 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
|
1159 if (options->file_ops.safe_delete_path) gtk_entry_set_text(GTK_ENTRY(entry), options->file_ops.safe_delete_path); |
9 | 1160 gtk_box_pack_start(GTK_BOX(gd->vbox), entry, FALSE, FALSE, 0); |
1161 gtk_widget_show(entry); | |
1162 gtk_widget_show(gd->dialog); | |
1163 } | |
1164 | |
1001
a1f0b2010ca1
Consistency: type * instead of type*.
Laurent Monin <geeqie@norz.org>
parents:
1000
diff
changeset
|
1165 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
|
1166 { |
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
|
1167 GtkWidget *pTextView; |
1001
a1f0b2010ca1
Consistency: type * instead of type*.
Laurent Monin <geeqie@norz.org>
parents:
1000
diff
changeset
|
1168 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
|
1169 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
|
1170 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
|
1171 |
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
|
1172 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
|
1173 |
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
|
1174 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
|
1175 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
|
1176 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
|
1177 |
1336
7fe7536f02e1
fixed overlay configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1327
diff
changeset
|
1178 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
|
1179 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
|
1180 } |
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
|
1181 |
469
681796421193
Rename few functions and replace fullscreen info with image overlay template string.
Laurent Monin <geeqie@norz.org>
parents:
468
diff
changeset
|
1182 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
|
1183 { |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1184 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
|
1185 GtkTextBuffer *buffer; |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1186 |
1336
7fe7536f02e1
fixed overlay configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1327
diff
changeset
|
1187 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
|
1188 if (!configwindow) return; |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1189 |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1190 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
|
1191 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
|
1192 } |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1193 |
469
681796421193
Rename few functions and replace fullscreen info with image overlay template string.
Laurent Monin <geeqie@norz.org>
parents:
468
diff
changeset
|
1194 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
|
1195 { |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1196 GenericDialog *gd; |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1197 |
469
681796421193
Rename few functions and replace fullscreen info with image overlay template string.
Laurent Monin <geeqie@norz.org>
parents:
468
diff
changeset
|
1198 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
|
1199 "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
|
1200 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
|
1201 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
|
1202 _("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
|
1203 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
|
1204 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
|
1205 } |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1206 |
625
96e360e5949d
Add an help button to OSD info configuration in Preferences dialog.
Laurent Monin <geeqie@norz.org>
parents:
597
diff
changeset
|
1207 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
|
1208 { |
2412 | 1209 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
|
1210 } |
354
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
1211 |
2334
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1212 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
|
1213 { |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1214 #if GTK_CHECK_VERSION(3,4,0) |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1215 GtkWidget *dialog; |
2334
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1216 char *font; |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1217 PangoFontDescription *font_desc; |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1218 |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1219 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
|
1220 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
|
1221 |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1222 if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_CANCEL) |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1223 { |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1224 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
|
1225 font = pango_font_description_to_string(font_desc); |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1226 g_free(c_options->image_overlay.font); |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1227 c_options->image_overlay.font = g_strdup(font); |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1228 g_free(font); |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1229 } |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1230 |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1231 gtk_widget_destroy(dialog); |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1232 #else |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1233 const char *font; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1234 |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1235 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
|
1236 c_options->image_overlay.font = g_strdup(font); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1237 #endif |
2334
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1238 } |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1239 |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1240 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
|
1241 { |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1242 GtkWidget *dialog; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1243 #if GTK_CHECK_VERSION(3,4,0) |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1244 GdkRGBA colour; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1245 |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1246 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
|
1247 colour.red = options->image_overlay.text_red; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1248 colour.green = options->image_overlay.text_green; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1249 colour.blue = options->image_overlay.text_blue; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1250 colour.alpha = options->image_overlay.text_alpha; |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1251 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
|
1252 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
|
1253 |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1254 if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_CANCEL) |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1255 { |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1256 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
|
1257 c_options->image_overlay.text_red = colour.red*255; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1258 c_options->image_overlay.text_green = colour.green*255; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1259 c_options->image_overlay.text_blue = colour.blue*255; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1260 c_options->image_overlay.text_alpha = colour.alpha*255; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1261 } |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1262 gtk_widget_destroy(dialog); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1263 #else |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1264 GdkColor colour; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1265 GtkColorSelection *colorsel; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1266 |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1267 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
|
1268 gtk_window_set_keep_above(GTK_WINDOW(dialog),TRUE); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1269 colour.red = options->image_overlay.text_red*257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1270 colour.green = options->image_overlay.text_green*257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1271 colour.blue = options->image_overlay.text_blue*257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1272 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
|
1273 gtk_color_selection_set_has_opacity_control(colorsel, TRUE); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1274 gtk_color_selection_set_current_color(colorsel, &colour); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1275 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
|
1276 |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1277 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
|
1278 { |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1279 gtk_color_selection_get_current_color(colorsel, &colour); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1280 c_options->image_overlay.text_red = colour.red/257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1281 c_options->image_overlay.text_green = colour.green/257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1282 c_options->image_overlay.text_blue = colour.blue/257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1283 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
|
1284 } |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1285 gtk_widget_destroy (dialog); |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1286 #endif |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1287 } |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1288 |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1289 |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1290 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
|
1291 { |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1292 GtkWidget *dialog; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1293 #if GTK_CHECK_VERSION(3,4,0) |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1294 GdkRGBA colour; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1295 |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1296 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
|
1297 colour.red = options->image_overlay.background_red; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1298 colour.green = options->image_overlay.background_green; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1299 colour.blue = options->image_overlay.background_blue; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1300 colour.alpha = options->image_overlay.background_alpha; |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1301 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
|
1302 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
|
1303 |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1304 if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_CANCEL) |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1305 { |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1306 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
|
1307 c_options->image_overlay.background_red = colour.red*255; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1308 c_options->image_overlay.background_green = colour.green*255; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1309 c_options->image_overlay.background_blue = colour.blue*255; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1310 c_options->image_overlay.background_alpha = colour.alpha*255; |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1311 } |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1312 gtk_widget_destroy(dialog); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1313 #else |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1314 GdkColor colour; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1315 GtkColorSelection *colorsel; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1316 |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1317 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
|
1318 gtk_window_set_keep_above(GTK_WINDOW(dialog),TRUE); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1319 colour.red = options->image_overlay.background_red*257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1320 colour.green = options->image_overlay.background_green*257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1321 colour.blue = options->image_overlay.background_blue*257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1322 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
|
1323 gtk_color_selection_set_has_opacity_control(colorsel, TRUE); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1324 gtk_color_selection_set_current_color(colorsel, &colour); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1325 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
|
1326 |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1327 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
|
1328 { |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1329 gtk_color_selection_get_current_color(colorsel, &colour); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1330 c_options->image_overlay.background_red = colour.red/257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1331 c_options->image_overlay.background_green = colour.green/257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1332 c_options->image_overlay.background_blue = colour.blue/257; |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1333 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
|
1334 } |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1335 gtk_widget_destroy(dialog); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1336 #endif |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1337 } |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1338 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1339 static void accel_store_populate(void) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1340 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1341 LayoutWindow *lw; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1342 GList *groups, *actions; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1343 GtkAction *action; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1344 const gchar *accel_path; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1345 GtkAccelKey key; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1346 GtkTreeIter iter; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1347 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1348 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
|
1349 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1350 gtk_tree_store_clear(accel_store); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1351 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
|
1352 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1353 g_assert(lw && lw->ui_manager); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1354 groups = gtk_ui_manager_get_action_groups(lw->ui_manager); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1355 while (groups) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1356 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1357 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
|
1358 while (actions) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1359 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1360 action = GTK_ACTION(actions->data); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1361 accel_path = gtk_action_get_accel_path(action); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1362 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
|
1363 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1364 gchar *label, *label2, *tooltip, *accel; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1365 g_object_get(action, |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1366 "tooltip", &tooltip, |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1367 "label", &label, |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1368 NULL); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1369 |
2059 | 1370 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
|
1371 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1372 g_free(label); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1373 label = label2; |
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 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1376 accel = gtk_accelerator_name(key.accel_key, key.accel_mods); |
2059 | 1377 |
1378 if (tooltip) | |
1619
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1606
diff
changeset
|
1379 { |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1606
diff
changeset
|
1380 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
|
1381 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
|
1382 AE_ACTION, label, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1606
diff
changeset
|
1383 AE_KEY, accel, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1606
diff
changeset
|
1384 AE_TOOLTIP, tooltip ? tooltip : "", |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1606
diff
changeset
|
1385 AE_ACCEL, accel_path, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1606
diff
changeset
|
1386 -1); |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1606
diff
changeset
|
1387 } |
1601
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 g_free(accel); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1390 g_free(label); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1391 g_free(tooltip); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1392 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1393 actions = actions->next; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1394 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1395 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1396 groups = groups->next; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1397 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1398 } |
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 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
|
1401 { |
2059 | 1402 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1403 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1404 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1405 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
|
1406 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1407 gchar *accel1 = data; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1408 gchar *accel2; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1409 GtkAccelKey key1; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1410 GtkAccelKey key2; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1411 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1412 gtk_tree_model_get(model, iter, AE_KEY, &accel2, -1); |
2059 | 1413 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1414 gtk_accelerator_parse(accel1, &key1.accel_key, &key1.accel_mods); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1415 gtk_accelerator_parse(accel2, &key2.accel_key, &key2.accel_mods); |
2059 | 1416 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1417 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
|
1418 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1419 gtk_tree_store_set(accel_store, iter, AE_KEY, "", -1); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1420 DEBUG_1("accelerator key '%s' is already used, removing.", accel1); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1421 } |
2059 | 1422 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1423 g_free(accel2); |
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 return FALSE; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1426 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1427 |
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 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
|
1430 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1431 GtkTreeModel *model = (GtkTreeModel *)accel_store; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1432 GtkTreeIter iter; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1433 gchar *acc; |
1664
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1434 gchar *accel_path; |
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1435 GtkAccelKey old_key, key; |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1436 GtkTreePath *path = gtk_tree_path_new_from_string(path_string); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1437 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1438 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
|
1439 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
|
1440 |
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1441 /* 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
|
1442 gtk_accel_map_lookup_entry(accel_path, &old_key); |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1443 |
1664
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1444 /* change the key and read it back (change may fail on keys hardcoded in gtk)*/ |
2059 | 1445 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
|
1446 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
|
1447 |
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1448 /* restore the original for now, the key will be really changed when the changes are confirmed */ |
2059 | 1449 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
|
1450 |
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1451 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
|
1452 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
|
1453 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1454 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
|
1455 gtk_tree_path_free(path); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1456 g_free(acc); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1457 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1458 |
2058
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1459 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
|
1460 { |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1461 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
|
1462 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
|
1463 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
|
1464 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1465 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
|
1466 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
|
1467 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
|
1468 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1469 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
|
1470 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
|
1471 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
|
1472 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1473 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
|
1474 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1475 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
|
1476 } |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1477 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1478 static void accel_default_cb(GtkWidget *widget, gpointer data) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1479 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1480 accel_store_populate(); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1481 |
2058
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1482 g_idle_add((GSourceFunc)accel_default_scroll, data); |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1483 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1484 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1485 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
|
1486 { |
2059 | 1487 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
|
1488 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1489 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1490 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
|
1491 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1492 GtkAccelKey key; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1493 gchar *accel_path, *accel; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1494 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1495 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
|
1496 gtk_accel_map_lookup_entry(accel_path, &key); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1497 accel = gtk_accelerator_name(key.accel_key, key.accel_mods); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1498 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1499 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
|
1500 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1501 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
|
1502 g_free(accel_path); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1503 g_free(accel); |
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 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1506 static void accel_reset_cb(GtkWidget *widget, gpointer data) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1507 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1508 GtkTreeSelection *selection; |
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 if (!accel_store) return; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1511 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(data)); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1512 gtk_tree_selection_selected_foreach(selection, &accel_reset_selection, NULL); |
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 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1516 |
1039
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1517 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
|
1518 { |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1519 GtkWidget *label; |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1520 GtkWidget *vbox; |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1521 GtkWidget *scrolled; |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1522 GtkWidget *viewport; |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1523 |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1524 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
|
1525 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
|
1526 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
|
1527 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
|
1528 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
|
1529 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
|
1530 gtk_widget_show(scrolled); |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1531 |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1532 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
|
1533 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
|
1534 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
|
1535 gtk_widget_show(viewport); |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1536 |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1537 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
|
1538 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
|
1539 gtk_widget_show(vbox); |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1540 |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1541 return vbox; |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1542 } |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1543 |
2566
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1544 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
|
1545 { |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1546 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
|
1547 { |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1548 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
|
1549 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
|
1550 } |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1551 else |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1552 { |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1553 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
|
1554 } |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1555 } |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1556 |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1557 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
|
1558 { |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1559 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
|
1560 { |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1561 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
|
1562 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
|
1563 } |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1564 else |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1565 { |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1566 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
|
1567 } |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1568 } |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1569 |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1570 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
|
1571 { |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1572 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
|
1573 { |
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 = TRUE; |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1575 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
|
1576 } |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1577 else |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1578 { |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1579 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
|
1580 } |
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 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1583 /* general options tab */ |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1584 static void config_tab_general(GtkWidget *notebook) |
9 | 1585 { |
1586 GtkWidget *vbox; | |
2482
9b050f7e7b6c
Fix #445: Info sidebar section heights
Colin Clark <colin.clark@cclark.uk>
parents:
2474
diff
changeset
|
1587 GtkWidget *hbox; |
9 | 1588 GtkWidget *group; |
2566
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1589 GtkWidget *group_frame; |
9 | 1590 GtkWidget *subgroup; |
1591 GtkWidget *button; | |
1592 GtkWidget *ct_button; | |
1593 GtkWidget *table; | |
1594 GtkWidget *spin; | |
2612
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1595 gint hours, minutes, remainder; |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1596 gdouble seconds; |
9 | 1597 |
1039
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1598 vbox = scrolled_notebook_page(notebook, _("General")); |
9 | 1599 |
1600 group = pref_group_new(vbox, FALSE, _("Thumbnails"), GTK_ORIENTATION_VERTICAL); | |
1601 | |
1602 table = pref_table_new(group, 2, 2, FALSE, FALSE); | |
1603 add_thumb_size_menu(table, 0, 0, _("Size:")); | |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
1604 add_quality_menu(table, 0, 1, _("Quality:"), options->thumbnails.quality, &c_options->thumbnails.quality); |
9 | 1605 |
1606 ct_button = pref_checkbox_new_int(group, _("Cache thumbnails"), | |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
1607 options->thumbnails.enable_caching, &c_options->thumbnails.enable_caching); |
9 | 1608 |
1609 subgroup = pref_box_new(group, FALSE, GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP); | |
1610 pref_checkbox_link_sensitivity(ct_button, subgroup); | |
1611 | |
2566
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1612 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
|
1613 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
|
1614 button = pref_radiobutton_new(group_frame, NULL, get_thumbnails_cache_dir(), |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1615 !options->thumbnails.spec_standard, |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1616 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
|
1617 |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1618 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
|
1619 _("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
|
1620 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
|
1621 pref_radiobutton_new(group_frame, button, "*/.thumbnails", |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1622 options->thumbnails.cache_into_dirs, |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1623 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
|
1624 |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1625 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
|
1626 _("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
|
1627 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
|
1628 pref_radiobutton_new(group_frame, button, get_thumbnails_standard_cache_dir(), |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1629 options->thumbnails.spec_standard, |
034d8772d6d8
Fix #500: Geeqie doesn’t use shared thumbnail folder
Colin Clark <colin.clark@cclark.uk>
parents:
2563
diff
changeset
|
1630 G_CALLBACK(cache_standard_cb), NULL); |
9 | 1631 |
1522
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
1632 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
|
1633 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
|
1634 |
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
|
1635 #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
|
1636 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
|
1637 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
|
1638 |
bef1f1a91df9
Fix #541: Showing existing, or maybe generating thumbnails for MP4 and WEBM
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2670
diff
changeset
|
1639 // 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
|
1640 // 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
|
1641 #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
|
1642 |
9 | 1643 group = pref_group_new(vbox, FALSE, _("Slide show"), GTK_ORIENTATION_VERTICAL); |
1644 | |
326 | 1645 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
|
1646 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
|
1647 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
|
1648 minutes = remainder / (60 * SLIDESHOW_SUBSECOND_PRECISION); |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1649 seconds = (gdouble)(remainder % (60 * SLIDESHOW_SUBSECOND_PRECISION)) / |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1650 SLIDESHOW_SUBSECOND_PRECISION; |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1651 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1652 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
|
1653 |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1654 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
|
1655 0, 23, 1.0, 0, |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1656 options->slideshow.delay ? hours : 0.0, |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1657 G_CALLBACK(slideshow_delay_hours_cb), NULL); |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1658 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
|
1659 spin = pref_spin_new(hbox, ":" , NULL, |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1660 0, 59, 1.0, 0, |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1661 options->slideshow.delay ? minutes: 0.0, |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1662 G_CALLBACK(slideshow_delay_minutes_cb), NULL); |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1663 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
|
1664 spin = pref_spin_new(hbox, ":", NULL, |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1665 SLIDESHOW_MIN_SECONDS, 59, 1.0, 1, |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1666 options->slideshow.delay ? seconds : 10.0, |
3966a69e854d
Slideshow delay in hrs-mins-secs
Colin Clark <colin.clark@cclark.uk>
parents:
2606
diff
changeset
|
1667 G_CALLBACK(slideshow_delay_seconds_cb), NULL); |
9 | 1668 gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(spin), GTK_UPDATE_ALWAYS); |
1669 | |
326 | 1670 pref_checkbox_new_int(group, _("Random"), options->slideshow.random, &c_options->slideshow.random); |
1671 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
|
1672 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1673 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
|
1674 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1675 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
|
1676 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
|
1677 pref_checkbox_new_int(group, _("Preload next image"), |
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
1678 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
|
1679 |
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
1680 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
|
1681 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
|
1682 |
2495
33571d08bc37
Fix #446: Minor text updates
Colin Clark <colin.clark@cclark.uk>
parents:
2482
diff
changeset
|
1683 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
|
1684 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
|
1685 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
|
1686 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
|
1687 1, 9999, 1, |
9b050f7e7b6c
Fix #445: Info sidebar section heights
Colin Clark <colin.clark@cclark.uk>
parents:
2474
diff
changeset
|
1688 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
|
1689 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
|
1690 1, 9999, 1, |
9b050f7e7b6c
Fix #445: Info sidebar section heights
Colin Clark <colin.clark@cclark.uk>
parents:
2474
diff
changeset
|
1691 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
|
1692 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
|
1693 1, 9999, 1, |
9b050f7e7b6c
Fix #445: Info sidebar section heights
Colin Clark <colin.clark@cclark.uk>
parents:
2474
diff
changeset
|
1694 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
|
1695 pref_spin_new_int(hbox, _("Rating:"), NULL, |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2495
diff
changeset
|
1696 1, 9999, 1, |
eb2ce489ceea
Fix #323: Rating system
Colin Clark <colin.clark@cclark.uk>
parents:
2495
diff
changeset
|
1697 options->info_rating.height, &c_options->info_rating.height); |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1698 } |
9 | 1699 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1700 /* image tab */ |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1701 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
|
1702 { |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1703 GtkWidget *hbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1704 GtkWidget *vbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1705 GtkWidget *group; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1706 GtkWidget *ct_button; |
2474
f591509cb3d3
Fix #123: Limit image expansion in Fit To Window
Colin Clark <colin.clark@cclark.uk>
parents:
2462
diff
changeset
|
1707 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
|
1708 GtkWidget *table; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1709 GtkWidget *spin; |
9 | 1710 |
1039
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1711 vbox = scrolled_notebook_page(notebook, _("Image")); |
9 | 1712 |
1713 group = pref_group_new(vbox, FALSE, _("Zoom"), GTK_ORIENTATION_VERTICAL); | |
1714 | |
1715 table = pref_table_new(group, 2, 1, FALSE, FALSE); | |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
1716 add_quality_menu(table, 0, 0, _("Quality:"), options->image.zoom_quality, &c_options->image.zoom_quality); |
9 | 1717 |
2084
1c712b43f063
added option for clutter renderer
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2066
diff
changeset
|
1718 #ifdef HAVE_CLUTTER |
1c712b43f063
added option for clutter renderer
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2066
diff
changeset
|
1719 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
|
1720 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
|
1721 #endif |
1c712b43f063
added option for clutter renderer
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2066
diff
changeset
|
1722 |
1515
99d03a6f394f
disabled 2-pass rendering also affect color correction
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1513
diff
changeset
|
1723 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
|
1724 options->image.zoom_2pass, &c_options->image.zoom_2pass); |
9 | 1725 |
2665
89f913549674
Update documentation for Fit image to window options
Colin Clark <colin.clark@cclark.uk>
parents:
2662
diff
changeset
|
1726 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
|
1727 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
|
1728 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
|
1729 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
|
1730 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
|
1731 |
89f913549674
Update documentation for Fit image to window options
Colin Clark <colin.clark@cclark.uk>
parents:
2662
diff
changeset
|
1732 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
|
1733 |
2474
f591509cb3d3
Fix #123: Limit image expansion in Fit To Window
Colin Clark <colin.clark@cclark.uk>
parents:
2462
diff
changeset
|
1734 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
|
1735 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
|
1736 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
|
1737 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
|
1738 100, 999, 1, |
f591509cb3d3
Fix #123: Limit image expansion in Fit To Window
Colin Clark <colin.clark@cclark.uk>
parents:
2462
diff
changeset
|
1739 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
|
1740 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
|
1741 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 | 1742 |
209
ce89a8349d8b
configurable frame around image - geeqie_autofit_maxsize.patch by Laurent MONIN
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
208
diff
changeset
|
1743 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
|
1744 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
|
1745 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
|
1746 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
|
1747 10, 150, 1, |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
1748 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
|
1749 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
|
1750 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 | 1751 |
1752 group = pref_group_new(vbox, FALSE, _("Appearance"), GTK_ORIENTATION_VERTICAL); | |
1753 | |
1644
2b10e2bee592
the options for custom border color were made independent
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1626
diff
changeset
|
1754 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
|
1755 options->image.use_custom_border_color, &c_options->image.use_custom_border_color); |
2059 | 1756 |
1644
2b10e2bee592
the options for custom border color were made independent
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1626
diff
changeset
|
1757 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
|
1758 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
|
1759 |
339
4b5f75e97d81
Rename user_specified_window_background and window_background_color
Laurent Monin <geeqie@norz.org>
parents:
338
diff
changeset
|
1760 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
|
1761 G_CALLBACK(pref_color_button_set_cb), &c_options->image.border_color); |
9 | 1762 |
2457
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
1763 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
|
1764 |
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
1765 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
|
1766 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
|
1767 |
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
1768 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
|
1769 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
|
1770 |
58f993045468
Fix #219: Ability to set solid colour for transparency layer
Colin Clark <cclark@mcb.net>
parents:
2454
diff
changeset
|
1771 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
|
1772 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
|
1773 |
9 | 1774 group = pref_group_new(vbox, FALSE, _("Convenience"), GTK_ORIENTATION_VERTICAL); |
1775 | |
2066
01d2c966209e
exif autorotate for proofs
Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
parents:
2059
diff
changeset
|
1776 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
|
1777 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
|
1778 } |
9 | 1779 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1780 /* windows tab */ |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1781 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
|
1782 { |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1783 GtkWidget *hbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1784 GtkWidget *vbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1785 GtkWidget *group; |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1786 GtkWidget *button; |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1787 GtkWidget *ct_button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1788 GtkWidget *spin; |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1789 GtkWidget *image_overlay_template_view; |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1790 GtkWidget *scrolled; |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1791 GtkTextBuffer *buffer; |
9 | 1792 |
1039
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1793 vbox = scrolled_notebook_page(notebook, _("Windows")); |
9 | 1794 |
1795 group = pref_group_new(vbox, FALSE, _("State"), GTK_ORIENTATION_VERTICAL); | |
1796 | |
2376
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
1797 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
|
1798 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
|
1799 |
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
1800 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
|
1801 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
|
1802 pref_checkbox_link_sensitivity(ct_button, button); |
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
1803 |
9 | 1804 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
|
1805 options->tools_restore_state, &c_options->tools_restore_state); |
9 | 1806 |
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
|
1807 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
|
1808 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
|
1809 |
2740
808983eb036e
Option to display window ID
Colin Clark <colin.clark@cclark.uk>
parents:
2723
diff
changeset
|
1810 pref_checkbox_new_int(group, _("Show window IDs"), |
808983eb036e
Option to display window ID
Colin Clark <colin.clark@cclark.uk>
parents:
2723
diff
changeset
|
1811 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
|
1812 |
9 | 1813 group = pref_group_new(vbox, FALSE, _("Size"), GTK_ORIENTATION_VERTICAL); |
1814 | |
1815 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
|
1816 options->image.fit_window_to_image, &c_options->image.fit_window_to_image); |
9 | 1817 |
1818 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE); | |
1819 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
|
1820 options->image.limit_window_size, &c_options->image.limit_window_size); |
9 | 1821 spin = pref_spin_new_int(hbox, NULL, NULL, |
1822 10, 150, 1, | |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
1823 options->image.max_window_size, &c_options->image.max_window_size); |
9 | 1824 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
|
1825 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1826 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
|
1827 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1828 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
|
1829 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
|
1830 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
|
1831 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
|
1832 gtk_widget_show(hbox); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1833 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1834 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
|
1835 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
|
1836 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
|
1837 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
|
1838 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1839 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1840 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
|
1841 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1842 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
|
1843 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1844 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
|
1845 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
|
1846 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
|
1847 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
|
1848 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1849 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
|
1850 gtk_widget_show(scrolled); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1851 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1852 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
|
1853 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1854 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
|
1855 _("<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
|
1856 "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
|
1857 "<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
|
1858 "<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
|
1859 "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
|
1860 "<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
|
1861 "<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
|
1862 "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
|
1863 "<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
|
1864 "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
|
1865 "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
|
1866 )); |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1867 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
|
1868 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
|
1869 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1870 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
|
1871 |
2337
7ff7000c458c
Image overlay configurable items
Colin Clark <cclark@mcb.net>
parents:
2335
diff
changeset
|
1872 #if GTK_CHECK_VERSION(3,4,0) |
2334
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1873 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
|
1874 G_CALLBACK(image_overlay_set_font_cb), notebook); |
2343
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1875 #else |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1876 button = gtk_font_button_new(); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1877 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
|
1878 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
|
1879 g_signal_connect(G_OBJECT(button), "font-set", |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1880 G_CALLBACK(image_overlay_set_font_cb),NULL); |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1881 #endif |
ab475bde511b
Image overlay configurable items GTK2
Colin Clark <cclark@mcb.net>
parents:
2341
diff
changeset
|
1882 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
|
1883 gtk_widget_show(button); |
e38178f556f6
Image overlay configurable font
Colin Clark <cclark@mcb.net>
parents:
2328
diff
changeset
|
1884 |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1885 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
|
1886 G_CALLBACK(image_overlay_set_text_colour_cb), NULL); |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1887 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
|
1888 gtk_widget_show(button); |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1889 |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1890 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
|
1891 G_CALLBACK(image_overlay_set_background_colour_cb), NULL); |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1892 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
|
1893 gtk_widget_show(button); |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1894 image_overlay_set_text_colours(); |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
1895 |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1896 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
|
1897 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
|
1898 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
|
1899 gtk_widget_show(button); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1900 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1901 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
|
1902 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
|
1903 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
|
1904 gtk_widget_show(button); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1905 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1906 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
|
1907 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
|
1908 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
|
1909 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
|
1910 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1911 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1912 } |
9 | 1913 |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1914 static GtkTreeModel *create_class_model(void) |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1915 { |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1916 GtkListStore *model; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1917 GtkTreeIter iter; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1918 gint i; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1919 |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1920 /* 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
|
1921 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
|
1922 for (i = 0; i < FILE_FORMAT_CLASSES; i++) |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1923 { |
1346
b3378273091e
No space between function name and first parenthesis, it eases greping (see CODING).
Laurent Monin <geeqie@norz.org>
parents:
1336
diff
changeset
|
1924 gtk_list_store_append(model, &iter); |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1925 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
|
1926 } |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1927 return GTK_TREE_MODEL (model); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1928 } |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1929 |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1930 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1931 /* filtering tab */ |
1522
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
1932 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
|
1933 { |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1934 GtkWidget *hbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1935 GtkWidget *frame; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1936 GtkWidget *vbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1937 GtkWidget *group; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1938 GtkWidget *button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1939 GtkWidget *ct_button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1940 GtkWidget *scrolled; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1941 GtkWidget *filter_view; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1942 GtkCellRenderer *renderer; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1943 GtkTreeSelection *selection; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1944 GtkTreeViewColumn *column; |
9 | 1945 |
1522
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
1946 vbox = scrolled_notebook_page(notebook, _("Files")); |
9 | 1947 |
1948 group = pref_box_new(vbox, FALSE, GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP); | |
1949 | |
356
ba4edae270d6
Rename show_dot_files to show_hidden_files.
Laurent Monin <geeqie@norz.org>
parents:
354
diff
changeset
|
1950 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
|
1951 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
|
1952 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
|
1953 options->file_filter.show_parent_directory, &c_options->file_filter.show_parent_directory); |
9 | 1954 pref_checkbox_new_int(group, _("Case sensitive sort"), |
329
056872a2bdf7
Rename file sorting options.
Laurent Monin <geeqie@norz.org>
parents:
327
diff
changeset
|
1955 options->file_sort.case_sensitive, &c_options->file_sort.case_sensitive); |
2406 | 1956 pref_checkbox_new_int(group, _("Natural sort order"), |
1957 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
|
1958 pref_checkbox_new_int(group, _("Disable file extension checks"), |
dec8d9db5770
Fix #333 Renaming file extensions
Colin Clark <cclark@mcb.net>
parents:
2265
diff
changeset
|
1959 options->file_filter.disable_file_extension_checks, &c_options->file_filter.disable_file_extension_checks); |
9 | 1960 |
1961 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
|
1962 options->file_filter.disable, &c_options->file_filter.disable); |
9 | 1963 |
170
34d0013592f5
basic sidecar files configuration via preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
134
diff
changeset
|
1964 |
34d0013592f5
basic sidecar files configuration via preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
134
diff
changeset
|
1965 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
|
1966 |
34d0013592f5
basic sidecar files configuration via preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
134
diff
changeset
|
1967 sidecar_ext_entry = gtk_entry_new(); |
1229
2f11fec715ca
sidecar files grouping was made case-insensitive
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1216
diff
changeset
|
1968 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
|
1969 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
|
1970 gtk_widget_show(sidecar_ext_entry); |
34d0013592f5
basic sidecar files configuration via preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
134
diff
changeset
|
1971 |
9 | 1972 group = pref_group_new(vbox, TRUE, _("File types"), GTK_ORIENTATION_VERTICAL); |
1973 | |
1974 frame = pref_group_parent(group); | |
1975 g_signal_connect(G_OBJECT(ct_button), "toggled", | |
1976 G_CALLBACK(filter_disable_cb), frame); | |
332
e0907717f749
Rename file filtering options.
Laurent Monin <geeqie@norz.org>
parents:
330
diff
changeset
|
1977 gtk_widget_set_sensitive(frame, !options->file_filter.disable); |
9 | 1978 |
1979 scrolled = gtk_scrolled_window_new(NULL, NULL); | |
1980 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
|
1981 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); |
9 | 1982 gtk_box_pack_start(GTK_BOX(group), scrolled, TRUE, TRUE, 0); |
1983 gtk_widget_show(scrolled); | |
1984 | |
1985 filter_store = gtk_list_store_new(1, G_TYPE_POINTER); | |
1986 filter_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(filter_store)); | |
1987 g_object_unref(filter_store); | |
1988 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(filter_view)); | |
1989 gtk_tree_selection_set_mode(GTK_TREE_SELECTION(selection), GTK_SELECTION_SINGLE); | |
1990 | |
1991 gtk_tree_view_set_enable_search(GTK_TREE_VIEW(filter_view), FALSE); | |
1992 | |
1993 column = gtk_tree_view_column_new(); | |
1994 gtk_tree_view_column_set_title(column, _("Filter")); | |
1995 gtk_tree_view_column_set_resizable(column, TRUE); | |
1996 | |
1997 renderer = gtk_cell_renderer_toggle_new(); | |
1998 g_signal_connect(G_OBJECT(renderer), "toggled", | |
1999 G_CALLBACK(filter_store_enable_cb), filter_store); | |
2000 gtk_tree_view_column_pack_start(column, renderer, FALSE); | |
2001 gtk_tree_view_column_set_cell_data_func(column, renderer, filter_set_func, | |
2002 GINT_TO_POINTER(FE_ENABLE), NULL); | |
442 | 2003 |
9 | 2004 renderer = gtk_cell_renderer_text_new(); |
2005 g_signal_connect(G_OBJECT(renderer), "edited", | |
2006 G_CALLBACK(filter_store_ext_edit_cb), filter_store); | |
2007 gtk_tree_view_column_pack_start(column, renderer, TRUE); | |
2008 g_object_set(G_OBJECT(renderer), "editable", (gboolean)TRUE, NULL); | |
2009 gtk_tree_view_column_set_cell_data_func(column, renderer, filter_set_func, | |
2010 GINT_TO_POINTER(FE_EXTENSION), NULL); | |
2011 gtk_tree_view_append_column(GTK_TREE_VIEW(filter_view), column); | |
2012 | |
2013 column = gtk_tree_view_column_new(); | |
2014 gtk_tree_view_column_set_title(column, _("Description")); | |
2015 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
|
2016 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
|
2017 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); |
2059 | 2018 |
9 | 2019 renderer = gtk_cell_renderer_text_new(); |
2020 g_signal_connect(G_OBJECT(renderer), "edited", | |
2021 G_CALLBACK(filter_store_desc_edit_cb), filter_store); | |
2022 g_object_set(G_OBJECT(renderer), "editable", (gboolean)TRUE, NULL); | |
2023 gtk_tree_view_column_pack_start(column, renderer, FALSE); | |
2024 gtk_tree_view_column_set_cell_data_func(column, renderer, filter_set_func, | |
2025 GINT_TO_POINTER(FE_DESCRIPTION), NULL); | |
2026 gtk_tree_view_append_column(GTK_TREE_VIEW(filter_view), column); | |
2027 | |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2028 column = gtk_tree_view_column_new(); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2029 gtk_tree_view_column_set_title(column, _("Class")); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2030 gtk_tree_view_column_set_resizable(column, TRUE); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2031 renderer = gtk_cell_renderer_combo_new(); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2032 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
|
2033 "model", create_class_model(), |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2034 "text-column", 0, |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2035 "has-entry", FALSE, |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2036 NULL); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2037 |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2038 g_signal_connect(G_OBJECT(renderer), "edited", |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2039 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
|
2040 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
|
2041 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
|
2042 GINT_TO_POINTER(FE_CLASS), NULL); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2043 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
|
2044 |
1239
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
2045 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
|
2046 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
|
2047 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
|
2048 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
|
2049 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
|
2050 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
|
2051 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
|
2052 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
|
2053 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
|
2054 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
|
2055 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
2056 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
|
2057 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
|
2058 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
|
2059 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
|
2060 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
|
2061 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
|
2062 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
|
2063 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
|
2064 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
|
2065 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
|
2066 |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
2067 |
9 | 2068 filter_store_populate(); |
2069 gtk_container_add(GTK_CONTAINER(scrolled), filter_view); | |
2070 gtk_widget_show(filter_view); | |
2071 | |
2072 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_BUTTON_GAP); | |
2073 | |
2074 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
|
2075 G_CALLBACK(filter_default_cb), filter_view); |
9 | 2076 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
2077 gtk_widget_show(button); | |
2078 | |
2079 button = pref_button_new(NULL, GTK_STOCK_REMOVE, NULL, FALSE, | |
2080 G_CALLBACK(filter_remove_cb), filter_view); | |
2081 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | |
2082 gtk_widget_show(button); | |
2083 | |
2084 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
|
2085 G_CALLBACK(filter_add_cb), filter_view); |
9 | 2086 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
2087 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
|
2088 } |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2089 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2090 /* metadata tab */ |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2091 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
|
2092 { |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2093 GtkWidget *vbox; |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2094 GtkWidget *hbox; |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2095 GtkWidget *group; |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2096 GtkWidget *ct_button; |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2097 GtkWidget *label; |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2098 gchar *text; |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2099 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2100 vbox = scrolled_notebook_page(notebook, _("Metadata")); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2101 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2102 |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2103 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
|
2104 #ifndef HAVE_EXIV2 |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2105 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
|
2106 #endif |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2107 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
|
2108 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
|
2109 |
2495
33571d08bc37
Fix #446: Minor text updates
Colin Clark <colin.clark@cclark.uk>
parents:
2482
diff
changeset
|
2110 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
|
2111 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
|
2112 #ifndef HAVE_EXIV2 |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2113 gtk_widget_set_sensitive(ct_button, FALSE); |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2114 #endif |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2115 |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2116 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
|
2117 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
|
2118 |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2119 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
|
2120 label = pref_label_new(group, text); |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2121 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
|
2122 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
|
2123 g_free(text); |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2124 |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2125 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
|
2126 #ifndef HAVE_EXIV2 |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2127 gtk_widget_set_sensitive(group, FALSE); |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2128 #endif |
1510
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 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
|
2131 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
|
2132 |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2133 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
|
2134 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
|
2135 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2136 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
|
2137 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
|
2138 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2139 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
|
2140 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
|
2141 |
2454
93d1c77a312b
Fix #147: Alternative format for sidecar extension
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2444
diff
changeset
|
2142 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
|
2143 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
|
2144 |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2145 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
|
2146 #ifndef HAVE_EXIV2 |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2147 gtk_widget_set_sensitive(group, FALSE); |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2148 #endif |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2149 |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2150 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
|
2151 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
|
2152 |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2153 |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2154 group = pref_group_new(vbox, FALSE, _("Miscellaneous"), GTK_ORIENTATION_VERTICAL); |
1663
c39c4ee5d94c
improved description string
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1644
diff
changeset
|
2155 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
|
2156 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
|
2157 |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2158 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
|
2159 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
|
2160 |
1686
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2161 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
|
2162 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
|
2163 #ifndef HAVE_EXIV2 |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2164 gtk_widget_set_sensitive(ct_button, FALSE); |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
2165 #endif |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2166 |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
2167 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
|
2168 |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2169 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
|
2170 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
|
2171 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2172 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
|
2173 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
|
2174 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2175 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
|
2176 options->metadata.confirm_timeout, &c_options->metadata.confirm_timeout); |
2059 | 2177 |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2178 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
|
2179 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
|
2180 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2181 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
|
2182 options->metadata.confirm_on_dir_change, &c_options->metadata.confirm_on_dir_change); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2183 } |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2184 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2185 /* metadata tab */ |
2386 | 2186 #ifdef HAVE_LCMS |
2187 static void intent_menu_cb(GtkWidget *combo, gpointer data) | |
2188 { | |
2189 gint *option = data; | |
2190 | |
2191 switch (gtk_combo_box_get_active(GTK_COMBO_BOX(combo))) | |
2192 { | |
2193 case 0: | |
2194 default: | |
2195 *option = INTENT_PERCEPTUAL; | |
2196 break; | |
2197 case 1: | |
2198 *option = INTENT_RELATIVE_COLORIMETRIC; | |
2199 break; | |
2200 case 2: | |
2201 *option = INTENT_SATURATION; | |
2202 break; | |
2203 case 3: | |
2204 *option = INTENT_ABSOLUTE_COLORIMETRIC; | |
2205 break; | |
2206 } | |
2207 } | |
2208 | |
2209 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
|
2210 gint option, gint *option_c) |
2386 | 2211 { |
2212 GtkWidget *combo; | |
2213 gint current = 0; | |
2214 | |
2215 *option_c = option; | |
2216 | |
2217 pref_table_label(table, column, row, text, 0.0); | |
2218 | |
2219 combo = gtk_combo_box_text_new(); | |
2220 | |
2221 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Perceptual")); | |
2222 if (option == INTENT_PERCEPTUAL) current = 0; | |
2223 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Relative Colorimetric")); | |
2224 if (option == INTENT_RELATIVE_COLORIMETRIC) current = 1; | |
2225 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Saturation")); | |
2226 if (option == INTENT_SATURATION) current = 2; | |
2227 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Absolute Colorimetric")); | |
2228 if (option == INTENT_ABSOLUTE_COLORIMETRIC) current = 3; | |
2229 | |
2230 gtk_combo_box_set_active(GTK_COMBO_BOX(combo), current); | |
2231 | |
2232 gtk_widget_set_tooltip_text(combo,"Refer to the lcms documentation for the defaults used when the selected Intent is not available"); | |
2233 | |
2234 g_signal_connect(G_OBJECT(combo), "changed", | |
2235 G_CALLBACK(intent_menu_cb), option_c); | |
2236 | |
2237 gtk_table_attach(GTK_TABLE(table), combo, column + 1, column + 2, row, row + 1, | |
2238 GTK_EXPAND | GTK_FILL, 0, 0, 0); | |
2239 gtk_widget_show(combo); | |
2240 } | |
2241 #endif | |
2242 | |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2243 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
|
2244 { |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2245 GtkWidget *label; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2246 GtkWidget *vbox; |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2247 GtkWidget *group; |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2248 GtkWidget *tabcomp; |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2249 GtkWidget *table; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2250 gint i; |
9 | 2251 |
1522
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
2252 vbox = scrolled_notebook_page(notebook, _("Color management")); |
9 | 2253 |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2254 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
|
2255 #ifndef HAVE_LCMS |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2256 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
|
2257 #endif |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2258 |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2259 table = pref_table_new(group, 3, COLOR_PROFILE_INPUTS + 1, FALSE, FALSE); |
9 | 2260 gtk_table_set_col_spacings(GTK_TABLE(table), PREF_PAD_GAP); |
2261 | |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2262 label = pref_table_label(table, 0, 0, _("Type"), 0.0); |
9 | 2263 pref_label_bold(label, TRUE, FALSE); |
2264 | |
2265 label = pref_table_label(table, 1, 0, _("Menu name"), 0.0); | |
2266 pref_label_bold(label, TRUE, FALSE); | |
2267 | |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2268 label = pref_table_label(table, 2, 0, _("File"), 0.0); |
9 | 2269 pref_label_bold(label, TRUE, FALSE); |
2270 | |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2271 for (i = 0; i < COLOR_PROFILE_INPUTS; i++) |
9 | 2272 { |
224
bb39a088c56e
Tidy up. Fix indentation and missing whitespaces.
Laurent Monin <geeqie@norz.org>
parents:
223
diff
changeset
|
2273 GtkWidget *entry; |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2274 gchar *buf; |
442 | 2275 |
1625 | 2276 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
|
2277 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
|
2278 g_free(buf); |
9 | 2279 |
224
bb39a088c56e
Tidy up. Fix indentation and missing whitespaces.
Laurent Monin <geeqie@norz.org>
parents:
223
diff
changeset
|
2280 entry = gtk_entry_new(); |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2281 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
|
2282 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
|
2283 { |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2284 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
|
2285 } |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2286 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
|
2287 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
|
2288 gtk_widget_show(entry); |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2289 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
|
2290 |
2723
c3417ff92722
Show .icc files when selecting color profiles
Colin Clark <colin.clark@cclark.uk>
parents:
2721
diff
changeset
|
2291 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
|
2292 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
|
2293 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
|
2294 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
|
2295 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
|
2296 gtk_widget_show(tabcomp); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2297 color_profile_input_file_entry[i] = entry; |
9 | 2298 } |
2299 | |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2300 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
|
2301 #ifndef HAVE_LCMS |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2302 gtk_widget_set_sensitive(pref_group_parent(group), FALSE); |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2303 #endif |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2304 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
|
2305 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
|
2306 |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2307 table = pref_table_new(group, 2, 1, FALSE, FALSE); |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2308 |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2309 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
|
2310 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
|
2311 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
|
2312 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
|
2313 gtk_widget_set_size_request(color_profile_screen_file_entry, 160, -1); |
2386 | 2314 #ifdef HAVE_LCMS |
2315 add_intent_menu(table, 0, 1, _("Render Intent:"), options->color_profile.render_intent, &c_options->color_profile.render_intent); | |
2316 #endif | |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2317 gtk_table_attach(GTK_TABLE(table), tabcomp, 1, 2, |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
2318 0, 1, |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2319 GTK_FILL | GTK_EXPAND, 0, 0, 0); |
2386 | 2320 |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2321 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
|
2322 } |
222
fe6cb572a798
various exif improvements based on patch by Uwe Ohse
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
218
diff
changeset
|
2323 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2324 /* advanced entry tab */ |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2325 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
|
2326 { |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2327 GtkWidget *hbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2328 GtkWidget *vbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2329 GtkWidget *group; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2330 GtkWidget *button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2331 GtkWidget *tabcomp; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2332 GtkWidget *ct_button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2333 GtkWidget *spin; |
2631
e493a7df8745
Addl fix #510: Rudimentary video support
Tomasz Golinski <tomaszg@math.uwb.edu.pl>
parents:
2628
diff
changeset
|
2334 GtkWidget *table; |
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
|
2335 |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2336 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
|
2337 |
1685
041cdca65160
Revert "Add pgettext for some ambiguous strings"
Klaus Ethgen <Klaus@Ethgen.de>
parents:
1678
diff
changeset
|
2338 group = pref_group_new(vbox, FALSE, _("Delete"), GTK_ORIENTATION_VERTICAL); |
9 | 2339 |
2340 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
|
2341 options->file_ops.confirm_delete, &c_options->file_ops.confirm_delete); |
9 | 2342 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
|
2343 options->file_ops.enable_delete_key, &c_options->file_ops.enable_delete_key); |
9 | 2344 |
2345 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
|
2346 options->file_ops.safe_delete_enable, &c_options->file_ops.safe_delete_enable); |
9 | 2347 |
2348 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE); | |
2349 pref_checkbox_link_sensitivity(ct_button, hbox); | |
2350 | |
2351 pref_spacer(hbox, PREF_PAD_INDENT - PREF_PAD_SPACE); | |
2352 pref_label_new(hbox, _("Folder:")); | |
2353 | |
2723
c3417ff92722
Show .icc files when selecting color profiles
Colin Clark <colin.clark@cclark.uk>
parents:
2721
diff
changeset
|
2354 tabcomp = tab_completion_new(&safe_delete_path_entry, options->file_ops.safe_delete_path, NULL, NULL, NULL, NULL); |
9 | 2355 tab_completion_add_select_button(safe_delete_path_entry, NULL, TRUE); |
2356 gtk_box_pack_start(GTK_BOX(hbox), tabcomp, TRUE, TRUE, 0); | |
2357 gtk_widget_show(tabcomp); | |
2358 | |
2359 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_BUTTON_GAP); | |
2360 pref_checkbox_link_sensitivity(ct_button, hbox); | |
2361 | |
2362 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
|
2363 spin = pref_spin_new_int(hbox, _("Maximum size:"), _("MB"), |
442 | 2364 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
|
2365 gtk_widget_set_tooltip_markup(spin, _("Set to 0 for unlimited size")); |
9 | 2366 button = pref_button_new(NULL, NULL, _("View"), FALSE, |
2367 G_CALLBACK(safe_delete_view_cb), NULL); | |
2368 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | |
2369 gtk_widget_show(button); | |
2370 | |
2371 button = pref_button_new(NULL, GTK_STOCK_CLEAR, NULL, FALSE, | |
2372 G_CALLBACK(safe_delete_clear_cb), NULL); | |
2373 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | |
2374 gtk_widget_show(button); | |
2375 | |
497
29dc838f7d6b
Allow the copy of file paths to clipboard.
Laurent Monin <geeqie@norz.org>
parents:
475
diff
changeset
|
2376 |
9 | 2377 group = pref_group_new(vbox, FALSE, _("Behavior"), GTK_ORIENTATION_VERTICAL); |
2378 | |
2379 pref_checkbox_new_int(group, _("Descend folders in tree view"), | |
321 | 2380 options->tree_descend_subdirs, &c_options->tree_descend_subdirs); |
9 | 2381 |
2382 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
|
2383 options->file_ops.enable_in_place_rename, &c_options->file_ops.enable_in_place_rename); |
9 | 2384 |
2376
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
2385 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
|
2386 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
|
2387 |
2424
83d9886b9bcb
Preferences: Open recent list maximum size
Colin Clark <cclark@mcb.net>
parents:
2423
diff
changeset
|
2388 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
|
2389 1, 50, 1, options->open_recent_list_maxsize, &c_options->open_recent_list_maxsize); |
2059 | 2390 |
458
1397463b9c74
Allow the user to set the drag'n drop icon size through
Laurent Monin <geeqie@norz.org>
parents:
446
diff
changeset
|
2391 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
|
2392 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
|
2393 |
2662
08d2547d72ea
Fix #137: "Copy path" problem (or may be feature)
Colin Clark <colin.clark@cclark.uk>
parents:
2631
diff
changeset
|
2394 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
|
2395 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
|
2396 |
9 | 2397 group = pref_group_new(vbox, FALSE, _("Navigation"), GTK_ORIENTATION_VERTICAL); |
2398 | |
2399 pref_checkbox_new_int(group, _("Progressive keyboard scrolling"), | |
321 | 2400 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
|
2401 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
|
2402 1, 32, 1, options->keyboard_scroll_step, (int *)&c_options->keyboard_scroll_step); |
9 | 2403 pref_checkbox_new_int(group, _("Mouse wheel scrolls image"), |
321 | 2404 options->mousewheel_scrolls, &c_options->mousewheel_scrolls); |
2376
6c310168a91c
Add four new preferences
Maciej S. Szmigiero <mail@maciej.szmigiero.name>
parents:
2350
diff
changeset
|
2405 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
|
2406 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
|
2407 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
|
2408 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
|
2409 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
|
2410 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
|
2411 |
9 | 2412 |
227
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
2413 #ifdef DEBUG |
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
2414 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
|
2415 |
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
2416 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
|
2417 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
|
2418 |
2596
9c435c86a296
Optional timer data in log window
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
2419 pref_checkbox_new_int(group, _("Timer data"), |
9c435c86a296
Optional timer data in log window
Colin Clark <colin.clark@cclark.uk>
parents:
2587
diff
changeset
|
2420 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
|
2421 |
2505
d01e5b8e80d9
Eliminate FIXME: Log window line limit
Colin Clark <colin.clark@cclark.uk>
parents:
2501
diff
changeset
|
2422 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
|
2423 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
|
2424 #endif |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2425 } |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2426 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2427 /* accelerators tab */ |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2428 static void config_tab_accelerators(GtkWidget *notebook) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2429 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2430 GtkWidget *hbox; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2431 GtkWidget *vbox; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2432 GtkWidget *group; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2433 GtkWidget *button; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2434 GtkWidget *scrolled; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2435 GtkWidget *accel_view; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2436 GtkCellRenderer *renderer; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2437 GtkTreeSelection *selection; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2438 GtkTreeViewColumn *column; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2439 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2440 vbox = scrolled_notebook_page(notebook, _("Keyboard")); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2441 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2442 group = pref_group_new(vbox, TRUE, _("Accelerators"), GTK_ORIENTATION_VERTICAL); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2443 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2444 scrolled = gtk_scrolled_window_new(NULL, NULL); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2445 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
|
2446 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
|
2447 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
|
2448 gtk_widget_show(scrolled); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2449 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2450 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
|
2451 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2452 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
|
2453 g_object_unref(accel_store); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2454 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
|
2455 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
|
2456 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2457 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
|
2458 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2459 renderer = gtk_cell_renderer_text_new(); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2460 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2461 column = gtk_tree_view_column_new_with_attributes(_("Action"), |
2059 | 2462 renderer, |
2463 "text", AE_ACTION, | |
2464 NULL); | |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2465 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2466 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
|
2467 gtk_tree_view_column_set_resizable(column, TRUE); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2468 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
|
2469 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2470 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2471 renderer = gtk_cell_renderer_accel_new(); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2472 g_signal_connect(G_OBJECT(renderer), "accel-cleared", |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2473 G_CALLBACK(accel_store_cleared_cb), accel_store); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2474 g_signal_connect(G_OBJECT(renderer), "accel-edited", |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2475 G_CALLBACK(accel_store_edited_cb), accel_store); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2476 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2477 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2478 g_object_set (renderer, |
2059 | 2479 "editable", TRUE, |
2480 "accel-mode", GTK_CELL_RENDERER_ACCEL_MODE_OTHER, | |
2481 NULL); | |
2482 | |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2483 column = gtk_tree_view_column_new_with_attributes(_("KEY"), |
2059 | 2484 renderer, |
2485 "text", AE_KEY, | |
2486 NULL); | |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2487 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2488 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
|
2489 gtk_tree_view_column_set_resizable(column, TRUE); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2490 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
|
2491 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2492 renderer = gtk_cell_renderer_text_new(); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2493 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2494 column = gtk_tree_view_column_new_with_attributes(_("Tooltip"), |
2059 | 2495 renderer, |
2496 "text", AE_TOOLTIP, | |
2497 NULL); | |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2498 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2499 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
|
2500 gtk_tree_view_column_set_resizable(column, TRUE); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2501 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
|
2502 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2503 renderer = gtk_cell_renderer_text_new(); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2504 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2505 column = gtk_tree_view_column_new_with_attributes("Accel", |
2059 | 2506 renderer, |
2507 "text", AE_ACCEL, | |
2508 NULL); | |
2509 | |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2510 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
|
2511 gtk_tree_view_column_set_resizable(column, TRUE); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2512 gtk_tree_view_append_column(GTK_TREE_VIEW(accel_view), column); |
2059 | 2513 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2514 accel_store_populate(); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2515 gtk_container_add(GTK_CONTAINER(scrolled), accel_view); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2516 gtk_widget_show(accel_view); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2517 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2518 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
|
2519 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2520 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
|
2521 G_CALLBACK(accel_default_cb), accel_view); |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2522 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
|
2523 gtk_widget_show(button); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2524 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2525 button = pref_button_new(NULL, NULL, _("Reset selected"), FALSE, |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2526 G_CALLBACK(accel_reset_cb), accel_view); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2527 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
|
2528 gtk_widget_show(button); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2529 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2530 |
2623
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
2531 /* toolbar tab */ |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
2532 static void config_tab_toolbar(GtkWidget *notebook) |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
2533 { |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
2534 GtkWidget *vbox; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
2535 GtkWidget *toolbardata; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
2536 LayoutWindow *lw; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
2537 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
2538 lw = layout_window_list->data; |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
2539 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
2540 vbox = scrolled_notebook_page(notebook, _("Toolbar")); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
2541 |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
2542 toolbardata = toolbar_select_new(lw); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
2543 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
|
2544 gtk_widget_show(vbox); |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
2545 } |
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
2546 |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
2547 /* stereo tab */ |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
2548 static void config_tab_stereo(GtkWidget *notebook) |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
2549 { |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
2550 GtkWidget *vbox; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
2551 GtkWidget *group; |
1891
25645af65caf
added fixed stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1889
diff
changeset
|
2552 GtkWidget *group2; |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
2553 GtkWidget *table; |
1892
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2554 GtkWidget *box; |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2555 GtkWidget *box2; |
1891
25645af65caf
added fixed stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1889
diff
changeset
|
2556 GtkWidget *fs_button; |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
2557 vbox = scrolled_notebook_page(notebook, _("Stereo")); |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
2558 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
2559 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
|
2560 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
2561 table = pref_table_new(group, 2, 1, FALSE, FALSE); |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
2562 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
|
2563 |
1892
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2564 table = pref_table_new(group, 2, 2, TRUE, FALSE); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2565 box = pref_table_box(table, 0, 0, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2566 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
|
2567 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
|
2568 box = pref_table_box(table, 1, 0, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2569 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
|
2570 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
|
2571 box = pref_table_box(table, 0, 1, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2572 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
|
2573 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
|
2574 box = pref_table_box(table, 1, 1, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2575 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
|
2576 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
|
2577 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
|
2578 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
|
2579 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
|
2580 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
|
2581 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
2582 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
|
2583 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
|
2584 options->stereo.enable_fsmode, &c_options->stereo.enable_fsmode); |
1892
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2585 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
|
2586 pref_checkbox_link_sensitivity(fs_button, box2); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2587 table = pref_table_new(box2, 2, 1, FALSE, FALSE); |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
2588 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
|
2589 table = pref_table_new(box2, 2, 2, TRUE, FALSE); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2590 box = pref_table_box(table, 0, 0, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2591 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
|
2592 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
|
2593 box = pref_table_box(table, 1, 0, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2594 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
|
2595 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
|
2596 box = pref_table_box(table, 0, 1, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2597 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
|
2598 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
|
2599 box = pref_table_box(table, 1, 1, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2600 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
|
2601 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
|
2602 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
|
2603 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
|
2604 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
|
2605 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
|
2606 |
1892
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2607 group2 = pref_group_new(box2, FALSE, _("Fixed position"), GTK_ORIENTATION_VERTICAL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2608 table = pref_table_new(group2, 5, 3, FALSE, FALSE); |
1921
9a82e917c61d
fixed stereo.fixed preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1896
diff
changeset
|
2609 pref_table_spin_new_int(table, 0, 0, _("Width"), NULL, |
9a82e917c61d
fixed stereo.fixed preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1896
diff
changeset
|
2610 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
|
2611 pref_table_spin_new_int(table, 3, 0, _("Height"), NULL, |
9a82e917c61d
fixed stereo.fixed preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1896
diff
changeset
|
2612 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
|
2613 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
|
2614 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
|
2615 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
|
2616 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
|
2617 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
|
2618 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
|
2619 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
|
2620 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
|
2621 |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
2622 } |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
2623 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2624 /* Main preferences window */ |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2625 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
|
2626 { |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2627 GtkWidget *win_vbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2628 GtkWidget *hbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2629 GtkWidget *notebook; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2630 GtkWidget *button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2631 GtkWidget *ct_button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2632 |
321 | 2633 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
|
2634 |
289
d4d7e7aa0d88
Simplify and unify gtk_window creation with the help of
Laurent Monin <geeqie@norz.org>
parents:
288
diff
changeset
|
2635 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
|
2636 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
|
2637 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
|
2638 G_CALLBACK(config_window_delete), NULL); |
442 | 2639 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
|
2640 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
|
2641 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
|
2642 |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2643 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
|
2644 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
|
2645 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
|
2646 |
2412 | 2647 notebook = gtk_notebook_new(); |
2648 gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_TOP); | |
2649 gtk_box_pack_start(GTK_BOX(win_vbox), notebook, TRUE, TRUE, 0); | |
2650 | |
2651 config_tab_general(notebook); | |
2652 config_tab_image(notebook); | |
2653 config_tab_windows(notebook); | |
2654 config_tab_accelerators(notebook); | |
2655 config_tab_files(notebook); | |
2656 config_tab_metadata(notebook); | |
2657 config_tab_color(notebook); | |
2658 config_tab_stereo(notebook); | |
2659 config_tab_behavior(notebook); | |
2623
f5886b8e1968
Fix #444: User-definable toolbar
Colin Clark <colin.clark@cclark.uk>
parents:
2612
diff
changeset
|
2660 config_tab_toolbar(notebook); |
2412 | 2661 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2662 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
|
2663 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
|
2664 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
|
2665 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
|
2666 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
|
2667 |
2412 | 2668 button = pref_button_new(NULL, GTK_STOCK_HELP, NULL, FALSE, |
2669 G_CALLBACK(config_window_help_cb), notebook); | |
2670 gtk_container_add(GTK_CONTAINER(hbox), button); | |
2671 gtk_widget_set_can_default(button, TRUE); | |
2672 gtk_widget_show(button); | |
2673 | |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2674 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
|
2675 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
|
2676 gtk_container_add(GTK_CONTAINER(hbox), button); |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
2677 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
|
2678 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
|
2679 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
|
2680 |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2681 ct_button = button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2682 |
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
|
2683 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
|
2684 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
|
2685 gtk_container_add(GTK_CONTAINER(hbox), button); |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
2686 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
|
2687 gtk_widget_show(button); |
2059 | 2688 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2689 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
|
2690 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
|
2691 gtk_container_add(GTK_CONTAINER(hbox), button); |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
2692 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
|
2693 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
|
2694 |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2695 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
|
2696 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
|
2697 gtk_container_add(GTK_CONTAINER(hbox), button); |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
2698 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
|
2699 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
|
2700 |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2701 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
|
2702 { |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2703 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
|
2704 } |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2705 |
9 | 2706 gtk_widget_show(notebook); |
2707 | |
2708 gtk_widget_show(configwindow); | |
2709 } | |
2710 | |
2711 /* | |
2712 *----------------------------------------------------------------------------- | |
2713 * config window show (public) | |
2714 *----------------------------------------------------------------------------- | |
442 | 2715 */ |
9 | 2716 |
2717 void show_config_window(void) | |
2718 { | |
2719 if (configwindow) | |
2720 { | |
2721 gtk_window_present(GTK_WINDOW(configwindow)); | |
2722 return; | |
2723 } | |
2724 | |
2725 config_window_create(); | |
2726 } | |
2727 | |
2728 /* | |
2729 *----------------- | |
2730 * about window | |
2731 *----------------- | |
2732 */ | |
2733 | |
2573
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2734 void show_about_window(LayoutWindow *lw) |
9 | 2735 { |
2573
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2736 GdkPixbuf *pixbuf_logo; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2737 GdkPixbuf *pixbuf_icon; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2738 gchar *authors[1000]; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2739 gchar *comment; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2740 gint i_authors = 0; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2741 gchar *path; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2742 FILE *fp = NULL; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2743 #define LINE_LENGTH 1000 |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2744 gchar line[LINE_LENGTH]; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2745 |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2746 #if !GTK_CHECK_VERSION(3,0,0) |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2747 GString *copyright; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2748 |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2749 copyright = g_string_new(NULL); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2750 path = g_build_filename(GQ_HELPDIR, "COPYING", NULL); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2751 fp = fopen(path, "r"); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2752 if (fp) |
9 | 2753 { |
2573
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2754 while(fgets(line, LINE_LENGTH, fp)) |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2755 { |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2756 copyright = g_string_append(copyright, line); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2757 } |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2758 fclose(fp); |
9 | 2759 } |
2573
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2760 g_free(path); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2761 #endif |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2762 |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2763 authors[0] = NULL; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2764 path = g_build_filename(GQ_HELPDIR, "AUTHORS", NULL); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2765 fp = fopen(path, "r"); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2766 if (fp) |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2767 { |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2768 while(fgets(line, LINE_LENGTH, fp)) |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2769 { |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2770 /* get rid of ending \n from fgets */ |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2771 line[strlen(line) - 1] = '\0'; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2772 authors[i_authors] = g_strdup(line); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2773 i_authors++; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2774 } |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2775 authors[i_authors] = NULL; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2776 fclose(fp); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2777 } |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2778 g_free(path); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2779 |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2780 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
|
2781 "\nhttps://github.com/BestImageViewer/geeqie/issues",NULL); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2782 |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2783 pixbuf_logo = pixbuf_inline(PIXBUF_INLINE_LOGO); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2784 pixbuf_icon = pixbuf_inline(PIXBUF_INLINE_ICON); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2785 gtk_show_about_dialog(GTK_WINDOW(lw->window), |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2786 "title", _("About Geeqie"), |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2787 "resizable", TRUE, |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2788 "program-name", GQ_APPNAME, |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2789 "version", VERSION, |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2790 "logo", pixbuf_logo, |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2791 "icon", pixbuf_icon, |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2792 "website", GQ_WEBSITE, |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2793 "website-label", "Website", |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2794 "comments", comment, |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2795 "authors", authors, |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2796 "translator-credits", _("translator-credits"), |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2797 #if GTK_CHECK_VERSION(3,0,0) |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2798 "license-type", GTK_LICENSE_GPL_2_0, |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2799 #else |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2800 "license", copyright->str, |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2801 #endif |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2802 NULL); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2803 |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2804 #if !GTK_CHECK_VERSION(3,0,0) |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2805 g_string_free(copyright, TRUE); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2806 #endif |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2807 gint n = 0; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2808 while(n < i_authors) |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2809 { |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2810 g_free(authors[n]); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2811 n++; |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2812 } |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2813 g_free(comment); |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2814 |
3e5919841759
Update secondary user documentation
Colin Clark <colin.clark@cclark.uk>
parents:
2568
diff
changeset
|
2815 return; |
9 | 2816 } |
2335
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
2817 |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
2818 static void image_overlay_set_text_colours() |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
2819 { |
aa2e9d37193b
Image overlay configurable colours
Colin Clark <cclark@mcb.net>
parents:
2334
diff
changeset
|
2820 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
|
2821 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
|
2822 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
|
2823 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
|
2824 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
|
2825 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
|
2826 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
|
2827 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
|
2828 } |
1055
4bbdfab3c89a
Adding a vim modeline to all files - patch by Klaus Ethgen
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1053
diff
changeset
|
2829 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */ |