Mercurial > geeqie
annotate src/gqview.h @ 226:3c89da4aef95
Fix and simplify thumbnails size combo box related code.
Some variables were unused, code was buggy (spurious entry at
the end of the list). A sanity check for values coming from
rc file was added. Two constants now define the default
thumbnail size.
author | zas_ |
---|---|
date | Thu, 03 Apr 2008 14:35:03 +0000 |
parents | f4a0555794a9 |
children | 41fc4bfc8b25 |
rev | line source |
---|---|
1 | 1 /* |
196 | 2 * Geeqie |
67
f63ecca6c087
Fri Oct 13 05:22:43 2006 John Ellis <johne@verizon.net>
gqview
parents:
14
diff
changeset
|
3 * (C) 2006 John Ellis |
1 | 4 * |
5 * Author: John Ellis | |
6 * | |
9 | 7 * This software is released under the GNU General Public License (GNU GPL). |
8 * Please read the included file COPYING for more information. | |
9 * This software comes with no warranty of any kind, use at your own risk! | |
1 | 10 */ |
11 | |
9 | 12 |
13 #ifndef GQVIEW_H | |
14 #define GQVIEW_H | |
15 | |
1 | 16 #ifdef HAVE_CONFIG_H |
17 # include "config.h" | |
18 #endif | |
19 | |
9 | 20 #ifdef HAVE_STRVERSCMP |
213 | 21 # ifndef _GNU_SOURCE |
22 # define _GNU_SOURCE | |
23 # endif | |
9 | 24 #endif |
25 | |
1 | 26 #include "intl.h" |
27 | |
28 /* | |
29 *------------------------------------- | |
30 * Standard library includes | |
31 *------------------------------------- | |
32 */ | |
33 | |
34 #include <pwd.h> | |
35 #include <stdio.h> | |
36 #include <stdlib.h> | |
37 #include <string.h> | |
38 #include <time.h> | |
39 #include <unistd.h> | |
40 #include <sys/stat.h> | |
9 | 41 #include <sys/time.h> |
42 #include <sys/types.h> | |
1 | 43 #include <dirent.h> |
9 | 44 #include <fcntl.h> |
1 | 45 |
46 /* | |
47 *------------------------------------- | |
9 | 48 * includes for glib / gtk / gdk-pixbuf |
1 | 49 *------------------------------------- |
50 */ | |
51 | |
52 #include <gdk/gdk.h> | |
53 #include <gtk/gtk.h> | |
9 | 54 |
55 #include <gdk-pixbuf/gdk-pixbuf.h> | |
56 #include <gdk-pixbuf/gdk-pixbuf-loader.h> | |
57 | |
1 | 58 |
59 /* | |
60 *---------------------------------------------------------------------------- | |
61 * defines | |
62 *---------------------------------------------------------------------------- | |
63 */ | |
64 | |
195 | 65 #define GQVIEW_RC_DIR ".geeqie" |
9 | 66 #define GQVIEW_RC_DIR_COLLECTIONS GQVIEW_RC_DIR"/collections" |
67 #define GQVIEW_RC_DIR_TRASH GQVIEW_RC_DIR"/trash" | |
68 | |
69 #define RC_FILE_NAME "gqviewrc" | |
1 | 70 |
71 #define ZOOM_RESET_ORIGINAL 0 | |
72 #define ZOOM_RESET_FIT_WINDOW 1 | |
73 #define ZOOM_RESET_NONE 2 | |
74 | |
9 | 75 #define SCROLL_RESET_TOPLEFT 0 |
76 #define SCROLL_RESET_CENTER 1 | |
77 #define SCROLL_RESET_NOCHANGE 2 | |
78 | |
4 | 79 #define MOUSEWHEEL_SCROLL_SIZE 20 |
80 | |
134
9009856628f7
started implementation of external commands; external Delete should work
nadvornik
parents:
113
diff
changeset
|
81 #define GQVIEW_EDITOR_GENERIC_SLOTS 10 |
1 | 82 |
113
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
91
diff
changeset
|
83 #define COLOR_PROFILE_INPUTS 4 |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
91
diff
changeset
|
84 |
226
3c89da4aef95
Fix and simplify thumbnails size combo box related code.
zas_
parents:
218
diff
changeset
|
85 #define DEFAULT_THUMB_WIDTH 96 |
3c89da4aef95
Fix and simplify thumbnails size combo box related code.
zas_
parents:
218
diff
changeset
|
86 #define DEFAULT_THUMB_HEIGHT 72 |
3c89da4aef95
Fix and simplify thumbnails size combo box related code.
zas_
parents:
218
diff
changeset
|
87 |
3c89da4aef95
Fix and simplify thumbnails size combo box related code.
zas_
parents:
218
diff
changeset
|
88 |
134
9009856628f7
started implementation of external commands; external Delete should work
nadvornik
parents:
113
diff
changeset
|
89 #include "typedefs.h" |
9009856628f7
started implementation of external commands; external Delete should work
nadvornik
parents:
113
diff
changeset
|
90 |
9 | 91 /* |
92 *---------------------------------------------------------------------------- | |
93 * globals | |
94 *---------------------------------------------------------------------------- | |
95 */ | |
1 | 96 |
9 | 97 /* |
98 * Since globals are used everywhere, | |
99 * it is easier to define them here. | |
100 */ | |
1 | 101 |
102 extern GList *filename_filter; | |
103 | |
104 /* -- options -- */ | |
105 extern gint main_window_w; | |
106 extern gint main_window_h; | |
107 extern gint main_window_x; | |
108 extern gint main_window_y; | |
9 | 109 extern gint main_window_maximized; |
1 | 110 |
111 extern gint float_window_w; | |
112 extern gint float_window_h; | |
113 extern gint float_window_x; | |
114 extern gint float_window_y; | |
9 | 115 extern gint float_window_divider; |
116 | |
117 extern gint window_hdivider_pos; | |
118 extern gint window_vdivider_pos; | |
1 | 119 |
120 extern gint save_window_positions; | |
121 extern gint tools_float; | |
122 extern gint tools_hidden; | |
9 | 123 extern gint toolbar_hidden; |
1 | 124 extern gint progressive_key_scrolling; |
125 | |
126 extern gint startup_path_enable; | |
127 extern gchar *startup_path; | |
128 extern gint confirm_delete; | |
9 | 129 extern gint enable_delete_key; |
130 extern gint safe_delete_enable; | |
131 extern gchar *safe_delete_path; | |
132 extern gint safe_delete_size; | |
1 | 133 extern gint restore_tool; |
134 extern gint zoom_mode; | |
9 | 135 extern gint two_pass_zoom; |
136 extern gint scroll_reset_method; | |
1 | 137 extern gint fit_window; |
138 extern gint limit_window_size; | |
9 | 139 extern gint zoom_to_fit_expands; |
1 | 140 extern gint max_window_size; |
209
ad78ad18523a
configurable frame around image - geeqie_autofit_maxsize.patch by Laurent MONIN
nadvornik
parents:
208
diff
changeset
|
141 extern gint limit_autofit_size; |
ad78ad18523a
configurable frame around image - geeqie_autofit_maxsize.patch by Laurent MONIN
nadvornik
parents:
208
diff
changeset
|
142 extern gint max_autofit_size; |
1 | 143 extern gint thumb_max_width; |
144 extern gint thumb_max_height; | |
145 extern gint enable_thumb_caching; | |
9 | 146 extern gint enable_thumb_dirs; |
14
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
9
diff
changeset
|
147 extern gint thumbnail_fast; |
1 | 148 extern gint use_xvpics_thumbnails; |
9 | 149 extern gint thumbnail_spec_standard; |
150 extern gint enable_metadata_dirs; | |
1 | 151 extern gint show_dot_files; |
152 extern gint file_filter_disable; | |
153 extern gchar *editor_name[]; | |
154 extern gchar *editor_command[]; | |
155 | |
156 extern gint thumbnails_enabled; | |
9 | 157 extern SortType file_sort_method; |
158 extern gint file_sort_ascending; | |
1 | 159 |
9 | 160 extern gint slideshow_delay; /* in tenths of a second */ |
1 | 161 extern gint slideshow_random; |
162 extern gint slideshow_repeat; | |
163 | |
4 | 164 extern gint mousewheel_scrolls; |
9 | 165 extern gint enable_in_place_rename; |
166 | |
208
fa0e05f985c3
set user-defined color as image background - patch by Laurent MONIN
nadvornik
parents:
196
diff
changeset
|
167 extern gint user_specified_window_background; |
fa0e05f985c3
set user-defined color as image background - patch by Laurent MONIN
nadvornik
parents:
196
diff
changeset
|
168 extern GdkColor window_background_color; |
9 | 169 |
170 extern gint fullscreen_screen; | |
171 extern gint fullscreen_clean_flip; | |
172 extern gint fullscreen_disable_saver; | |
173 extern gint fullscreen_above; | |
218
f4a0555794a9
Customizable info overlay in fullscreen, based on the patch posted to gqview-devel list by Timo on 2007-09-10.
zas_
parents:
213
diff
changeset
|
174 extern gint show_fullscreen_info; |
f4a0555794a9
Customizable info overlay in fullscreen, based on the patch posted to gqview-devel list by Timo on 2007-09-10.
zas_
parents:
213
diff
changeset
|
175 extern gchar *fullscreen_info; |
9 | 176 |
177 extern gint dupe_custom_threshold; | |
4 | 178 |
1 | 179 extern gint debug; |
180 | |
9 | 181 extern gint recent_list_max; |
1 | 182 |
9 | 183 extern gint collection_rectangular_selection; |
1 | 184 |
9 | 185 extern gint tile_cache_max; /* in megabytes */ |
186 extern gint thumbnail_quality; | |
187 extern gint zoom_quality; | |
188 extern gint dither_quality; | |
1 | 189 |
9 | 190 extern gint zoom_increment; /* 10 is 1.0, 5 is 0.05, 20 is 2.0, etc. */ |
191 | |
192 extern gint enable_read_ahead; | |
1 | 193 |
9 | 194 extern gint place_dialogs_under_mouse; |
195 | |
196 /* layout */ | |
197 extern gchar *layout_order; | |
198 extern gint layout_style; | |
1 | 199 |
9 | 200 extern gint layout_view_icons; |
201 extern gint layout_view_tree; | |
202 | |
203 extern gint show_icon_names; | |
204 | |
205 extern gint tree_descend_subdirs; | |
1 | 206 |
9 | 207 extern gint lazy_image_sync; |
208 extern gint update_on_time_change; | |
209 extern gint exif_rotate_enable; | |
1 | 210 |
113
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
91
diff
changeset
|
211 extern gint color_profile_enabled; |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
91
diff
changeset
|
212 extern gint color_profile_input_type; |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
91
diff
changeset
|
213 extern gchar *color_profile_input_file[]; |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
91
diff
changeset
|
214 extern gchar *color_profile_input_name[]; |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
91
diff
changeset
|
215 extern gint color_profile_screen_type; |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
91
diff
changeset
|
216 extern gchar *color_profile_screen_file; |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
91
diff
changeset
|
217 extern gint color_profile_use_image; |
55166d93498d
Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
91
diff
changeset
|
218 |
9 | 219 /* |
220 *---------------------------------------------------------------------------- | |
221 * main.c | |
222 *---------------------------------------------------------------------------- | |
223 */ | |
1 | 224 |
9 | 225 /* |
226 * This also doubles as the main.c header. | |
227 */ | |
1 | 228 |
91
d063f97503b7
Wed Nov 1 11:39:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
229 void window_set_icon(GtkWidget *window, const gchar *icon, const gchar *file); |
9 | 230 gint window_maximized(GtkWidget *window); |
1 | 231 |
9 | 232 gdouble get_zoom_increment(void); |
1 | 233 |
9 | 234 void help_window_show(const gchar *key); |
1 | 235 |
9 | 236 void keyboard_scroll_calc(gint *x, gint *y, GdkEventKey *event); |
237 gint key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data); | |
238 void exit_gqview(void); | |
1 | 239 |
240 | |
9 | 241 #endif |
1 | 242 |
243 | |
244 |