annotate src/main.h @ 1802:956aab097ea7

added 2010 to copyright text
author nadvornik
date Tue, 16 Feb 2010 21:18:03 +0000
parents dc0d9a05d8e5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
1 /*
196
f6e307c7bad6 rename GQview -> Geeqie over the code
nadvornik
parents: 195
diff changeset
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
1802
956aab097ea7 added 2010 to copyright text
nadvornik
parents: 1591
diff changeset
4 * Copyright (C) 2008 - 2010 The Geeqie Team
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
5 *
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
6 * Author: John Ellis
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
7 *
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
8 * This software is released under the GNU General Public License (GNU GPL).
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
9 * Please read the included file COPYING for more information.
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
10 * This software comes with no warranty of any kind, use at your own risk!
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
11 */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
12
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
13
282
c2cb12def9d6 GQVIEW_H -> MAIN_H
zas_
parents: 281
diff changeset
14 #ifndef MAIN_H
c2cb12def9d6 GQVIEW_H -> MAIN_H
zas_
parents: 281
diff changeset
15 #define MAIN_H
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
16
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
17 #ifdef HAVE_CONFIG_H
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
18 # include "config.h"
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
19 #endif
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
20
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
21 #ifdef HAVE_STRVERSCMP
213
28f2274c9bd0 Fix two minor compilation warnings.
zas_
parents: 209
diff changeset
22 # ifndef _GNU_SOURCE
28f2274c9bd0 Fix two minor compilation warnings.
zas_
parents: 209
diff changeset
23 # define _GNU_SOURCE
28f2274c9bd0 Fix two minor compilation warnings.
zas_
parents: 209
diff changeset
24 # endif
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
25 #endif
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
26
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
27 #include "intl.h"
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
28
671
8268cbe682f1 Include debug.h from main.h since debug macros may be used anywhere in the code.
zas_
parents: 653
diff changeset
29
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
30 /*
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
31 *-------------------------------------
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
32 * Standard library includes
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
33 *-------------------------------------
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
34 */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
35
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
36 #include <pwd.h>
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
37 #include <stdio.h>
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
38 #include <stdlib.h>
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
39 #include <string.h>
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
40 #include <time.h>
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
41 #include <unistd.h>
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
42 #include <sys/stat.h>
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
43 #include <sys/time.h>
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
44 #include <sys/types.h>
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
45 #include <dirent.h>
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
46 #include <fcntl.h>
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
47
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
48 /*
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
49 *-------------------------------------
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
50 * includes for glib / gtk / gdk-pixbuf
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
51 *-------------------------------------
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
52 */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
53
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
54 #include <gdk/gdk.h>
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
55 #include <gtk/gtk.h>
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
56
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
57 #include <gdk-pixbuf/gdk-pixbuf.h>
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
58 #include <gdk-pixbuf/gdk-pixbuf-loader.h>
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
59
1574
ee2b66a09a03 compilation fixes for older glib and gtk
nadvornik
parents: 1512
diff changeset
60 #include "compat.h"
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
61
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
62 /*
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
63 *----------------------------------------------------------------------------
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
64 * defines
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
65 *----------------------------------------------------------------------------
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
66 */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
67
1591
dc0d9a05d8e5 enabled XDG directory layout
nadvornik
parents: 1574
diff changeset
68 #define USE_XDG 1
1149
c4fcf8001574 Implement preliminary support for XDG Base Directory Specification.
zas_
parents: 1145
diff changeset
69
288
d1f74154463e Replace occurences of Geeqie / geeqie by constants defined in main.h.
zas_
parents: 283
diff changeset
70 #define GQ_APPNAME "Geeqie"
d1f74154463e Replace occurences of Geeqie / geeqie by constants defined in main.h.
zas_
parents: 283
diff changeset
71 #define GQ_APPNAME_LC "geeqie"
d1f74154463e Replace occurences of Geeqie / geeqie by constants defined in main.h.
zas_
parents: 283
diff changeset
72 #define GQ_WEBSITE "geeqie.sourceforge.net"
d1f74154463e Replace occurences of Geeqie / geeqie by constants defined in main.h.
zas_
parents: 283
diff changeset
73 #define GQ_EMAIL_ADDRESS "geeqie-devel@lists.sourceforge.net"
254
9faf34f047b1 Make the wmclass value unique among the code by defining
zas_
parents: 243
diff changeset
74
1145
3a7af6a8cd5f Use functions to return directories instead of constants.
zas_
parents: 1055
diff changeset
75 #define GQ_RC_DIR "." GQ_APPNAME_LC
3a7af6a8cd5f Use functions to return directories instead of constants.
zas_
parents: 1055
diff changeset
76 #define GQ_COLLECTIONS_DIR "collections"
3a7af6a8cd5f Use functions to return directories instead of constants.
zas_
parents: 1055
diff changeset
77 #define GQ_TRASH_DIR "trash"
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
78
743
77ff94c0490a Try to load a system-wide rc file if any, before per-user rc file.
zas_
parents: 737
diff changeset
79 #define GQ_SYSTEM_WIDE_DIR "/etc/" GQ_APPNAME_LC
77ff94c0490a Try to load a system-wide rc file if any, before per-user rc file.
zas_
parents: 737
diff changeset
80
1309
55ea4962887a config file format changed to XML
nadvornik
parents: 1284
diff changeset
81 #define RC_FILE_NAME GQ_APPNAME_LC "rc.xml"
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
82
781
2d2cca2bceb0 Replace hardcoded collection filename extension by a macro (GQ_COLLECTION_EXT).
zas_
parents: 767
diff changeset
83 #define GQ_COLLECTION_EXT ".gqv"
2d2cca2bceb0 Replace hardcoded collection filename extension by a macro (GQ_COLLECTION_EXT).
zas_
parents: 767
diff changeset
84
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
85 #define SCROLL_RESET_TOPLEFT 0
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
86 #define SCROLL_RESET_CENTER 1
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
87 #define SCROLL_RESET_NOCHANGE 2
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
88
4
e149abcda4eb Syncing to 0.8.1
gqview
parents: 3
diff changeset
89 #define MOUSEWHEEL_SCROLL_SIZE 20
e149abcda4eb Syncing to 0.8.1
gqview
parents: 3
diff changeset
90
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
91
737
8a8873e7a552 Make shell command and its option rc file options instead of hardcoded strings.
zas_
parents: 728
diff changeset
92 #define GQ_DEFAULT_SHELL_PATH "/bin/sh"
8a8873e7a552 Make shell command and its option rc file options instead of hardcoded strings.
zas_
parents: 728
diff changeset
93 #define GQ_DEFAULT_SHELL_OPTIONS "-c"
8a8873e7a552 Make shell command and its option rc file options instead of hardcoded strings.
zas_
parents: 728
diff changeset
94
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents: 91
diff changeset
95 #define COLOR_PROFILE_INPUTS 4
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents: 91
diff changeset
96
226
3c89da4aef95 Fix and simplify thumbnails size combo box related code.
zas_
parents: 218
diff changeset
97 #define DEFAULT_THUMB_WIDTH 96
3c89da4aef95 Fix and simplify thumbnails size combo box related code.
zas_
parents: 218
diff changeset
98 #define DEFAULT_THUMB_HEIGHT 72
3c89da4aef95 Fix and simplify thumbnails size combo box related code.
zas_
parents: 218
diff changeset
99
1029
1a4b18c58556 Use a constant for minimal window size. Set it to 32 for all dialogs.
zas_
parents: 1028
diff changeset
100 #define DEFAULT_MINIMAL_WINDOW_SIZE 32
1a4b18c58556 Use a constant for minimal window size. Set it to 32 for all dialogs.
zas_
parents: 1028
diff changeset
101
1383
3c9abbc05792 use standard GtkHPaned for sidebar width
nadvornik
parents: 1309
diff changeset
102 #define IMAGE_MIN_WIDTH 100
3c9abbc05792 use standard GtkHPaned for sidebar width
nadvornik
parents: 1309
diff changeset
103 #define SIDEBAR_DEFAULT_WIDTH 250
3c9abbc05792 use standard GtkHPaned for sidebar width
nadvornik
parents: 1309
diff changeset
104
415
4f7362028062 Add zoom ratio display to OSD in fullscreen mode.
zas_
parents: 413
diff changeset
105
622
54e20abb5c6d Fix display of collection in overlay info.
zas_
parents: 566
diff changeset
106 #define DEFAULT_OVERLAY_INFO "%collection:<i>*</i>\\n%" \
54e20abb5c6d Fix display of collection in overlay info.
zas_
parents: 566
diff changeset
107 "(%number%/%total%) [%zoom%] <b>%name%</b>\n" \
442
4b2d7f9af171 Big whitespaces cleanup:
zas_
parents: 415
diff changeset
108 "%res%|%date%|%size%\n" \
622
54e20abb5c6d Fix display of collection in overlay info.
zas_
parents: 566
diff changeset
109 "%formatted.Aperture%|%formatted.ShutterSpeed%|%formatted.ISOSpeedRating:ISO *%|%formatted.FocalLength%|%formatted.ExposureBias:* Ev%\n" \
54e20abb5c6d Fix display of collection in overlay info.
zas_
parents: 566
diff changeset
110 "%formatted.Camera:40%|%formatted.Flash%"
495
c7a2471e5c4e Introduce macros to display debug messages.
zas_
parents: 489
diff changeset
111
1242
187e6096cc6c show symlinks in filelist
nadvornik
parents: 1174
diff changeset
112 #define GQ_LINK_STR "↗"
134
9009856628f7 started implementation of external commands; external Delete should work
nadvornik
parents: 113
diff changeset
113 #include "typedefs.h"
671
8268cbe682f1 Include debug.h from main.h since debug macros may be used anywhere in the code.
zas_
parents: 653
diff changeset
114 #include "debug.h"
508
011a6be611c8 Move options stuff to options.{c,h} and remove globals.c
zas_
parents: 507
diff changeset
115 #include "options.h"
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents: 91
diff changeset
116
1479
d062522699dc added simple desktop file editor
nadvornik
parents: 1463
diff changeset
117 #define DESKTOP_FILE_TEMPLATE GQ_APP_DIR "/template.desktop"
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
118 /*
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
119 *----------------------------------------------------------------------------
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
120 * main.c
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
121 *----------------------------------------------------------------------------
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
122 */
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
123
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
124 /*
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
125 * This also doubles as the main.c header.
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
126 */
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
127
1506
d352a44545a6 Force thumbnails refreshing when thumbnails dimensions are modified through Preferences.
zas_
parents: 1479
diff changeset
128 extern gboolean thumb_format_changed;
d352a44545a6 Force thumbnails refreshing when thumbnails dimensions are modified through Preferences.
zas_
parents: 1479
diff changeset
129
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
130 void keyboard_scroll_calc(gint *x, gint *y, GdkEventKey *event);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
131 gint key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data);
648
e34c1002e553 Move some functions from main.[ch] to new window.[ch].
zas_
parents: 645
diff changeset
132
278
04abf5b160eb exit_gqview() renamed to exit_program().
zas_
parents: 254
diff changeset
133 void exit_program(void);
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
134
329
a51242c032ea Rename file sorting options.
zas_
parents: 320
diff changeset
135 #define CASE_SORT(a, b) ( (options->file_sort.case_sensitive) ? strcmp((a), (b)) : strcasecmp((a), (b)) )
319
f9611a6cf0e2 Move file_sort_case_sensitive to ConfOptions.
zas_
parents: 318
diff changeset
136
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
137
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
138 #endif
1055
1646720364cf Adding a vim modeline to all files - patch by Klaus Ethgen
nadvornik
parents: 1029
diff changeset
139 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */