Mercurial > geeqie
annotate src/pan-view.c @ 212:c7021159079d
differentiate among normal image, raw image and metadata
removed raw extension lists on various places and fixed most of the
Exiv2 warnings
todo: configuration and a special icons for unreadable raw or metadata
author | nadvornik |
---|---|
date | Sun, 30 Mar 2008 11:47:14 +0000 |
parents | f6e307c7bad6 |
children | 22ed43d4c849 |
rev | line source |
---|---|
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1 /* |
196 | 2 * Geeqie |
67
f63ecca6c087
Fri Oct 13 05:22:43 2006 John Ellis <johne@verizon.net>
gqview
parents:
64
diff
changeset
|
3 * (C) 2006 John Ellis |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
4 * |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
5 * Author: John Ellis |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
6 * |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
7 * This software is released under the GNU General Public License (GNU GPL). |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
8 * Please read the included file COPYING for more information. |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
9 * This software comes with no warranty of any kind, use at your own risk! |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
10 */ |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
11 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
12 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
13 #include "gqview.h" |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
14 #include "pan-view.h" |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
15 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
16 #include "pan-types.h" |
95
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
17 #include "bar_exif.h" |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
18 #include "dnd.h" |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
19 #include "editors.h" |
95
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
20 #include "exif.h" |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
21 #include "fullscreen.h" |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
22 #include "img-view.h" |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
23 #include "info.h" |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
24 #include "menu.h" |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
25 #include "thumb.h" |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
26 #include "utilops.h" |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
27 #include "ui_bookmark.h" |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
28 #include "ui_fileops.h" |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
29 #include "ui_menu.h" |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
30 #include "ui_tabcomp.h" |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
31 #include "ui_utildlg.h" |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
32 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
33 #include <gdk/gdkkeysyms.h> /* for keyboard values */ |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
34 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
35 #include <math.h> |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
36 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
37 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
38 #define PAN_WINDOW_DEFAULT_WIDTH 720 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
39 #define PAN_WINDOW_DEFAULT_HEIGHT 500 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
40 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
41 #define PAN_TILE_SIZE 512 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
42 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
43 #define ZOOM_INCREMENT 1.0 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
44 #define ZOOM_LABEL_WIDTH 64 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
45 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
46 |
95
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
47 #define PAN_PREF_GROUP "pan_view_options" |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
48 #define PAN_PREF_HIDE_WARNING "hide_performance_warning" |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
49 #define PAN_PREF_EXIF_PAN_DATE "use_exif_date" |
102
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
50 #define PAN_PREF_INFO_IMAGE "info_image_size" |
95
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
51 #define PAN_PREF_INFO_EXIF "info_includes_exif" |
37
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
52 |
15
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
53 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
54 static GList *pan_window_list = NULL; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
55 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
56 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
57 static void pan_layout_update_idle(PanWindow *pw); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
58 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
59 static void pan_fullscreen_toggle(PanWindow *pw, gint force_off); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
60 |
97
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
61 static void pan_search_toggle_visible(PanWindow *pw, gint enable); |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
62 static void pan_search_activate(PanWindow *pw); |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
63 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
64 static void pan_window_close(PanWindow *pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
65 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
66 static GtkWidget *pan_popup_menu(PanWindow *pw); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
67 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
68 static void pan_window_dnd_init(PanWindow *pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
69 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
70 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
71 /* |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
72 *----------------------------------------------------------------------------- |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
73 * the image/thumb loader queue |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
74 *----------------------------------------------------------------------------- |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
75 */ |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
76 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
77 static gint pan_queue_step(PanWindow *pw); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
78 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
79 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
80 static void pan_queue_thumb_done_cb(ThumbLoader *tl, gpointer data) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
81 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
82 PanWindow *pw = data; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
83 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
84 if (pw->queue_pi) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
85 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
86 PanItem *pi; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
87 gint rc; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
88 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
89 pi = pw->queue_pi; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
90 pw->queue_pi = NULL; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
91 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
92 pi->queued = FALSE; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
93 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
94 if (pi->pixbuf) g_object_unref(pi->pixbuf); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
95 pi->pixbuf = thumb_loader_get_pixbuf(tl, TRUE); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
96 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
97 rc = pi->refcount; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
98 image_area_changed(pw->imd, pi->x, pi->y, pi->width, pi->height); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
99 pi->refcount = rc; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
100 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
101 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
102 thumb_loader_free(pw->tl); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
103 pw->tl = NULL; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
104 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
105 while (pan_queue_step(pw)); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
106 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
107 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
108 static void pan_queue_image_done_cb(ImageLoader *il, gpointer data) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
109 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
110 PanWindow *pw = data; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
111 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
112 if (pw->queue_pi) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
113 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
114 PanItem *pi; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
115 gint rc; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
116 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
117 pi = pw->queue_pi; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
118 pw->queue_pi = NULL; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
119 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
120 pi->queued = FALSE; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
121 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
122 if (pi->pixbuf) g_object_unref(pi->pixbuf); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
123 pi->pixbuf = image_loader_get_pixbuf(pw->il); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
124 if (pi->pixbuf) g_object_ref(pi->pixbuf); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
125 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
126 if (pi->pixbuf && pw->size != PAN_IMAGE_SIZE_100 && |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
127 (gdk_pixbuf_get_width(pi->pixbuf) > pi->width || |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
128 gdk_pixbuf_get_height(pi->pixbuf) > pi->height)) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
129 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
130 GdkPixbuf *tmp; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
131 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
132 tmp = pi->pixbuf; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
133 pi->pixbuf = gdk_pixbuf_scale_simple(tmp, pi->width, pi->height, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
134 (GdkInterpType)zoom_quality); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
135 g_object_unref(tmp); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
136 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
137 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
138 rc = pi->refcount; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
139 image_area_changed(pw->imd, pi->x, pi->y, pi->width, pi->height); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
140 pi->refcount = rc; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
141 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
142 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
143 image_loader_free(pw->il); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
144 pw->il = NULL; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
145 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
146 while (pan_queue_step(pw)); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
147 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
148 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
149 #if 0 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
150 static void pan_queue_image_area_cb(ImageLoader *il, guint x, guint y, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
151 guint width, guint height, gpointer data) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
152 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
153 PanWindow *pw = data; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
154 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
155 if (pw->queue_pi) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
156 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
157 PanItem *pi; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
158 gint rc; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
159 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
160 pi = pw->queue_pi; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
161 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
162 if (!pi->pixbuf) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
163 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
164 pi->pixbuf = image_loader_get_pixbuf(pw->il); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
165 if (pi->pixbuf) g_object_ref(pi->pixbuf); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
166 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
167 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
168 rc = pi->refcount; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
169 image_area_changed(pw->imd, pi->x + x, pi->y + y, width, height); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
170 pi->refcount = rc; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
171 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
172 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
173 #endif |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
174 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
175 static gint pan_queue_step(PanWindow *pw) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
176 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
177 PanItem *pi; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
178 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
179 if (!pw->queue) return FALSE; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
180 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
181 pi = pw->queue->data; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
182 pw->queue = g_list_remove(pw->queue, pi); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
183 pw->queue_pi = pi; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
184 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
185 if (!pw->queue_pi->fd) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
186 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
187 pw->queue_pi->queued = FALSE; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
188 pw->queue_pi = NULL; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
189 return TRUE; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
190 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
191 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
192 image_loader_free(pw->il); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
193 pw->il = NULL; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
194 thumb_loader_free(pw->tl); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
195 pw->tl = NULL; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
196 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
197 if (pi->type == PAN_ITEM_IMAGE) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
198 { |
138 | 199 pw->il = image_loader_new(pi->fd); |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
200 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
201 if (pw->size != PAN_IMAGE_SIZE_100) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
202 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
203 image_loader_set_requested_size(pw->il, pi->width, pi->height); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
204 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
205 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
206 #if 0 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
207 image_loader_set_area_ready_func(pw->il, pan_queue_image_area_cb, pw); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
208 #endif |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
209 image_loader_set_error_func(pw->il, pan_queue_image_done_cb, pw); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
210 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
211 if (image_loader_start(pw->il, pan_queue_image_done_cb, pw)) return FALSE; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
212 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
213 image_loader_free(pw->il); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
214 pw->il = NULL; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
215 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
216 else if (pi->type == PAN_ITEM_THUMB) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
217 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
218 pw->tl = thumb_loader_new(PAN_THUMB_SIZE, PAN_THUMB_SIZE); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
219 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
220 if (!pw->tl->standard_loader) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
221 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
222 /* The classic loader will recreate a thumbnail any time we |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
223 * request a different size than what exists. This view will |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
224 * almost never use the user configured sizes so disable cache. |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
225 */ |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
226 thumb_loader_set_cache(pw->tl, FALSE, FALSE, FALSE); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
227 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
228 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
229 thumb_loader_set_callbacks(pw->tl, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
230 pan_queue_thumb_done_cb, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
231 pan_queue_thumb_done_cb, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
232 NULL, pw); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
233 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
234 if (thumb_loader_start(pw->tl, pi->fd->path)) return FALSE; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
235 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
236 thumb_loader_free(pw->tl); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
237 pw->tl = NULL; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
238 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
239 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
240 pw->queue_pi->queued = FALSE; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
241 pw->queue_pi = NULL; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
242 return TRUE; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
243 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
244 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
245 static void pan_queue_add(PanWindow *pw, PanItem *pi) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
246 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
247 if (!pi || pi->queued || pi->pixbuf) return; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
248 if (pw->size <= PAN_IMAGE_SIZE_THUMB_NONE && |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
249 (!pi->key || strcmp(pi->key, "info") != 0) ) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
250 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
251 return; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
252 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
253 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
254 pi->queued = TRUE; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
255 pw->queue = g_list_prepend(pw->queue, pi); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
256 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
257 if (!pw->tl && !pw->il) while(pan_queue_step(pw)); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
258 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
259 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
260 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
261 /* |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
262 *----------------------------------------------------------------------------- |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
263 * tile request/dispose handlers |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
264 *----------------------------------------------------------------------------- |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
265 */ |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
266 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
267 static gint pan_window_request_tile_cb(PixbufRenderer *pr, gint x, gint y, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
268 gint width, gint height, GdkPixbuf *pixbuf, gpointer data) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
269 { |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
270 PanWindow *pw = data; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
271 GList *list; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
272 GList *work; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
273 gint i; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
274 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
275 pixbuf_set_rect_fill(pixbuf, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
276 0, 0, width, height, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
277 PAN_BACKGROUND_COLOR, 255); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
278 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
279 for (i = (x / PAN_GRID_SIZE) * PAN_GRID_SIZE; i < x + width; i += PAN_GRID_SIZE) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
280 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
281 gint rx, ry, rw, rh; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
282 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
283 if (util_clip_region(x, y, width, height, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
284 i, y, 1, height, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
285 &rx, &ry, &rw, &rh)) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
286 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
287 pixbuf_draw_rect_fill(pixbuf, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
288 rx - x, ry - y, rw, rh, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
289 PAN_GRID_COLOR, PAN_GRID_ALPHA); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
290 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
291 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
292 for (i = (y / PAN_GRID_SIZE) * PAN_GRID_SIZE; i < y + height; i += PAN_GRID_SIZE) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
293 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
294 gint rx, ry, rw, rh; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
295 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
296 if (util_clip_region(x, y, width, height, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
297 x, i, width, 1, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
298 &rx, &ry, &rw, &rh)) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
299 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
300 pixbuf_draw_rect_fill(pixbuf, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
301 rx - x, ry - y, rw, rh, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
302 PAN_GRID_COLOR, PAN_GRID_ALPHA); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
303 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
304 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
305 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
306 list = pan_layout_intersect(pw, x, y, width, height); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
307 work = list; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
308 while (work) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
309 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
310 PanItem *pi; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
311 gint queue = FALSE; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
312 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
313 pi = work->data; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
314 work = work->next; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
315 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
316 pi->refcount++; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
317 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
318 switch (pi->type) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
319 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
320 case PAN_ITEM_BOX: |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
321 queue = pan_item_box_draw(pw, pi, pixbuf, pr, x, y, width, height); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
322 break; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
323 case PAN_ITEM_TRIANGLE: |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
324 queue = pan_item_tri_draw(pw, pi, pixbuf, pr, x, y, width, height); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
325 break; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
326 case PAN_ITEM_TEXT: |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
327 queue = pan_item_text_draw(pw, pi, pixbuf, pr, x, y, width, height); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
328 break; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
329 case PAN_ITEM_THUMB: |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
330 queue = pan_item_thumb_draw(pw, pi, pixbuf, pr, x, y, width, height); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
331 break; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
332 case PAN_ITEM_IMAGE: |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
333 queue = pan_item_image_draw(pw, pi, pixbuf, pr, x, y, width, height); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
334 break; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
335 case PAN_ITEM_NONE: |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
336 default: |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
337 break; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
338 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
339 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
340 if (queue) pan_queue_add(pw, pi); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
341 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
342 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
343 g_list_free(list); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
344 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
345 #if 0 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
346 if (x%512 == 0 && y%512 == 0) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
347 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
348 PangoLayout *layout; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
349 gchar *buf; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
350 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
351 layout = gtk_widget_create_pango_layout((GtkWidget *)pr, NULL); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
352 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
353 buf = g_strdup_printf("%d,%d\n(#%d)", x, y, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
354 (x / pr->source_tile_width) + |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
355 (y / pr->source_tile_height * (pr->image_width/pr->source_tile_width + 1))); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
356 pango_layout_set_text(layout, buf, -1); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
357 g_free(buf); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
358 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
359 pixbuf_draw_layout(pixbuf, layout, (GtkWidget *)pr, 0, 0, 0, 0, 0, 255); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
360 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
361 g_object_unref(G_OBJECT(layout)); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
362 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
363 #endif |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
364 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
365 return TRUE; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
366 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
367 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
368 static void pan_window_dispose_tile_cb(PixbufRenderer *pr, gint x, gint y, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
369 gint width, gint height, GdkPixbuf *pixbuf, gpointer data) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
370 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
371 PanWindow *pw = data; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
372 GList *list; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
373 GList *work; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
374 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
375 list = pan_layout_intersect(pw, x, y, width, height); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
376 work = list; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
377 while (work) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
378 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
379 PanItem *pi; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
380 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
381 pi = work->data; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
382 work = work->next; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
383 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
384 if (pi->refcount > 0) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
385 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
386 pi->refcount--; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
387 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
388 if (pi->refcount == 0) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
389 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
390 if (pi->queued) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
391 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
392 pw->queue = g_list_remove(pw->queue, pi); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
393 pi->queued = FALSE; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
394 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
395 if (pw->queue_pi == pi) pw->queue_pi = NULL; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
396 if (pi->pixbuf) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
397 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
398 g_object_unref(pi->pixbuf); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
399 pi->pixbuf = NULL; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
400 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
401 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
402 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
403 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
404 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
405 g_list_free(list); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
406 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
407 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
408 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
409 /* |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
410 *----------------------------------------------------------------------------- |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
411 * misc |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
412 *----------------------------------------------------------------------------- |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
413 */ |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
414 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
415 static void pan_window_message(PanWindow *pw, const gchar *text) |
18
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
416 { |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
417 GList *work; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
418 gint count = 0; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
419 gint64 size = 0; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
420 gchar *ss; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
421 gchar *buf; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
422 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
423 if (text) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
424 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
425 gtk_label_set_text(GTK_LABEL(pw->label_message), text); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
426 return; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
427 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
428 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
429 work = pw->list_static; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
430 if (pw->layout == PAN_LAYOUT_CALENDAR) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
431 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
432 while (work) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
433 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
434 PanItem *pi; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
435 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
436 pi = work->data; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
437 work = work->next; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
438 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
439 if (pi->fd && |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
440 pi->type == PAN_ITEM_BOX && |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
441 pi->key && strcmp(pi->key, "dot") == 0) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
442 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
443 size += pi->fd->size; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
444 count++; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
445 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
446 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
447 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
448 else |
18
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
449 { |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
450 while (work) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
451 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
452 PanItem *pi; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
453 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
454 pi = work->data; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
455 work = work->next; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
456 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
457 if (pi->fd && |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
458 (pi->type == PAN_ITEM_THUMB || pi->type == PAN_ITEM_IMAGE)) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
459 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
460 size += pi->fd->size; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
461 count++; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
462 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
463 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
464 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
465 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
466 ss = text_from_size_abrev(size); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
467 buf = g_strdup_printf(_("%d images, %s"), count, ss); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
468 g_free(ss); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
469 gtk_label_set_text(GTK_LABEL(pw->label_message), buf); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
470 g_free(buf); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
471 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
472 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
473 static void pan_warning_folder(const gchar *path, GtkWidget *parent) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
474 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
475 gchar *message; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
476 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
477 message = g_strdup_printf(_("The pan view does not support the folder \"%s\"."), path); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
478 warning_dialog(_("Folder not supported"), message, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
479 GTK_STOCK_DIALOG_INFO, parent); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
480 g_free(message); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
481 } |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
482 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
483 static void pan_window_zoom_limit(PanWindow *pw) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
484 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
485 gdouble min; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
486 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
487 switch (pw->size) |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
488 { |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
489 case PAN_IMAGE_SIZE_THUMB_DOTS: |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
490 case PAN_IMAGE_SIZE_THUMB_NONE: |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
491 case PAN_IMAGE_SIZE_THUMB_SMALL: |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
492 case PAN_IMAGE_SIZE_THUMB_NORMAL: |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
493 #if 0 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
494 /* easily requires > 512mb ram when window size > 1024x768 and zoom is <= -8 */ |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
495 min = -16.0; |
18
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
496 break; |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
497 #endif |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
498 case PAN_IMAGE_SIZE_THUMB_LARGE: |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
499 min = -6.0; |
18
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
500 break; |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
501 case PAN_IMAGE_SIZE_10: |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
502 case PAN_IMAGE_SIZE_25: |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
503 min = -4.0; |
18
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
504 break; |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
505 case PAN_IMAGE_SIZE_33: |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
506 case PAN_IMAGE_SIZE_50: |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
507 case PAN_IMAGE_SIZE_100: |
18
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
508 default: |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
509 min = -2.0; |
18
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
510 break; |
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
511 } |
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
512 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
513 image_zoom_set_limits(pw->imd, min, 32.0); |
18
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
514 } |
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
515 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
516 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
517 /* |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
518 *----------------------------------------------------------------------------- |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
519 * cache |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
520 *----------------------------------------------------------------------------- |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
521 */ |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
522 |
138 | 523 static gint pan_cache_sort_file_cb(void *a, void *b) |
524 { | |
525 PanCacheData *pca = a; | |
526 PanCacheData *pcb = b; | |
527 return filelist_sort_compare_filedata(pca->fd, pcb->fd); | |
528 } | |
529 GList *pan_cache_sort(GList *list, SortType method, gint ascend) | |
530 { | |
531 return filelist_sort_full(list, method, ascend, (GCompareFunc) pan_cache_sort_file_cb); | |
532 } | |
533 | |
534 | |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
535 static void pan_cache_free(PanWindow *pw) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
536 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
537 GList *work; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
538 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
539 work = pw->cache_list; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
540 while (work) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
541 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
542 PanCacheData *pc; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
543 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
544 pc = work->data; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
545 work = work->next; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
546 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
547 cache_sim_data_free(pc->cd); |
138 | 548 file_data_unref(pc->fd); |
549 g_free(pc); | |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
550 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
551 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
552 g_list_free(pw->cache_list); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
553 pw->cache_list = NULL; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
554 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
555 filelist_free(pw->cache_todo); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
556 pw->cache_todo = NULL; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
557 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
558 pw->cache_count = 0; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
559 pw->cache_total = 0; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
560 pw->cache_tick = 0; |
37
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
561 |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
562 cache_loader_free(pw->cache_cl); |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
563 pw->cache_cl = NULL; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
564 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
565 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
566 static void pan_cache_fill(PanWindow *pw, const gchar *path) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
567 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
568 GList *list; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
569 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
570 pan_cache_free(pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
571 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
572 list = pan_list_tree(path, SORT_NAME, TRUE, pw->ignore_symlinks); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
573 pw->cache_todo = g_list_reverse(list); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
574 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
575 pw->cache_total = g_list_length(pw->cache_todo); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
576 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
577 |
37
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
578 static void pan_cache_step_done_cb(CacheLoader *cl, gint error, gpointer data) |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
579 { |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
580 PanWindow *pw = data; |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
581 |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
582 if (pw->cache_list) |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
583 { |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
584 PanCacheData *pc; |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
585 pc = pw->cache_list->data; |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
586 |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
587 if (!pc->cd) |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
588 { |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
589 pc->cd = cl->cd; |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
590 cl->cd = NULL; |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
591 } |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
592 } |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
593 |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
594 cache_loader_free(cl); |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
595 pw->cache_cl = NULL; |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
596 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
597 pan_layout_update_idle(pw); |
37
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
598 } |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
599 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
600 static gint pan_cache_step(PanWindow *pw) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
601 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
602 FileData *fd; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
603 PanCacheData *pc; |
37
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
604 CacheDataType load_mask; |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
605 |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
606 if (!pw->cache_todo) return TRUE; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
607 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
608 fd = pw->cache_todo->data; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
609 pw->cache_todo = g_list_remove(pw->cache_todo, fd); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
610 |
37
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
611 #if 0 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
612 if (enable_thumb_caching) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
613 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
614 gchar *found; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
615 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
616 found = cache_find_location(CACHE_TYPE_SIM, fd->path); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
617 if (found && filetime(found) == fd->date) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
618 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
619 cd = cache_sim_data_load(found); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
620 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
621 g_free(found); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
622 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
623 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
624 if (!cd) cd = cache_sim_data_new(); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
625 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
626 if (!cd->dimensions) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
627 { |
138 | 628 cd->dimensions = image_load_dimensions(fd, &cd->width, &cd->height); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
629 if (enable_thumb_caching && |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
630 cd->dimensions) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
631 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
632 gchar *base; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
633 mode_t mode = 0755; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
634 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
635 base = cache_get_location(CACHE_TYPE_SIM, fd->path, FALSE, &mode); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
636 if (cache_ensure_dir_exists(base, mode)) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
637 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
638 g_free(cd->path); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
639 cd->path = cache_get_location(CACHE_TYPE_SIM, fd->path, TRUE, NULL); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
640 if (cache_sim_data_save(cd)) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
641 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
642 filetime_set(cd->path, filetime(fd->path)); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
643 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
644 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
645 g_free(base); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
646 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
647 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
648 pw->cache_tick = 9; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
649 } |
37
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
650 #endif |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
651 pc = g_new0(PanCacheData, 1); |
138 | 652 pc->fd = file_data_ref(fd); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
653 |
37
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
654 pc->cd = NULL; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
655 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
656 pw->cache_list = g_list_prepend(pw->cache_list, pc); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
657 |
37
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
658 cache_loader_free(pw->cache_cl); |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
659 |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
660 load_mask = CACHE_LOADER_NONE; |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
661 if (pw->size > PAN_IMAGE_SIZE_THUMB_LARGE) load_mask |= CACHE_LOADER_DIMENSIONS; |
56
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
662 if (pw->exif_date_enable) load_mask |= CACHE_LOADER_DATE; |
138 | 663 pw->cache_cl = cache_loader_new(pc->fd, load_mask, |
37
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
664 pan_cache_step_done_cb, pw); |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
665 return (pw->cache_cl == NULL); |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
666 } |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
667 |
39
64068b1bab89
Thu Apr 14 10:44:00 2005 John Ellis <johne@verizon.net>
gqview
parents:
37
diff
changeset
|
668 /* This sync date function is optimized for lists with a common sort */ |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
669 void pan_cache_sync_date(PanWindow *pw, GList *list) |
37
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
670 { |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
671 GList *haystack; |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
672 GList *work; |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
673 |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
674 haystack = g_list_copy(pw->cache_list); |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
675 |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
676 work = list; |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
677 while (work) |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
678 { |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
679 FileData *fd; |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
680 GList *needle; |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
681 |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
682 fd = work->data; |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
683 work = work->next; |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
684 |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
685 needle = haystack; |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
686 while (needle) |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
687 { |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
688 PanCacheData *pc; |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
689 gchar *path; |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
690 |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
691 pc = needle->data; |
138 | 692 if (pc->fd == fd) |
37
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
693 { |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
694 if (pc->cd && pc->cd->have_date && pc->cd->date >= 0) |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
695 { |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
696 fd->date = pc->cd->date; |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
697 } |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
698 |
39
64068b1bab89
Thu Apr 14 10:44:00 2005 John Ellis <johne@verizon.net>
gqview
parents:
37
diff
changeset
|
699 haystack = g_list_delete_link(haystack, needle); |
64068b1bab89
Thu Apr 14 10:44:00 2005 John Ellis <johne@verizon.net>
gqview
parents:
37
diff
changeset
|
700 needle = NULL; |
37
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
701 } |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
702 else |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
703 { |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
704 needle = needle->next; |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
705 } |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
706 } |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
707 } |
39
64068b1bab89
Thu Apr 14 10:44:00 2005 John Ellis <johne@verizon.net>
gqview
parents:
37
diff
changeset
|
708 |
64068b1bab89
Thu Apr 14 10:44:00 2005 John Ellis <johne@verizon.net>
gqview
parents:
37
diff
changeset
|
709 g_list_free(haystack); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
710 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
711 |
35
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
712 /* |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
713 *----------------------------------------------------------------------------- |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
714 * item grid |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
715 *----------------------------------------------------------------------------- |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
716 */ |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
717 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
718 static void pan_grid_clear(PanWindow *pw) |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
719 { |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
720 GList *work; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
721 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
722 work = pw->list_grid; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
723 while (work) |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
724 { |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
725 PanGrid *pg; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
726 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
727 pg = work->data; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
728 work = work->next; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
729 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
730 g_list_free(pg->list); |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
731 g_free(pg); |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
732 } |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
733 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
734 g_list_free(pw->list_grid); |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
735 pw->list_grid = NULL; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
736 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
737 pw->list = g_list_concat(pw->list, pw->list_static); |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
738 pw->list_static = NULL; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
739 } |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
740 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
741 static void pan_grid_build(PanWindow *pw, gint width, gint height, gint grid_size) |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
742 { |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
743 GList *work; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
744 gint col, row; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
745 gint cw, ch; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
746 gint l; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
747 gdouble total; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
748 gdouble s; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
749 gdouble aw, ah; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
750 gint i, j; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
751 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
752 pan_grid_clear(pw); |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
753 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
754 l = g_list_length(pw->list); |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
755 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
756 if (l < 1) return; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
757 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
758 total = (gdouble)width * (gdouble)height / (gdouble)l; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
759 s = sqrt(total); |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
760 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
761 aw = (gdouble)width / s; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
762 ah = (gdouble)height / s; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
763 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
764 col = (gint)(sqrt((gdouble)l / grid_size) * width / height + 0.999); |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
765 col = CLAMP(col, 1, l / grid_size + 1); |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
766 row = (gint)((gdouble)l / grid_size / col); |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
767 if (row < 1) row = 1; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
768 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
769 /* limit minimum size of grid so that a tile will always fit regardless of position */ |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
770 cw = MAX((gint)ceil((gdouble)width / col), PAN_TILE_SIZE * 2); |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
771 ch = MAX((gint)ceil((gdouble)height / row), PAN_TILE_SIZE * 2); |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
772 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
773 row = row * 2 - 1; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
774 col = col * 2 - 1; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
775 |
99
d19b0de6d0bb
Sat Nov 4 17:14:47 2006 John Ellis <johne@verizon.net>
gqview
parents:
97
diff
changeset
|
776 if (debug) printf("intersect speedup grid is %dx%d, based on %d average per grid\n", col, row, grid_size); |
35
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
777 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
778 for (j = 0; j < row; j++) |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
779 for (i = 0; i < col; i++) |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
780 { |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
781 if ((i + 1) * cw / 2 < width && (j + 1) * ch / 2 < height) |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
782 { |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
783 PanGrid *pg; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
784 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
785 pg = g_new0(PanGrid, 1); |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
786 pg->x = i * cw / 2; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
787 pg->y = j * ch / 2; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
788 pg->w = cw; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
789 pg->h = ch; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
790 pg->list = NULL; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
791 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
792 pw->list_grid = g_list_prepend(pw->list_grid, pg); |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
793 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
794 if (debug) printf("grid section: %d,%d (%dx%d)\n", pg->x, pg->y, pg->w, pg->h); |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
795 } |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
796 } |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
797 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
798 work = pw->list; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
799 while (work) |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
800 { |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
801 PanItem *pi; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
802 GList *grid; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
803 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
804 pi = work->data; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
805 work = work->next; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
806 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
807 grid = pw->list_grid; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
808 while (grid) |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
809 { |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
810 PanGrid *pg; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
811 gint rx, ry, rw, rh; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
812 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
813 pg = grid->data; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
814 grid = grid->next; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
815 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
816 if (util_clip_region(pi->x, pi->y, pi->width, pi->height, |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
817 pg->x, pg->y, pg->w, pg->h, |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
818 &rx, &ry, &rw, &rh)) |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
819 { |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
820 pg->list = g_list_prepend(pg->list, pi); |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
821 } |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
822 } |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
823 } |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
824 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
825 work = pw->list_grid; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
826 while (work) |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
827 { |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
828 PanGrid *pg; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
829 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
830 pg = work->data; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
831 work = work->next; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
832 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
833 pg->list = g_list_reverse(pg->list); |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
834 } |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
835 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
836 pw->list_static = pw->list; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
837 pw->list = NULL; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
838 } |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
839 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
840 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
841 /* |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
842 *----------------------------------------------------------------------------- |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
843 * layout state reset |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
844 *----------------------------------------------------------------------------- |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
845 */ |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
846 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
847 static void pan_window_items_free(PanWindow *pw) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
848 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
849 GList *work; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
850 |
35
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
851 pan_grid_clear(pw); |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
852 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
853 work = pw->list; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
854 while (work) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
855 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
856 PanItem *pi = work->data; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
857 work = work->next; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
858 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
859 pan_item_free(pi); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
860 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
861 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
862 g_list_free(pw->list); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
863 pw->list = NULL; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
864 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
865 g_list_free(pw->queue); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
866 pw->queue = NULL; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
867 pw->queue_pi = NULL; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
868 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
869 image_loader_free(pw->il); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
870 pw->il = NULL; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
871 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
872 thumb_loader_free(pw->tl); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
873 pw->tl = NULL; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
874 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
875 pw->click_pi = NULL; |
20
b542e45eb053
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
18
diff
changeset
|
876 pw->search_pi = NULL; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
877 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
878 |
35
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
879 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
880 /* |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
881 *----------------------------------------------------------------------------- |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
882 * layout generation, queries, sizing |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
883 *----------------------------------------------------------------------------- |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
884 */ |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
885 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
886 static void pan_layout_compute(PanWindow *pw, const gchar *path, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
887 gint *width, gint *height, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
888 gint *scroll_x, gint *scroll_y) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
889 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
890 pan_window_items_free(pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
891 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
892 switch (pw->size) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
893 { |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
894 case PAN_IMAGE_SIZE_THUMB_DOTS: |
14
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
895 pw->thumb_size = PAN_THUMB_SIZE_DOTS; |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
896 pw->thumb_gap = PAN_THUMB_GAP_DOTS; |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
897 break; |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
898 case PAN_IMAGE_SIZE_THUMB_NONE: |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
899 pw->thumb_size = PAN_THUMB_SIZE_NONE; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
900 pw->thumb_gap = PAN_THUMB_GAP_SMALL; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
901 break; |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
902 case PAN_IMAGE_SIZE_THUMB_SMALL: |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
903 pw->thumb_size = PAN_THUMB_SIZE_SMALL; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
904 pw->thumb_gap = PAN_THUMB_GAP_SMALL; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
905 break; |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
906 case PAN_IMAGE_SIZE_THUMB_NORMAL: |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
907 default: |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
908 pw->thumb_size = PAN_THUMB_SIZE_NORMAL; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
909 pw->thumb_gap = PAN_THUMB_GAP_NORMAL; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
910 break; |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
911 case PAN_IMAGE_SIZE_THUMB_LARGE: |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
912 pw->thumb_size = PAN_THUMB_SIZE_LARGE; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
913 pw->thumb_gap = PAN_THUMB_GAP_LARGE; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
914 break; |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
915 case PAN_IMAGE_SIZE_10: |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
916 pw->image_size = 10; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
917 pw->thumb_gap = PAN_THUMB_GAP_NORMAL; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
918 break; |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
919 case PAN_IMAGE_SIZE_25: |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
920 pw->image_size = 25; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
921 pw->thumb_gap = PAN_THUMB_GAP_NORMAL; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
922 break; |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
923 case PAN_IMAGE_SIZE_33: |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
924 pw->image_size = 33; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
925 pw->thumb_gap = PAN_THUMB_GAP_LARGE; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
926 break; |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
927 case PAN_IMAGE_SIZE_50: |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
928 pw->image_size = 50; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
929 pw->thumb_gap = PAN_THUMB_GAP_HUGE; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
930 break; |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
931 case PAN_IMAGE_SIZE_100: |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
932 pw->image_size = 100; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
933 pw->thumb_gap = PAN_THUMB_GAP_HUGE; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
934 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
935 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
936 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
937 *width = 0; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
938 *height = 0; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
939 *scroll_x = 0; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
940 *scroll_y = 0; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
941 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
942 switch (pw->layout) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
943 { |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
944 case PAN_LAYOUT_GRID: |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
945 default: |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
946 pan_grid_compute(pw, path, width, height); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
947 break; |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
948 case PAN_LAYOUT_FOLDERS_LINEAR: |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
949 pan_folder_tree_compute(pw, path, width, height); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
950 break; |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
951 case PAN_LAYOUT_FOLDERS_FLOWER: |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
952 pan_flower_compute(pw, path, width, height, scroll_x, scroll_y); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
953 break; |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
954 case PAN_LAYOUT_CALENDAR: |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
955 pan_calendar_compute(pw, path, width, height); |
18
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
956 break; |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
957 case PAN_LAYOUT_TIMELINE: |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
958 pan_timeline_compute(pw, path, width, height); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
959 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
960 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
961 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
962 pan_cache_free(pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
963 |
99
d19b0de6d0bb
Sat Nov 4 17:14:47 2006 John Ellis <johne@verizon.net>
gqview
parents:
97
diff
changeset
|
964 if (debug) printf("computed %d objects\n", g_list_length(pw->list)); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
965 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
966 |
35
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
967 static GList *pan_layout_intersect_l(GList *list, GList *item_list, |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
968 gint x, gint y, gint width, gint height) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
969 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
970 GList *work; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
971 |
35
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
972 work = item_list; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
973 while (work) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
974 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
975 PanItem *pi; |
33
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
32
diff
changeset
|
976 gint rx, ry, rw, rh; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
977 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
978 pi = work->data; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
979 work = work->next; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
980 |
33
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
32
diff
changeset
|
981 if (util_clip_region(x, y, width, height, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
32
diff
changeset
|
982 pi->x, pi->y, pi->width, pi->height, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
32
diff
changeset
|
983 &rx, &ry, &rw, &rh)) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
984 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
985 list = g_list_prepend(list, pi); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
986 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
987 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
988 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
989 return list; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
990 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
991 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
992 GList *pan_layout_intersect(PanWindow *pw, gint x, gint y, gint width, gint height) |
35
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
993 { |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
994 GList *list = NULL; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
995 GList *grid; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
996 PanGrid *pg = NULL; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
997 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
998 grid = pw->list_grid; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
999 while (grid && !pg) |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1000 { |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1001 pg = grid->data; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1002 grid = grid->next; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1003 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1004 if (x < pg->x || x + width > pg->x + pg->w || |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1005 y < pg->y || y + height > pg->y + pg->h) |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1006 { |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1007 pg = NULL; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1008 } |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1009 } |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1010 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1011 list = pan_layout_intersect_l(list, pw->list, x, y, width, height); |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1012 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1013 if (pg) |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1014 { |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1015 list = pan_layout_intersect_l(list, pg->list, x, y, width, height); |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1016 } |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1017 else |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1018 { |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1019 list = pan_layout_intersect_l(list, pw->list_static, x, y, width, height); |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1020 } |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1021 |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1022 return list; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1023 } |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1024 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1025 void pan_layout_resize(PanWindow *pw) |
77
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1026 { |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1027 gint width = 0; |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1028 gint height = 0; |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1029 GList *work; |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1030 PixbufRenderer *pr; |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1031 |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1032 work = pw->list; |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1033 while (work) |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1034 { |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1035 PanItem *pi; |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1036 |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1037 pi = work->data; |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1038 work = work->next; |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1039 |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1040 if (width < pi->x + pi->width) width = pi->x + pi->width; |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1041 if (height < pi->y + pi->height) height = pi->y + pi->height; |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1042 } |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1043 work = pw->list_static; |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1044 while (work) |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1045 { |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1046 PanItem *pi; |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1047 |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1048 pi = work->data; |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1049 work = work->next; |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1050 |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1051 if (width < pi->x + pi->width) width = pi->x + pi->width; |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1052 if (height < pi->y + pi->height) height = pi->y + pi->height; |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1053 } |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1054 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1055 width += PAN_BOX_BORDER * 2; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1056 height += PAN_BOX_BORDER * 2; |
77
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1057 |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1058 pr = PIXBUF_RENDERER(pw->imd->pr); |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1059 if (width < pr->window_width) width = pr->window_width; |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1060 if (height < pr->window_width) height = pr->window_height; |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1061 |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1062 pixbuf_renderer_set_tiles_size(PIXBUF_RENDERER(pw->imd->pr), width, height); |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1063 } |
44f2223541d1
Sun Oct 15 10:45:14 2006 John Ellis <johne@verizon.net>
gqview
parents:
67
diff
changeset
|
1064 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1065 static gint pan_layout_update_idle_cb(gpointer data) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1066 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1067 PanWindow *pw = data; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1068 gint width; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1069 gint height; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1070 gint scroll_x; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1071 gint scroll_y; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1072 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1073 if (pw->size > PAN_IMAGE_SIZE_THUMB_LARGE || |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1074 (pw->exif_date_enable && (pw->layout == PAN_LAYOUT_TIMELINE || pw->layout == PAN_LAYOUT_CALENDAR))) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1075 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1076 if (!pw->cache_list && !pw->cache_todo) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1077 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1078 pan_cache_fill(pw, pw->path); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1079 if (pw->cache_todo) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1080 { |
56
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
1081 pan_window_message(pw, _("Reading image data...")); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1082 return TRUE; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1083 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1084 } |
37
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
1085 if (pw->cache_todo) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1086 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1087 pw->cache_count++; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1088 pw->cache_tick++; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1089 if (pw->cache_count == pw->cache_total) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1090 { |
56
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
1091 pan_window_message(pw, _("Sorting...")); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1092 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1093 else if (pw->cache_tick > 9) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1094 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1095 gchar *buf; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1096 |
102
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
1097 buf = g_strdup_printf("%s %d / %d", _("Reading image data..."), |
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
1098 pw->cache_count, pw->cache_total); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1099 pan_window_message(pw, buf); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1100 g_free(buf); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1101 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1102 pw->cache_tick = 0; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1103 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1104 |
37
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
1105 if (pan_cache_step(pw)) return TRUE; |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
1106 |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
1107 pw->idle_id = -1; |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
1108 return FALSE; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1109 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1110 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1111 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1112 pan_layout_compute(pw, pw->path, &width, &height, &scroll_x, &scroll_y); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1113 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1114 pan_window_zoom_limit(pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1115 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1116 if (width > 0 && height > 0) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1117 { |
13
ef790149ae21
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
12
diff
changeset
|
1118 gdouble align; |
ef790149ae21
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
12
diff
changeset
|
1119 |
99
d19b0de6d0bb
Sat Nov 4 17:14:47 2006 John Ellis <johne@verizon.net>
gqview
parents:
97
diff
changeset
|
1120 if (debug) printf("Canvas size is %d x %d\n", width, height); |
32
96ac60a9c0f1
Wed Apr 6 02:43:40 2005 John Ellis <johne@verizon.net>
gqview
parents:
30
diff
changeset
|
1121 |
35
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1122 pan_grid_build(pw, width, height, 1000); |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1123 |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
1124 pixbuf_renderer_set_tiles(PIXBUF_RENDERER(pw->imd->pr), width, height, |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
1125 PAN_TILE_SIZE, PAN_TILE_SIZE, 10, |
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
1126 pan_window_request_tile_cb, |
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
1127 pan_window_dispose_tile_cb, pw, 1.0); |
13
ef790149ae21
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
12
diff
changeset
|
1128 |
ef790149ae21
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
12
diff
changeset
|
1129 if (scroll_x == 0 && scroll_y == 0) |
ef790149ae21
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
12
diff
changeset
|
1130 { |
ef790149ae21
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
12
diff
changeset
|
1131 align = 0.0; |
ef790149ae21
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
12
diff
changeset
|
1132 } |
ef790149ae21
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
12
diff
changeset
|
1133 else |
ef790149ae21
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
12
diff
changeset
|
1134 { |
ef790149ae21
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
12
diff
changeset
|
1135 align = 0.5; |
ef790149ae21
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
12
diff
changeset
|
1136 } |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
1137 pixbuf_renderer_scroll_to_point(PIXBUF_RENDERER(pw->imd->pr), scroll_x, scroll_y, align, align); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1138 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1139 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1140 pan_window_message(pw, NULL); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1141 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1142 pw->idle_id = -1; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1143 return FALSE; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1144 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1145 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1146 static void pan_layout_update_idle(PanWindow *pw) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1147 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1148 if (pw->idle_id == -1) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1149 { |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1150 pw->idle_id = g_idle_add(pan_layout_update_idle_cb, pw); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1151 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1152 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1153 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1154 static void pan_layout_update(PanWindow *pw) |
37
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
1155 { |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
1156 pan_window_message(pw, _("Sorting images...")); |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1157 pan_layout_update_idle(pw); |
37
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
1158 } |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
1159 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1160 static void pan_layout_set_path(PanWindow *pw, const gchar *path) |
40
dcc04a6a58bf
Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents:
39
diff
changeset
|
1161 { |
dcc04a6a58bf
Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents:
39
diff
changeset
|
1162 if (!path) return; |
dcc04a6a58bf
Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents:
39
diff
changeset
|
1163 |
dcc04a6a58bf
Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents:
39
diff
changeset
|
1164 if (strcmp(path, "/") == 0) |
dcc04a6a58bf
Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents:
39
diff
changeset
|
1165 { |
dcc04a6a58bf
Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents:
39
diff
changeset
|
1166 pan_warning_folder(path, pw->window); |
dcc04a6a58bf
Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents:
39
diff
changeset
|
1167 return; |
dcc04a6a58bf
Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents:
39
diff
changeset
|
1168 } |
dcc04a6a58bf
Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents:
39
diff
changeset
|
1169 |
dcc04a6a58bf
Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents:
39
diff
changeset
|
1170 g_free(pw->path); |
dcc04a6a58bf
Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents:
39
diff
changeset
|
1171 pw->path = g_strdup(path); |
dcc04a6a58bf
Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents:
39
diff
changeset
|
1172 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1173 pan_layout_update(pw); |
40
dcc04a6a58bf
Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents:
39
diff
changeset
|
1174 } |
dcc04a6a58bf
Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents:
39
diff
changeset
|
1175 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1176 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1177 /* |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1178 *----------------------------------------------------------------------------- |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1179 * keyboard handlers |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1180 *----------------------------------------------------------------------------- |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1181 */ |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1182 |
138 | 1183 FileData *pan_menu_click_fd(PanWindow *pw) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1184 { |
138 | 1185 if (pw->click_pi && pw->click_pi->fd) return pw->click_pi->fd; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1186 return NULL; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1187 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1188 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1189 static void pan_window_menu_pos_cb(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1190 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1191 PanWindow *pw = data; |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
1192 |
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
1193 gdk_window_get_origin(pw->imd->pr->window, x, y); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1194 popup_menu_position_clamp(menu, x, y, 0); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1195 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1196 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1197 static gint pan_window_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1198 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1199 PanWindow *pw = data; |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
1200 PixbufRenderer *pr; |
138 | 1201 FileData *fd; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1202 gint stop_signal = FALSE; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1203 GtkWidget *menu; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1204 gint x = 0; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1205 gint y = 0; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1206 gint focused; |
97
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1207 gint on_entry; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1208 |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
1209 pr = PIXBUF_RENDERER(pw->imd->pr); |
138 | 1210 fd = pan_menu_click_fd(pw); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1211 |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
1212 focused = (pw->fs || GTK_WIDGET_HAS_FOCUS(GTK_WIDGET(pw->imd->widget))); |
97
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1213 on_entry = (GTK_WIDGET_HAS_FOCUS(pw->path_entry) || |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1214 GTK_WIDGET_HAS_FOCUS(pw->search_entry)); |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
1215 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1216 if (focused) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1217 { |
85
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1218 stop_signal = TRUE; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1219 switch (event->keyval) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1220 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1221 case GDK_Left: case GDK_KP_Left: |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1222 x -= 1; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1223 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1224 case GDK_Right: case GDK_KP_Right: |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1225 x += 1; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1226 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1227 case GDK_Up: case GDK_KP_Up: |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1228 y -= 1; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1229 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1230 case GDK_Down: case GDK_KP_Down: |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1231 y += 1; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1232 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1233 case GDK_Page_Up: case GDK_KP_Page_Up: |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
1234 pixbuf_renderer_scroll(pr, 0, 0 - pr->vis_height / 2); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1235 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1236 case GDK_Page_Down: case GDK_KP_Page_Down: |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
1237 pixbuf_renderer_scroll(pr, 0, pr->vis_height / 2); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1238 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1239 case GDK_Home: case GDK_KP_Home: |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
1240 pixbuf_renderer_scroll(pr, 0 - pr->vis_width / 2, 0); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1241 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1242 case GDK_End: case GDK_KP_End: |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
1243 pixbuf_renderer_scroll(pr, pr->vis_width / 2, 0); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1244 break; |
85
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1245 default: |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1246 stop_signal = FALSE; |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1247 break; |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1248 } |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1249 |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1250 if (x != 0 || y!= 0) |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1251 { |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1252 if (event->state & GDK_SHIFT_MASK) |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1253 { |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1254 x *= 3; |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1255 y *= 3; |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1256 } |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1257 keyboard_scroll_calc(&x, &y, event); |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1258 pixbuf_renderer_scroll(pr, x, y); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1259 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1260 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1261 |
85
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1262 if (stop_signal) return stop_signal; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1263 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1264 if (event->state & GDK_CONTROL_MASK) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1265 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1266 gint n = -1; |
85
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1267 |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1268 stop_signal = TRUE; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1269 switch (event->keyval) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1270 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1271 case '1': |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1272 n = 0; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1273 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1274 case '2': |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1275 n = 1; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1276 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1277 case '3': |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1278 n = 2; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1279 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1280 case '4': |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1281 n = 3; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1282 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1283 case '5': |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1284 n = 4; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1285 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1286 case '6': |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1287 n = 5; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1288 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1289 case '7': |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1290 n = 6; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1291 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1292 case '8': |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1293 n = 7; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1294 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1295 case '9': |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1296 n = 8; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1297 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1298 case '0': |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1299 n = 9; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1300 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1301 case 'C': case 'c': |
138 | 1302 if (fd) file_util_copy(fd, NULL, NULL, GTK_WIDGET(pr)); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1303 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1304 case 'M': case 'm': |
138 | 1305 if (fd) file_util_move(fd, NULL, NULL, GTK_WIDGET(pr)); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1306 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1307 case 'R': case 'r': |
138 | 1308 if (fd) file_util_rename(fd, NULL, GTK_WIDGET(pr)); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1309 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1310 case 'D': case 'd': |
138 | 1311 if (fd) file_util_delete(fd, NULL, GTK_WIDGET(pr)); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1312 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1313 case 'P': case 'p': |
138 | 1314 if (fd) info_window_new(fd, NULL); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1315 break; |
97
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1316 case 'F': case 'f': |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1317 pan_search_toggle_visible(pw, TRUE); |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1318 break; |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1319 case 'G': case 'g': |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1320 pan_search_activate(pw); |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1321 break; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1322 case 'W': case 'w': |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1323 pan_window_close(pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1324 break; |
85
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1325 default: |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1326 stop_signal = FALSE; |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1327 break; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1328 } |
85
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1329 |
138 | 1330 if (n != -1 && fd) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1331 { |
60
9c0c402b0ef3
Mon Jun 13 17:31:46 2005 John Ellis <johne@verizon.net>
gqview
parents:
56
diff
changeset
|
1332 if (!editor_window_flag_set(n)) |
9c0c402b0ef3
Mon Jun 13 17:31:46 2005 John Ellis <johne@verizon.net>
gqview
parents:
56
diff
changeset
|
1333 { |
9c0c402b0ef3
Mon Jun 13 17:31:46 2005 John Ellis <johne@verizon.net>
gqview
parents:
56
diff
changeset
|
1334 pan_fullscreen_toggle(pw, TRUE); |
9c0c402b0ef3
Mon Jun 13 17:31:46 2005 John Ellis <johne@verizon.net>
gqview
parents:
56
diff
changeset
|
1335 } |
138 | 1336 start_editor_from_file(n, fd); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1337 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1338 } |
85
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1339 else |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1340 { |
97
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1341 stop_signal = TRUE; |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1342 switch (event->keyval) |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1343 { |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1344 case GDK_Escape: |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1345 if (pw->fs) |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1346 { |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1347 pan_fullscreen_toggle(pw, TRUE); |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1348 } |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1349 else |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1350 { |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1351 pan_search_toggle_visible(pw, FALSE); |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1352 } |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1353 break; |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1354 default: |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1355 stop_signal = FALSE; |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1356 break; |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1357 } |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1358 |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1359 if (stop_signal) return stop_signal; |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1360 |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1361 if (!on_entry) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1362 { |
85
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1363 stop_signal = TRUE; |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1364 switch (event->keyval) |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1365 { |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1366 case '+': case '=': case GDK_KP_Add: |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1367 pixbuf_renderer_zoom_adjust(pr, ZOOM_INCREMENT); |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1368 break; |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1369 case '-': case GDK_KP_Subtract: |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1370 pixbuf_renderer_zoom_adjust(pr, -ZOOM_INCREMENT); |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1371 break; |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1372 case 'Z': case 'z': case GDK_KP_Divide: case '1': |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1373 pixbuf_renderer_zoom_set(pr, 1.0); |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1374 break; |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1375 case '2': |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1376 pixbuf_renderer_zoom_set(pr, 2.0); |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1377 break; |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1378 case '3': |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1379 pixbuf_renderer_zoom_set(pr, 3.0); |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1380 break; |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1381 case '4': |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1382 pixbuf_renderer_zoom_set(pr, 4.0); |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1383 break; |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1384 case '7': |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1385 pixbuf_renderer_zoom_set(pr, -4.0); |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1386 break; |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1387 case '8': |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1388 pixbuf_renderer_zoom_set(pr, -3.0); |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1389 break; |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1390 case '9': |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1391 pixbuf_renderer_zoom_set(pr, -2.0); |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1392 break; |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1393 case 'F': case 'f': |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1394 case 'V': case 'v': |
86
cade6a52a165
Mon Oct 23 05:34:29 2006 John Ellis <johne@verizon.net>
gqview
parents:
85
diff
changeset
|
1395 case GDK_F11: |
85
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1396 pan_fullscreen_toggle(pw, FALSE); |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1397 break; |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1398 case 'I': case 'i': |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1399 #if 0 |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1400 pan_overlay_toggle(pw); |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1401 #endif |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1402 break; |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1403 case GDK_Delete: case GDK_KP_Delete: |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1404 break; |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1405 case GDK_Menu: |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1406 case GDK_F10: |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1407 menu = pan_popup_menu(pw); |
97
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1408 gtk_menu_popup(GTK_MENU(menu), NULL, NULL, |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1409 pan_window_menu_pos_cb, pw, 0, GDK_CURRENT_TIME); |
85
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1410 break; |
97
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1411 case '/': |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1412 pan_search_toggle_visible(pw, TRUE); |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1413 break; |
85
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1414 default: |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1415 stop_signal = FALSE; |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1416 break; |
9d5c75b5ec28
Fri Oct 20 09:20:10 2006 John Ellis <johne@verizon.net>
gqview
parents:
78
diff
changeset
|
1417 } |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1418 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1419 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1420 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1421 return stop_signal; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1422 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1423 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1424 /* |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1425 *----------------------------------------------------------------------------- |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1426 * info popup |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1427 *----------------------------------------------------------------------------- |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1428 */ |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1429 |
95
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1430 static void pan_info_add_exif(PanTextAlignment *ta, FileData *fd) |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1431 { |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1432 ExifData *exif; |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1433 GList *work; |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1434 gint i; |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1435 |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1436 if (!fd) return; |
188
0584cb78aa14
write comment and keywords to xmp, sidecars are used if exist
nadvornik
parents:
177
diff
changeset
|
1437 exif = exif_read_fd(fd, FALSE); |
95
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1438 if (!exif) return; |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1439 |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1440 pan_text_alignment_add(ta, NULL, NULL); |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1441 |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1442 for (i = 0; i < bar_exif_key_count; i++) |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1443 { |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1444 gchar *label; |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1445 gchar *text; |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1446 |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1447 label = g_strdup_printf("%s:", exif_get_description_by_key(bar_exif_key_list[i])); |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1448 text = exif_get_data_as_text(exif, bar_exif_key_list[i]); |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1449 text = bar_exif_validate_text(text); |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1450 pan_text_alignment_add(ta, label, text); |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1451 g_free(label); |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1452 g_free(text); |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1453 } |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1454 |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1455 work = g_list_last(history_list_get_by_key("exif_extras")); |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1456 if (work) pan_text_alignment_add(ta, "---", NULL); |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1457 while (work) |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1458 { |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1459 const gchar *name; |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1460 gchar *label; |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1461 gchar *text; |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1462 |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1463 name = work->data; |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1464 work = work->prev; |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1465 |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1466 label = g_strdup_printf("%s:", name); |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1467 text = exif_get_data_as_text(exif, name); |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1468 text = bar_exif_validate_text(text); |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1469 pan_text_alignment_add(ta, label, text); |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1470 g_free(label); |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1471 g_free(text); |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1472 } |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1473 |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1474 exif_free(exif); |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1475 } |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1476 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1477 static void pan_info_update(PanWindow *pw, PanItem *pi) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1478 { |
95
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1479 PanTextAlignment *ta; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1480 PanItem *pbox; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1481 PanItem *p; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1482 gchar *buf; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1483 gint x1, y1, x2, y2, x3, y3; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1484 gint x, y, w, h; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1485 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1486 if (pw->click_pi == pi) return; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1487 if (pi && !pi->fd) pi = NULL; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1488 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1489 while ((p = pan_item_find_by_key(pw, PAN_ITEM_NONE, "info"))) pan_item_remove(pw, p); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1490 pw->click_pi = pi; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1491 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1492 if (!pi) return; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1493 |
35
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1494 if (debug) printf("info set to %s\n", pi->fd->path); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1495 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1496 pbox = pan_item_box_new(pw, NULL, pi->x + pi->width + 4, pi->y, 10, 10, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1497 PAN_POPUP_BORDER, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1498 PAN_POPUP_COLOR, PAN_POPUP_ALPHA, |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1499 PAN_POPUP_BORDER_COLOR, PAN_POPUP_ALPHA); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1500 pan_item_set_key(pbox, "info"); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1501 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1502 if (pi->type == PAN_ITEM_THUMB && pi->pixbuf) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1503 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1504 w = gdk_pixbuf_get_width(pi->pixbuf); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1505 h = gdk_pixbuf_get_height(pi->pixbuf); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1506 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1507 x1 = pi->x + pi->width - (pi->width - w) / 2 - 8; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1508 y1 = pi->y + (pi->height - h) / 2 + 8; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1509 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1510 else |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1511 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1512 x1 = pi->x + pi->width - 8; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1513 y1 = pi->y + 8; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1514 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1515 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1516 x2 = pbox->x + 1; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1517 y2 = pbox->y + 36; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1518 x3 = pbox->x + 1; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1519 y3 = pbox->y + 12; |
33
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
32
diff
changeset
|
1520 util_clip_triangle(x1, y1, x2, y2, x3, y3, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
32
diff
changeset
|
1521 &x, &y, &w, &h); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1522 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1523 p = pan_item_tri_new(pw, NULL, x, y, w, h, |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1524 x1, y1, x2, y2, x3, y3, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1525 PAN_POPUP_COLOR, PAN_POPUP_ALPHA); |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1526 pan_item_tri_border(p, PAN_BORDER_1 | PAN_BORDER_3, PAN_POPUP_BORDER_COLOR, PAN_POPUP_ALPHA); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1527 pan_item_set_key(p, "info"); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1528 pan_item_added(pw, p); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1529 |
95
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1530 ta = pan_text_alignment_new(pw, pbox->x + PREF_PAD_BORDER, pbox->y + PREF_PAD_BORDER, "info"); |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1531 |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1532 pan_text_alignment_add(ta, _("Filename:"), pi->fd->name); |
97
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1533 buf = remove_level_from_path(pi->fd->path); |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1534 pan_text_alignment_add(ta, _("Location:"), buf); |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1535 g_free(buf); |
95
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1536 pan_text_alignment_add(ta, _("Date:"), text_from_time(pi->fd->date)); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1537 buf = text_from_size(pi->fd->size); |
95
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1538 pan_text_alignment_add(ta, _("Size:"), buf); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1539 g_free(buf); |
95
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1540 |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1541 if (pw->info_includes_exif) |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1542 { |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1543 pan_info_add_exif(ta, pi->fd); |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1544 } |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1545 |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1546 pan_text_alignment_calc(ta, pbox); |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1547 pan_text_alignment_free(ta); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1548 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1549 pan_item_box_shadow(pbox, PAN_SHADOW_OFFSET * 2, PAN_SHADOW_FADE * 2); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1550 pan_item_added(pw, pbox); |
78
b192a0efe080
Sun Oct 15 12:36:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
77
diff
changeset
|
1551 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1552 if (pw->info_image_size > PAN_IMAGE_SIZE_THUMB_NONE) |
78
b192a0efe080
Sun Oct 15 12:36:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
77
diff
changeset
|
1553 { |
b192a0efe080
Sun Oct 15 12:36:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
77
diff
changeset
|
1554 gint iw, ih; |
138 | 1555 if (image_load_dimensions(pi->fd, &iw, &ih)) |
78
b192a0efe080
Sun Oct 15 12:36:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
77
diff
changeset
|
1556 { |
102
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
1557 gint scale = 25; |
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
1558 |
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
1559 switch (pw->info_image_size) |
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
1560 { |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1561 case PAN_IMAGE_SIZE_10: |
102
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
1562 scale = 10; |
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
1563 break; |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1564 case PAN_IMAGE_SIZE_25: |
102
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
1565 scale = 25; |
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
1566 break; |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1567 case PAN_IMAGE_SIZE_33: |
102
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
1568 scale = 33; |
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
1569 break; |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1570 case PAN_IMAGE_SIZE_50: |
102
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
1571 scale = 50; |
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
1572 break; |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1573 case PAN_IMAGE_SIZE_100: |
102
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
1574 scale = 100; |
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
1575 break; |
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
1576 } |
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
1577 |
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
1578 iw = MAX(1, iw * scale / 100); |
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
1579 ih = MAX(1, ih * scale / 100); |
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
1580 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1581 pbox = pan_item_box_new(pw, NULL, pbox->x, pbox->y + pbox->height + 8, 10, 10, |
78
b192a0efe080
Sun Oct 15 12:36:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
77
diff
changeset
|
1582 PAN_POPUP_BORDER, |
b192a0efe080
Sun Oct 15 12:36:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
77
diff
changeset
|
1583 PAN_POPUP_COLOR, PAN_POPUP_ALPHA, |
b192a0efe080
Sun Oct 15 12:36:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
77
diff
changeset
|
1584 PAN_POPUP_BORDER_COLOR, PAN_POPUP_ALPHA); |
b192a0efe080
Sun Oct 15 12:36:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
77
diff
changeset
|
1585 pan_item_set_key(pbox, "info"); |
b192a0efe080
Sun Oct 15 12:36:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
77
diff
changeset
|
1586 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1587 p = pan_item_image_new(pw, file_data_new_simple(pi->fd->path), |
95
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1588 pbox->x + PREF_PAD_BORDER, pbox->y + PREF_PAD_BORDER, iw, ih); |
78
b192a0efe080
Sun Oct 15 12:36:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
77
diff
changeset
|
1589 pan_item_set_key(p, "info"); |
95
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
1590 pan_item_size_by_item(pbox, p, PREF_PAD_BORDER); |
78
b192a0efe080
Sun Oct 15 12:36:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
77
diff
changeset
|
1591 |
b192a0efe080
Sun Oct 15 12:36:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
77
diff
changeset
|
1592 pan_item_box_shadow(pbox, PAN_SHADOW_OFFSET * 2, PAN_SHADOW_FADE * 2); |
b192a0efe080
Sun Oct 15 12:36:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
77
diff
changeset
|
1593 pan_item_added(pw, pbox); |
b192a0efe080
Sun Oct 15 12:36:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
77
diff
changeset
|
1594 } |
b192a0efe080
Sun Oct 15 12:36:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
77
diff
changeset
|
1595 } |
99
d19b0de6d0bb
Sat Nov 4 17:14:47 2006 John Ellis <johne@verizon.net>
gqview
parents:
97
diff
changeset
|
1596 |
d19b0de6d0bb
Sat Nov 4 17:14:47 2006 John Ellis <johne@verizon.net>
gqview
parents:
97
diff
changeset
|
1597 pan_layout_resize(pw); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1598 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1599 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1600 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1601 /* |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1602 *----------------------------------------------------------------------------- |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1603 * search |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1604 *----------------------------------------------------------------------------- |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1605 */ |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1606 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1607 static void pan_search_status(PanWindow *pw, const gchar *text) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1608 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1609 gtk_label_set_text(GTK_LABEL(pw->search_label), (text) ? text : ""); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1610 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1611 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1612 static gint pan_search_by_path(PanWindow *pw, const gchar *path) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1613 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1614 PanItem *pi; |
17
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1615 GList *list; |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1616 GList *found; |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1617 PanItemType type; |
17
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1618 gchar *buf; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1619 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1620 type = (pw->size > PAN_IMAGE_SIZE_THUMB_LARGE) ? PAN_ITEM_IMAGE : PAN_ITEM_THUMB; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1621 |
17
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1622 list = pan_item_find_by_path(pw, type, path, FALSE, FALSE); |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1623 if (!list) return FALSE; |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1624 |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1625 found = g_list_find(list, pw->click_pi); |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1626 if (found && found->next) |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1627 { |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1628 found = found->next; |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1629 pi = found->data; |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1630 } |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1631 else |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1632 { |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1633 pi = list->data; |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1634 } |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1635 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1636 pan_info_update(pw, pi); |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
1637 image_scroll_to_point(pw->imd, pi->x + pi->width / 2, pi->y + pi->height / 2, 0.5, 0.5); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1638 |
17
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1639 buf = g_strdup_printf("%s ( %d / %d )", |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1640 (path[0] == '/') ? _("path found") : _("filename found"), |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1641 g_list_index(list, pi) + 1, |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1642 g_list_length(list)); |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1643 pan_search_status(pw, buf); |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1644 g_free(buf); |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1645 |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1646 g_list_free(list); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1647 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1648 return TRUE; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1649 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1650 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1651 static gint pan_search_by_partial(PanWindow *pw, const gchar *text) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1652 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1653 PanItem *pi; |
17
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1654 GList *list; |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1655 GList *found; |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1656 PanItemType type; |
17
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1657 gchar *buf; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1658 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1659 type = (pw->size > PAN_IMAGE_SIZE_THUMB_LARGE) ? PAN_ITEM_IMAGE : PAN_ITEM_THUMB; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1660 |
17
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1661 list = pan_item_find_by_path(pw, type, text, TRUE, FALSE); |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1662 if (!list) list = pan_item_find_by_path(pw, type, text, FALSE, TRUE); |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1663 if (!list) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1664 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1665 gchar *needle; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1666 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1667 needle = g_utf8_strdown(text, -1); |
17
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1668 list = pan_item_find_by_path(pw, type, needle, TRUE, TRUE); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1669 g_free(needle); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1670 } |
17
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1671 if (!list) return FALSE; |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1672 |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1673 found = g_list_find(list, pw->click_pi); |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1674 if (found && found->next) |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1675 { |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1676 found = found->next; |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1677 pi = found->data; |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1678 } |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1679 else |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1680 { |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1681 pi = list->data; |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1682 } |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1683 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1684 pan_info_update(pw, pi); |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
1685 image_scroll_to_point(pw->imd, pi->x + pi->width / 2, pi->y + pi->height / 2, 0.5, 0.5); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1686 |
17
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1687 buf = g_strdup_printf("%s ( %d / %d )", |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1688 _("partial match"), |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1689 g_list_index(list, pi) + 1, |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1690 g_list_length(list)); |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1691 pan_search_status(pw, buf); |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1692 g_free(buf); |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1693 |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1694 g_list_free(list); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1695 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1696 return TRUE; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1697 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1698 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1699 static gint valid_date_separator(gchar c) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1700 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1701 return (c == '/' || c == '-' || c == ' ' || c == '.' || c == ','); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1702 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1703 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1704 static GList *pan_search_by_date_val(PanWindow *pw, PanItemType type, |
20
b542e45eb053
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
18
diff
changeset
|
1705 gint year, gint month, gint day, |
b542e45eb053
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
18
diff
changeset
|
1706 const gchar *key) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1707 { |
17
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1708 GList *list = NULL; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1709 GList *work; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1710 |
35
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
1711 work = g_list_last(pw->list_static); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1712 while (work) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1713 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1714 PanItem *pi; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1715 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1716 pi = work->data; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1717 work = work->prev; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1718 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1719 if (pi->fd && (pi->type == type || type == PAN_ITEM_NONE) && |
20
b542e45eb053
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
18
diff
changeset
|
1720 ((!key && !pi->key) || (key && pi->key && strcmp(key, pi->key) == 0))) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1721 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1722 struct tm *tl; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1723 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1724 tl = localtime(&pi->fd->date); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1725 if (tl) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1726 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1727 gint match; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1728 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1729 match = (tl->tm_year == year - 1900); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1730 if (match && month >= 0) match = (tl->tm_mon == month - 1); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1731 if (match && day > 0) match = (tl->tm_mday == day); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1732 |
17
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1733 if (match) list = g_list_prepend(list, pi); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1734 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1735 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1736 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1737 |
17
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1738 return g_list_reverse(list); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1739 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1740 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1741 static gint pan_search_by_date(PanWindow *pw, const gchar *text) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1742 { |
17
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1743 PanItem *pi = NULL; |
20
b542e45eb053
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
18
diff
changeset
|
1744 GList *list = NULL; |
17
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1745 GList *found; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1746 gint year; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1747 gint month = -1; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1748 gint day = -1; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1749 gchar *ptr; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1750 gchar *mptr; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1751 struct tm *lt; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1752 time_t t; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1753 gchar *message; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1754 gchar *buf; |
17
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1755 gchar *buf_count; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1756 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1757 if (!text) return FALSE; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1758 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1759 ptr = (gchar *)text; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1760 while (*ptr != '\0') |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1761 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1762 if (!g_unichar_isdigit(*ptr) && !valid_date_separator(*ptr)) return FALSE; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1763 ptr++; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1764 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1765 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1766 t = time(NULL); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1767 if (t == -1) return FALSE; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1768 lt = localtime(&t); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1769 if (!lt) return FALSE; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1770 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1771 if (valid_date_separator(*text)) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1772 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1773 year = -1; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1774 mptr = (gchar *)text; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1775 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1776 else |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1777 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1778 year = (gint)strtol(text, &mptr, 10); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1779 if (mptr == text) return FALSE; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1780 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1781 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1782 if (*mptr != '\0' && valid_date_separator(*mptr)) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1783 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1784 gchar *dptr; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1785 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1786 mptr++; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1787 month = strtol(mptr, &dptr, 10); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1788 if (dptr == mptr) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1789 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1790 if (valid_date_separator(*dptr)) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1791 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1792 month = lt->tm_mon + 1; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1793 dptr++; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1794 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1795 else |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1796 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1797 month = -1; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1798 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1799 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1800 if (dptr != mptr && *dptr != '\0' && valid_date_separator(*dptr)) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1801 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1802 gchar *eptr; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1803 dptr++; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1804 day = strtol(dptr, &eptr, 10); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1805 if (dptr == eptr) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1806 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1807 day = lt->tm_mday; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1808 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1809 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1810 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1811 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1812 if (year == -1) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1813 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1814 year = lt->tm_year + 1900; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1815 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1816 else if (year < 100) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1817 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1818 if (year > 70) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1819 year+= 1900; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1820 else |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1821 year+= 2000; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1822 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1823 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1824 if (year < 1970 || |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1825 month < -1 || month == 0 || month > 12 || |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1826 day < -1 || day == 0 || day > 31) return FALSE; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1827 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1828 t = pan_date_to_time(year, month, day); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1829 if (t < 0) return FALSE; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1830 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1831 if (pw->layout == PAN_LAYOUT_CALENDAR) |
20
b542e45eb053
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
18
diff
changeset
|
1832 { |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1833 list = pan_search_by_date_val(pw, PAN_ITEM_BOX, year, month, day, "day"); |
20
b542e45eb053
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
18
diff
changeset
|
1834 } |
b542e45eb053
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
18
diff
changeset
|
1835 else |
b542e45eb053
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
18
diff
changeset
|
1836 { |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1837 PanItemType type; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1838 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1839 type = (pw->size > PAN_IMAGE_SIZE_THUMB_LARGE) ? PAN_ITEM_IMAGE : PAN_ITEM_THUMB; |
20
b542e45eb053
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
18
diff
changeset
|
1840 list = pan_search_by_date_val(pw, type, year, month, day, NULL); |
b542e45eb053
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
18
diff
changeset
|
1841 } |
b542e45eb053
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
18
diff
changeset
|
1842 |
17
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1843 if (list) |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1844 { |
20
b542e45eb053
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
18
diff
changeset
|
1845 found = g_list_find(list, pw->search_pi); |
17
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1846 if (found && found->next) |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1847 { |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1848 found = found->next; |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1849 pi = found->data; |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1850 } |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1851 else |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1852 { |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1853 pi = list->data; |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1854 } |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1855 } |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1856 |
20
b542e45eb053
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
18
diff
changeset
|
1857 pw->search_pi = pi; |
b542e45eb053
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
18
diff
changeset
|
1858 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1859 if (pw->layout == PAN_LAYOUT_CALENDAR && pi && pi->type == PAN_ITEM_BOX) |
20
b542e45eb053
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
18
diff
changeset
|
1860 { |
b542e45eb053
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
18
diff
changeset
|
1861 pan_info_update(pw, NULL); |
b542e45eb053
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
18
diff
changeset
|
1862 pan_calendar_update(pw, pi); |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
1863 image_scroll_to_point(pw->imd, |
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
1864 pi->x + pi->width / 2, |
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
1865 pi->y + pi->height / 2, 0.5, 0.5); |
20
b542e45eb053
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
18
diff
changeset
|
1866 } |
b542e45eb053
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
18
diff
changeset
|
1867 else if (pi) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1868 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1869 pan_info_update(pw, pi); |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
1870 image_scroll_to_point(pw->imd, |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1871 pi->x - PAN_BOX_BORDER * 5 / 2, |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
1872 pi->y, 0.0, 0.5); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1873 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1874 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1875 if (month > 0) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1876 { |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1877 buf = pan_date_value_string(t, PAN_DATE_LENGTH_MONTH); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1878 if (day > 0) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1879 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1880 gchar *tmp; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1881 tmp = buf; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1882 buf = g_strdup_printf("%d %s", day, tmp); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1883 g_free(tmp); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1884 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1885 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1886 else |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1887 { |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1888 buf = pan_date_value_string(t, PAN_DATE_LENGTH_YEAR); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1889 } |
17
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1890 |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1891 if (pi) |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1892 { |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1893 buf_count = g_strdup_printf("( %d / %d )", |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1894 g_list_index(list, pi) + 1, |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1895 g_list_length(list)); |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1896 } |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1897 else |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1898 { |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1899 buf_count = g_strdup_printf("(%s)", _("no match")); |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1900 } |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1901 |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1902 message = g_strdup_printf("%s %s %s", _("Date:"), buf, buf_count); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1903 g_free(buf); |
17
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1904 g_free(buf_count); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1905 pan_search_status(pw, message); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1906 g_free(message); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1907 |
17
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1908 g_list_free(list); |
bd9ae48e4eb2
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
15
diff
changeset
|
1909 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1910 return TRUE; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1911 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1912 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1913 static void pan_search_activate_cb(const gchar *text, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1914 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1915 PanWindow *pw = data; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1916 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1917 if (!text) return; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1918 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1919 tab_completion_append_to_history(pw->search_entry, text); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1920 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1921 if (pan_search_by_path(pw, text)) return; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1922 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1923 if ((pw->layout == PAN_LAYOUT_TIMELINE || |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
1924 pw->layout == PAN_LAYOUT_CALENDAR) && |
18
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
1925 pan_search_by_date(pw, text)) |
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
1926 { |
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
1927 return; |
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
1928 } |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1929 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1930 if (pan_search_by_partial(pw, text)) return; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1931 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1932 pan_search_status(pw, _("no match")); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1933 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1934 |
97
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1935 static void pan_search_activate(PanWindow *pw) |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1936 { |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1937 gchar *text; |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1938 |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1939 #if 0 |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1940 if (!GTK_WIDGET_VISIBLE(pw->search_box)) |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1941 { |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1942 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pw->search_button), TRUE); |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1943 } |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1944 #endif |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1945 |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1946 text = g_strdup(gtk_entry_get_text(GTK_ENTRY(pw->search_entry))); |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1947 pan_search_activate_cb(text, pw); |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1948 g_free(text); |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1949 } |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1950 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1951 static void pan_search_toggle_cb(GtkWidget *button, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1952 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1953 PanWindow *pw = data; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1954 gint visible; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1955 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1956 visible = GTK_WIDGET_VISIBLE(pw->search_box); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1957 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)) == visible) return; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1958 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1959 if (visible) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1960 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1961 gtk_widget_hide(pw->search_box); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1962 gtk_arrow_set(GTK_ARROW(pw->search_button_arrow), GTK_ARROW_UP, GTK_SHADOW_NONE); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1963 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1964 else |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1965 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1966 gtk_widget_show(pw->search_box); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1967 gtk_arrow_set(GTK_ARROW(pw->search_button_arrow), GTK_ARROW_DOWN, GTK_SHADOW_NONE); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1968 gtk_widget_grab_focus(pw->search_entry); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1969 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1970 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
1971 |
97
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1972 static void pan_search_toggle_visible(PanWindow *pw, gint enable) |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1973 { |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1974 if (pw->fs) return; |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1975 |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1976 if (enable) |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1977 { |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1978 if (GTK_WIDGET_VISIBLE(pw->search_box)) |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1979 { |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1980 gtk_widget_grab_focus(pw->search_entry); |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1981 } |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1982 else |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1983 { |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1984 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pw->search_button), TRUE); |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1985 } |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1986 } |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1987 else |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1988 { |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1989 if (GTK_WIDGET_VISIBLE(pw->search_entry)) |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1990 { |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1991 if (GTK_WIDGET_HAS_FOCUS(pw->search_entry)) |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1992 { |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1993 gtk_widget_grab_focus(GTK_WIDGET(pw->imd->widget)); |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1994 } |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1995 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pw->search_button), FALSE); |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1996 } |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1997 } |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1998 } |
ddde49aace00
Fri Nov 3 21:15:40 2006 John Ellis <johne@verizon.net>
gqview
parents:
95
diff
changeset
|
1999 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2000 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2001 /* |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2002 *----------------------------------------------------------------------------- |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2003 * main window |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2004 *----------------------------------------------------------------------------- |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2005 */ |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2006 |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2007 static void button_cb(PixbufRenderer *pr, GdkEventButton *event, gpointer data) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2008 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2009 PanWindow *pw = data; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2010 PanItem *pi = NULL; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2011 GtkWidget *menu; |
18
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
2012 gint rx, ry; |
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
2013 |
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
2014 rx = ry = 0; |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2015 if (pr->scale) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2016 { |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2017 rx = (double)(pr->x_scroll + event->x - pr->x_offset) / pr->scale; |
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2018 ry = (double)(pr->y_scroll + event->y - pr->y_offset) / pr->scale; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2019 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2020 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2021 pi = pan_item_find_by_coord(pw, PAN_ITEM_BOX, rx, ry, "info"); |
78
b192a0efe080
Sun Oct 15 12:36:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
77
diff
changeset
|
2022 if (pi && event->button == 1) |
b192a0efe080
Sun Oct 15 12:36:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
77
diff
changeset
|
2023 { |
b192a0efe080
Sun Oct 15 12:36:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
77
diff
changeset
|
2024 pan_info_update(pw, NULL); |
b192a0efe080
Sun Oct 15 12:36:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
77
diff
changeset
|
2025 return; |
b192a0efe080
Sun Oct 15 12:36:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
77
diff
changeset
|
2026 } |
b192a0efe080
Sun Oct 15 12:36:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
77
diff
changeset
|
2027 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2028 pi = pan_item_find_by_coord(pw, (pw->size > PAN_IMAGE_SIZE_THUMB_LARGE) ? PAN_ITEM_IMAGE : PAN_ITEM_THUMB, |
18
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
2029 rx, ry, NULL); |
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
2030 |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2031 switch (event->button) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2032 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2033 case 1: |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2034 pan_info_update(pw, pi); |
18
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
2035 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2036 if (!pi && pw->layout == PAN_LAYOUT_CALENDAR) |
18
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
2037 { |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2038 pi = pan_item_find_by_coord(pw, PAN_ITEM_BOX, rx, ry, "day"); |
18
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
2039 pan_calendar_update(pw, pi); |
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
2040 } |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2041 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2042 case 2: |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2043 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2044 case 3: |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2045 pan_info_update(pw, pi); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2046 menu = pan_popup_menu(pw); |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2047 gtk_menu_popup (GTK_MENU(menu), NULL, NULL, NULL, NULL, 3, event->time); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2048 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2049 default: |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2050 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2051 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2052 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2053 |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2054 static void scroll_cb(PixbufRenderer *pr, GdkEventScroll *event, gpointer data) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2055 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2056 #if 0 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2057 PanWindow *pw = data; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2058 #endif |
18
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
2059 gint w, h; |
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
2060 |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2061 w = pr->vis_width; |
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2062 h = pr->vis_height; |
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2063 |
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2064 if (!(event->state & GDK_SHIFT_MASK)) |
18
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
2065 { |
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
2066 w /= 3; |
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
2067 h /= 3; |
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
2068 } |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2069 |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2070 if (event->state & GDK_CONTROL_MASK) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2071 { |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2072 switch (event->direction) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2073 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2074 case GDK_SCROLL_UP: |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2075 pixbuf_renderer_zoom_adjust_at_point(pr, ZOOM_INCREMENT, |
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2076 (gint)event->x, (gint)event->y); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2077 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2078 case GDK_SCROLL_DOWN: |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2079 pixbuf_renderer_zoom_adjust_at_point(pr, -ZOOM_INCREMENT, |
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2080 (gint)event->x, (gint)event->y); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2081 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2082 default: |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2083 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2084 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2085 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2086 else |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2087 { |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2088 switch (event->direction) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2089 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2090 case GDK_SCROLL_UP: |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2091 pixbuf_renderer_scroll(pr, 0, -h); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2092 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2093 case GDK_SCROLL_DOWN: |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2094 pixbuf_renderer_scroll(pr, 0, h); |
18
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
2095 break; |
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
2096 case GDK_SCROLL_LEFT: |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2097 pixbuf_renderer_scroll(pr, -w, 0); |
18
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
2098 break; |
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
2099 case GDK_SCROLL_RIGHT: |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2100 pixbuf_renderer_scroll(pr, w, 0); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2101 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2102 default: |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2103 break; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2104 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2105 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2106 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2107 |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2108 static void pan_image_set_buttons(PanWindow *pw, ImageWindow *imd) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2109 { |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2110 g_signal_connect(G_OBJECT(imd->pr), "clicked", |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2111 G_CALLBACK(button_cb), pw); |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2112 g_signal_connect(G_OBJECT(imd->pr), "scroll_event", |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2113 G_CALLBACK(scroll_cb), pw); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2114 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2115 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2116 static void pan_fullscreen_stop_func(FullScreenData *fs, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2117 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2118 PanWindow *pw = data; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2119 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2120 pw->fs = NULL; |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2121 pw->imd = pw->imd_normal; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2122 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2123 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2124 static void pan_fullscreen_toggle(PanWindow *pw, gint force_off) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2125 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2126 if (force_off && !pw->fs) return; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2127 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2128 if (pw->fs) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2129 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2130 fullscreen_stop(pw->fs); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2131 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2132 else |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2133 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2134 pw->fs = fullscreen_start(pw->window, pw->imd, pan_fullscreen_stop_func, pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2135 pan_image_set_buttons(pw, pw->fs->imd); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2136 g_signal_connect(G_OBJECT(pw->fs->window), "key_press_event", |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2137 G_CALLBACK(pan_window_key_press_cb), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2138 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2139 pw->imd = pw->fs->imd; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2140 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2141 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2142 |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2143 static void pan_window_image_zoom_cb(PixbufRenderer *pr, gdouble zoom, gpointer data) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2144 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2145 PanWindow *pw = data; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2146 gchar *text; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2147 |
27
9c24765c2d3a
Sat Apr 2 17:28:16 2005 John Ellis <johne@verizon.net>
gqview
parents:
24
diff
changeset
|
2148 text = image_zoom_get_as_text(pw->imd); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2149 gtk_label_set_text(GTK_LABEL(pw->label_zoom), text); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2150 g_free(text); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2151 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2152 |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2153 static void pan_window_image_scroll_notify_cb(PixbufRenderer *pr, gpointer data) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2154 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2155 PanWindow *pw = data; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2156 GtkAdjustment *adj; |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2157 GdkRectangle rect; |
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2158 gint width, height; |
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2159 |
29
8a8ec4b3e769
Sun Apr 3 00:36:22 2005 John Ellis <johne@verizon.net>
gqview
parents:
27
diff
changeset
|
2160 if (pr->scale == 0.0) return; |
8a8ec4b3e769
Sun Apr 3 00:36:22 2005 John Ellis <johne@verizon.net>
gqview
parents:
27
diff
changeset
|
2161 |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2162 pixbuf_renderer_get_visible_rect(pr, &rect); |
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2163 pixbuf_renderer_get_image_size(pr, &width, &height); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2164 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2165 adj = gtk_range_get_adjustment(GTK_RANGE(pw->scrollbar_h)); |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2166 adj->page_size = (gdouble)rect.width; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2167 adj->page_increment = adj->page_size / 2.0; |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2168 adj->step_increment = 48.0 / pr->scale; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2169 adj->lower = 0.0; |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2170 adj->upper = MAX((gdouble)width, 1.0); |
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2171 adj->value = (gdouble)rect.x; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2172 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2173 pref_signal_block_data(pw->scrollbar_h, pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2174 gtk_adjustment_changed(adj); |
29
8a8ec4b3e769
Sun Apr 3 00:36:22 2005 John Ellis <johne@verizon.net>
gqview
parents:
27
diff
changeset
|
2175 gtk_adjustment_value_changed(adj); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2176 pref_signal_unblock_data(pw->scrollbar_h, pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2177 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2178 adj = gtk_range_get_adjustment(GTK_RANGE(pw->scrollbar_v)); |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2179 adj->page_size = (gdouble)rect.height; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2180 adj->page_increment = adj->page_size / 2.0; |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2181 adj->step_increment = 48.0 / pr->scale; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2182 adj->lower = 0.0; |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2183 adj->upper = MAX((gdouble)height, 1.0); |
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2184 adj->value = (gdouble)rect.y; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2185 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2186 pref_signal_block_data(pw->scrollbar_v, pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2187 gtk_adjustment_changed(adj); |
29
8a8ec4b3e769
Sun Apr 3 00:36:22 2005 John Ellis <johne@verizon.net>
gqview
parents:
27
diff
changeset
|
2188 gtk_adjustment_value_changed(adj); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2189 pref_signal_unblock_data(pw->scrollbar_v, pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2190 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2191 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2192 static void pan_window_scrollbar_h_value_cb(GtkRange *range, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2193 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2194 PanWindow *pw = data; |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2195 PixbufRenderer *pr; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2196 gint x; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2197 |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2198 pr = PIXBUF_RENDERER(pw->imd_normal->pr); |
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2199 |
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2200 if (!pr->scale) return; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2201 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2202 x = (gint)gtk_range_get_value(range); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2203 |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2204 pixbuf_renderer_scroll_to_point(pr, x, (gint)((gdouble)pr->y_scroll / pr->scale), 0.0, 0.0); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2205 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2206 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2207 static void pan_window_scrollbar_v_value_cb(GtkRange *range, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2208 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2209 PanWindow *pw = data; |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2210 PixbufRenderer *pr; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2211 gint y; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2212 |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2213 pr = PIXBUF_RENDERER(pw->imd_normal->pr); |
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2214 |
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2215 if (!pr->scale) return; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2216 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2217 y = (gint)gtk_range_get_value(range); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2218 |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2219 pixbuf_renderer_scroll_to_point(pr, (gint)((gdouble)pr->x_scroll / pr->scale), y, 0.0, 0.0); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2220 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2221 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2222 static void pan_window_layout_change_cb(GtkWidget *combo, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2223 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2224 PanWindow *pw = data; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2225 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2226 pw->layout = gtk_combo_box_get_active(GTK_COMBO_BOX(combo)); |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2227 pan_layout_update(pw); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2228 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2229 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2230 static void pan_window_layout_size_cb(GtkWidget *combo, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2231 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2232 PanWindow *pw = data; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2233 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2234 pw->size = gtk_combo_box_get_active(GTK_COMBO_BOX(combo)); |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2235 pan_layout_update(pw); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2236 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2237 |
56
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2238 #if 0 |
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2239 static void pan_window_date_toggle_cb(GtkWidget *button, gpointer data) |
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2240 { |
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2241 PanWindow *pw = data; |
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2242 |
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2243 pw->exif_date_enable = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)); |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2244 pan_layout_update(pw); |
56
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2245 } |
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2246 #endif |
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2247 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2248 static void pan_window_entry_activate_cb(const gchar *new_text, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2249 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2250 PanWindow *pw = data; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2251 gchar *path; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2252 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2253 path = remove_trailing_slash(new_text); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2254 parse_out_relatives(path); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2255 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2256 if (!isdir(path)) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2257 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2258 warning_dialog(_("Folder not found"), |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2259 _("The entered path is not a folder"), |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2260 GTK_STOCK_DIALOG_WARNING, pw->path_entry); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2261 } |
37
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
2262 else |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
2263 { |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
2264 tab_completion_append_to_history(pw->path_entry, path); |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
2265 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2266 pan_layout_set_path(pw, path); |
37
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
2267 } |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
2268 |
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
2269 g_free(path); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2270 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2271 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2272 static void pan_window_entry_change_cb(GtkWidget *combo, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2273 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2274 PanWindow *pw = data; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2275 gchar *text; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2276 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2277 if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)) < 0) return; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2278 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2279 text = g_strdup(gtk_entry_get_text(GTK_ENTRY(pw->path_entry))); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2280 pan_window_entry_activate_cb(text, pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2281 g_free(text); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2282 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2283 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2284 static void pan_window_close(PanWindow *pw) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2285 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2286 pan_window_list = g_list_remove(pan_window_list, pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2287 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2288 pref_list_int_set(PAN_PREF_GROUP, PAN_PREF_EXIF_PAN_DATE, pw->exif_date_enable); |
102
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
2289 pref_list_int_set(PAN_PREF_GROUP, PAN_PREF_INFO_IMAGE, pw->info_image_size); |
95
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2290 pref_list_int_set(PAN_PREF_GROUP, PAN_PREF_INFO_EXIF, pw->info_includes_exif); |
56
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2291 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2292 if (pw->idle_id != -1) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2293 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2294 g_source_remove(pw->idle_id); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2295 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2296 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2297 pan_fullscreen_toggle(pw, TRUE); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2298 gtk_widget_destroy(pw->window); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2299 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2300 pan_window_items_free(pw); |
37
67ba4381497e
Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
36
diff
changeset
|
2301 pan_cache_free(pw); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2302 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2303 g_free(pw->path); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2304 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2305 g_free(pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2306 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2307 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2308 static gint pan_window_delete_cb(GtkWidget *w, GdkEventAny *event, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2309 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2310 PanWindow *pw = data; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2311 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2312 pan_window_close(pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2313 return TRUE; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2314 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2315 |
15
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2316 static void pan_window_new_real(const gchar *path) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2317 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2318 PanWindow *pw; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2319 GtkWidget *vbox; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2320 GtkWidget *box; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2321 GtkWidget *combo; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2322 GtkWidget *hbox; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2323 GtkWidget *frame; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2324 GtkWidget *table; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2325 GdkGeometry geometry; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2326 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2327 pw = g_new0(PanWindow, 1); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2328 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2329 pw->path = g_strdup(path); |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2330 pw->layout = PAN_LAYOUT_TIMELINE; |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2331 pw->size = PAN_IMAGE_SIZE_THUMB_NORMAL; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2332 pw->thumb_size = PAN_THUMB_SIZE_NORMAL; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2333 pw->thumb_gap = PAN_THUMB_GAP_NORMAL; |
35
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
2334 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2335 if (!pref_list_int_get(PAN_PREF_GROUP, PAN_PREF_EXIF_PAN_DATE, &pw->exif_date_enable)) |
56
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2336 { |
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2337 pw->exif_date_enable = FALSE; |
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2338 } |
102
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
2339 if (!pref_list_int_get(PAN_PREF_GROUP, PAN_PREF_INFO_IMAGE, &pw->info_image_size)) |
95
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2340 { |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2341 pw->info_image_size = PAN_IMAGE_SIZE_THUMB_NONE; |
95
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2342 } |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2343 if (!pref_list_int_get(PAN_PREF_GROUP, PAN_PREF_INFO_EXIF, &pw->info_includes_exif)) |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2344 { |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2345 pw->info_includes_exif = TRUE; |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2346 } |
56
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2347 |
40
dcc04a6a58bf
Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents:
39
diff
changeset
|
2348 pw->ignore_symlinks = TRUE; |
dcc04a6a58bf
Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents:
39
diff
changeset
|
2349 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2350 pw->list = NULL; |
35
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
2351 pw->list_static = NULL; |
e46aedb70f67
Fri Apr 8 15:31:38 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
2352 pw->list_grid = NULL; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2353 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2354 pw->fs = NULL; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2355 pw->overlay_id = -1; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2356 pw->idle_id = -1; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2357 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2358 pw->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2359 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2360 geometry.min_width = 8; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2361 geometry.min_height = 8; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2362 gtk_window_set_geometry_hints(GTK_WINDOW(pw->window), NULL, &geometry, GDK_HINT_MIN_SIZE); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2363 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2364 gtk_window_set_resizable(GTK_WINDOW(pw->window), TRUE); |
196 | 2365 gtk_window_set_title (GTK_WINDOW(pw->window), _("Pan View - Geeqie")); |
2366 gtk_window_set_wmclass(GTK_WINDOW(pw->window), "view", "Geeqie"); | |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2367 gtk_container_set_border_width(GTK_CONTAINER(pw->window), 0); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2368 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2369 window_set_icon(pw->window, NULL, NULL); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2370 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2371 vbox = gtk_vbox_new(FALSE, 0); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2372 gtk_container_add(GTK_CONTAINER(pw->window), vbox); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2373 gtk_widget_show(vbox); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2374 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2375 box = pref_box_new(vbox, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2376 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2377 pref_spacer(box, 0); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2378 pref_label_new(box, _("Location:")); |
56
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2379 combo = tab_completion_new_with_history(&pw->path_entry, path, "pan_view_path", -1, |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2380 pan_window_entry_activate_cb, pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2381 g_signal_connect(G_OBJECT(pw->path_entry->parent), "changed", |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2382 G_CALLBACK(pan_window_entry_change_cb), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2383 gtk_box_pack_start(GTK_BOX(box), combo, TRUE, TRUE, 0); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2384 gtk_widget_show(combo); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2385 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2386 combo = gtk_combo_box_new_text(); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2387 gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("Timeline")); |
18
bc5da5b63abd
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
17
diff
changeset
|
2388 gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("Calendar")); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2389 gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("Folders")); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2390 gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("Folders (flower)")); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2391 gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("Grid")); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2392 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2393 gtk_combo_box_set_active(GTK_COMBO_BOX(combo), pw->layout); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2394 g_signal_connect(G_OBJECT(combo), "changed", |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2395 G_CALLBACK(pan_window_layout_change_cb), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2396 gtk_box_pack_start(GTK_BOX(box), combo, FALSE, FALSE, 0); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2397 gtk_widget_show(combo); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2398 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2399 combo = gtk_combo_box_new_text(); |
14
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2400 gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("Dots")); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2401 gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("No Images")); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2402 gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("Small Thumbnails")); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2403 gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("Normal Thumbnails")); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2404 gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("Large Thumbnails")); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2405 gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("1:10 (10%)")); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2406 gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("1:4 (25%)")); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2407 gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("1:3 (33%)")); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2408 gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("1:2 (50%)")); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2409 gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("1:1 (100%)")); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2410 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2411 gtk_combo_box_set_active(GTK_COMBO_BOX(combo), pw->size); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2412 g_signal_connect(G_OBJECT(combo), "changed", |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2413 G_CALLBACK(pan_window_layout_size_cb), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2414 gtk_box_pack_start(GTK_BOX(box), combo, FALSE, FALSE, 0); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2415 gtk_widget_show(combo); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2416 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2417 table = pref_table_new(vbox, 2, 2, FALSE, TRUE); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2418 gtk_table_set_row_spacings(GTK_TABLE(table), 2); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2419 gtk_table_set_col_spacings(GTK_TABLE(table), 2); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2420 |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2421 pw->imd = image_new(TRUE); |
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2422 pw->imd_normal = pw->imd; |
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2423 |
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2424 g_signal_connect(G_OBJECT(pw->imd->pr), "zoom", |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2425 G_CALLBACK(pan_window_image_zoom_cb), pw); |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2426 g_signal_connect(G_OBJECT(pw->imd->pr), "scroll_notify", |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2427 G_CALLBACK(pan_window_image_scroll_notify_cb), pw); |
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2428 |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2429 gtk_table_attach(GTK_TABLE(table), pw->imd->widget, 0, 1, 0, 1, |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2430 GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2431 gtk_widget_show(GTK_WIDGET(pw->imd->widget)); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2432 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2433 pan_window_dnd_init(pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2434 |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2435 pan_image_set_buttons(pw, pw->imd); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2436 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2437 pw->scrollbar_h = gtk_hscrollbar_new(NULL); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2438 g_signal_connect(G_OBJECT(pw->scrollbar_h), "value_changed", |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2439 G_CALLBACK(pan_window_scrollbar_h_value_cb), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2440 gtk_table_attach(GTK_TABLE(table), pw->scrollbar_h, 0, 1, 1, 2, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2441 GTK_FILL | GTK_EXPAND, 0, 0, 0); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2442 gtk_widget_show(pw->scrollbar_h); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2443 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2444 pw->scrollbar_v = gtk_vscrollbar_new(NULL); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2445 g_signal_connect(G_OBJECT(pw->scrollbar_v), "value_changed", |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2446 G_CALLBACK(pan_window_scrollbar_v_value_cb), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2447 gtk_table_attach(GTK_TABLE(table), pw->scrollbar_v, 1, 2, 0, 1, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2448 0, GTK_FILL | GTK_EXPAND, 0, 0); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2449 gtk_widget_show(pw->scrollbar_v); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2450 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2451 /* find bar */ |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2452 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2453 pw->search_box = gtk_hbox_new(FALSE, PREF_PAD_SPACE); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2454 gtk_box_pack_start(GTK_BOX(vbox), pw->search_box, FALSE, FALSE, 2); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2455 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2456 pref_spacer(pw->search_box, 0); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2457 pref_label_new(pw->search_box, _("Find:")); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2458 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2459 hbox = gtk_hbox_new(TRUE, PREF_PAD_SPACE); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2460 gtk_box_pack_start(GTK_BOX(pw->search_box), hbox, TRUE, TRUE, 0); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2461 gtk_widget_show(hbox); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2462 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2463 combo = tab_completion_new_with_history(&pw->search_entry, "", "pan_view_search", -1, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2464 pan_search_activate_cb, pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2465 gtk_box_pack_start(GTK_BOX(hbox), combo, TRUE, TRUE, 0); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2466 gtk_widget_show(combo); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2467 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2468 pw->search_label = gtk_label_new(""); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2469 gtk_box_pack_start(GTK_BOX(hbox), pw->search_label, TRUE, TRUE, 0); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2470 gtk_widget_show(pw->search_label); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2471 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2472 /* status bar */ |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2473 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2474 box = pref_box_new(vbox, FALSE, GTK_ORIENTATION_HORIZONTAL, 0); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2475 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2476 frame = gtk_frame_new(NULL); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2477 gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2478 gtk_widget_set_size_request(frame, ZOOM_LABEL_WIDTH, -1); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2479 gtk_box_pack_start(GTK_BOX(box), frame, TRUE, TRUE, 0); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2480 gtk_widget_show(frame); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2481 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2482 hbox = gtk_hbox_new(FALSE, PREF_PAD_SPACE); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2483 gtk_container_add(GTK_CONTAINER(frame), hbox); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2484 gtk_widget_show(hbox); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2485 |
14
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2486 pref_spacer(hbox, 0); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2487 pw->label_message = pref_label_new(hbox, ""); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2488 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2489 frame = gtk_frame_new(NULL); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2490 gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2491 gtk_widget_set_size_request(frame, ZOOM_LABEL_WIDTH, -1); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2492 gtk_box_pack_end(GTK_BOX(box), frame, FALSE, FALSE, 0); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2493 gtk_widget_show(frame); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2494 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2495 pw->label_zoom = gtk_label_new(""); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2496 gtk_container_add(GTK_CONTAINER(frame), pw->label_zoom); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2497 gtk_widget_show(pw->label_zoom); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2498 |
56
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2499 #if 0 |
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2500 pw->date_button = pref_checkbox_new(box, _("Use Exif date"), pw->exif_date_enable, |
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2501 G_CALLBACK(pan_window_date_toggle_cb), pw); |
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2502 #endif |
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2503 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2504 pw->search_button = gtk_toggle_button_new(); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2505 gtk_button_set_relief(GTK_BUTTON(pw->search_button), GTK_RELIEF_NONE); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2506 gtk_button_set_focus_on_click(GTK_BUTTON(pw->search_button), FALSE); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2507 hbox = gtk_hbox_new(FALSE, PREF_PAD_GAP); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2508 gtk_container_add(GTK_CONTAINER(pw->search_button), hbox); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2509 gtk_widget_show(hbox); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2510 pw->search_button_arrow = gtk_arrow_new(GTK_ARROW_UP, GTK_SHADOW_NONE); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2511 gtk_box_pack_start(GTK_BOX(hbox), pw->search_button_arrow, FALSE, FALSE, 0); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2512 gtk_widget_show(pw->search_button_arrow); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2513 pref_label_new(hbox, _("Find")); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2514 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2515 gtk_box_pack_end(GTK_BOX(box), pw->search_button, FALSE, FALSE, 0); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2516 gtk_widget_show(pw->search_button); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2517 g_signal_connect(G_OBJECT(pw->search_button), "clicked", |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2518 G_CALLBACK(pan_search_toggle_cb), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2519 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2520 g_signal_connect(G_OBJECT(pw->window), "delete_event", |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2521 G_CALLBACK(pan_window_delete_cb), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2522 g_signal_connect(G_OBJECT(pw->window), "key_press_event", |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2523 G_CALLBACK(pan_window_key_press_cb), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2524 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2525 gtk_window_set_default_size(GTK_WINDOW(pw->window), PAN_WINDOW_DEFAULT_WIDTH, PAN_WINDOW_DEFAULT_HEIGHT); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2526 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2527 pan_layout_update(pw); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2528 |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2529 gtk_widget_grab_focus(GTK_WIDGET(pw->imd->widget)); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2530 gtk_widget_show(pw->window); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2531 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2532 pan_window_list = g_list_append(pan_window_list, pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2533 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2534 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2535 /* |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2536 *----------------------------------------------------------------------------- |
15
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2537 * peformance warnings |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2538 *----------------------------------------------------------------------------- |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2539 */ |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2540 |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2541 static void pan_warning_ok_cb(GenericDialog *gd, gpointer data) |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2542 { |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2543 gchar *path = data; |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2544 |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2545 generic_dialog_close(gd); |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2546 |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2547 pan_window_new_real(path); |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2548 g_free(path); |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2549 } |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2550 |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2551 static void pan_warning_hide_cb(GtkWidget *button, gpointer data) |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2552 { |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2553 gint hide_dlg; |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2554 |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2555 hide_dlg = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)); |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2556 pref_list_int_set(PAN_PREF_GROUP, PAN_PREF_HIDE_WARNING, hide_dlg); |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2557 } |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2558 |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2559 static gint pan_warning(const gchar *path) |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2560 { |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2561 GenericDialog *gd; |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2562 GtkWidget *box; |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2563 GtkWidget *group; |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2564 GtkWidget *button; |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2565 GtkWidget *ct_button; |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2566 gint hide_dlg; |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2567 |
40
dcc04a6a58bf
Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents:
39
diff
changeset
|
2568 if (path && strcmp(path, "/") == 0) |
dcc04a6a58bf
Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents:
39
diff
changeset
|
2569 { |
dcc04a6a58bf
Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents:
39
diff
changeset
|
2570 pan_warning_folder(path, NULL); |
dcc04a6a58bf
Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents:
39
diff
changeset
|
2571 return TRUE; |
dcc04a6a58bf
Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents:
39
diff
changeset
|
2572 } |
dcc04a6a58bf
Sat Apr 16 12:29:42 2005 John Ellis <johne@verizon.net>
gqview
parents:
39
diff
changeset
|
2573 |
15
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2574 if (enable_thumb_caching && |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2575 thumbnail_spec_standard) return FALSE; |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2576 |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2577 if (!pref_list_int_get(PAN_PREF_GROUP, PAN_PREF_HIDE_WARNING, &hide_dlg)) hide_dlg = FALSE; |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2578 if (hide_dlg) return FALSE; |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2579 |
196 | 2580 gd = generic_dialog_new(_("Pan View Performance"), "Geeqie", "pan_view_warning", NULL, FALSE, |
15
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2581 NULL, NULL); |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2582 gd->data = g_strdup(path); |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2583 generic_dialog_add_button(gd, GTK_STOCK_OK, NULL, |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2584 pan_warning_ok_cb, TRUE); |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2585 |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2586 box = generic_dialog_add_message(gd, GTK_STOCK_DIALOG_INFO, |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2587 _("Pan view performance may be poor."), |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2588 _("To improve performance of thumbnails in the pan view the" |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2589 " following options can be enabled. Note that both options" |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2590 " must be enabled to notice a change in performance.")); |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2591 |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2592 group = pref_box_new(box, FALSE, GTK_ORIENTATION_HORIZONTAL, 0); |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2593 pref_spacer(group, PREF_PAD_INDENT); |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2594 group = pref_box_new(group, TRUE, GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP); |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2595 |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2596 ct_button = pref_checkbox_new_int(group, _("Cache thumbnails"), |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2597 enable_thumb_caching, &enable_thumb_caching); |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2598 button = pref_checkbox_new_int(group, _("Use shared thumbnail cache"), |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2599 thumbnail_spec_standard, &thumbnail_spec_standard); |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2600 pref_checkbox_link_sensitivity(ct_button, button); |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2601 |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2602 pref_line(box, 0); |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2603 |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2604 pref_checkbox_new(box, _("Do not show this dialog again"), hide_dlg, |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2605 G_CALLBACK(pan_warning_hide_cb), NULL); |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2606 |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2607 gtk_widget_show(gd->dialog); |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2608 |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2609 return TRUE; |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2610 } |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2611 |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2612 |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2613 /* |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2614 *----------------------------------------------------------------------------- |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2615 * entry point |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2616 *----------------------------------------------------------------------------- |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2617 */ |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2618 |
15
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2619 void pan_window_new(const gchar *path) |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2620 { |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2621 if (pan_warning(path)) return; |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2622 |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2623 pan_window_new_real(path); |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2624 } |
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2625 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2626 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2627 /* |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2628 *----------------------------------------------------------------------------- |
15
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2629 * menus |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2630 *----------------------------------------------------------------------------- |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2631 */ |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2632 |
102
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
2633 #define INFO_IMAGE_SIZE_KEY "image_size_data" |
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
2634 |
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
2635 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2636 static void pan_new_window_cb(GtkWidget *widget, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2637 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2638 PanWindow *pw = data; |
138 | 2639 FileData *fd; |
2640 | |
2641 fd = pan_menu_click_fd(pw); | |
2642 if (fd) | |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2643 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2644 pan_fullscreen_toggle(pw, TRUE); |
138 | 2645 view_window_new(fd); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2646 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2647 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2648 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2649 static void pan_edit_cb(GtkWidget *widget, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2650 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2651 PanWindow *pw; |
138 | 2652 FileData *fd; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2653 gint n; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2654 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2655 pw = submenu_item_get_data(widget); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2656 n = GPOINTER_TO_INT(data); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2657 if (!pw) return; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2658 |
138 | 2659 fd = pan_menu_click_fd(pw); |
2660 if (fd) | |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2661 { |
60
9c0c402b0ef3
Mon Jun 13 17:31:46 2005 John Ellis <johne@verizon.net>
gqview
parents:
56
diff
changeset
|
2662 if (!editor_window_flag_set(n)) |
9c0c402b0ef3
Mon Jun 13 17:31:46 2005 John Ellis <johne@verizon.net>
gqview
parents:
56
diff
changeset
|
2663 { |
9c0c402b0ef3
Mon Jun 13 17:31:46 2005 John Ellis <johne@verizon.net>
gqview
parents:
56
diff
changeset
|
2664 pan_fullscreen_toggle(pw, TRUE); |
9c0c402b0ef3
Mon Jun 13 17:31:46 2005 John Ellis <johne@verizon.net>
gqview
parents:
56
diff
changeset
|
2665 } |
138 | 2666 start_editor_from_file(n, fd); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2667 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2668 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2669 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2670 static void pan_info_cb(GtkWidget *widget, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2671 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2672 PanWindow *pw = data; |
138 | 2673 FileData *fd; |
2674 | |
2675 fd = pan_menu_click_fd(pw); | |
2676 if (fd) info_window_new(fd, NULL); | |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2677 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2678 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2679 static void pan_zoom_in_cb(GtkWidget *widget, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2680 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2681 PanWindow *pw = data; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2682 |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2683 image_zoom_adjust(pw->imd, ZOOM_INCREMENT); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2684 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2685 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2686 static void pan_zoom_out_cb(GtkWidget *widget, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2687 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2688 PanWindow *pw = data; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2689 |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2690 image_zoom_adjust(pw->imd, -ZOOM_INCREMENT); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2691 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2692 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2693 static void pan_zoom_1_1_cb(GtkWidget *widget, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2694 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2695 PanWindow *pw = data; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2696 |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2697 image_zoom_set(pw->imd, 1.0); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2698 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2699 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2700 static void pan_copy_cb(GtkWidget *widget, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2701 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2702 PanWindow *pw = data; |
138 | 2703 FileData *fd; |
2704 | |
2705 fd = pan_menu_click_fd(pw); | |
2706 if (fd) file_util_copy(fd, NULL, NULL, pw->imd->widget); | |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2707 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2708 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2709 static void pan_move_cb(GtkWidget *widget, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2710 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2711 PanWindow *pw = data; |
138 | 2712 FileData *fd; |
2713 | |
2714 fd = pan_menu_click_fd(pw); | |
2715 if (fd) file_util_move(fd, NULL, NULL, pw->imd->widget); | |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2716 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2717 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2718 static void pan_rename_cb(GtkWidget *widget, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2719 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2720 PanWindow *pw = data; |
138 | 2721 FileData *fd; |
2722 | |
2723 fd = pan_menu_click_fd(pw); | |
2724 if (fd) file_util_rename(fd, NULL, pw->imd->widget); | |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2725 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2726 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2727 static void pan_delete_cb(GtkWidget *widget, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2728 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2729 PanWindow *pw = data; |
138 | 2730 FileData *fd; |
2731 | |
2732 fd = pan_menu_click_fd(pw); | |
2733 if (fd) file_util_delete(fd, NULL, pw->imd->widget); | |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2734 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2735 |
56
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2736 static void pan_exif_date_toggle_cb(GtkWidget *widget, gpointer data) |
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2737 { |
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2738 PanWindow *pw = data; |
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2739 |
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2740 pw->exif_date_enable = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2741 pan_layout_update(pw); |
56
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2742 } |
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2743 |
95
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2744 static void pan_info_toggle_exif_cb(GtkWidget *widget, gpointer data) |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2745 { |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2746 PanWindow *pw = data; |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2747 |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2748 pw->info_includes_exif = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2749 /* fixme: sync info now */ |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2750 } |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2751 |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2752 static void pan_info_toggle_image_cb(GtkWidget *widget, gpointer data) |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2753 { |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2754 PanWindow *pw = data; |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2755 |
102
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
2756 pw->info_image_size = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), INFO_IMAGE_SIZE_KEY)); |
95
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2757 /* fixme: sync info now */ |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2758 } |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2759 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2760 static void pan_fullscreen_cb(GtkWidget *widget, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2761 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2762 PanWindow *pw = data; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2763 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2764 pan_fullscreen_toggle(pw, FALSE); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2765 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2766 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2767 static void pan_close_cb(GtkWidget *widget, gpointer data) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2768 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2769 PanWindow *pw = data; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2770 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2771 pan_window_close(pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2772 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2773 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2774 static GtkWidget *pan_popup_menu(PanWindow *pw) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2775 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2776 GtkWidget *menu; |
102
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
2777 GtkWidget *submenu; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2778 GtkWidget *item; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2779 gint active; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2780 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2781 active = (pw->click_pi != NULL); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2782 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2783 menu = popup_menu_short_lived(); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2784 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2785 menu_item_add_stock(menu, _("Zoom _in"), GTK_STOCK_ZOOM_IN, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2786 G_CALLBACK(pan_zoom_in_cb), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2787 menu_item_add_stock(menu, _("Zoom _out"), GTK_STOCK_ZOOM_OUT, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2788 G_CALLBACK(pan_zoom_out_cb), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2789 menu_item_add_stock(menu, _("Zoom _1:1"), GTK_STOCK_ZOOM_100, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2790 G_CALLBACK(pan_zoom_1_1_cb), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2791 menu_item_add_divider(menu); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2792 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2793 submenu_add_edit(menu, &item, G_CALLBACK(pan_edit_cb), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2794 gtk_widget_set_sensitive(item, active); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2795 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2796 menu_item_add_stock_sensitive(menu, _("_Properties"), GTK_STOCK_PROPERTIES, active, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2797 G_CALLBACK(pan_info_cb), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2798 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2799 menu_item_add_stock_sensitive(menu, _("View in _new window"), GTK_STOCK_NEW, active, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2800 G_CALLBACK(pan_new_window_cb), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2801 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2802 menu_item_add_divider(menu); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2803 menu_item_add_stock_sensitive(menu, _("_Copy..."), GTK_STOCK_COPY, active, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2804 G_CALLBACK(pan_copy_cb), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2805 menu_item_add_sensitive(menu, _("_Move..."), active, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2806 G_CALLBACK(pan_move_cb), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2807 menu_item_add_sensitive(menu, _("_Rename..."), active, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2808 G_CALLBACK(pan_rename_cb), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2809 menu_item_add_stock_sensitive(menu, _("_Delete..."), GTK_STOCK_DELETE, active, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2810 G_CALLBACK(pan_delete_cb), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2811 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2812 menu_item_add_divider(menu); |
56
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2813 item = menu_item_add_check(menu, _("Sort by E_xif date"), pw->exif_date_enable, |
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2814 G_CALLBACK(pan_exif_date_toggle_cb), pw); |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2815 gtk_widget_set_sensitive(item, (pw->layout == PAN_LAYOUT_TIMELINE || pw->layout == PAN_LAYOUT_CALENDAR)); |
56
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2816 |
c722cbf9ad25
Fri Jun 10 02:19:26 2005 John Ellis <johne@verizon.net>
gqview
parents:
40
diff
changeset
|
2817 menu_item_add_divider(menu); |
102
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
2818 |
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
2819 menu_item_add_check(menu, _("_Show Exif information"), pw->info_includes_exif, |
95
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2820 G_CALLBACK(pan_info_toggle_exif_cb), pw); |
102
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
2821 item = menu_item_add(menu, _("Show im_age"), NULL, NULL); |
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
2822 submenu = gtk_menu_new(); |
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
2823 gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), submenu); |
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
2824 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2825 item = menu_item_add_check(submenu, _("_None"), (pw->info_image_size == PAN_IMAGE_SIZE_THUMB_NONE), |
102
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
2826 G_CALLBACK(pan_info_toggle_image_cb), pw); |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2827 g_object_set_data(G_OBJECT(item), INFO_IMAGE_SIZE_KEY, GINT_TO_POINTER(PAN_IMAGE_SIZE_THUMB_NONE)); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2828 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2829 item = menu_item_add_check(submenu, _("_Full size"), (pw->info_image_size == PAN_IMAGE_SIZE_100), |
102
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
2830 G_CALLBACK(pan_info_toggle_image_cb), pw); |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2831 g_object_set_data(G_OBJECT(item), INFO_IMAGE_SIZE_KEY, GINT_TO_POINTER(PAN_IMAGE_SIZE_100)); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2832 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2833 item = menu_item_add_check(submenu, _("1:2 (50%)"), (pw->info_image_size == PAN_IMAGE_SIZE_50), |
102
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
2834 G_CALLBACK(pan_info_toggle_image_cb), pw); |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2835 g_object_set_data(G_OBJECT(item), INFO_IMAGE_SIZE_KEY, GINT_TO_POINTER(PAN_IMAGE_SIZE_50)); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2836 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2837 item = menu_item_add_check(submenu, _("1:3 (33%)"), (pw->info_image_size == PAN_IMAGE_SIZE_33), |
102
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
2838 G_CALLBACK(pan_info_toggle_image_cb), pw); |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2839 g_object_set_data(G_OBJECT(item), INFO_IMAGE_SIZE_KEY, GINT_TO_POINTER(PAN_IMAGE_SIZE_33)); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2840 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2841 item = menu_item_add_check(submenu, _("1:4 (25%)"), (pw->info_image_size == PAN_IMAGE_SIZE_25), |
102
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
2842 G_CALLBACK(pan_info_toggle_image_cb), pw); |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2843 g_object_set_data(G_OBJECT(item), INFO_IMAGE_SIZE_KEY, GINT_TO_POINTER(PAN_IMAGE_SIZE_25)); |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2844 |
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2845 item = menu_item_add_check(submenu, _("1:10 (10%)"), (pw->info_image_size == PAN_IMAGE_SIZE_10), |
102
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
2846 G_CALLBACK(pan_info_toggle_image_cb), pw); |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2847 g_object_set_data(G_OBJECT(item), INFO_IMAGE_SIZE_KEY, GINT_TO_POINTER(PAN_IMAGE_SIZE_10)); |
102
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
2848 |
73443803ea59
Tue Nov 7 19:54:44 2006 John Ellis <johne@verizon.net>
gqview
parents:
99
diff
changeset
|
2849 |
95
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2850 |
eb9bb29cbd65
Fri Nov 3 11:40:48 2006 John Ellis <johne@verizon.net>
gqview
parents:
86
diff
changeset
|
2851 menu_item_add_divider(menu); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2852 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2853 if (pw->fs) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2854 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2855 menu_item_add(menu, _("Exit _full screen"), G_CALLBACK(pan_fullscreen_cb), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2856 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2857 else |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2858 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2859 menu_item_add(menu, _("_Full screen"), G_CALLBACK(pan_fullscreen_cb), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2860 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2861 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2862 menu_item_add_divider(menu); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2863 menu_item_add_stock(menu, _("C_lose window"), GTK_STOCK_CLOSE, G_CALLBACK(pan_close_cb), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2864 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2865 return menu; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2866 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2867 |
105
de64a683d5d0
Thu Nov 9 17:43:06 2006 John Ellis <johne@verizon.net>
gqview
parents:
102
diff
changeset
|
2868 |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2869 /* |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2870 *----------------------------------------------------------------------------- |
15
3263965d5f9e
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
14
diff
changeset
|
2871 * drag and drop |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2872 *----------------------------------------------------------------------------- |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2873 */ |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2874 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2875 static void pan_window_get_dnd_data(GtkWidget *widget, GdkDragContext *context, |
14
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2876 gint x, gint y, |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2877 GtkSelectionData *selection_data, guint info, |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2878 guint time, gpointer data) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2879 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2880 PanWindow *pw = data; |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2881 |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2882 if (gtk_drag_get_source_widget(context) == pw->imd->pr) return; |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2883 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2884 if (info == TARGET_URI_LIST) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2885 { |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2886 GList *list; |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2887 |
138 | 2888 list = uri_filelist_from_text((gchar *)selection_data->data, TRUE); |
2889 if (list && isdir(((FileData *)list->data)->path)) | |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2890 { |
138 | 2891 FileData *fd = list->data; |
2892 | |
2893 pan_layout_set_path(pw, fd->path); | |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2894 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2895 |
138 | 2896 filelist_free(list); |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2897 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2898 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2899 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2900 static void pan_window_set_dnd_data(GtkWidget *widget, GdkDragContext *context, |
14
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2901 GtkSelectionData *selection_data, guint info, |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2902 guint time, gpointer data) |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2903 { |
14
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2904 PanWindow *pw = data; |
138 | 2905 FileData *fd; |
2906 | |
2907 fd = pan_menu_click_fd(pw); | |
2908 if (fd) | |
14
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2909 { |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2910 gchar *text = NULL; |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2911 gint len; |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2912 gint plain_text; |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2913 GList *list; |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2914 |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2915 switch (info) |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2916 { |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2917 case TARGET_URI_LIST: |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2918 plain_text = FALSE; |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2919 break; |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2920 case TARGET_TEXT_PLAIN: |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2921 default: |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2922 plain_text = TRUE; |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2923 break; |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2924 } |
138 | 2925 list = g_list_append(NULL, fd); |
2926 text = uri_text_from_filelist(list, &len, plain_text); | |
14
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2927 g_list_free(list); |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2928 if (text) |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2929 { |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2930 gtk_selection_data_set (selection_data, selection_data->target, |
64
04ff0df3ad2f
Mon Aug 15 17:13:57 2005 John Ellis <johne@verizon.net>
gqview
parents:
60
diff
changeset
|
2931 8, (guchar *)text, len); |
14
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2932 g_free(text); |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2933 } |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2934 } |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2935 else |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2936 { |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2937 gtk_selection_data_set (selection_data, selection_data->target, |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2938 8, NULL, 0); |
25335c62cd9b
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
13
diff
changeset
|
2939 } |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2940 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2941 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2942 static void pan_window_dnd_init(PanWindow *pw) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2943 { |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2944 GtkWidget *widget; |
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2945 |
24
104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
gqview
parents:
23
diff
changeset
|
2946 widget = pw->imd->pr; |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2947 |
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2948 gtk_drag_source_set(widget, GDK_BUTTON2_MASK, |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2949 dnd_file_drag_types, dnd_file_drag_types_count, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2950 GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK); |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2951 g_signal_connect(G_OBJECT(widget), "drag_data_get", |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2952 G_CALLBACK(pan_window_set_dnd_data), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2953 |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2954 gtk_drag_dest_set(widget, |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2955 GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2956 dnd_file_drop_types, dnd_file_drop_types_count, |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2957 GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK); |
23
17acca639a86
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
20
diff
changeset
|
2958 g_signal_connect(G_OBJECT(widget), "drag_data_received", |
12
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2959 G_CALLBACK(pan_window_get_dnd_data), pw); |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2960 } |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2961 |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2962 /* |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2963 *----------------------------------------------------------------------------- |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2964 * maintenance (for rename, move, remove) |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2965 *----------------------------------------------------------------------------- |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2966 */ |
147f4c4b9025
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
gqview
parents:
diff
changeset
|
2967 |