Mercurial > hg > forks > geeqie
annotate src/slideshow.c @ 2916:ae6cdcd69d9f default tip
Merge with upstream/master.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 14 May 2019 11:46:50 +0300 |
parents | 95606e2192d1 |
children |
rev | line source |
---|---|
1 | 1 /* |
2350
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2185
diff
changeset
|
2 * Copyright (C) 2004 John Ellis |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2185
diff
changeset
|
3 * Copyright (C) 2008 - 2016 The Geeqie Team |
1 | 4 * |
5 * Author: John Ellis | |
6 * | |
2350
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2185
diff
changeset
|
7 * This program is free software; you can redistribute it and/or modify |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2185
diff
changeset
|
8 * it under the terms of the GNU General Public License as published by |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2185
diff
changeset
|
9 * the Free Software Foundation; either version 2 of the License, or |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2185
diff
changeset
|
10 * (at your option) any later version. |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2185
diff
changeset
|
11 * |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2185
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2185
diff
changeset
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2185
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2185
diff
changeset
|
15 * GNU General Public License for more details. |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2185
diff
changeset
|
16 * |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2185
diff
changeset
|
17 * You should have received a copy of the GNU General Public License along |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2185
diff
changeset
|
18 * with this program; if not, write to the Free Software Foundation, Inc., |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2185
diff
changeset
|
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
1 | 20 */ |
21 | |
281 | 22 #include "main.h" |
9 | 23 #include "collect.h" |
24 #include "image.h" | |
25 #include "slideshow.h" | |
586
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
517
diff
changeset
|
26 #include "filedata.h" |
1 | 27 |
9 | 28 #include "layout.h" |
29 #include "layout_image.h" | |
30 #include "ui_fileops.h" | |
1 | 31 |
9 | 32 |
744
5da45c8c2a96
Move code from slideshow_timer_reset() to new slideshow_timer_stop() and simplify calls.
Laurent Monin <geeqie@norz.org>
parents:
736
diff
changeset
|
33 static void slideshow_timer_stop(SlideShowData *ss); |
9 | 34 |
1 | 35 |
9 | 36 void slideshow_free(SlideShowData *ss) |
37 { | |
89
563002fc408b
Sat Oct 28 14:41:10 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
9
diff
changeset
|
38 if (!ss) return; |
563002fc408b
Sat Oct 28 14:41:10 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
9
diff
changeset
|
39 |
744
5da45c8c2a96
Move code from slideshow_timer_reset() to new slideshow_timer_stop() and simplify calls.
Laurent Monin <geeqie@norz.org>
parents:
736
diff
changeset
|
40 slideshow_timer_stop(ss); |
1 | 41 |
9 | 42 if (ss->stop_func) ss->stop_func(ss, ss->stop_data); |
3 | 43 |
138
5be5d1c53016
replaced gchar* path with FileData *fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
119
diff
changeset
|
44 if (ss->filelist) filelist_free(ss->filelist); |
9 | 45 if (ss->cd) collection_unref(ss->cd); |
783
0e45ed008a1c
replaced directory path with FileData* dir_fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
745
diff
changeset
|
46 file_data_unref(ss->dir_fd); |
1 | 47 |
9 | 48 g_list_free(ss->list); |
49 g_list_free(ss->list_done); | |
1 | 50 |
138
5be5d1c53016
replaced gchar* path with FileData *fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
119
diff
changeset
|
51 file_data_unref(ss->slide_fd); |
9 | 52 |
53 g_free(ss); | |
1 | 54 } |
55 | |
9 | 56 static GList *generate_list(SlideShowData *ss) |
1 | 57 { |
58 GList *list = NULL; | |
59 | |
9 | 60 if (ss->from_selection) |
61 { | |
1627
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
62 list = layout_selection_list_by_index(ss->lw); |
9 | 63 } |
64 else | |
1 | 65 { |
736
31d858f3272d
Fix signed vs unsigned warnings.
Laurent Monin <geeqie@norz.org>
parents:
586
diff
changeset
|
66 guint i; |
517
f5faee2a188e
6 for() vs 201 for (): winner is for ().
Laurent Monin <geeqie@norz.org>
parents:
516
diff
changeset
|
67 for (i = 0; i < ss->slide_count; i++) |
1 | 68 { |
69 list = g_list_prepend(list, GINT_TO_POINTER(i)); | |
70 } | |
9 | 71 list = g_list_reverse(list); |
1 | 72 } |
73 | |
74 return list; | |
75 } | |
76 | |
1281
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
77 static void ptr_array_add(gpointer data, GPtrArray *array) |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
78 { |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
79 g_ptr_array_add(array, data); |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
80 } |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
81 |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
82 static void list_prepend(gpointer data, GList **list) |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
83 { |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
84 *list = g_list_prepend(*list, data); |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
85 } |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
86 |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
87 static GPtrArray *generate_ptr_array_from_list(GList *src_list) |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
88 { |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
89 GPtrArray *arr = g_ptr_array_sized_new(g_list_length(src_list)); |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
90 |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
91 g_list_foreach(src_list, (GFunc) ptr_array_add, arr); |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
92 |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
93 return arr; |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
94 } |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
95 |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
96 static void swap(GPtrArray *array, guint index1, guint index2) |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
97 { |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
98 gpointer temp = g_ptr_array_index(array, index1); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2021
diff
changeset
|
99 |
1281
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
100 g_ptr_array_index(array, index1) = g_ptr_array_index(array, index2); |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
101 g_ptr_array_index(array, index2) = temp; |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
102 } |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
103 |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
104 static void ptr_array_random_shuffle(GPtrArray *array) |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
105 { |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
106 guint i; |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
107 for (i = 0; i < array->len; ++i) |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
108 { |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
109 guint p = (double)rand() / ((double)RAND_MAX + 1.0) * array->len; |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
110 swap(array, i, p); |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
111 } |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
112 } |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
113 |
9 | 114 static GList *generate_random_list(SlideShowData *ss) |
1 | 115 { |
1281
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
116 GList *src_list; |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
117 GPtrArray *src_array; |
1 | 118 GList *list = NULL; |
119 | |
9 | 120 src_list = generate_list(ss); |
1281
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
121 src_array = generate_ptr_array_from_list(src_list); |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
122 g_list_free(src_list); |
1 | 123 |
1281
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
124 ptr_array_random_shuffle(src_array); |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
125 g_ptr_array_foreach(src_array, (GFunc) list_prepend, &list); |
6c6d99ead2c9
Speed up random slideshow, startup time decreases from minutes to seconds when amount of images is big. Patch by Kjell Morgenstern.
Laurent Monin <geeqie@norz.org>
parents:
1055
diff
changeset
|
126 g_ptr_array_free(src_array, TRUE); |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2021
diff
changeset
|
127 |
1 | 128 return list; |
129 } | |
130 | |
9 | 131 static void slideshow_list_init(SlideShowData *ss, gint start_index) |
1 | 132 { |
9 | 133 if (ss->list_done) |
1 | 134 { |
9 | 135 g_list_free(ss->list_done); |
136 ss->list_done = NULL; | |
1 | 137 } |
138 | |
9 | 139 if (ss->list) g_list_free(ss->list); |
3 | 140 |
326 | 141 if (options->slideshow.random) |
1 | 142 { |
9 | 143 ss->list = generate_random_list(ss); |
1 | 144 } |
145 else | |
146 { | |
9 | 147 ss->list = generate_list(ss); |
148 if (start_index >= 0) | |
3 | 149 { |
9 | 150 /* start with specified image by skipping to it */ |
151 gint i = 0; | |
152 | |
516
768d10237b88
Convert the minority of while() to while ().
Laurent Monin <geeqie@norz.org>
parents:
513
diff
changeset
|
153 while (ss->list && i < start_index) |
9 | 154 { |
513
6743a5928e09
Remove whitespace between function name and first parenthesis for the sake of consistency. (pass 2)
Laurent Monin <geeqie@norz.org>
parents:
475
diff
changeset
|
155 ss->list_done = g_list_prepend(ss->list_done, ss->list->data); |
9 | 156 ss->list = g_list_remove(ss->list, ss->list->data); |
157 i++; | |
158 } | |
3 | 159 } |
160 } | |
161 } | |
162 | |
1446 | 163 gboolean slideshow_should_continue(SlideShowData *ss) |
1 | 164 { |
138
5be5d1c53016
replaced gchar* path with FileData *fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
119
diff
changeset
|
165 FileData *imd_fd; |
783
0e45ed008a1c
replaced directory path with FileData* dir_fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
745
diff
changeset
|
166 FileData *dir_fd; |
9 | 167 |
89
563002fc408b
Sat Oct 28 14:41:10 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
9
diff
changeset
|
168 if (!ss) return FALSE; |
563002fc408b
Sat Oct 28 14:41:10 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
9
diff
changeset
|
169 |
1627
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
170 if (ss->lw) |
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
171 imd_fd = layout_image_get_fd(ss->lw); |
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
172 else |
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
173 imd_fd = image_get_fd(ss->imd); |
9 | 174 |
138
5be5d1c53016
replaced gchar* path with FileData *fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
119
diff
changeset
|
175 if ( ((imd_fd == NULL) != (ss->slide_fd == NULL)) || |
5be5d1c53016
replaced gchar* path with FileData *fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
119
diff
changeset
|
176 (imd_fd && ss->slide_fd && imd_fd != ss->slide_fd) ) return FALSE; |
9 | 177 |
138
5be5d1c53016
replaced gchar* path with FileData *fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
119
diff
changeset
|
178 if (ss->filelist) return TRUE; |
9 | 179 |
180 if (ss->cd) | |
181 { | |
182 if (g_list_length(ss->cd->list) == ss->slide_count) | |
183 return TRUE; | |
184 else | |
185 return FALSE; | |
186 } | |
187 | |
1627
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
188 dir_fd = ss->lw->dir_fd; |
9 | 189 |
783
0e45ed008a1c
replaced directory path with FileData* dir_fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
745
diff
changeset
|
190 if (dir_fd && ss->dir_fd && dir_fd == ss->dir_fd) |
9 | 191 { |
1627
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
192 if (ss->from_selection && ss->slide_count == layout_selection_count(ss->lw, NULL)) return TRUE; |
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
193 if (!ss->from_selection && ss->slide_count == layout_list_count(ss->lw, NULL)) return TRUE; |
9 | 194 } |
195 | |
196 return FALSE; | |
197 } | |
198 | |
1446 | 199 static gboolean slideshow_step(SlideShowData *ss, gboolean forward) |
9 | 200 { |
201 gint row; | |
202 | |
203 if (!slideshow_should_continue(ss)) | |
1 | 204 { |
205 return FALSE; | |
206 } | |
207 | |
9 | 208 if (forward) |
209 { | |
210 if (!ss->list) return TRUE; | |
1 | 211 |
9 | 212 row = GPOINTER_TO_INT(ss->list->data); |
513
6743a5928e09
Remove whitespace between function name and first parenthesis for the sake of consistency. (pass 2)
Laurent Monin <geeqie@norz.org>
parents:
475
diff
changeset
|
213 ss->list_done = g_list_prepend(ss->list_done, ss->list->data); |
9 | 214 ss->list = g_list_remove(ss->list, ss->list->data); |
215 } | |
216 else | |
217 { | |
218 if (!ss->list_done || !ss->list_done->next) return TRUE; | |
3 | 219 |
9 | 220 ss->list = g_list_prepend(ss->list, ss->list_done->data); |
221 ss->list_done = g_list_remove(ss->list_done, ss->list_done->data); | |
222 row = GPOINTER_TO_INT(ss->list_done->data); | |
3 | 223 } |
224 | |
138
5be5d1c53016
replaced gchar* path with FileData *fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
119
diff
changeset
|
225 file_data_unref(ss->slide_fd); |
5be5d1c53016
replaced gchar* path with FileData *fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
119
diff
changeset
|
226 ss->slide_fd = NULL; |
3 | 227 |
138
5be5d1c53016
replaced gchar* path with FileData *fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
119
diff
changeset
|
228 if (ss->filelist) |
9 | 229 { |
138
5be5d1c53016
replaced gchar* path with FileData *fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
119
diff
changeset
|
230 ss->slide_fd = file_data_ref((FileData *)g_list_nth_data(ss->filelist, row)); |
1627
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
231 if (ss->lw) |
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
232 layout_set_fd(ss->lw, ss->slide_fd); |
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
233 else |
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
234 image_change_fd(ss->imd, ss->slide_fd, image_zoom_get_default(ss->imd)); |
9 | 235 } |
236 else if (ss->cd) | |
237 { | |
238 CollectInfo *info; | |
3 | 239 |
9 | 240 info = g_list_nth_data(ss->cd->list, row); |
138
5be5d1c53016
replaced gchar* path with FileData *fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
119
diff
changeset
|
241 ss->slide_fd = file_data_ref(info->fd); |
9 | 242 |
1627
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
243 if (ss->lw) |
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
244 image_change_from_collection(ss->lw->image, ss->cd, info, image_zoom_get_default(ss->lw->image)); |
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
245 else |
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
246 image_change_from_collection(ss->imd, ss->cd, info, image_zoom_get_default(ss->imd)); |
3 | 247 } |
248 else | |
249 { | |
1627
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
250 ss->slide_fd = file_data_ref(layout_list_get_fd(ss->lw, row)); |
9 | 251 |
252 if (ss->from_selection) | |
253 { | |
1627
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
254 layout_set_fd(ss->lw, ss->slide_fd); |
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
255 layout_status_update_info(ss->lw, NULL); |
9 | 256 } |
257 else | |
258 { | |
1627
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
259 layout_image_set_index(ss->lw, row); |
9 | 260 } |
3 | 261 } |
262 | |
326 | 263 if (!ss->list && options->slideshow.repeat) |
9 | 264 { |
265 slideshow_list_init(ss, -1); | |
266 } | |
3 | 267 |
9 | 268 if (!ss->list) |
1 | 269 { |
270 return FALSE; | |
271 } | |
272 | |
9 | 273 /* read ahead */ |
1627
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
274 if (options->image.enable_read_ahead && (!ss->lw || ss->from_selection)) |
1 | 275 { |
9 | 276 gint r; |
277 if (forward) | |
278 { | |
279 if (!ss->list) return TRUE; | |
280 r = GPOINTER_TO_INT(ss->list->data); | |
281 } | |
282 else | |
283 { | |
284 if (!ss->list_done || !ss->list_done->next) return TRUE; | |
285 r = GPOINTER_TO_INT(ss->list_done->next->data); | |
286 } | |
1 | 287 |
138
5be5d1c53016
replaced gchar* path with FileData *fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
119
diff
changeset
|
288 if (ss->filelist) |
9 | 289 { |
138
5be5d1c53016
replaced gchar* path with FileData *fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
119
diff
changeset
|
290 image_prebuffer_set(ss->imd, g_list_nth_data(ss->filelist, r)); |
9 | 291 } |
292 else if (ss->cd) | |
293 { | |
294 CollectInfo *info; | |
295 info = g_list_nth_data(ss->cd->list, r); | |
138
5be5d1c53016
replaced gchar* path with FileData *fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
119
diff
changeset
|
296 if (info) image_prebuffer_set(ss->imd, info->fd); |
9 | 297 } |
298 else if (ss->from_selection) | |
299 { | |
1627
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
300 image_prebuffer_set(ss->lw->image, layout_list_get_fd(ss->lw, r)); |
9 | 301 } |
1 | 302 } |
303 | |
304 return TRUE; | |
305 } | |
306 | |
2590
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2350
diff
changeset
|
307 static void slideshow_timer_reset(SlideShowData *ss); |
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2350
diff
changeset
|
308 |
1446 | 309 static gboolean slideshow_loop_cb(gpointer data) |
3 | 310 { |
9 | 311 SlideShowData *ss = data; |
1 | 312 |
9 | 313 if (ss->paused) return TRUE; |
1 | 314 |
9 | 315 if (!slideshow_step(ss, TRUE)) |
3 | 316 { |
1523
e52aabe8fc7a
Fix up event source ids type: gint -> guint.
Laurent Monin <geeqie@norz.org>
parents:
1446
diff
changeset
|
317 ss->timeout_id = 0; |
9 | 318 slideshow_free(ss); |
1 | 319 return FALSE; |
320 } | |
321 | |
2590
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2350
diff
changeset
|
322 /* Check if the user has changed the timer interval */ |
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2350
diff
changeset
|
323 slideshow_timer_reset(ss); |
95606e2192d1
Fix #278: Shortcut to change time between images in slideshow
Colin Clark <colin.clark@cclark.uk>
parents:
2350
diff
changeset
|
324 |
1 | 325 return TRUE; |
326 } | |
327 | |
744
5da45c8c2a96
Move code from slideshow_timer_reset() to new slideshow_timer_stop() and simplify calls.
Laurent Monin <geeqie@norz.org>
parents:
736
diff
changeset
|
328 static void slideshow_timer_stop(SlideShowData *ss) |
9 | 329 { |
1523
e52aabe8fc7a
Fix up event source ids type: gint -> guint.
Laurent Monin <geeqie@norz.org>
parents:
1446
diff
changeset
|
330 if (!ss->timeout_id) return; |
744
5da45c8c2a96
Move code from slideshow_timer_reset() to new slideshow_timer_stop() and simplify calls.
Laurent Monin <geeqie@norz.org>
parents:
736
diff
changeset
|
331 |
5da45c8c2a96
Move code from slideshow_timer_reset() to new slideshow_timer_stop() and simplify calls.
Laurent Monin <geeqie@norz.org>
parents:
736
diff
changeset
|
332 g_source_remove(ss->timeout_id); |
1523
e52aabe8fc7a
Fix up event source ids type: gint -> guint.
Laurent Monin <geeqie@norz.org>
parents:
1446
diff
changeset
|
333 ss->timeout_id = 0; |
744
5da45c8c2a96
Move code from slideshow_timer_reset() to new slideshow_timer_stop() and simplify calls.
Laurent Monin <geeqie@norz.org>
parents:
736
diff
changeset
|
334 } |
9 | 335 |
744
5da45c8c2a96
Move code from slideshow_timer_reset() to new slideshow_timer_stop() and simplify calls.
Laurent Monin <geeqie@norz.org>
parents:
736
diff
changeset
|
336 static void slideshow_timer_reset(SlideShowData *ss) |
5da45c8c2a96
Move code from slideshow_timer_reset() to new slideshow_timer_stop() and simplify calls.
Laurent Monin <geeqie@norz.org>
parents:
736
diff
changeset
|
337 { |
5da45c8c2a96
Move code from slideshow_timer_reset() to new slideshow_timer_stop() and simplify calls.
Laurent Monin <geeqie@norz.org>
parents:
736
diff
changeset
|
338 if (options->slideshow.delay < 1) options->slideshow.delay = 1; |
5da45c8c2a96
Move code from slideshow_timer_reset() to new slideshow_timer_stop() and simplify calls.
Laurent Monin <geeqie@norz.org>
parents:
736
diff
changeset
|
339 |
1523
e52aabe8fc7a
Fix up event source ids type: gint -> guint.
Laurent Monin <geeqie@norz.org>
parents:
1446
diff
changeset
|
340 if (ss->timeout_id) g_source_remove(ss->timeout_id); |
744
5da45c8c2a96
Move code from slideshow_timer_reset() to new slideshow_timer_stop() and simplify calls.
Laurent Monin <geeqie@norz.org>
parents:
736
diff
changeset
|
341 ss->timeout_id = g_timeout_add(options->slideshow.delay * 1000 / SLIDESHOW_SUBSECOND_PRECISION, |
5da45c8c2a96
Move code from slideshow_timer_reset() to new slideshow_timer_stop() and simplify calls.
Laurent Monin <geeqie@norz.org>
parents:
736
diff
changeset
|
342 slideshow_loop_cb, ss); |
9 | 343 } |
344 | |
745
9f6c4988ce30
slideshow_next(), slideshow_prev(): move code to common slideshow_move(), reducing code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
744
diff
changeset
|
345 static void slideshow_move(SlideShowData *ss, gboolean forward) |
9 | 346 { |
89
563002fc408b
Sat Oct 28 14:41:10 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
9
diff
changeset
|
347 if (!ss) return; |
563002fc408b
Sat Oct 28 14:41:10 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
9
diff
changeset
|
348 |
745
9f6c4988ce30
slideshow_next(), slideshow_prev(): move code to common slideshow_move(), reducing code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
744
diff
changeset
|
349 if (!slideshow_step(ss, forward)) |
9 | 350 { |
351 slideshow_free(ss); | |
352 return; | |
353 } | |
354 | |
744
5da45c8c2a96
Move code from slideshow_timer_reset() to new slideshow_timer_stop() and simplify calls.
Laurent Monin <geeqie@norz.org>
parents:
736
diff
changeset
|
355 slideshow_timer_reset(ss); |
9 | 356 } |
357 | |
745
9f6c4988ce30
slideshow_next(), slideshow_prev(): move code to common slideshow_move(), reducing code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
744
diff
changeset
|
358 void slideshow_next(SlideShowData *ss) |
9f6c4988ce30
slideshow_next(), slideshow_prev(): move code to common slideshow_move(), reducing code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
744
diff
changeset
|
359 { |
9f6c4988ce30
slideshow_next(), slideshow_prev(): move code to common slideshow_move(), reducing code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
744
diff
changeset
|
360 slideshow_move(ss, TRUE); |
9f6c4988ce30
slideshow_next(), slideshow_prev(): move code to common slideshow_move(), reducing code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
744
diff
changeset
|
361 } |
9f6c4988ce30
slideshow_next(), slideshow_prev(): move code to common slideshow_move(), reducing code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
744
diff
changeset
|
362 |
9 | 363 void slideshow_prev(SlideShowData *ss) |
364 { | |
745
9f6c4988ce30
slideshow_next(), slideshow_prev(): move code to common slideshow_move(), reducing code redundancy.
Laurent Monin <geeqie@norz.org>
parents:
744
diff
changeset
|
365 slideshow_move(ss, FALSE); |
9 | 366 } |
367 | |
1627
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
368 static SlideShowData *real_slideshow_start(LayoutWindow *target_lw, ImageWindow *imd, |
138
5be5d1c53016
replaced gchar* path with FileData *fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
119
diff
changeset
|
369 GList *filelist, gint start_point, |
9 | 370 CollectionData *cd, CollectInfo *start_info, |
371 void (*stop_func)(SlideShowData *, gpointer), gpointer stop_data) | |
372 { | |
373 SlideShowData *ss; | |
374 gint start_index = -1; | |
375 | |
1627
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
376 if (!filelist && !cd && layout_list_count(target_lw, NULL) < 1) return NULL; |
9 | 377 |
378 ss = g_new0(SlideShowData, 1); | |
379 | |
1627
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
380 ss->lw = target_lw; |
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
381 ss->imd = imd; /* FIXME: ss->imd is used only for img-view.c and can be dropped with it */ |
138
5be5d1c53016
replaced gchar* path with FileData *fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
119
diff
changeset
|
382 ss->filelist = filelist; |
9 | 383 ss->cd = cd; |
384 | |
138
5be5d1c53016
replaced gchar* path with FileData *fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
119
diff
changeset
|
385 if (ss->filelist) |
9 | 386 { |
138
5be5d1c53016
replaced gchar* path with FileData *fd
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
119
diff
changeset
|
387 ss->slide_count = g_list_length(ss->filelist); |
9 | 388 } |
389 else if (ss->cd) | |
390 { | |
391 collection_ref(ss->cd); | |
392 ss->slide_count = g_list_length(ss->cd->list); | |
326 | 393 if (!options->slideshow.random && start_info) |
9 | 394 { |
395 start_index = g_list_index(ss->cd->list, start_info); | |
396 } | |
397 } | |
398 else | |
399 { | |
400 /* layout method */ | |
401 | |
1627
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
402 ss->slide_count = layout_selection_count(ss->lw, NULL); |
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
403 ss->dir_fd = file_data_ref(ss->lw->dir_fd); |
9 | 404 if (ss->slide_count < 2) |
405 { | |
1627
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
406 ss->slide_count = layout_list_count(ss->lw, NULL); |
736
31d858f3272d
Fix signed vs unsigned warnings.
Laurent Monin <geeqie@norz.org>
parents:
586
diff
changeset
|
407 if (!options->slideshow.random && start_point >= 0 && (guint) start_point < ss->slide_count) |
9 | 408 { |
409 start_index = start_point; | |
410 } | |
411 } | |
412 else | |
413 { | |
414 ss->from_selection = TRUE; | |
415 } | |
416 } | |
417 | |
418 slideshow_list_init(ss, start_index); | |
2185
c14a1d8e6aa4
Trim trailing white spaces on empty lines.
Laurent Monin <zas@norz.org>
parents:
2021
diff
changeset
|
419 |
1627
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
420 if (ss->lw) |
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
421 ss->slide_fd = file_data_ref(layout_image_get_fd(ss->lw)); |
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
422 else |
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
423 ss->slide_fd = file_data_ref(image_get_fd(ss->imd)); |
9 | 424 |
425 if (slideshow_step(ss, TRUE)) | |
426 { | |
744
5da45c8c2a96
Move code from slideshow_timer_reset() to new slideshow_timer_stop() and simplify calls.
Laurent Monin <geeqie@norz.org>
parents:
736
diff
changeset
|
427 slideshow_timer_reset(ss); |
119
2bc92ee6cd29
Thu Nov 30 09:55:42 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
89
diff
changeset
|
428 |
2bc92ee6cd29
Thu Nov 30 09:55:42 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
89
diff
changeset
|
429 ss->stop_func = stop_func; |
2bc92ee6cd29
Thu Nov 30 09:55:42 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
89
diff
changeset
|
430 ss->stop_data = stop_data; |
9 | 431 } |
432 else | |
433 { | |
119
2bc92ee6cd29
Thu Nov 30 09:55:42 2006 John Ellis <johne@verizon.net>
John Ellis <johne@verizon.net>
parents:
89
diff
changeset
|
434 slideshow_free(ss); |
9 | 435 ss = NULL; |
436 } | |
437 | |
438 return ss; | |
439 } | |
440 | |
1627
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
441 SlideShowData *slideshow_start_from_filelist(LayoutWindow *target_lw, ImageWindow *imd, GList *list, |
9 | 442 void (*stop_func)(SlideShowData *, gpointer), gpointer stop_data) |
443 { | |
1627
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
444 return real_slideshow_start(target_lw, imd, list, -1, NULL, NULL, stop_func, stop_data); |
9 | 445 } |
446 | |
1627
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
447 SlideShowData *slideshow_start_from_collection(LayoutWindow *target_lw, ImageWindow *imd, CollectionData *cd, |
9 | 448 void (*stop_func)(SlideShowData *, gpointer), gpointer stop_data, |
449 CollectInfo *start_info) | |
450 { | |
1627
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
451 return real_slideshow_start(target_lw, imd, NULL, -1, cd, start_info, stop_func, stop_data); |
9 | 452 } |
453 | |
1627
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
454 SlideShowData *slideshow_start(LayoutWindow *lw, gint start_point, |
9 | 455 void (*stop_func)(SlideShowData *, gpointer), gpointer stop_data) |
456 { | |
1627
c3778530b075
use layout_set_fd() for changing images from a slideshow
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1523
diff
changeset
|
457 return real_slideshow_start(lw, NULL, NULL, start_point, NULL, NULL, stop_func, stop_data); |
9 | 458 } |
459 | |
1433
12600de4b59a
Use gboolean where applicable, minor cleanup and indentations fixes.
Laurent Monin <geeqie@norz.org>
parents:
1365
diff
changeset
|
460 gboolean slideshow_paused(SlideShowData *ss) |
9 | 461 { |
462 if (!ss) return FALSE; | |
463 | |
464 return ss->paused; | |
465 } | |
466 | |
1433
12600de4b59a
Use gboolean where applicable, minor cleanup and indentations fixes.
Laurent Monin <geeqie@norz.org>
parents:
1365
diff
changeset
|
467 void slideshow_pause_set(SlideShowData *ss, gboolean paused) |
9 | 468 { |
469 if (!ss) return; | |
470 | |
471 ss->paused = paused; | |
472 } | |
473 | |
1433
12600de4b59a
Use gboolean where applicable, minor cleanup and indentations fixes.
Laurent Monin <geeqie@norz.org>
parents:
1365
diff
changeset
|
474 gboolean slideshow_pause_toggle(SlideShowData *ss) |
9 | 475 { |
476 slideshow_pause_set(ss, !slideshow_paused(ss)); | |
477 return slideshow_paused(ss); | |
478 } | |
1055
4bbdfab3c89a
Adding a vim modeline to all files - patch by Klaus Ethgen
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1000
diff
changeset
|
479 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */ |