Mercurial > hg > forks > geeqie
annotate src/preferences.c @ 2184:9cdebd070874
Trim trailing white spaces.
author | Laurent Monin <zas@norz.org> |
---|---|
date | Thu, 30 Aug 2012 18:31:41 +0200 |
parents | 8addfcef82af |
children | c14a1d8e6aa4 |
rev | line source |
---|---|
9 | 1 /* |
196
bdad1cacadf4
rename GQview -> Geeqie over the code
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
170
diff
changeset
|
2 * Geeqie |
67
40abb746a32e
Fri Oct 13 05:22:43 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
26
diff
changeset
|
3 * (C) 2006 John Ellis |
2021
26dfd7a4d130
updated version and copyright notice
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1921
diff
changeset
|
4 * Copyright (C) 2008 - 2012 The Geeqie Team |
9 | 5 * |
6 * Author: John Ellis | |
7 * | |
8 * This software is released under the GNU General Public License (GNU GPL). | |
9 * Please read the included file COPYING for more information. | |
10 * This software comes with no warranty of any kind, use at your own risk! | |
11 */ | |
12 | |
13 | |
281 | 14 #include "main.h" |
9 | 15 #include "preferences.h" |
16 | |
648
36e8da5a771d
Move some functions from main.[ch] to new window.[ch].
Laurent Monin <geeqie@norz.org>
parents:
630
diff
changeset
|
17 #include "bar_exif.h" |
1599
ec811624c949
Include missing header file.
Laurent Monin <geeqie@norz.org>
parents:
1596
diff
changeset
|
18 #include "cache.h" |
9 | 19 #include "cache_maint.h" |
20 #include "editors.h" | |
648
36e8da5a771d
Move some functions from main.[ch] to new window.[ch].
Laurent Monin <geeqie@norz.org>
parents:
630
diff
changeset
|
21 #include "exif.h" |
586
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
566
diff
changeset
|
22 #include "filedata.h" |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
566
diff
changeset
|
23 #include "filefilter.h" |
9 | 24 #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
|
25 #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
|
26 #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
|
27 #include "color-man.h" |
9 | 28 #include "img-view.h" |
29 #include "layout_config.h" | |
30 #include "layout_util.h" | |
31 #include "pixbuf_util.h" | |
32 #include "slideshow.h" | |
597
471697db9e6b
moved safe delete functions to separate file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
594
diff
changeset
|
33 #include "trash.h" |
9 | 34 #include "utilops.h" |
35 #include "ui_fileops.h" | |
36 #include "ui_misc.h" | |
37 #include "ui_tabcomp.h" | |
38 #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
|
39 #include "window.h" |
9 | 40 |
41 #include <math.h> | |
42 | |
43 | |
44 #define EDITOR_NAME_MAX_LENGTH 32 | |
45 #define EDITOR_COMMAND_MAX_LENGTH 1024 | |
46 | |
47 | |
48 typedef struct _ThumbSize ThumbSize; | |
49 struct _ThumbSize | |
50 { | |
51 gint w; | |
52 gint h; | |
53 }; | |
54 | |
55 static ThumbSize thumb_size_list[] = | |
56 { | |
57 { 24, 24 }, | |
58 { 32, 32 }, | |
59 { 48, 48 }, | |
60 { 64, 64 }, | |
61 { 96, 72 }, | |
62 { 96, 96 }, | |
63 { 128, 96 }, | |
64 { 128, 128 }, | |
65 { 160, 120 }, | |
66 { 160, 160 }, | |
67 { 192, 144 }, | |
68 { 192, 192 }, | |
69 { 256, 192 }, | |
70 { 256, 256 } | |
71 }; | |
72 | |
73 enum { | |
74 FE_ENABLE, | |
75 FE_EXTENSION, | |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
76 FE_DESCRIPTION, |
1239
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
77 FE_CLASS, |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
78 FE_WRITABLE, |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
79 FE_ALLOW_SIDECAR |
9 | 80 }; |
81 | |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
82 enum { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
83 AE_ACTION, |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
84 AE_KEY, |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
85 AE_TOOLTIP, |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
86 AE_ACCEL |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
87 }; |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
88 |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
89 static gchar *format_class_list[] = { |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
90 N_("Unknown"), |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
91 N_("Image"), |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
92 N_("RAW Image"), |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
93 N_("Metadata") |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
94 }; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
95 |
9 | 96 /* config memory values */ |
321 | 97 static ConfOptions *c_options = NULL; |
9 | 98 |
99 | |
227
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
100 #ifdef DEBUG |
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
101 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
|
102 #endif |
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
103 |
9 | 104 static GtkWidget *configwindow = NULL; |
105 static GtkListStore *filter_store = NULL; | |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
106 static GtkTreeStore *accel_store = NULL; |
9 | 107 |
108 static GtkWidget *safe_delete_path_entry; | |
109 | |
113
f2109493004f
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
91
diff
changeset
|
110 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
|
111 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
|
112 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
|
113 |
170
34d0013592f5
basic sidecar files configuration via preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
134
diff
changeset
|
114 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
|
115 |
5794f581eafc
Make the preferences window resizeable, and try to improve
Laurent Monin <geeqie@norz.org>
parents:
224
diff
changeset
|
116 |
5794f581eafc
Make the preferences window resizeable, and try to improve
Laurent Monin <geeqie@norz.org>
parents:
224
diff
changeset
|
117 #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
|
118 #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
|
119 |
9 | 120 /* |
121 *----------------------------------------------------------------------------- | |
122 * option widget callbacks (private) | |
123 *----------------------------------------------------------------------------- | |
442 | 124 */ |
9 | 125 |
1039
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
126 static void zoom_mode_cb(GtkWidget *widget, gpointer data) |
9 | 127 { |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
128 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) |
1039
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
129 c_options->image.zoom_mode = GPOINTER_TO_INT(data); |
9 | 130 } |
131 | |
1038
ea23bbd31f75
Allow to change image.scroll_reset_method in Preferences > Image.
Laurent Monin <geeqie@norz.org>
parents:
1024
diff
changeset
|
132 static void scroll_reset_cb(GtkWidget *widget, gpointer data) |
ea23bbd31f75
Allow to change image.scroll_reset_method in Preferences > Image.
Laurent Monin <geeqie@norz.org>
parents:
1024
diff
changeset
|
133 { |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
134 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) |
1038
ea23bbd31f75
Allow to change image.scroll_reset_method in Preferences > Image.
Laurent Monin <geeqie@norz.org>
parents:
1024
diff
changeset
|
135 c_options->image.scroll_reset_method = GPOINTER_TO_INT(data); |
ea23bbd31f75
Allow to change image.scroll_reset_method in Preferences > Image.
Laurent Monin <geeqie@norz.org>
parents:
1024
diff
changeset
|
136 } |
ea23bbd31f75
Allow to change image.scroll_reset_method in Preferences > Image.
Laurent Monin <geeqie@norz.org>
parents:
1024
diff
changeset
|
137 |
9 | 138 static void zoom_increment_cb(GtkWidget *spin, gpointer data) |
139 { | |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
140 c_options->image.zoom_increment = (gint)(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin)) * 10.0 + 0.01); |
9 | 141 } |
142 | |
143 static void slideshow_delay_cb(GtkWidget *spin, gpointer data) | |
144 { | |
326 | 145 c_options->slideshow.delay = (gint)(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin)) * |
1000
07f6093c1c1a
For the sake of consistency, use glib basic types everywhere.
Laurent Monin <geeqie@norz.org>
parents:
995
diff
changeset
|
146 (gdouble)SLIDESHOW_SUBSECOND_PRECISION + 0.01); |
9 | 147 } |
148 | |
149 /* | |
150 *----------------------------------------------------------------------------- | |
151 * sync progam to config window routine (private) | |
152 *----------------------------------------------------------------------------- | |
442 | 153 */ |
9 | 154 |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1400
diff
changeset
|
155 void config_entry_to_option(GtkWidget *entry, gchar **option, gchar *(*func)(const gchar *)) |
9 | 156 { |
157 const gchar *buf; | |
1042
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
158 |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
159 g_free(*option); |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
160 *option = NULL; |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
161 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
|
162 if (buf && strlen(buf) > 0) |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
163 { |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
164 if (func) |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
165 *option = func(buf); |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
166 else |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
167 *option = g_strdup(buf); |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
168 } |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
169 } |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
170 |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
171 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
172 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
|
173 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
174 gchar *accel_path, *accel; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
175 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
176 gtk_tree_model_get(model, iter, AE_ACCEL, &accel_path, AE_KEY, &accel, -1); |
2059 | 177 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
178 if (accel_path && accel_path[0]) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
179 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
180 GtkAccelKey key; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
181 gtk_accelerator_parse(accel, &key.accel_key, &key.accel_mods); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
182 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
|
183 } |
2059 | 184 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
185 g_free(accel_path); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
186 g_free(accel); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
187 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
188 return FALSE; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
189 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
190 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
191 |
1042
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
192 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
|
193 { |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
194 gint i; |
1437 | 195 gboolean refresh = FALSE; |
1042
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
196 |
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
197 config_entry_to_option(safe_delete_path_entry, &options->file_ops.safe_delete_path, remove_trailing_slash); |
2059 | 198 |
356
ba4edae270d6
Rename show_dot_files to show_hidden_files.
Laurent Monin <geeqie@norz.org>
parents:
354
diff
changeset
|
199 if (options->file_filter.show_hidden_files != c_options->file_filter.show_hidden_files) refresh = TRUE; |
373
363117fefc85
Add a new option in Preferences > Filtering to allow the
Laurent Monin <geeqie@norz.org>
parents:
356
diff
changeset
|
200 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
|
201 if (options->file_sort.case_sensitive != c_options->file_sort.case_sensitive) refresh = TRUE; |
332
e0907717f749
Rename file filtering options.
Laurent Monin <geeqie@norz.org>
parents:
330
diff
changeset
|
202 if (options->file_filter.disable != c_options->file_filter.disable) refresh = TRUE; |
9 | 203 |
341
3e0059a55671
Move safe_delete* and in place rename options to file_ops
Laurent Monin <geeqie@norz.org>
parents:
339
diff
changeset
|
204 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
|
205 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
|
206 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
|
207 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
|
208 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
|
209 options->save_window_positions = c_options->save_window_positions; |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
210 options->image.zoom_mode = c_options->image.zoom_mode; |
1038
ea23bbd31f75
Allow to change image.scroll_reset_method in Preferences > Image.
Laurent Monin <geeqie@norz.org>
parents:
1024
diff
changeset
|
211 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
|
212 options->image.zoom_2pass = c_options->image.zoom_2pass; |
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
213 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
|
214 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
|
215 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
|
216 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
|
217 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
|
218 options->image.max_autofit_size = c_options->image.max_autofit_size; |
2084
1c712b43f063
added option for clutter renderer
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2066
diff
changeset
|
219 options->image.use_clutter_renderer = c_options->image.use_clutter_renderer; |
321 | 220 options->progressive_key_scrolling = c_options->progressive_key_scrolling; |
1506
6e235e3ba076
Force thumbnails refreshing when thumbnails dimensions are modified through Preferences.
Laurent Monin <geeqie@norz.org>
parents:
1443
diff
changeset
|
221 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
|
222 || 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
|
223 || 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
|
224 { |
6e235e3ba076
Force thumbnails refreshing when thumbnails dimensions are modified through Preferences.
Laurent Monin <geeqie@norz.org>
parents:
1443
diff
changeset
|
225 thumb_format_changed = TRUE; |
6e235e3ba076
Force thumbnails refreshing when thumbnails dimensions are modified through Preferences.
Laurent Monin <geeqie@norz.org>
parents:
1443
diff
changeset
|
226 refresh = TRUE; |
6e235e3ba076
Force thumbnails refreshing when thumbnails dimensions are modified through Preferences.
Laurent Monin <geeqie@norz.org>
parents:
1443
diff
changeset
|
227 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
|
228 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
|
229 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
|
230 } |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
231 options->thumbnails.enable_caching = c_options->thumbnails.enable_caching; |
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
232 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
|
233 options->thumbnails.use_exif = c_options->thumbnails.use_exif; |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
234 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
|
235 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
|
236 options->file_filter.show_hidden_files = c_options->file_filter.show_hidden_files; |
373
363117fefc85
Add a new option in Preferences > Filtering to allow the
Laurent Monin <geeqie@norz.org>
parents:
356
diff
changeset
|
237 options->file_filter.show_dot_directory = c_options->file_filter.show_dot_directory; |
363117fefc85
Add a new option in Preferences > Filtering to allow the
Laurent Monin <geeqie@norz.org>
parents:
356
diff
changeset
|
238 |
329
056872a2bdf7
Rename file sorting options.
Laurent Monin <geeqie@norz.org>
parents:
327
diff
changeset
|
239 options->file_sort.case_sensitive = c_options->file_sort.case_sensitive; |
332
e0907717f749
Rename file filtering options.
Laurent Monin <geeqie@norz.org>
parents:
330
diff
changeset
|
240 options->file_filter.disable = c_options->file_filter.disable; |
9 | 241 |
1229
2f11fec715ca
sidecar files grouping was made case-insensitive
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1216
diff
changeset
|
242 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
|
243 sidecar_ext_parse(options->sidecar.ext); |
170
34d0013592f5
basic sidecar files configuration via preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
134
diff
changeset
|
244 |
326 | 245 options->slideshow.random = c_options->slideshow.random; |
246 options->slideshow.repeat = c_options->slideshow.repeat; | |
247 options->slideshow.delay = c_options->slideshow.delay; | |
9 | 248 |
321 | 249 options->mousewheel_scrolls = c_options->mousewheel_scrolls; |
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.enable_in_place_rename = c_options->file_ops.enable_in_place_rename; |
9 | 252 |
330 | 253 options->collections.rectangular_selection = c_options->collections.rectangular_selection; |
9 | 254 |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
255 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
|
256 options->image.image_cache_max = c_options->image.image_cache_max; |
442 | 257 |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
258 options->image.zoom_quality = c_options->image.zoom_quality; |
9 | 259 |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
260 options->image.zoom_increment = c_options->image.zoom_increment; |
9 | 261 |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
262 options->image.enable_read_ahead = c_options->image.enable_read_ahead; |
9 | 263 |
2059 | 264 |
339
4b5f75e97d81
Rename user_specified_window_background and window_background_color
Laurent Monin <geeqie@norz.org>
parents:
338
diff
changeset
|
265 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
|
266 || 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
|
267 || !gdk_color_equal(&options->image.border_color, &c_options->image.border_color)) |
9 | 268 { |
1644
2b10e2bee592
the options for custom border color were made independent
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1626
diff
changeset
|
269 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
|
270 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
|
271 options->image.border_color = c_options->image.border_color; |
9 | 272 layout_colors_update(); |
273 view_window_colors_update(); | |
274 } | |
275 | |
322
a4fd6dd48d9b
Rationalize fullscreen options naming.
Laurent Monin <geeqie@norz.org>
parents:
321
diff
changeset
|
276 options->fullscreen.screen = c_options->fullscreen.screen; |
a4fd6dd48d9b
Rationalize fullscreen options naming.
Laurent Monin <geeqie@norz.org>
parents:
321
diff
changeset
|
277 options->fullscreen.clean_flip = c_options->fullscreen.clean_flip; |
a4fd6dd48d9b
Rationalize fullscreen options naming.
Laurent Monin <geeqie@norz.org>
parents:
321
diff
changeset
|
278 options->fullscreen.disable_saver = c_options->fullscreen.disable_saver; |
a4fd6dd48d9b
Rationalize fullscreen options naming.
Laurent Monin <geeqie@norz.org>
parents:
321
diff
changeset
|
279 options->fullscreen.above = c_options->fullscreen.above; |
1336
7fe7536f02e1
fixed overlay configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1327
diff
changeset
|
280 if (c_options->image_overlay.template_string) |
7fe7536f02e1
fixed overlay configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1327
diff
changeset
|
281 set_image_overlay_template_string(&options->image_overlay.template_string, |
7fe7536f02e1
fixed overlay configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1327
diff
changeset
|
282 c_options->image_overlay.template_string); |
2059 | 283 |
321 | 284 options->update_on_time_change = c_options->update_on_time_change; |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
285 options->image.exif_rotate_enable = c_options->image.exif_rotate_enable; |
2066
01d2c966209e
exif autorotate for proofs
Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
parents:
2059
diff
changeset
|
286 options->image.exif_proof_rotate_enable = c_options->image.exif_proof_rotate_enable; |
9 | 287 |
342
de6de19bd03a
Rename dupe_custom_threshold option to duplicates_similarity_threshold.
Laurent Monin <geeqie@norz.org>
parents:
341
diff
changeset
|
288 options->duplicates_similarity_threshold = c_options->duplicates_similarity_threshold; |
9 | 289 |
321 | 290 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
|
291 |
3cc6ee2e3e21
Allow the user to change open_recent_list_maxsize option through
Laurent Monin <geeqie@norz.org>
parents:
426
diff
changeset
|
292 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
|
293 options->dnd_icon_size = c_options->dnd_icon_size; |
2059 | 294 |
1208
338afd22a394
added options for metadata - not yet used
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1188
diff
changeset
|
295 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
|
296 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
|
297 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
|
298 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
|
299 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
|
300 options->metadata.confirm_write = c_options->metadata.confirm_write; |
581886171554
show metadata options in preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1208
diff
changeset
|
301 options->metadata.confirm_timeout = c_options->metadata.confirm_timeout; |
1244
eeefa0f10d39
improved metadata preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1239
diff
changeset
|
302 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
|
303 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
|
304 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
|
305 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
|
306 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
|
307 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
|
308 (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
|
309 (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
|
310 (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
|
311 (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
|
312 (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
|
313 (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
|
314 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
|
315 (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
|
316 (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
|
317 (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
|
318 (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
|
319 (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
|
320 (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
|
321 options->stereo.enable_fsmode = c_options->stereo.enable_fsmode; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
322 options->stereo.fixed_w = c_options->stereo.fixed_w; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
323 options->stereo.fixed_h = c_options->stereo.fixed_h; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
324 options->stereo.fixed_x1 = c_options->stereo.fixed_x1; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
325 options->stereo.fixed_y1 = c_options->stereo.fixed_y1; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
326 options->stereo.fixed_x2 = c_options->stereo.fixed_x2; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
327 options->stereo.fixed_y2 = c_options->stereo.fixed_y2; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
328 |
227
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
329 #ifdef DEBUG |
507
7408e89b601d
Move debug macros from main.h to new debug.h.
Laurent Monin <geeqie@norz.org>
parents:
497
diff
changeset
|
330 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
|
331 #endif |
9 | 332 |
113
f2109493004f
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
91
diff
changeset
|
333 #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
|
334 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
|
335 { |
1042
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
336 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
|
337 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
|
338 } |
1042
4a5170f2d926
Shorten config_window_apply() a bit, reduce code redunancy.
Laurent Monin <geeqie@norz.org>
parents:
1039
diff
changeset
|
339 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
|
340 options->color_profile.use_x11_screen_profile = c_options->color_profile.use_x11_screen_profile; |
113
f2109493004f
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
91
diff
changeset
|
341 #endif |
f2109493004f
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
91
diff
changeset
|
342 |
26
f1fe26e637e9
Mon Mar 28 20:23:34 2005 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
15
diff
changeset
|
343 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
|
344 |
9 | 345 if (refresh) |
346 { | |
347 filter_rebuild(); | |
348 layout_refresh(NULL); | |
349 } | |
2059 | 350 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
351 if (accel_store) gtk_tree_model_foreach(GTK_TREE_MODEL(accel_store), accel_apply_cb, NULL); |
9 | 352 } |
353 | |
354 /* | |
355 *----------------------------------------------------------------------------- | |
356 * config window main button callbacks (private) | |
357 *----------------------------------------------------------------------------- | |
442 | 358 */ |
9 | 359 |
360 static void config_window_close_cb(GtkWidget *widget, gpointer data) | |
361 { | |
362 gtk_widget_destroy(configwindow); | |
363 configwindow = NULL; | |
364 filter_store = NULL; | |
365 } | |
366 | |
1443 | 367 static gboolean config_window_delete(GtkWidget *widget, GdkEventAny *event, gpointer data) |
9 | 368 { |
369 config_window_close_cb(NULL, NULL); | |
370 return TRUE; | |
371 } | |
372 | |
373 static void config_window_ok_cb(GtkWidget *widget, gpointer data) | |
374 { | |
375 config_window_apply(); | |
376 config_window_close_cb(NULL, NULL); | |
377 } | |
378 | |
379 static void config_window_apply_cb(GtkWidget *widget, gpointer data) | |
380 { | |
381 config_window_apply(); | |
382 } | |
383 | |
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
|
384 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
|
385 { |
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
|
386 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
|
387 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
|
388 } |
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
|
389 |
9 | 390 /* |
391 *----------------------------------------------------------------------------- | |
392 * config window setup (private) | |
393 *----------------------------------------------------------------------------- | |
442 | 394 */ |
9 | 395 |
396 static void quality_menu_cb(GtkWidget *combo, gpointer data) | |
397 { | |
398 gint *option = data; | |
399 | |
400 switch (gtk_combo_box_get_active(GTK_COMBO_BOX(combo))) | |
401 { | |
402 case 0: | |
403 default: | |
404 *option = GDK_INTERP_NEAREST; | |
405 break; | |
406 case 1: | |
407 *option = GDK_INTERP_TILES; | |
408 break; | |
409 case 2: | |
410 *option = GDK_INTERP_BILINEAR; | |
411 break; | |
412 case 3: | |
413 *option = GDK_INTERP_HYPER; | |
414 break; | |
415 } | |
416 } | |
417 | |
418 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
|
419 guint option, guint *option_c) |
9 | 420 { |
421 GtkWidget *combo; | |
422 gint current = 0; | |
423 | |
424 *option_c = option; | |
425 | |
426 pref_table_label(table, column, row, text, 0.0); | |
427 | |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
428 combo = gtk_combo_box_text_new(); |
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
429 |
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
430 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Nearest (worst, but fastest)")); |
9 | 431 if (option == GDK_INTERP_NEAREST) current = 0; |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
432 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Tiles")); |
9 | 433 if (option == GDK_INTERP_TILES) current = 1; |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
434 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Bilinear")); |
9 | 435 if (option == GDK_INTERP_BILINEAR) current = 2; |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
436 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Hyper (best, but slowest)")); |
9 | 437 if (option == GDK_INTERP_HYPER) current = 3; |
438 | |
439 gtk_combo_box_set_active(GTK_COMBO_BOX(combo), current); | |
440 | |
441 g_signal_connect(G_OBJECT(combo), "changed", | |
442 G_CALLBACK(quality_menu_cb), option_c); | |
443 | |
444 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
|
445 GTK_EXPAND | GTK_FILL, 0, 0, 0); |
9 | 446 gtk_widget_show(combo); |
447 } | |
448 | |
449 static void thumb_size_menu_cb(GtkWidget *combo, gpointer data) | |
450 { | |
451 gint n; | |
452 | |
453 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
|
454 if (n < 0) return; |
9 | 455 |
736
31d858f3272d
Fix signed vs unsigned warnings.
Laurent Monin <geeqie@norz.org>
parents:
733
diff
changeset
|
456 if ((guint) n < sizeof(thumb_size_list) / sizeof(ThumbSize)) |
9 | 457 { |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
458 c_options->thumbnails.max_width = thumb_size_list[n].w; |
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
459 c_options->thumbnails.max_height = thumb_size_list[n].h; |
9 | 460 } |
736
31d858f3272d
Fix signed vs unsigned warnings.
Laurent Monin <geeqie@norz.org>
parents:
733
diff
changeset
|
461 else |
9 | 462 { |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
463 c_options->thumbnails.max_width = options->thumbnails.max_width; |
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
464 c_options->thumbnails.max_height = options->thumbnails.max_height; |
9 | 465 } |
466 } | |
467 | |
468 static void add_thumb_size_menu(GtkWidget *table, gint column, gint row, gchar *text) | |
469 { | |
470 GtkWidget *combo; | |
471 gint current; | |
472 gint i; | |
473 | |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
474 c_options->thumbnails.max_width = options->thumbnails.max_width; |
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
475 c_options->thumbnails.max_height = options->thumbnails.max_height; |
9 | 476 |
477 pref_table_label(table, column, row, text, 0.0); | |
478 | |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
479 combo = gtk_combo_box_text_new(); |
9 | 480 |
481 current = -1; | |
736
31d858f3272d
Fix signed vs unsigned warnings.
Laurent Monin <geeqie@norz.org>
parents:
733
diff
changeset
|
482 for (i = 0; (guint) i < sizeof(thumb_size_list) / sizeof(ThumbSize); i++) |
9 | 483 { |
484 gint w, h; | |
226
6b9e4c9e5596
Fix and simplify thumbnails size combo box related code.
Laurent Monin <geeqie@norz.org>
parents:
225
diff
changeset
|
485 gchar *buf; |
9 | 486 |
487 w = thumb_size_list[i].w; | |
488 h = thumb_size_list[i].h; | |
489 | |
226
6b9e4c9e5596
Fix and simplify thumbnails size combo box related code.
Laurent Monin <geeqie@norz.org>
parents:
225
diff
changeset
|
490 buf = g_strdup_printf("%d x %d", w, h); |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
491 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
|
492 g_free(buf); |
442 | 493 |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
494 if (w == options->thumbnails.max_width && h == options->thumbnails.max_height) current = i; |
9 | 495 } |
496 | |
497 if (current == -1) | |
498 { | |
499 gchar *buf; | |
500 | |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
501 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
|
502 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), buf); |
9 | 503 g_free(buf); |
504 | |
226
6b9e4c9e5596
Fix and simplify thumbnails size combo box related code.
Laurent Monin <geeqie@norz.org>
parents:
225
diff
changeset
|
505 current = i; |
9 | 506 } |
507 | |
508 gtk_combo_box_set_active(GTK_COMBO_BOX(combo), current); | |
509 g_signal_connect(G_OBJECT(combo), "changed", | |
510 G_CALLBACK(thumb_size_menu_cb), NULL); | |
511 | |
512 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
|
513 GTK_EXPAND | GTK_FILL, 0, 0, 0); |
9 | 514 gtk_widget_show(combo); |
515 } | |
516 | |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
517 static void stereo_mode_menu_cb(GtkWidget *combo, gpointer data) |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
518 { |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
519 gint *option = data; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
520 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
521 switch (gtk_combo_box_get_active(GTK_COMBO_BOX(combo))) |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
522 { |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
523 case 0: |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
524 default: |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
525 *option = PR_STEREO_NONE; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
526 break; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
527 case 1: |
1896
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
528 *option = PR_STEREO_ANAGLYPH_RC; |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
529 break; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
530 case 2: |
1896
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
531 *option = PR_STEREO_ANAGLYPH_GRAY; |
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
532 break; |
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
533 case 3: |
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
534 *option = PR_STEREO_ANAGLYPH_DB; |
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
535 break; |
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
536 case 4: |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
537 *option = PR_STEREO_HORIZ; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
538 break; |
1896
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
539 case 5: |
1895
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
540 *option = PR_STEREO_HORIZ | PR_STEREO_HALF; |
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
541 break; |
1896
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
542 case 6: |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
543 *option = PR_STEREO_VERT; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
544 break; |
1896
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
545 case 7: |
1895
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
546 *option = PR_STEREO_VERT | PR_STEREO_HALF; |
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
547 break; |
1896
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
548 case 8: |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
549 *option = PR_STEREO_FIXED; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
550 break; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
551 } |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
552 } |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
553 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
554 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
|
555 gint option, gint *option_c, gboolean add_fixed) |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
556 { |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
557 GtkWidget *combo; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
558 gint current = 0; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
559 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
560 *option_c = option; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
561 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
562 pref_table_label(table, column, row, text, 0.0); |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
563 |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
564 combo = gtk_combo_box_text_new(); |
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
565 |
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), _("Single image")); |
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
567 |
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
568 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
|
569 if (option & PR_STEREO_ANAGLYPH_RC) current = 1; |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
570 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Anaglyph Gray Red-Cyan")); |
1896
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
571 if (option & PR_STEREO_ANAGLYPH_GRAY) current = 2; |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
572 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Anaglyph Dubois")); |
1896
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
573 if (option & PR_STEREO_ANAGLYPH_DB) current = 3; |
1889
14088e0b25ec
temporarily disable stereo mode, added more stereo prefs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1887
diff
changeset
|
574 |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
575 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
|
576 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Side by Side Half size")); |
2184 | 577 if (option & PR_STEREO_HORIZ) |
1895
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
578 { |
1896
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
579 current = 4; |
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
580 if (option & PR_STEREO_HALF) current = 5; |
1895
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
581 } |
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
582 |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
583 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
|
584 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Top - Bottom Half size")); |
2184 | 585 if (option & PR_STEREO_VERT) |
1895
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
586 { |
1896
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
587 current = 6; |
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
588 if (option & PR_STEREO_HALF) current = 7; |
1895
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
589 } |
6e3edda945ae
added half-size (3dtv) stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1892
diff
changeset
|
590 |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
591 if (add_fixed) |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
592 { |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
593 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Fixed position")); |
1896
9604c72ac670
added more anaglyph modes
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1895
diff
changeset
|
594 if (option & PR_STEREO_FIXED) current = 8; |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
595 } |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
596 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
597 gtk_combo_box_set_active(GTK_COMBO_BOX(combo), current); |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
598 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
599 g_signal_connect(G_OBJECT(combo), "changed", |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
600 G_CALLBACK(stereo_mode_menu_cb), option_c); |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
601 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
602 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
|
603 GTK_EXPAND | GTK_FILL, 0, 0, 0); |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
604 gtk_widget_show(combo); |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
605 } |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
606 |
9 | 607 static void filter_store_populate(void) |
608 { | |
609 GList *work; | |
610 | |
611 if (!filter_store) return; | |
612 | |
613 gtk_list_store_clear(filter_store); | |
614 | |
615 work = filter_get_list(); | |
616 while (work) | |
617 { | |
618 FilterEntry *fe; | |
619 GtkTreeIter iter; | |
620 | |
621 fe = work->data; | |
622 work = work->next; | |
623 | |
624 gtk_list_store_append(filter_store, &iter); | |
625 gtk_list_store_set(filter_store, &iter, 0, fe, -1); | |
626 } | |
627 } | |
628 | |
629 static void filter_store_ext_edit_cb(GtkCellRendererText *cell, gchar *path_str, | |
630 gchar *new_text, gpointer data) | |
631 { | |
632 GtkWidget *model = data; | |
633 FilterEntry *fe = data; | |
634 GtkTreePath *tpath; | |
635 GtkTreeIter iter; | |
636 | |
637 if (!new_text || strlen(new_text) < 1) return; | |
638 | |
639 tpath = gtk_tree_path_new_from_string(path_str); | |
640 gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, tpath); | |
641 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 0, &fe, -1); | |
642 | |
643 g_free(fe->extensions); | |
644 fe->extensions = g_strdup(new_text); | |
645 | |
646 gtk_tree_path_free(tpath); | |
647 filter_rebuild(); | |
648 } | |
649 | |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
650 static void filter_store_class_edit_cb(GtkCellRendererText *cell, gchar *path_str, |
1443 | 651 gchar *new_text, gpointer data) |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
652 { |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
653 GtkWidget *model = data; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
654 FilterEntry *fe = data; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
655 GtkTreePath *tpath; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
656 GtkTreeIter iter; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
657 gint i; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
658 |
1443 | 659 if (!new_text || !new_text[0]) return; |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
660 |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
661 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
|
662 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
|
663 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
|
664 |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
665 for (i = 0; i < FILE_FORMAT_CLASSES; i++) |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
666 { |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
667 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
|
668 { |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
669 fe->file_class = i; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
670 break; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
671 } |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
672 } |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
673 |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
674 gtk_tree_path_free(tpath); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
675 filter_rebuild(); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
676 } |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
677 |
9 | 678 static void filter_store_desc_edit_cb(GtkCellRendererText *cell, gchar *path_str, |
679 gchar *new_text, gpointer data) | |
680 { | |
681 GtkWidget *model = data; | |
682 FilterEntry *fe; | |
683 GtkTreePath *tpath; | |
684 GtkTreeIter iter; | |
685 | |
1443 | 686 if (!new_text || !new_text[0]) return; |
9 | 687 |
688 tpath = gtk_tree_path_new_from_string(path_str); | |
689 gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, tpath); | |
690 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 0, &fe, -1); | |
691 | |
692 g_free(fe->description); | |
693 fe->description = g_strdup(new_text); | |
694 | |
695 gtk_tree_path_free(tpath); | |
696 } | |
697 | |
698 static void filter_store_enable_cb(GtkCellRendererToggle *renderer, | |
699 gchar *path_str, gpointer data) | |
700 { | |
701 GtkWidget *model = data; | |
702 FilterEntry *fe; | |
703 GtkTreePath *tpath; | |
704 GtkTreeIter iter; | |
705 | |
706 tpath = gtk_tree_path_new_from_string(path_str); | |
707 gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, tpath); | |
708 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 0, &fe, -1); | |
709 | |
710 fe->enabled = !fe->enabled; | |
711 | |
712 gtk_tree_path_free(tpath); | |
713 filter_rebuild(); | |
714 } | |
715 | |
1239
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
716 static void filter_store_writable_cb(GtkCellRendererToggle *renderer, |
1443 | 717 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
|
718 { |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
719 GtkWidget *model = data; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
720 FilterEntry *fe; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
721 GtkTreePath *tpath; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
722 GtkTreeIter iter; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
723 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
724 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
|
725 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
|
726 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
|
727 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
728 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
|
729 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
|
730 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
731 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
|
732 filter_rebuild(); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
733 } |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
734 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
735 static void filter_store_sidecar_cb(GtkCellRendererToggle *renderer, |
1443 | 736 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
|
737 { |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
738 GtkWidget *model = data; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
739 FilterEntry *fe; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
740 GtkTreePath *tpath; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
741 GtkTreeIter iter; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
742 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
743 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
|
744 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
|
745 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
|
746 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
747 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
|
748 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
|
749 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
750 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
|
751 filter_rebuild(); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
752 } |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
753 |
9 | 754 static void filter_set_func(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, |
755 GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data) | |
756 { | |
757 FilterEntry *fe; | |
758 | |
759 gtk_tree_model_get(tree_model, iter, 0, &fe, -1); | |
760 | |
1347
84d289bde1ea
Add missing space between switch and first parenthesis.
Laurent Monin <geeqie@norz.org>
parents:
1346
diff
changeset
|
761 switch (GPOINTER_TO_INT(data)) |
9 | 762 { |
763 case FE_ENABLE: | |
764 g_object_set(GTK_CELL_RENDERER(cell), | |
765 "active", fe->enabled, NULL); | |
766 break; | |
767 case FE_EXTENSION: | |
768 g_object_set(GTK_CELL_RENDERER(cell), | |
769 "text", fe->extensions, NULL); | |
770 break; | |
771 case FE_DESCRIPTION: | |
772 g_object_set(GTK_CELL_RENDERER(cell), | |
773 "text", fe->description, NULL); | |
774 break; | |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
775 case FE_CLASS: |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
776 g_object_set(GTK_CELL_RENDERER(cell), |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
777 "text", _(format_class_list[fe->file_class]), NULL); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
778 break; |
1239
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
779 case FE_WRITABLE: |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
780 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
|
781 "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
|
782 break; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
783 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
|
784 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
|
785 "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
|
786 break; |
9 | 787 } |
788 } | |
789 | |
2058
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
790 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
|
791 { |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
792 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
|
793 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
|
794 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
|
795 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
|
796 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
|
797 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
|
798 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
|
799 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
|
800 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
801 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
|
802 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
|
803 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
804 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
|
805 do { |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
806 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
|
807 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
|
808 i++; |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
809 } 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
|
810 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
811 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
|
812 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
|
813 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
814 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
|
815 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
|
816 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
|
817 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
|
818 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
819 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
|
820 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
|
821 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
|
822 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
823 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
|
824 } |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
825 |
9 | 826 static void filter_add_cb(GtkWidget *widget, gpointer data) |
827 { | |
1239
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
828 filter_add_unique("description", ".new", FORMAT_CLASS_IMAGE, TRUE, FALSE, TRUE); |
9 | 829 filter_store_populate(); |
830 | |
2058
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
831 g_idle_add((GSourceFunc)filter_add_scroll, data); |
9 | 832 } |
833 | |
834 static void filter_remove_cb(GtkWidget *widget, gpointer data) | |
835 { | |
836 GtkWidget *filter_view = data; | |
837 GtkTreeSelection *selection; | |
838 GtkTreeIter iter; | |
839 FilterEntry *fe; | |
840 | |
841 if (!filter_store) return; | |
995 | 842 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(filter_view)); |
9 | 843 if (!gtk_tree_selection_get_selected(selection, NULL, &iter)) return; |
844 gtk_tree_model_get(GTK_TREE_MODEL(filter_store), &iter, 0, &fe, -1); | |
845 if (!fe) return; | |
846 | |
847 filter_remove_entry(fe); | |
848 filter_rebuild(); | |
849 filter_store_populate(); | |
850 } | |
851 | |
2058
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
852 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
|
853 { |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
854 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
|
855 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
|
856 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
|
857 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
858 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
|
859 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
|
860 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
|
861 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
862 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
|
863 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
|
864 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
|
865 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
866 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
|
867 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
868 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
|
869 } |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
870 |
9 | 871 static void filter_default_ok_cb(GenericDialog *gd, gpointer data) |
872 { | |
873 filter_reset(); | |
874 filter_add_defaults(); | |
875 filter_rebuild(); | |
876 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
|
877 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
878 g_idle_add((GSourceFunc)filter_default_ok_scroll, gd->data); |
9 | 879 } |
880 | |
881 static void dummy_cancel_cb(GenericDialog *gd, gpointer data) | |
882 { | |
883 /* no op, only so cancel button appears */ | |
884 } | |
885 | |
886 static void filter_default_cb(GtkWidget *widget, gpointer data) | |
887 { | |
888 GenericDialog *gd; | |
889 | |
890 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
|
891 "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
|
892 dummy_cancel_cb, data); |
9 | 893 generic_dialog_add_message(gd, GTK_STOCK_DIALOG_QUESTION, _("Reset filters"), |
894 _("This will reset the file filters to the defaults.\nContinue?")); | |
895 generic_dialog_add_button(gd, GTK_STOCK_OK, NULL, filter_default_ok_cb, TRUE); | |
896 gtk_widget_show(gd->dialog); | |
897 } | |
898 | |
1001
a1f0b2010ca1
Consistency: type * instead of type*.
Laurent Monin <geeqie@norz.org>
parents:
1000
diff
changeset
|
899 static void filter_disable_cb(GtkWidget *widget, gpointer data) |
9 | 900 { |
901 GtkWidget *frame = data; | |
902 | |
903 gtk_widget_set_sensitive(frame, | |
904 !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))); | |
905 } | |
906 | |
1001
a1f0b2010ca1
Consistency: type * instead of type*.
Laurent Monin <geeqie@norz.org>
parents:
1000
diff
changeset
|
907 static void safe_delete_view_cb(GtkWidget *widget, gpointer data) |
9 | 908 { |
909 layout_set_path(NULL, gtk_entry_get_text(GTK_ENTRY(safe_delete_path_entry))); | |
910 } | |
911 | |
912 static void safe_delete_clear_ok_cb(GenericDialog *gd, gpointer data) | |
913 { | |
914 file_util_trash_clear(); | |
915 } | |
916 | |
1001
a1f0b2010ca1
Consistency: type * instead of type*.
Laurent Monin <geeqie@norz.org>
parents:
1000
diff
changeset
|
917 static void safe_delete_clear_cb(GtkWidget *widget, gpointer data) |
9 | 918 { |
919 GenericDialog *gd; | |
920 GtkWidget *entry; | |
921 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
|
922 "clear_trash", widget, TRUE, |
9 | 923 dummy_cancel_cb, NULL); |
924 generic_dialog_add_message(gd, GTK_STOCK_DIALOG_QUESTION, _("Clear trash"), | |
925 _("This will remove the trash contents.")); | |
926 generic_dialog_add_button(gd, GTK_STOCK_OK, NULL, safe_delete_clear_ok_cb, TRUE); | |
927 entry = gtk_entry_new(); | |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
928 gtk_widget_set_can_focus(entry, FALSE); |
9 | 929 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
|
930 if (options->file_ops.safe_delete_path) gtk_entry_set_text(GTK_ENTRY(entry), options->file_ops.safe_delete_path); |
9 | 931 gtk_box_pack_start(GTK_BOX(gd->vbox), entry, FALSE, FALSE, 0); |
932 gtk_widget_show(entry); | |
933 gtk_widget_show(gd->dialog); | |
934 } | |
935 | |
1001
a1f0b2010ca1
Consistency: type * instead of type*.
Laurent Monin <geeqie@norz.org>
parents:
1000
diff
changeset
|
936 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
|
937 { |
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
|
938 GtkWidget *pTextView; |
1001
a1f0b2010ca1
Consistency: type * instead of type*.
Laurent Monin <geeqie@norz.org>
parents:
1000
diff
changeset
|
939 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
|
940 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
|
941 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
|
942 |
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
|
943 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
|
944 |
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
|
945 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
|
946 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
|
947 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
|
948 |
1336
7fe7536f02e1
fixed overlay configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1327
diff
changeset
|
949 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
|
950 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
|
951 } |
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
|
952 |
469
681796421193
Rename few functions and replace fullscreen info with image overlay template string.
Laurent Monin <geeqie@norz.org>
parents:
468
diff
changeset
|
953 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
|
954 { |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
955 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
|
956 GtkTextBuffer *buffer; |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
957 |
1336
7fe7536f02e1
fixed overlay configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1327
diff
changeset
|
958 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
|
959 if (!configwindow) return; |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
960 |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
961 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
|
962 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
|
963 } |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
964 |
469
681796421193
Rename few functions and replace fullscreen info with image overlay template string.
Laurent Monin <geeqie@norz.org>
parents:
468
diff
changeset
|
965 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
|
966 { |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
967 GenericDialog *gd; |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
968 |
469
681796421193
Rename few functions and replace fullscreen info with image overlay template string.
Laurent Monin <geeqie@norz.org>
parents:
468
diff
changeset
|
969 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
|
970 "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
|
971 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
|
972 generic_dialog_add_message(gd, GTK_STOCK_DIALOG_QUESTION, _("Reset image overlay template string"), |
681796421193
Rename few functions and replace fullscreen info with image overlay template string.
Laurent Monin <geeqie@norz.org>
parents:
468
diff
changeset
|
973 _("This will reset the image overlay template string to the default.\nContinue?")); |
681796421193
Rename few functions and replace fullscreen info with image overlay template string.
Laurent Monin <geeqie@norz.org>
parents:
468
diff
changeset
|
974 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
|
975 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
|
976 } |
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
977 |
625
96e360e5949d
Add an help button to OSD info configuration in Preferences dialog.
Laurent Monin <geeqie@norz.org>
parents:
597
diff
changeset
|
978 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
|
979 { |
96e360e5949d
Add an help button to OSD info configuration in Preferences dialog.
Laurent Monin <geeqie@norz.org>
parents:
597
diff
changeset
|
980 help_window_show("overlay"); |
96e360e5949d
Add an help button to OSD info configuration in Preferences dialog.
Laurent Monin <geeqie@norz.org>
parents:
597
diff
changeset
|
981 } |
354
3f7a136c8ef8
Add a button to reset fullscreen info string to default value.
Laurent Monin <geeqie@norz.org>
parents:
342
diff
changeset
|
982 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
983 static void accel_store_populate(void) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
984 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
985 LayoutWindow *lw; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
986 GList *groups, *actions; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
987 GtkAction *action; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
988 const gchar *accel_path; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
989 GtkAccelKey key; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
990 GtkTreeIter iter; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
991 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
992 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
|
993 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
994 gtk_tree_store_clear(accel_store); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
995 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
|
996 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
997 g_assert(lw && lw->ui_manager); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
998 groups = gtk_ui_manager_get_action_groups(lw->ui_manager); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
999 while (groups) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1000 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1001 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
|
1002 while (actions) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1003 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1004 action = GTK_ACTION(actions->data); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1005 accel_path = gtk_action_get_accel_path(action); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1006 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
|
1007 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1008 gchar *label, *label2, *tooltip, *accel; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1009 g_object_get(action, |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1010 "tooltip", &tooltip, |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1011 "label", &label, |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1012 NULL); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1013 |
2059 | 1014 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
|
1015 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1016 g_free(label); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1017 label = label2; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1018 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1019 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1020 accel = gtk_accelerator_name(key.accel_key, key.accel_mods); |
2059 | 1021 |
1022 if (tooltip) | |
1619
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1606
diff
changeset
|
1023 { |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1606
diff
changeset
|
1024 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
|
1025 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
|
1026 AE_ACTION, label, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1606
diff
changeset
|
1027 AE_KEY, accel, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1606
diff
changeset
|
1028 AE_TOOLTIP, tooltip ? tooltip : "", |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1606
diff
changeset
|
1029 AE_ACCEL, accel_path, |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1606
diff
changeset
|
1030 -1); |
504fbd47f515
do not display menus ("FileMenu" etc.) in accelerator configuration
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1606
diff
changeset
|
1031 } |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1032 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1033 g_free(accel); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1034 g_free(label); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1035 g_free(tooltip); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1036 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1037 actions = actions->next; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1038 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1039 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1040 groups = groups->next; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1041 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1042 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1043 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1044 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
|
1045 { |
2059 | 1046 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1047 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1048 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1049 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
|
1050 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1051 gchar *accel1 = data; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1052 gchar *accel2; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1053 GtkAccelKey key1; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1054 GtkAccelKey key2; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1055 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1056 gtk_tree_model_get(model, iter, AE_KEY, &accel2, -1); |
2059 | 1057 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1058 gtk_accelerator_parse(accel1, &key1.accel_key, &key1.accel_mods); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1059 gtk_accelerator_parse(accel2, &key2.accel_key, &key2.accel_mods); |
2059 | 1060 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1061 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
|
1062 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1063 gtk_tree_store_set(accel_store, iter, AE_KEY, "", -1); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1064 DEBUG_1("accelerator key '%s' is already used, removing.", accel1); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1065 } |
2059 | 1066 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1067 g_free(accel2); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1068 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1069 return FALSE; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1070 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1071 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1072 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1073 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
|
1074 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1075 GtkTreeModel *model = (GtkTreeModel *)accel_store; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1076 GtkTreeIter iter; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1077 gchar *acc; |
1664
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1078 gchar *accel_path; |
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1079 GtkAccelKey old_key, key; |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1080 GtkTreePath *path = gtk_tree_path_new_from_string(path_string); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1081 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1082 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
|
1083 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
|
1084 |
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1085 /* 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
|
1086 gtk_accel_map_lookup_entry(accel_path, &old_key); |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1087 |
1664
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1088 /* change the key and read it back (change may fail on keys hardcoded in gtk)*/ |
2059 | 1089 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
|
1090 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
|
1091 |
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1092 /* restore the original for now, the key will be really changed when the changes are confirmed */ |
2059 | 1093 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
|
1094 |
bb836939160c
test if an accelerator can be stored
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1663
diff
changeset
|
1095 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
|
1096 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
|
1097 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1098 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
|
1099 gtk_tree_path_free(path); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1100 g_free(acc); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1101 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1102 |
2058
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1103 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
|
1104 { |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1105 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
|
1106 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
|
1107 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
|
1108 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1109 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
|
1110 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
|
1111 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
|
1112 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1113 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
|
1114 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
|
1115 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
|
1116 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1117 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
|
1118 |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1119 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
|
1120 } |
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1121 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1122 static void accel_default_cb(GtkWidget *widget, gpointer data) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1123 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1124 accel_store_populate(); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1125 |
2058
31543e32379a
Implement the scroll to/select row stuff for tree view in Preferences dialog
Colin Clark <cclark@mcb.net>
parents:
2057
diff
changeset
|
1126 g_idle_add((GSourceFunc)accel_default_scroll, data); |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1127 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1128 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1129 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
|
1130 { |
2059 | 1131 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
|
1132 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1133 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1134 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
|
1135 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1136 GtkAccelKey key; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1137 gchar *accel_path, *accel; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1138 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1139 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
|
1140 gtk_accel_map_lookup_entry(accel_path, &key); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1141 accel = gtk_accelerator_name(key.accel_key, key.accel_mods); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1142 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1143 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
|
1144 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1145 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
|
1146 g_free(accel_path); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1147 g_free(accel); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1148 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1149 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1150 static void accel_reset_cb(GtkWidget *widget, gpointer data) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1151 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1152 GtkTreeSelection *selection; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1153 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1154 if (!accel_store) return; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1155 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(data)); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1156 gtk_tree_selection_selected_foreach(selection, &accel_reset_selection, NULL); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1157 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1158 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1159 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1160 |
1039
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1161 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
|
1162 { |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1163 GtkWidget *label; |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1164 GtkWidget *vbox; |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1165 GtkWidget *scrolled; |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1166 GtkWidget *viewport; |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1167 |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1168 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
|
1169 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
|
1170 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
|
1171 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
|
1172 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
|
1173 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
|
1174 gtk_widget_show(scrolled); |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1175 |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1176 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
|
1177 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
|
1178 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
|
1179 gtk_widget_show(viewport); |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1180 |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1181 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
|
1182 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
|
1183 gtk_widget_show(vbox); |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1184 |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1185 return vbox; |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1186 } |
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1187 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1188 /* general options tab */ |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1189 static void config_tab_general(GtkWidget *notebook) |
9 | 1190 { |
1191 GtkWidget *vbox; | |
1192 GtkWidget *group; | |
1193 GtkWidget *subgroup; | |
1194 GtkWidget *button; | |
1195 GtkWidget *ct_button; | |
1196 GtkWidget *table; | |
1197 GtkWidget *spin; | |
1198 | |
1039
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1199 vbox = scrolled_notebook_page(notebook, _("General")); |
9 | 1200 |
1201 group = pref_group_new(vbox, FALSE, _("Thumbnails"), GTK_ORIENTATION_VERTICAL); | |
1202 | |
1203 table = pref_table_new(group, 2, 2, FALSE, FALSE); | |
1204 add_thumb_size_menu(table, 0, 0, _("Size:")); | |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
1205 add_quality_menu(table, 0, 1, _("Quality:"), options->thumbnails.quality, &c_options->thumbnails.quality); |
9 | 1206 |
1207 ct_button = pref_checkbox_new_int(group, _("Cache thumbnails"), | |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
1208 options->thumbnails.enable_caching, &c_options->thumbnails.enable_caching); |
9 | 1209 |
1210 subgroup = pref_box_new(group, FALSE, GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP); | |
1211 pref_checkbox_link_sensitivity(ct_button, subgroup); | |
1212 | |
1522
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
1213 button = pref_checkbox_new_int(subgroup, _("Use standard thumbnail cache, shared with other applications"), |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
1214 options->thumbnails.spec_standard, &c_options->thumbnails.spec_standard); |
9 | 1215 |
1216 subgroup = pref_box_new(subgroup, FALSE, GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP); | |
1217 pref_checkbox_link_sensitivity_swap(button, subgroup); | |
1218 | |
1522
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
1219 pref_checkbox_new_int(subgroup, _("Store thumbnails in '.thumbnails' folder, local to image folder (non-standard)"), |
333
1ebdf8fb2c1a
Rename thumbnails related options.
Laurent Monin <geeqie@norz.org>
parents:
332
diff
changeset
|
1220 options->thumbnails.cache_into_dirs, &c_options->thumbnails.cache_into_dirs); |
9 | 1221 |
1522
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
1222 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
|
1223 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
|
1224 |
9 | 1225 group = pref_group_new(vbox, FALSE, _("Slide show"), GTK_ORIENTATION_VERTICAL); |
1226 | |
326 | 1227 c_options->slideshow.delay = options->slideshow.delay; |
9 | 1228 spin = pref_spin_new(group, _("Delay between image change:"), _("seconds"), |
1229 SLIDESHOW_MIN_SECONDS, SLIDESHOW_MAX_SECONDS, 1.0, 1, | |
1000
07f6093c1c1a
For the sake of consistency, use glib basic types everywhere.
Laurent Monin <geeqie@norz.org>
parents:
995
diff
changeset
|
1230 options->slideshow.delay ? (gdouble)options->slideshow.delay / SLIDESHOW_SUBSECOND_PRECISION : 10.0, |
9 | 1231 G_CALLBACK(slideshow_delay_cb), NULL); |
1232 gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(spin), GTK_UPDATE_ALWAYS); | |
1233 | |
326 | 1234 pref_checkbox_new_int(group, _("Random"), options->slideshow.random, &c_options->slideshow.random); |
1235 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
|
1236 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1237 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
|
1238 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1239 pref_spin_new_int(group, _("Decoded image cache size (Mb):"), NULL, |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1240 0, 1024, 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
|
1241 pref_checkbox_new_int(group, _("Preload next image"), |
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
1242 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
|
1243 |
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
1244 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
|
1245 options->update_on_time_change, &c_options->update_on_time_change); |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1246 } |
9 | 1247 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1248 /* image tab */ |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1249 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
|
1250 { |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1251 GtkWidget *hbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1252 GtkWidget *vbox; |
1516
7439fcf0a6d3
improved Scroll reset method in preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1515
diff
changeset
|
1253 GtkWidget *vbox2; |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1254 GtkWidget *group; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1255 GtkWidget *button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1256 GtkWidget *ct_button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1257 GtkWidget *table; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1258 GtkWidget *spin; |
9 | 1259 |
1039
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1260 vbox = scrolled_notebook_page(notebook, _("Image")); |
9 | 1261 |
1262 group = pref_group_new(vbox, FALSE, _("Zoom"), GTK_ORIENTATION_VERTICAL); | |
1263 | |
1264 table = pref_table_new(group, 2, 1, FALSE, FALSE); | |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
1265 add_quality_menu(table, 0, 0, _("Quality:"), options->image.zoom_quality, &c_options->image.zoom_quality); |
9 | 1266 |
2084
1c712b43f063
added option for clutter renderer
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2066
diff
changeset
|
1267 #ifdef HAVE_CLUTTER |
1c712b43f063
added option for clutter renderer
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2066
diff
changeset
|
1268 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
|
1269 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
|
1270 #endif |
1c712b43f063
added option for clutter renderer
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2066
diff
changeset
|
1271 |
1515
99d03a6f394f
disabled 2-pass rendering also affect color correction
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1513
diff
changeset
|
1272 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
|
1273 options->image.zoom_2pass, &c_options->image.zoom_2pass); |
9 | 1274 |
67
40abb746a32e
Fri Oct 13 05:22:43 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
26
diff
changeset
|
1275 pref_checkbox_new_int(group, _("Allow enlargement of image for zoom to fit"), |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
1276 options->image.zoom_to_fit_allow_expand, &c_options->image.zoom_to_fit_allow_expand); |
9 | 1277 |
209
ce89a8349d8b
configurable frame around image - geeqie_autofit_maxsize.patch by Laurent MONIN
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
208
diff
changeset
|
1278 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE); |
ce89a8349d8b
configurable frame around image - geeqie_autofit_maxsize.patch by Laurent MONIN
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
208
diff
changeset
|
1279 ct_button = pref_checkbox_new_int(hbox, _("Limit image size when autofitting (%):"), |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
1280 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
|
1281 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
|
1282 10, 150, 1, |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
1283 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
|
1284 pref_checkbox_link_sensitivity(ct_button, spin); |
ce89a8349d8b
configurable frame around image - geeqie_autofit_maxsize.patch by Laurent MONIN
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
208
diff
changeset
|
1285 |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
1286 c_options->image.zoom_increment = options->image.zoom_increment; |
9 | 1287 spin = pref_spin_new(group, _("Zoom increment:"), NULL, |
1000
07f6093c1c1a
For the sake of consistency, use glib basic types everywhere.
Laurent Monin <geeqie@norz.org>
parents:
995
diff
changeset
|
1288 0.1, 4.0, 0.1, 1, (gdouble)options->image.zoom_increment / 10.0, |
9 | 1289 G_CALLBACK(zoom_increment_cb), NULL); |
1290 gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(spin), GTK_UPDATE_ALWAYS); | |
1291 | |
1516
7439fcf0a6d3
improved Scroll reset method in preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1515
diff
changeset
|
1292 group = pref_group_new(vbox, FALSE, _("When new image is selected:"), GTK_ORIENTATION_HORIZONTAL); |
9 | 1293 |
1516
7439fcf0a6d3
improved Scroll reset method in preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1515
diff
changeset
|
1294 vbox2 = pref_box_new(group, TRUE, GTK_ORIENTATION_VERTICAL, PREF_PAD_SPACE); |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
1295 c_options->image.zoom_mode = options->image.zoom_mode; |
1516
7439fcf0a6d3
improved Scroll reset method in preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1515
diff
changeset
|
1296 button = pref_radiobutton_new(vbox2, NULL, _("Zoom to original size"), |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
1297 (options->image.zoom_mode == ZOOM_RESET_ORIGINAL), |
1039
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1298 G_CALLBACK(zoom_mode_cb), GINT_TO_POINTER(ZOOM_RESET_ORIGINAL)); |
1516
7439fcf0a6d3
improved Scroll reset method in preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1515
diff
changeset
|
1299 button = pref_radiobutton_new(vbox2, button, _("Fit image to window"), |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
1300 (options->image.zoom_mode == ZOOM_RESET_FIT_WINDOW), |
1039
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1301 G_CALLBACK(zoom_mode_cb), GINT_TO_POINTER(ZOOM_RESET_FIT_WINDOW)); |
1516
7439fcf0a6d3
improved Scroll reset method in preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1515
diff
changeset
|
1302 button = pref_radiobutton_new(vbox2, button, _("Leave Zoom at previous setting"), |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
1303 (options->image.zoom_mode == ZOOM_RESET_NONE), |
1039
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1304 G_CALLBACK(zoom_mode_cb), GINT_TO_POINTER(ZOOM_RESET_NONE)); |
9 | 1305 |
1516
7439fcf0a6d3
improved Scroll reset method in preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1515
diff
changeset
|
1306 vbox2 = pref_box_new(group, TRUE, GTK_ORIENTATION_VERTICAL, PREF_PAD_SPACE); |
1038
ea23bbd31f75
Allow to change image.scroll_reset_method in Preferences > Image.
Laurent Monin <geeqie@norz.org>
parents:
1024
diff
changeset
|
1307 c_options->image.scroll_reset_method = options->image.scroll_reset_method; |
1516
7439fcf0a6d3
improved Scroll reset method in preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1515
diff
changeset
|
1308 button = pref_radiobutton_new(vbox2, NULL, _("Scroll to top left corner"), |
1038
ea23bbd31f75
Allow to change image.scroll_reset_method in Preferences > Image.
Laurent Monin <geeqie@norz.org>
parents:
1024
diff
changeset
|
1309 (options->image.scroll_reset_method == SCROLL_RESET_TOPLEFT), |
ea23bbd31f75
Allow to change image.scroll_reset_method in Preferences > Image.
Laurent Monin <geeqie@norz.org>
parents:
1024
diff
changeset
|
1310 G_CALLBACK(scroll_reset_cb), GINT_TO_POINTER(SCROLL_RESET_TOPLEFT)); |
1516
7439fcf0a6d3
improved Scroll reset method in preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1515
diff
changeset
|
1311 button = pref_radiobutton_new(vbox2, button, _("Scroll to image center"), |
1038
ea23bbd31f75
Allow to change image.scroll_reset_method in Preferences > Image.
Laurent Monin <geeqie@norz.org>
parents:
1024
diff
changeset
|
1312 (options->image.scroll_reset_method == SCROLL_RESET_CENTER), |
ea23bbd31f75
Allow to change image.scroll_reset_method in Preferences > Image.
Laurent Monin <geeqie@norz.org>
parents:
1024
diff
changeset
|
1313 G_CALLBACK(scroll_reset_cb), GINT_TO_POINTER(SCROLL_RESET_CENTER)); |
1516
7439fcf0a6d3
improved Scroll reset method in preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1515
diff
changeset
|
1314 button = pref_radiobutton_new(vbox2, button, _("Keep the region from previous image"), |
1038
ea23bbd31f75
Allow to change image.scroll_reset_method in Preferences > Image.
Laurent Monin <geeqie@norz.org>
parents:
1024
diff
changeset
|
1315 (options->image.scroll_reset_method == SCROLL_RESET_NOCHANGE), |
ea23bbd31f75
Allow to change image.scroll_reset_method in Preferences > Image.
Laurent Monin <geeqie@norz.org>
parents:
1024
diff
changeset
|
1316 G_CALLBACK(scroll_reset_cb), GINT_TO_POINTER(SCROLL_RESET_NOCHANGE)); |
ea23bbd31f75
Allow to change image.scroll_reset_method in Preferences > Image.
Laurent Monin <geeqie@norz.org>
parents:
1024
diff
changeset
|
1317 |
ea23bbd31f75
Allow to change image.scroll_reset_method in Preferences > Image.
Laurent Monin <geeqie@norz.org>
parents:
1024
diff
changeset
|
1318 |
9 | 1319 group = pref_group_new(vbox, FALSE, _("Appearance"), GTK_ORIENTATION_VERTICAL); |
1320 | |
1644
2b10e2bee592
the options for custom border color were made independent
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1626
diff
changeset
|
1321 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
|
1322 options->image.use_custom_border_color, &c_options->image.use_custom_border_color); |
2059 | 1323 |
1644
2b10e2bee592
the options for custom border color were made independent
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1626
diff
changeset
|
1324 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
|
1325 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
|
1326 |
339
4b5f75e97d81
Rename user_specified_window_background and window_background_color
Laurent Monin <geeqie@norz.org>
parents:
338
diff
changeset
|
1327 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
|
1328 G_CALLBACK(pref_color_button_set_cb), &c_options->image.border_color); |
9 | 1329 |
1330 group = pref_group_new(vbox, FALSE, _("Convenience"), GTK_ORIENTATION_VERTICAL); | |
1331 | |
1332 pref_checkbox_new_int(group, _("Auto rotate image using Exif information"), | |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
1333 options->image.exif_rotate_enable, &c_options->image.exif_rotate_enable); |
2066
01d2c966209e
exif autorotate for proofs
Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
parents:
2059
diff
changeset
|
1334 |
01d2c966209e
exif autorotate for proofs
Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
parents:
2059
diff
changeset
|
1335 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
|
1336 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
|
1337 } |
9 | 1338 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1339 /* windows tab */ |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1340 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
|
1341 { |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1342 GtkWidget *hbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1343 GtkWidget *vbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1344 GtkWidget *group; |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1345 GtkWidget *button; |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1346 GtkWidget *ct_button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1347 GtkWidget *spin; |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1348 GtkWidget *image_overlay_template_view; |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1349 GtkWidget *scrolled; |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1350 GtkTextBuffer *buffer; |
9 | 1351 |
1039
205886cbf992
Allow all Preferences pages to scroll vertically. Reduce code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
1038
diff
changeset
|
1352 vbox = scrolled_notebook_page(notebook, _("Windows")); |
9 | 1353 |
1354 group = pref_group_new(vbox, FALSE, _("State"), GTK_ORIENTATION_VERTICAL); | |
1355 | |
1356 pref_checkbox_new_int(group, _("Remember window positions"), | |
1436
13d61fe760fb
completely separated global and layout window options
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1400
diff
changeset
|
1357 options->save_window_positions, &c_options->save_window_positions); |
9 | 1358 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
|
1359 options->tools_restore_state, &c_options->tools_restore_state); |
9 | 1360 |
1361 group = pref_group_new(vbox, FALSE, _("Size"), GTK_ORIENTATION_VERTICAL); | |
1362 | |
1363 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
|
1364 options->image.fit_window_to_image, &c_options->image.fit_window_to_image); |
9 | 1365 |
1366 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE); | |
1367 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
|
1368 options->image.limit_window_size, &c_options->image.limit_window_size); |
9 | 1369 spin = pref_spin_new_int(hbox, NULL, NULL, |
1370 10, 150, 1, | |
334
771c179cba77
Rename image-related options.
Laurent Monin <geeqie@norz.org>
parents:
333
diff
changeset
|
1371 options->image.max_window_size, &c_options->image.max_window_size); |
9 | 1372 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
|
1373 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1374 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
|
1375 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1376 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
|
1377 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
|
1378 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
|
1379 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
|
1380 gtk_widget_show(hbox); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1381 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1382 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
|
1383 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
|
1384 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
|
1385 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
|
1386 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1387 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1388 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
|
1389 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1390 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
|
1391 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1392 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
|
1393 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
|
1394 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
|
1395 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
|
1396 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1397 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
|
1398 gtk_widget_show(scrolled); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1399 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1400 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
|
1401 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1402 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
|
1403 _("<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
|
1404 "Also available: <i>%collection%</i>, <i>%number%</i>, <i>%total%</i>, <i>%date%</i>,\n" |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1405 "<i>%size%</i> (filesize), <i>%width%</i>, <i>%height%</i>, <i>%res%</i> (resolution)\n" |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1406 "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
|
1407 "<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
|
1408 "<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
|
1409 "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
|
1410 "<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
|
1411 "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
|
1412 "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
|
1413 )); |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1414 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
|
1415 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
|
1416 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1417 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
|
1418 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1419 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
|
1420 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
|
1421 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
|
1422 gtk_widget_show(button); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1423 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1424 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
|
1425 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
|
1426 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
|
1427 gtk_widget_show(button); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1428 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1429 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
|
1430 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
|
1431 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
|
1432 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
|
1433 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1434 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1435 } |
9 | 1436 |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1437 static GtkTreeModel *create_class_model(void) |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1438 { |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1439 GtkListStore *model; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1440 GtkTreeIter iter; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1441 gint i; |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1442 |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1443 /* 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
|
1444 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
|
1445 for (i = 0; i < FILE_FORMAT_CLASSES; i++) |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1446 { |
1346
b3378273091e
No space between function name and first parenthesis, it eases greping (see CODING).
Laurent Monin <geeqie@norz.org>
parents:
1336
diff
changeset
|
1447 gtk_list_store_append(model, &iter); |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1448 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
|
1449 } |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1450 return GTK_TREE_MODEL (model); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1451 } |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1452 |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1453 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1454 /* filtering tab */ |
1522
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
1455 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
|
1456 { |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1457 GtkWidget *hbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1458 GtkWidget *frame; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1459 GtkWidget *vbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1460 GtkWidget *group; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1461 GtkWidget *button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1462 GtkWidget *ct_button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1463 GtkWidget *scrolled; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1464 GtkWidget *filter_view; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1465 GtkCellRenderer *renderer; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1466 GtkTreeSelection *selection; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1467 GtkTreeViewColumn *column; |
9 | 1468 |
1522
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
1469 vbox = scrolled_notebook_page(notebook, _("Files")); |
9 | 1470 |
1471 group = pref_box_new(vbox, FALSE, GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP); | |
1472 | |
356
ba4edae270d6
Rename show_dot_files to show_hidden_files.
Laurent Monin <geeqie@norz.org>
parents:
354
diff
changeset
|
1473 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
|
1474 options->file_filter.show_hidden_files, &c_options->file_filter.show_hidden_files); |
9 | 1475 pref_checkbox_new_int(group, _("Case sensitive sort"), |
329
056872a2bdf7
Rename file sorting options.
Laurent Monin <geeqie@norz.org>
parents:
327
diff
changeset
|
1476 options->file_sort.case_sensitive, &c_options->file_sort.case_sensitive); |
9 | 1477 |
1478 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
|
1479 options->file_filter.disable, &c_options->file_filter.disable); |
9 | 1480 |
170
34d0013592f5
basic sidecar files configuration via preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
134
diff
changeset
|
1481 |
34d0013592f5
basic sidecar files configuration via preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
134
diff
changeset
|
1482 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
|
1483 |
34d0013592f5
basic sidecar files configuration via preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
134
diff
changeset
|
1484 sidecar_ext_entry = gtk_entry_new(); |
1229
2f11fec715ca
sidecar files grouping was made case-insensitive
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1216
diff
changeset
|
1485 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
|
1486 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
|
1487 gtk_widget_show(sidecar_ext_entry); |
34d0013592f5
basic sidecar files configuration via preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
134
diff
changeset
|
1488 |
9 | 1489 group = pref_group_new(vbox, TRUE, _("File types"), GTK_ORIENTATION_VERTICAL); |
1490 | |
1491 frame = pref_group_parent(group); | |
1492 g_signal_connect(G_OBJECT(ct_button), "toggled", | |
1493 G_CALLBACK(filter_disable_cb), frame); | |
332
e0907717f749
Rename file filtering options.
Laurent Monin <geeqie@norz.org>
parents:
330
diff
changeset
|
1494 gtk_widget_set_sensitive(frame, !options->file_filter.disable); |
9 | 1495 |
1496 scrolled = gtk_scrolled_window_new(NULL, NULL); | |
1497 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
|
1498 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); |
9 | 1499 gtk_box_pack_start(GTK_BOX(group), scrolled, TRUE, TRUE, 0); |
1500 gtk_widget_show(scrolled); | |
1501 | |
1502 filter_store = gtk_list_store_new(1, G_TYPE_POINTER); | |
1503 filter_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(filter_store)); | |
1504 g_object_unref(filter_store); | |
1505 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(filter_view)); | |
1506 gtk_tree_selection_set_mode(GTK_TREE_SELECTION(selection), GTK_SELECTION_SINGLE); | |
1507 | |
1508 gtk_tree_view_set_enable_search(GTK_TREE_VIEW(filter_view), FALSE); | |
1509 | |
1510 column = gtk_tree_view_column_new(); | |
1511 gtk_tree_view_column_set_title(column, _("Filter")); | |
1512 gtk_tree_view_column_set_resizable(column, TRUE); | |
1513 | |
1514 renderer = gtk_cell_renderer_toggle_new(); | |
1515 g_signal_connect(G_OBJECT(renderer), "toggled", | |
1516 G_CALLBACK(filter_store_enable_cb), filter_store); | |
1517 gtk_tree_view_column_pack_start(column, renderer, FALSE); | |
1518 gtk_tree_view_column_set_cell_data_func(column, renderer, filter_set_func, | |
1519 GINT_TO_POINTER(FE_ENABLE), NULL); | |
442 | 1520 |
9 | 1521 renderer = gtk_cell_renderer_text_new(); |
1522 g_signal_connect(G_OBJECT(renderer), "edited", | |
1523 G_CALLBACK(filter_store_ext_edit_cb), filter_store); | |
1524 gtk_tree_view_column_pack_start(column, renderer, TRUE); | |
1525 g_object_set(G_OBJECT(renderer), "editable", (gboolean)TRUE, NULL); | |
1526 gtk_tree_view_column_set_cell_data_func(column, renderer, filter_set_func, | |
1527 GINT_TO_POINTER(FE_EXTENSION), NULL); | |
1528 gtk_tree_view_append_column(GTK_TREE_VIEW(filter_view), column); | |
1529 | |
1530 column = gtk_tree_view_column_new(); | |
1531 gtk_tree_view_column_set_title(column, _("Description")); | |
1532 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
|
1533 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
|
1534 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); |
2059 | 1535 |
9 | 1536 renderer = gtk_cell_renderer_text_new(); |
1537 g_signal_connect(G_OBJECT(renderer), "edited", | |
1538 G_CALLBACK(filter_store_desc_edit_cb), filter_store); | |
1539 g_object_set(G_OBJECT(renderer), "editable", (gboolean)TRUE, NULL); | |
1540 gtk_tree_view_column_pack_start(column, renderer, FALSE); | |
1541 gtk_tree_view_column_set_cell_data_func(column, renderer, filter_set_func, | |
1542 GINT_TO_POINTER(FE_DESCRIPTION), NULL); | |
1543 gtk_tree_view_append_column(GTK_TREE_VIEW(filter_view), column); | |
1544 | |
1216
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1545 column = gtk_tree_view_column_new(); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1546 gtk_tree_view_column_set_title(column, _("Class")); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1547 gtk_tree_view_column_set_resizable(column, TRUE); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1548 renderer = gtk_cell_renderer_combo_new(); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1549 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
|
1550 "model", create_class_model(), |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1551 "text-column", 0, |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1552 "has-entry", FALSE, |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1553 NULL); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1554 |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1555 g_signal_connect(G_OBJECT(renderer), "edited", |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1556 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
|
1557 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
|
1558 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
|
1559 GINT_TO_POINTER(FE_CLASS), NULL); |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1560 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
|
1561 |
1239
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
1562 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
|
1563 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
|
1564 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
|
1565 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
|
1566 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
|
1567 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
|
1568 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
|
1569 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
|
1570 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
|
1571 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
|
1572 |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
1573 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
|
1574 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
|
1575 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
|
1576 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
|
1577 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
|
1578 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
|
1579 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
|
1580 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
|
1581 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
|
1582 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
|
1583 |
fdef686991e6
file class made configurable in preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1213
diff
changeset
|
1584 |
9 | 1585 filter_store_populate(); |
1586 gtk_container_add(GTK_CONTAINER(scrolled), filter_view); | |
1587 gtk_widget_show(filter_view); | |
1588 | |
1589 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_BUTTON_GAP); | |
1590 | |
1591 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
|
1592 G_CALLBACK(filter_default_cb), filter_view); |
9 | 1593 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
1594 gtk_widget_show(button); | |
1595 | |
1596 button = pref_button_new(NULL, GTK_STOCK_REMOVE, NULL, FALSE, | |
1597 G_CALLBACK(filter_remove_cb), filter_view); | |
1598 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | |
1599 gtk_widget_show(button); | |
1600 | |
1601 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
|
1602 G_CALLBACK(filter_add_cb), filter_view); |
9 | 1603 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
1604 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
|
1605 } |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1606 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1607 /* metadata tab */ |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1608 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
|
1609 { |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1610 GtkWidget *vbox; |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1611 GtkWidget *hbox; |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1612 GtkWidget *group; |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1613 GtkWidget *ct_button; |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
1614 GtkWidget *label; |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
1615 gchar *text; |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1616 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1617 vbox = scrolled_notebook_page(notebook, _("Metadata")); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1618 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1619 |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
1620 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
|
1621 #ifndef HAVE_EXIV2 |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
1622 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
|
1623 #endif |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
1624 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
|
1625 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
|
1626 |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
1627 ct_button = pref_checkbox_new_int(group, _("1) Save metadata in image files, resp. sidecar files, according to the XMP standard"), |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
1628 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
|
1629 #ifndef HAVE_EXIV2 |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
1630 gtk_widget_set_sensitive(ct_button, FALSE); |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
1631 #endif |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
1632 |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
1633 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
|
1634 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
|
1635 |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
1636 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
|
1637 label = pref_label_new(group, text); |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
1638 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
|
1639 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
|
1640 g_free(text); |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
1641 |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
1642 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
|
1643 #ifndef HAVE_EXIV2 |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
1644 gtk_widget_set_sensitive(group, FALSE); |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
1645 #endif |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1646 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1647 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
|
1648 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
|
1649 |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
1650 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
|
1651 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
|
1652 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1653 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
|
1654 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
|
1655 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1656 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
|
1657 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
|
1658 |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
1659 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
|
1660 #ifndef HAVE_EXIV2 |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
1661 gtk_widget_set_sensitive(group, FALSE); |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
1662 #endif |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
1663 |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
1664 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
|
1665 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
|
1666 |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
1667 |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
1668 group = pref_group_new(vbox, FALSE, _("Miscellaneous"), GTK_ORIENTATION_VERTICAL); |
1663
c39c4ee5d94c
improved description string
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1644
diff
changeset
|
1669 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
|
1670 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
|
1671 |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
1672 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
|
1673 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
|
1674 |
1686
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
1675 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
|
1676 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
|
1677 #ifndef HAVE_EXIV2 |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
1678 gtk_widget_set_sensitive(ct_button, FALSE); |
4cb7c2245306
fixes for a built without Exiv2
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1685
diff
changeset
|
1679 #endif |
1596
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
1680 |
6efbb4b49ab4
added some structure to the metadata preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1590
diff
changeset
|
1681 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
|
1682 |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1683 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
|
1684 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
|
1685 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1686 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
|
1687 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
|
1688 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1689 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
|
1690 options->metadata.confirm_timeout, &c_options->metadata.confirm_timeout); |
2059 | 1691 |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1692 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
|
1693 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
|
1694 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1695 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
|
1696 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
|
1697 } |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1698 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1699 /* metadata tab */ |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1700 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
|
1701 { |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1702 GtkWidget *label; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1703 GtkWidget *vbox; |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1704 GtkWidget *group; |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1705 GtkWidget *tabcomp; |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1706 GtkWidget *table; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1707 gint i; |
9 | 1708 |
1522
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
1709 vbox = scrolled_notebook_page(notebook, _("Color management")); |
9 | 1710 |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
1711 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
|
1712 #ifndef HAVE_LCMS |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1713 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
|
1714 #endif |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1715 |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
1716 table = pref_table_new(group, 3, COLOR_PROFILE_INPUTS + 1, FALSE, FALSE); |
9 | 1717 gtk_table_set_col_spacings(GTK_TABLE(table), PREF_PAD_GAP); |
1718 | |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1719 label = pref_table_label(table, 0, 0, _("Type"), 0.0); |
9 | 1720 pref_label_bold(label, TRUE, FALSE); |
1721 | |
1722 label = pref_table_label(table, 1, 0, _("Menu name"), 0.0); | |
1723 pref_label_bold(label, TRUE, FALSE); | |
1724 | |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1725 label = pref_table_label(table, 2, 0, _("File"), 0.0); |
9 | 1726 pref_label_bold(label, TRUE, FALSE); |
1727 | |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1728 for (i = 0; i < COLOR_PROFILE_INPUTS; i++) |
9 | 1729 { |
224
bb39a088c56e
Tidy up. Fix indentation and missing whitespaces.
Laurent Monin <geeqie@norz.org>
parents:
223
diff
changeset
|
1730 GtkWidget *entry; |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1731 gchar *buf; |
442 | 1732 |
1625 | 1733 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
|
1734 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
|
1735 g_free(buf); |
9 | 1736 |
224
bb39a088c56e
Tidy up. Fix indentation and missing whitespaces.
Laurent Monin <geeqie@norz.org>
parents:
223
diff
changeset
|
1737 entry = gtk_entry_new(); |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1738 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
|
1739 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
|
1740 { |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1741 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
|
1742 } |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1743 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
|
1744 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
|
1745 gtk_widget_show(entry); |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1746 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
|
1747 |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1748 tabcomp = tab_completion_new(&entry, options->color_profile.input_file[i], NULL, NULL); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1749 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
|
1750 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
|
1751 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
|
1752 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
|
1753 gtk_widget_show(tabcomp); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1754 color_profile_input_file_entry[i] = entry; |
9 | 1755 } |
1756 | |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
1757 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
|
1758 #ifndef HAVE_LCMS |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
1759 gtk_widget_set_sensitive(pref_group_parent(group), FALSE); |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
1760 #endif |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
1761 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
|
1762 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
|
1763 |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
1764 table = pref_table_new(group, 2, 1, FALSE, FALSE); |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
1765 |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
1766 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
|
1767 tabcomp = tab_completion_new(&color_profile_screen_file_entry, |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1768 options->color_profile.screen_file, NULL, NULL); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1769 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
|
1770 gtk_widget_set_size_request(color_profile_screen_file_entry, 160, -1); |
1548
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
1771 gtk_table_attach(GTK_TABLE(table), tabcomp, 1, 2, |
1bd57e730350
support X11 screen profile
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1540
diff
changeset
|
1772 0, 1, |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1773 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
|
1774 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
|
1775 } |
222
fe6cb572a798
various exif improvements based on patch by Uwe Ohse
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
218
diff
changeset
|
1776 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1777 /* advanced entry tab */ |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1778 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
|
1779 { |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1780 GtkWidget *hbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1781 GtkWidget *vbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1782 GtkWidget *group; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1783 GtkWidget *button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1784 GtkWidget *tabcomp; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1785 GtkWidget *ct_button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1786 GtkWidget *spin; |
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
|
1787 |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
1788 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
|
1789 |
1685
041cdca65160
Revert "Add pgettext for some ambiguous strings"
Klaus Ethgen <Klaus@Ethgen.de>
parents:
1678
diff
changeset
|
1790 group = pref_group_new(vbox, FALSE, _("Delete"), GTK_ORIENTATION_VERTICAL); |
9 | 1791 |
1792 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
|
1793 options->file_ops.confirm_delete, &c_options->file_ops.confirm_delete); |
9 | 1794 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
|
1795 options->file_ops.enable_delete_key, &c_options->file_ops.enable_delete_key); |
9 | 1796 |
1797 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
|
1798 options->file_ops.safe_delete_enable, &c_options->file_ops.safe_delete_enable); |
9 | 1799 |
1800 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE); | |
1801 pref_checkbox_link_sensitivity(ct_button, hbox); | |
1802 | |
1803 pref_spacer(hbox, PREF_PAD_INDENT - PREF_PAD_SPACE); | |
1804 pref_label_new(hbox, _("Folder:")); | |
1805 | |
341
3e0059a55671
Move safe_delete* and in place rename options to file_ops
Laurent Monin <geeqie@norz.org>
parents:
339
diff
changeset
|
1806 tabcomp = tab_completion_new(&safe_delete_path_entry, options->file_ops.safe_delete_path, NULL, NULL); |
9 | 1807 tab_completion_add_select_button(safe_delete_path_entry, NULL, TRUE); |
1808 gtk_box_pack_start(GTK_BOX(hbox), tabcomp, TRUE, TRUE, 0); | |
1809 gtk_widget_show(tabcomp); | |
1810 | |
1811 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_BUTTON_GAP); | |
1812 pref_checkbox_link_sensitivity(ct_button, hbox); | |
1813 | |
1814 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
|
1815 spin = pref_spin_new_int(hbox, _("Maximum size:"), _("MB"), |
442 | 1816 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
|
1817 gtk_widget_set_tooltip_markup(spin, _("Set to 0 for unlimited size")); |
9 | 1818 button = pref_button_new(NULL, NULL, _("View"), FALSE, |
1819 G_CALLBACK(safe_delete_view_cb), NULL); | |
1820 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | |
1821 gtk_widget_show(button); | |
1822 | |
1823 button = pref_button_new(NULL, GTK_STOCK_CLEAR, NULL, FALSE, | |
1824 G_CALLBACK(safe_delete_clear_cb), NULL); | |
1825 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | |
1826 gtk_widget_show(button); | |
1827 | |
497
29dc838f7d6b
Allow the copy of file paths to clipboard.
Laurent Monin <geeqie@norz.org>
parents:
475
diff
changeset
|
1828 |
9 | 1829 group = pref_group_new(vbox, FALSE, _("Behavior"), GTK_ORIENTATION_VERTICAL); |
1830 | |
1831 pref_checkbox_new_int(group, _("Rectangular selection in icon view"), | |
330 | 1832 options->collections.rectangular_selection, &c_options->collections.rectangular_selection); |
9 | 1833 |
1834 pref_checkbox_new_int(group, _("Descend folders in tree view"), | |
321 | 1835 options->tree_descend_subdirs, &c_options->tree_descend_subdirs); |
9 | 1836 |
1837 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
|
1838 options->file_ops.enable_in_place_rename, &c_options->file_ops.enable_in_place_rename); |
9 | 1839 |
441
3cc6ee2e3e21
Allow the user to change open_recent_list_maxsize option through
Laurent Monin <geeqie@norz.org>
parents:
426
diff
changeset
|
1840 pref_spin_new_int(group, _("Open recent list maximum size"), NULL, |
3cc6ee2e3e21
Allow the user to change open_recent_list_maxsize option through
Laurent Monin <geeqie@norz.org>
parents:
426
diff
changeset
|
1841 1, 50, 1, options->open_recent_list_maxsize, &c_options->open_recent_list_maxsize); |
2059 | 1842 |
458
1397463b9c74
Allow the user to set the drag'n drop icon size through
Laurent Monin <geeqie@norz.org>
parents:
446
diff
changeset
|
1843 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
|
1844 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
|
1845 |
9 | 1846 group = pref_group_new(vbox, FALSE, _("Navigation"), GTK_ORIENTATION_VERTICAL); |
1847 | |
1848 pref_checkbox_new_int(group, _("Progressive keyboard scrolling"), | |
321 | 1849 options->progressive_key_scrolling, &c_options->progressive_key_scrolling); |
9 | 1850 pref_checkbox_new_int(group, _("Mouse wheel scrolls image"), |
321 | 1851 options->mousewheel_scrolls, &c_options->mousewheel_scrolls); |
9 | 1852 |
1213
581886171554
show metadata options in preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1208
diff
changeset
|
1853 group = pref_group_new(vbox, FALSE, _("Miscellaneous"), GTK_ORIENTATION_VERTICAL); |
581886171554
show metadata options in preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1208
diff
changeset
|
1854 |
9 | 1855 pref_spin_new_int(group, _("Custom similarity threshold:"), NULL, |
1188
d69b18588e19
Fix up sign-related warning.
Laurent Monin <geeqie@norz.org>
parents:
1174
diff
changeset
|
1856 0, 100, 1, options->duplicates_similarity_threshold, (int *)&c_options->duplicates_similarity_threshold); |
9 | 1857 |
113
f2109493004f
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
91
diff
changeset
|
1858 |
227
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
1859 #ifdef DEBUG |
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
1860 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
|
1861 |
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
1862 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
|
1863 DEBUG_LEVEL_MIN, DEBUG_LEVEL_MAX, 1, get_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
|
1864 #endif |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1865 } |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
1866 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1867 /* accelerators tab */ |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1868 static void config_tab_accelerators(GtkWidget *notebook) |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1869 { |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1870 GtkWidget *hbox; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1871 GtkWidget *vbox; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1872 GtkWidget *group; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1873 GtkWidget *button; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1874 GtkWidget *scrolled; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1875 GtkWidget *accel_view; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1876 GtkCellRenderer *renderer; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1877 GtkTreeSelection *selection; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1878 GtkTreeViewColumn *column; |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1879 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1880 vbox = scrolled_notebook_page(notebook, _("Keyboard")); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1881 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1882 group = pref_group_new(vbox, TRUE, _("Accelerators"), GTK_ORIENTATION_VERTICAL); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1883 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1884 scrolled = gtk_scrolled_window_new(NULL, NULL); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1885 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
|
1886 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
|
1887 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
|
1888 gtk_widget_show(scrolled); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1889 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1890 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
|
1891 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1892 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
|
1893 g_object_unref(accel_store); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1894 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
|
1895 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
|
1896 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1897 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
|
1898 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1899 renderer = gtk_cell_renderer_text_new(); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1900 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1901 column = gtk_tree_view_column_new_with_attributes(_("Action"), |
2059 | 1902 renderer, |
1903 "text", AE_ACTION, | |
1904 NULL); | |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1905 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1906 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
|
1907 gtk_tree_view_column_set_resizable(column, TRUE); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1908 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
|
1909 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1910 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1911 renderer = gtk_cell_renderer_accel_new(); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1912 g_signal_connect(G_OBJECT(renderer), "accel-cleared", |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1913 G_CALLBACK(accel_store_cleared_cb), accel_store); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1914 g_signal_connect(G_OBJECT(renderer), "accel-edited", |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1915 G_CALLBACK(accel_store_edited_cb), accel_store); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1916 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1917 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1918 g_object_set (renderer, |
2059 | 1919 "editable", TRUE, |
1920 "accel-mode", GTK_CELL_RENDERER_ACCEL_MODE_OTHER, | |
1921 NULL); | |
1922 | |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1923 column = gtk_tree_view_column_new_with_attributes(_("KEY"), |
2059 | 1924 renderer, |
1925 "text", AE_KEY, | |
1926 NULL); | |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1927 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1928 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
|
1929 gtk_tree_view_column_set_resizable(column, TRUE); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1930 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
|
1931 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1932 renderer = gtk_cell_renderer_text_new(); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1933 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1934 column = gtk_tree_view_column_new_with_attributes(_("Tooltip"), |
2059 | 1935 renderer, |
1936 "text", AE_TOOLTIP, | |
1937 NULL); | |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1938 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1939 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
|
1940 gtk_tree_view_column_set_resizable(column, TRUE); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1941 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
|
1942 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1943 renderer = gtk_cell_renderer_text_new(); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1944 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1945 column = gtk_tree_view_column_new_with_attributes("Accel", |
2059 | 1946 renderer, |
1947 "text", AE_ACCEL, | |
1948 NULL); | |
1949 | |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1950 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
|
1951 gtk_tree_view_column_set_resizable(column, TRUE); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1952 gtk_tree_view_append_column(GTK_TREE_VIEW(accel_view), column); |
2059 | 1953 |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1954 accel_store_populate(); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1955 gtk_container_add(GTK_CONTAINER(scrolled), accel_view); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1956 gtk_widget_show(accel_view); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1957 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1958 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
|
1959 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1960 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
|
1961 G_CALLBACK(accel_default_cb), accel_view); |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1962 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
|
1963 gtk_widget_show(button); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1964 |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1965 button = pref_button_new(NULL, NULL, _("Reset selected"), FALSE, |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1966 G_CALLBACK(accel_reset_cb), accel_view); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1967 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
|
1968 gtk_widget_show(button); |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1969 } |
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
1970 |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
1971 /* stereo tab */ |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
1972 static void config_tab_stereo(GtkWidget *notebook) |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
1973 { |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
1974 GtkWidget *vbox; |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
1975 GtkWidget *group; |
1891
25645af65caf
added fixed stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1889
diff
changeset
|
1976 GtkWidget *group2; |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
1977 GtkWidget *table; |
1892
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
1978 GtkWidget *box; |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
1979 GtkWidget *box2; |
1891
25645af65caf
added fixed stereo mode
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1889
diff
changeset
|
1980 GtkWidget *fs_button; |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
1981 vbox = scrolled_notebook_page(notebook, _("Stereo")); |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
1982 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
1983 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
|
1984 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
1985 table = pref_table_new(group, 2, 1, FALSE, FALSE); |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
1986 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
|
1987 |
1892
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
1988 table = pref_table_new(group, 2, 2, TRUE, FALSE); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
1989 box = pref_table_box(table, 0, 0, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
1990 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
|
1991 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
|
1992 box = pref_table_box(table, 1, 0, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
1993 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
|
1994 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
|
1995 box = pref_table_box(table, 0, 1, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
1996 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
|
1997 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
|
1998 box = pref_table_box(table, 1, 1, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
1999 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
|
2000 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
|
2001 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
|
2002 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
|
2003 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
|
2004 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
|
2005 |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
2006 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
|
2007 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
|
2008 options->stereo.enable_fsmode, &c_options->stereo.enable_fsmode); |
1892
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2009 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
|
2010 pref_checkbox_link_sensitivity(fs_button, box2); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2011 table = pref_table_new(box2, 2, 1, FALSE, FALSE); |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
2012 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
|
2013 table = pref_table_new(box2, 2, 2, TRUE, FALSE); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2014 box = pref_table_box(table, 0, 0, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2015 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
|
2016 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
|
2017 box = pref_table_box(table, 1, 0, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2018 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
|
2019 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
|
2020 box = pref_table_box(table, 0, 1, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2021 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
|
2022 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
|
2023 box = pref_table_box(table, 1, 1, GTK_ORIENTATION_HORIZONTAL, NULL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2024 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
|
2025 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
|
2026 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
|
2027 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
|
2028 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
|
2029 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
|
2030 |
1892
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2031 group2 = pref_group_new(box2, FALSE, _("Fixed position"), GTK_ORIENTATION_VERTICAL); |
e250a4b38301
improved preferences dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1891
diff
changeset
|
2032 table = pref_table_new(group2, 5, 3, FALSE, FALSE); |
1921
9a82e917c61d
fixed stereo.fixed preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1896
diff
changeset
|
2033 pref_table_spin_new_int(table, 0, 0, _("Width"), NULL, |
9a82e917c61d
fixed stereo.fixed preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1896
diff
changeset
|
2034 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
|
2035 pref_table_spin_new_int(table, 3, 0, _("Height"), NULL, |
9a82e917c61d
fixed stereo.fixed preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1896
diff
changeset
|
2036 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
|
2037 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
|
2038 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
|
2039 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
|
2040 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
|
2041 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
|
2042 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
|
2043 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
|
2044 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
|
2045 |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
2046 } |
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
2047 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2048 /* Main preferences window */ |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2049 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
|
2050 { |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2051 GtkWidget *win_vbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2052 GtkWidget *hbox; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2053 GtkWidget *notebook; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2054 GtkWidget *button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2055 GtkWidget *ct_button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2056 |
321 | 2057 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
|
2058 |
289
d4d7e7aa0d88
Simplify and unify gtk_window creation with the help of
Laurent Monin <geeqie@norz.org>
parents:
288
diff
changeset
|
2059 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
|
2060 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
|
2061 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
|
2062 G_CALLBACK(config_window_delete), NULL); |
442 | 2063 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
|
2064 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
|
2065 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
|
2066 |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2067 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
|
2068 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
|
2069 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
|
2070 |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2071 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
|
2072 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
|
2073 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
|
2074 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
|
2075 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
|
2076 |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2077 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
|
2078 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
|
2079 gtk_container_add(GTK_CONTAINER(hbox), button); |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
2080 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
|
2081 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
|
2082 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
|
2083 |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2084 ct_button = button; |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2085 |
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
|
2086 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
|
2087 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
|
2088 gtk_container_add(GTK_CONTAINER(hbox), button); |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
2089 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
|
2090 gtk_widget_show(button); |
2059 | 2091 |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2092 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
|
2093 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
|
2094 gtk_container_add(GTK_CONTAINER(hbox), button); |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
2095 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
|
2096 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
|
2097 |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2098 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
|
2099 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
|
2100 gtk_container_add(GTK_CONTAINER(hbox), button); |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
2101 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
|
2102 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
|
2103 |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2104 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
|
2105 { |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2106 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
|
2107 } |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2108 |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2109 notebook = gtk_notebook_new(); |
512
0896f486ec6f
Remove whitespace between function name and first parenthesis for the sake of consistency.
Laurent Monin <geeqie@norz.org>
parents:
507
diff
changeset
|
2110 gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_TOP); |
230
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2111 gtk_box_pack_start(GTK_BOX(win_vbox), notebook, TRUE, TRUE, 0); |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2112 |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2113 config_tab_general(notebook); |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2114 config_tab_image(notebook); |
ab6b27690d45
Move tabs code from config_window_create() to new smaller functions.
Laurent Monin <geeqie@norz.org>
parents:
227
diff
changeset
|
2115 config_tab_windows(notebook); |
1601
102d767de670
added keyboard configuration dialog
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1599
diff
changeset
|
2116 config_tab_accelerators(notebook); |
1522
4f9d5c5d36b4
re-ordered some options, improved descriptions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1521
diff
changeset
|
2117 config_tab_files(notebook); |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2118 config_tab_metadata(notebook); |
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2119 config_tab_color(notebook); |
1887
cca739d627fd
stereo mode preferences
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
2120 config_tab_stereo(notebook); |
1510
e03e7beeea30
moved options from Advanced tab to other tabs
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1506
diff
changeset
|
2121 config_tab_behavior(notebook); |
227
8c04a55c0229
Add a debug level spinner at the end of Preferences > Advanced.
Laurent Monin <geeqie@norz.org>
parents:
226
diff
changeset
|
2122 |
9 | 2123 gtk_widget_show(notebook); |
2124 | |
2125 gtk_widget_show(configwindow); | |
2126 } | |
2127 | |
2128 /* | |
2129 *----------------------------------------------------------------------------- | |
2130 * config window show (public) | |
2131 *----------------------------------------------------------------------------- | |
442 | 2132 */ |
9 | 2133 |
2134 void show_config_window(void) | |
2135 { | |
2136 if (configwindow) | |
2137 { | |
2138 gtk_window_present(GTK_WINDOW(configwindow)); | |
2139 return; | |
2140 } | |
2141 | |
2142 config_window_create(); | |
2143 } | |
2144 | |
2145 /* | |
2146 *----------------- | |
2147 * about window | |
2148 *----------------- | |
2149 */ | |
2150 | |
2151 static GtkWidget *about = NULL; | |
2152 | |
1443 | 2153 static gboolean about_delete_cb(GtkWidget *widget, GdkEventAny *event, gpointer data) |
9 | 2154 { |
2155 gtk_widget_destroy(about); | |
2156 about = NULL; | |
2157 | |
2158 return TRUE; | |
2159 } | |
2160 | |
2161 static void about_window_close(GtkWidget *widget, gpointer data) | |
2162 { | |
2163 if (!about) return; | |
2164 | |
2165 gtk_widget_destroy(about); | |
2166 about = NULL; | |
2167 } | |
2168 | |
2169 static void about_credits_cb(GtkWidget *widget, gpointer data) | |
2170 { | |
2171 help_window_show("credits"); | |
2172 } | |
2173 | |
2174 void show_about_window(void) | |
2175 { | |
2176 GtkWidget *vbox; | |
2177 GtkWidget *hbox; | |
2178 GtkWidget *label; | |
2179 GtkWidget *button; | |
2180 GdkPixbuf *pixbuf; | |
2181 | |
2182 gchar *buf; | |
2183 | |
2184 if (about) | |
2185 { | |
2186 gtk_window_present(GTK_WINDOW(about)); | |
2187 return; | |
2188 } | |
2189 | |
289
d4d7e7aa0d88
Simplify and unify gtk_window creation with the help of
Laurent Monin <geeqie@norz.org>
parents:
288
diff
changeset
|
2190 about = window_new(GTK_WINDOW_TOPLEVEL, "about", NULL, NULL, _("About")); |
9 | 2191 gtk_window_set_type_hint(GTK_WINDOW(about), GDK_WINDOW_TYPE_HINT_DIALOG); |
2192 g_signal_connect(G_OBJECT(about), "delete_event", | |
2193 G_CALLBACK(about_delete_cb), NULL); | |
2194 | |
2195 gtk_container_set_border_width(GTK_CONTAINER(about), PREF_PAD_BORDER); | |
2196 | |
2197 vbox = gtk_vbox_new(FALSE, PREF_PAD_SPACE); | |
2198 gtk_container_add(GTK_CONTAINER(about), vbox); | |
2199 gtk_widget_show(vbox); | |
2200 | |
2201 pixbuf = pixbuf_inline(PIXBUF_INLINE_LOGO); | |
2202 button = gtk_image_new_from_pixbuf(pixbuf); | |
2203 g_object_unref(pixbuf); | |
2204 gtk_box_pack_start(GTK_BOX(vbox), button, TRUE, TRUE, 0); | |
2205 gtk_widget_show(button); | |
2206 | |
475
baa9658ddd9f
updated copyright in source files
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
469
diff
changeset
|
2207 buf = g_strdup_printf(_("%s %s\n\nCopyright (c) 2006 John Ellis\nCopyright (c) %s The Geeqie Team\nwebsite: %s\nemail: %s\n\nReleased under the GNU General Public License"), |
288
e675073bcca0
Replace occurences of Geeqie / geeqie by constants defined in main.h.
Laurent Monin <geeqie@norz.org>
parents:
283
diff
changeset
|
2208 GQ_APPNAME, |
9 | 2209 VERSION, |
2021
26dfd7a4d130
updated version and copyright notice
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1921
diff
changeset
|
2210 "2008 - 2012", |
288
e675073bcca0
Replace occurences of Geeqie / geeqie by constants defined in main.h.
Laurent Monin <geeqie@norz.org>
parents:
283
diff
changeset
|
2211 GQ_WEBSITE, |
e675073bcca0
Replace occurences of Geeqie / geeqie by constants defined in main.h.
Laurent Monin <geeqie@norz.org>
parents:
283
diff
changeset
|
2212 GQ_EMAIL_ADDRESS); |
9 | 2213 label = gtk_label_new(buf); |
2214 g_free(buf); | |
2215 | |
2216 gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_CENTER); | |
2217 gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0); | |
2218 gtk_widget_show(label); | |
2219 | |
2220 hbox = gtk_hbutton_box_new(); | |
2221 gtk_button_box_set_layout(GTK_BUTTON_BOX(hbox), GTK_BUTTONBOX_END); | |
2222 gtk_box_set_spacing(GTK_BOX(hbox), PREF_PAD_BUTTON_GAP); | |
2223 gtk_box_pack_end(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | |
2224 gtk_widget_show(hbox); | |
2225 | |
2226 button = pref_button_new(NULL, NULL, _("Credits..."), FALSE, | |
2227 G_CALLBACK(about_credits_cb), NULL); | |
2228 gtk_container_add(GTK_CONTAINER(hbox), button); | |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
2229 gtk_widget_set_can_default(button, TRUE); |
9 | 2230 gtk_widget_show(button); |
2231 | |
2232 button = pref_button_new(NULL, GTK_STOCK_CLOSE, NULL, FALSE, | |
2233 G_CALLBACK(about_window_close), NULL); | |
2234 gtk_container_add(GTK_CONTAINER(hbox), button); | |
2034
9297985567b5
use accessor functions
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
2021
diff
changeset
|
2235 gtk_widget_set_can_default(button, TRUE); |
9 | 2236 gtk_widget_grab_default(button); |
2237 gtk_widget_show(button); | |
2238 | |
2239 gtk_widget_show(about); | |
2240 } | |
1055
4bbdfab3c89a
Adding a vim modeline to all files - patch by Klaus Ethgen
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1053
diff
changeset
|
2241 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */ |