annotate src/slideshow.c @ 33:a41ecbb26a96

Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net> * pan-view.c: Move pixbuf drawing into pixbuf_util.c. * pixbuf-renderer.c: Rename util_clip_region to pr_clip_region to fix namespace conflict with util in pixbuf_util.h. * pixbuf_util.[ch]: Moved pixbuf drawing utils here from pan-view.c ##### Note: GQview CVS on sourceforge is not always up to date, please use ##### ##### an offical release when making enhancements and translation updates. #####
author gqview
date Wed, 06 Apr 2005 10:45:36 +0000
parents d907d608745f
children b3149a34d0dd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
1 /*
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
2 * GQview
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
3 * (C) 2004 John Ellis
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
4 *
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
5 * Author: John Ellis
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
6 *
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
7 * This software is released under the GNU General Public License (GNU GPL).
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
8 * Please read the included file COPYING for more information.
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
9 * This software comes with no warranty of any kind, use at your own risk!
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
10 */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
11
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
12
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
13 #include "gqview.h"
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
14 #include "collect.h"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
15 #include "image.h"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
16 #include "slideshow.h"
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
17
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
18 #include "layout.h"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
19 #include "layout_image.h"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
20 #include "ui_fileops.h"
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
21
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
22
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
23 static void slideshow_timer_reset(SlideShowData *ss, gint reset);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
24
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
25
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
26 void slideshow_free(SlideShowData *ss)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
27 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
28 slideshow_timer_reset(ss, FALSE);
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
29
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
30 if (ss->stop_func) ss->stop_func(ss, ss->stop_data);
3
gqview
parents: 1
diff changeset
31
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
32 if (ss->path_list) path_list_free(ss->path_list);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
33 if (ss->cd) collection_unref(ss->cd);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
34 g_free(ss->layout_path);
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
35
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
36 g_list_free(ss->list);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
37 g_list_free(ss->list_done);
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
38
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
39 g_free(ss->slide_path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
40
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
41 g_free(ss);
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
42 }
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
43
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
44 static GList *generate_list(SlideShowData *ss)
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
45 {
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
46 GList *list = NULL;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
47
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
48 if (ss->from_selection)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
49 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
50 list = layout_selection_list_by_index(ss->layout);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
51 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
52 else
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
53 {
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
54 gint i;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
55 for(i = 0; i < ss->slide_count; i++)
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
56 {
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
57 list = g_list_prepend(list, GINT_TO_POINTER(i));
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
58 }
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
59 list = g_list_reverse(list);
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
60 }
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
61
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
62 return list;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
63 }
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
64
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
65 static GList *generate_random_list(SlideShowData *ss)
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
66 {
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
67 GList *src_list = NULL;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
68 GList *list = NULL;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
69 GList *work;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
70
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
71 src_list = generate_list(ss);
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
72
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
73 while(src_list)
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
74 {
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
75 gint p = (double)rand() / ((double)RAND_MAX + 1.0) * g_list_length(src_list);
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
76 work = g_list_nth(src_list, p);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
77 list = g_list_prepend(list, work->data);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
78 src_list = g_list_remove(src_list, work->data);
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
79 }
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
80
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
81 return list;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
82 }
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
83
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
84 static void slideshow_list_init(SlideShowData *ss, gint start_index)
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
85 {
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
86 if (ss->list_done)
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
87 {
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
88 g_list_free(ss->list_done);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
89 ss->list_done = NULL;
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
90 }
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
91
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
92 if (ss->list) g_list_free(ss->list);
3
gqview
parents: 1
diff changeset
93
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
94 if (slideshow_random)
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
95 {
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
96 ss->list = generate_random_list(ss);
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
97 }
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
98 else
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
99 {
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
100 ss->list = generate_list(ss);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
101 if (start_index >= 0)
3
gqview
parents: 1
diff changeset
102 {
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
103 /* start with specified image by skipping to it */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
104 gint i = 0;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
105
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
106 while(ss->list && i < start_index)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
107 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
108 ss->list_done = g_list_prepend (ss->list_done, ss->list->data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
109 ss->list = g_list_remove(ss->list, ss->list->data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
110 i++;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
111 }
3
gqview
parents: 1
diff changeset
112 }
gqview
parents: 1
diff changeset
113 }
gqview
parents: 1
diff changeset
114 }
gqview
parents: 1
diff changeset
115
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
116 gint slideshow_should_continue(SlideShowData *ss)
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
117 {
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
118 const gchar *imd_path;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
119 const gchar *path;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
120
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
121 imd_path = image_get_path(ss->imd);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
122
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
123 if ( ((imd_path == NULL) != (ss->slide_path == NULL)) ||
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
124 (imd_path && ss->slide_path && strcmp(imd_path, ss->slide_path) != 0) ) return FALSE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
125
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
126 if (ss->path_list) return TRUE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
127
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
128 if (ss->cd)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
129 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
130 if (g_list_length(ss->cd->list) == ss->slide_count)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
131 return TRUE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
132 else
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
133 return FALSE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
134 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
135
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
136 if (!ss->layout) return FALSE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
137 path = layout_get_path(ss->layout);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
138
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
139 if (path && ss->layout_path &&
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
140 strcmp(path, ss->layout_path) == 0)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
141 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
142 if (ss->from_selection && ss->slide_count == layout_selection_count(ss->layout, NULL)) return TRUE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
143 if (!ss->from_selection && ss->slide_count == layout_list_count(ss->layout, NULL)) return TRUE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
144 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
145
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
146 return FALSE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
147 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
148
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
149 static gint slideshow_step(SlideShowData *ss, gint forward)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
150 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
151 gint row;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
152
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
153 if (!slideshow_should_continue(ss))
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
154 {
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
155 return FALSE;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
156 }
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
157
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
158 if (forward)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
159 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
160 if (!ss->list) return TRUE;
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
161
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
162 row = GPOINTER_TO_INT(ss->list->data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
163 ss->list_done = g_list_prepend (ss->list_done, ss->list->data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
164 ss->list = g_list_remove(ss->list, ss->list->data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
165 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
166 else
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
167 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
168 if (!ss->list_done || !ss->list_done->next) return TRUE;
3
gqview
parents: 1
diff changeset
169
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
170 ss->list = g_list_prepend(ss->list, ss->list_done->data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
171 ss->list_done = g_list_remove(ss->list_done, ss->list_done->data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
172 row = GPOINTER_TO_INT(ss->list_done->data);
3
gqview
parents: 1
diff changeset
173 }
gqview
parents: 1
diff changeset
174
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
175 g_free(ss->slide_path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
176 ss->slide_path = NULL;
3
gqview
parents: 1
diff changeset
177
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
178 if (ss->path_list)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
179 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
180 ss->slide_path = g_strdup(g_list_nth_data(ss->path_list, row));
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
181 image_change_path(ss->imd, ss->slide_path, image_zoom_get_default(ss->imd, zoom_mode));
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
182 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
183 else if (ss->cd)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
184 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
185 CollectInfo *info;
3
gqview
parents: 1
diff changeset
186
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
187 info = g_list_nth_data(ss->cd->list, row);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
188 ss->slide_path = g_strdup(info->path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
189
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
190 image_change_from_collection(ss->imd, ss->cd, info, image_zoom_get_default(ss->imd, zoom_mode));
3
gqview
parents: 1
diff changeset
191 }
gqview
parents: 1
diff changeset
192 else
gqview
parents: 1
diff changeset
193 {
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
194 ss->slide_path = g_strdup(layout_list_get_path(ss->layout, row));
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
195
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
196 if (ss->from_selection)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
197 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
198 image_change_path(ss->imd, ss->slide_path, image_zoom_get_default(ss->imd, zoom_mode));
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
199 layout_status_update_info(ss->layout, NULL);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
200 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
201 else
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
202 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
203 layout_image_set_index(ss->layout, row);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
204 }
3
gqview
parents: 1
diff changeset
205 }
gqview
parents: 1
diff changeset
206
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
207 if (!ss->list && slideshow_repeat)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
208 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
209 slideshow_list_init(ss, -1);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
210 }
3
gqview
parents: 1
diff changeset
211
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
212 if (!ss->list)
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
213 {
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
214 return FALSE;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
215 }
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
216
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
217 /* read ahead */
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
218
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
219 if (enable_read_ahead)
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
220 {
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
221 gint r;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
222 if (forward)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
223 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
224 if (!ss->list) return TRUE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
225 r = GPOINTER_TO_INT(ss->list->data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
226 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
227 else
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
228 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
229 if (!ss->list_done || !ss->list_done->next) return TRUE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
230 r = GPOINTER_TO_INT(ss->list_done->next->data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
231 }
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
232
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
233 if (ss->path_list)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
234 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
235 image_prebuffer_set(ss->imd, g_list_nth_data(ss->path_list, r));
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
236 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
237 else if (ss->cd)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
238 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
239 CollectInfo *info;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
240 info = g_list_nth_data(ss->cd->list, r);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
241 if (info) image_prebuffer_set(ss->imd, info->path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
242 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
243 else if (ss->from_selection)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
244 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
245 image_prebuffer_set(ss->imd, layout_list_get_path(ss->layout, r));
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
246 }
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
247 }
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
248
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
249 return TRUE;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
250 }
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
251
3
gqview
parents: 1
diff changeset
252 static gint slideshow_loop_cb(gpointer data)
gqview
parents: 1
diff changeset
253 {
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
254 SlideShowData *ss = data;
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
255
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
256 if (ss->paused) return TRUE;
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
257
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
258 if (!slideshow_step(ss, TRUE))
3
gqview
parents: 1
diff changeset
259 {
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
260 ss->timeout_id = -1;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
261 slideshow_free(ss);
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
262 return FALSE;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
263 }
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
264
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
265 return TRUE;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
266 }
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
267
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
268 static void slideshow_timer_reset(SlideShowData *ss, gint reset)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
269 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
270 if (reset)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
271 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
272 if (slideshow_delay < 1) slideshow_delay = 1;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
273
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
274 if (ss->timeout_id != -1) g_source_remove(ss->timeout_id);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
275 ss->timeout_id = g_timeout_add(slideshow_delay * 1000 / SLIDESHOW_SUBSECOND_PRECISION,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
276 slideshow_loop_cb, ss);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
277 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
278 else if (ss->timeout_id != -1)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
279 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
280 g_source_remove(ss->timeout_id);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
281 ss->timeout_id = -1;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
282 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
283 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
284
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
285 void slideshow_next(SlideShowData *ss)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
286 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
287 if (!slideshow_step(ss, TRUE))
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
288 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
289 slideshow_free(ss);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
290 return;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
291 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
292
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
293 slideshow_timer_reset(ss, TRUE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
294 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
295
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
296 void slideshow_prev(SlideShowData *ss)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
297 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
298 if (!slideshow_step(ss, FALSE))
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
299 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
300 slideshow_free(ss);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
301 return;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
302 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
303
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
304 slideshow_timer_reset(ss, TRUE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
305 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
306
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
307 static SlideShowData *real_slideshow_start(ImageWindow *imd, LayoutWindow *lw,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
308 GList *path_list, gint start_point,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
309 CollectionData *cd, CollectInfo *start_info,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
310 void (*stop_func)(SlideShowData *, gpointer), gpointer stop_data)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
311 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
312 SlideShowData *ss;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
313 gint start_index = -1;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
314
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
315 if (!path_list && !cd && layout_list_count(lw, NULL) < 1) return NULL;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
316
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
317 ss = g_new0(SlideShowData, 1);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
318
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
319 ss->imd = imd;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
320
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
321 ss->path_list = path_list;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
322 ss->cd = cd;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
323 ss->layout = lw;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
324 ss->layout_path = NULL;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
325
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
326 ss->list = NULL;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
327 ss->list_done = NULL;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
328
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
329 ss->from_selection = FALSE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
330
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
331 ss->stop_func = stop_func;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
332 ss->stop_data = stop_data;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
333
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
334 ss->timeout_id = -1;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
335
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
336 ss->paused = FALSE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
337
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
338 if (ss->path_list)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
339 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
340 ss->slide_count = g_list_length(ss->path_list);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
341 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
342 else if (ss->cd)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
343 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
344 collection_ref(ss->cd);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
345 ss->slide_count = g_list_length(ss->cd->list);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
346 if (!slideshow_random && start_info)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
347 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
348 start_index = g_list_index(ss->cd->list, start_info);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
349 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
350 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
351 else
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
352 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
353 /* layout method */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
354
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
355 ss->slide_count = layout_selection_count(ss->layout, NULL);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
356 ss->layout_path = g_strdup(layout_get_path(ss->layout));
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
357 if (ss->slide_count < 2)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
358 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
359 ss->slide_count = layout_list_count(ss->layout, NULL);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
360 if (!slideshow_random && start_point >= 0 && start_point < ss->slide_count)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
361 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
362 start_index = start_point;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
363 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
364 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
365 else
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
366 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
367 ss->from_selection = TRUE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
368 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
369 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
370
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
371 slideshow_list_init(ss, start_index);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
372
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
373 ss->slide_path = g_strdup(image_get_path(ss->imd));
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
374 if (slideshow_step(ss, TRUE))
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
375 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
376 slideshow_timer_reset(ss, TRUE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
377 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
378 else
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
379 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
380 ss = NULL;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
381 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
382
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
383 return ss;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
384 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
385
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
386 SlideShowData *slideshow_start_from_path_list(ImageWindow *imd, GList *list,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
387 void (*stop_func)(SlideShowData *, gpointer), gpointer stop_data)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
388 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
389 return real_slideshow_start(imd, NULL, list, -1, NULL, NULL, stop_func, stop_data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
390 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
391
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
392 SlideShowData *slideshow_start_from_collection(ImageWindow *imd, CollectionData *cd,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
393 void (*stop_func)(SlideShowData *, gpointer), gpointer stop_data,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
394 CollectInfo *start_info)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
395 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
396 return real_slideshow_start(imd, NULL, NULL, -1, cd, start_info, stop_func, stop_data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
397 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
398
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
399 SlideShowData *slideshow_start(ImageWindow *imd, LayoutWindow *lw, gint start_point,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
400 void (*stop_func)(SlideShowData *, gpointer), gpointer stop_data)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
401 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
402 return real_slideshow_start(imd, lw, NULL, start_point, NULL, NULL, stop_func, stop_data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
403 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
404
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
405 gint slideshow_paused(SlideShowData *ss)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
406 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
407 if (!ss) return FALSE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
408
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
409 return ss->paused;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
410 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
411
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
412 void slideshow_pause_set(SlideShowData *ss, gint paused)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
413 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
414 if (!ss) return;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
415
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
416 ss->paused = paused;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
417 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
418
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
419 gint slideshow_pause_toggle(SlideShowData *ss)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
420 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
421 slideshow_pause_set(ss, !slideshow_paused(ss));
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
422 return slideshow_paused(ss);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
423 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
424
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
425