Mercurial > geeqie.yaz
comparison src/layout_image.c @ 1623:66d4bd637fd7
use layout_set_fd() for changing images from a slideshow
- this updates folder and icon in recursive slideshow mode
preserve slideshow on layout change - fixes
https://sourceforge.net/tracker/?func=detail&aid=1998513&group_id=222125&atid=1054680
author | nadvornik |
---|---|
date | Thu, 04 Jun 2009 21:07:03 +0000 |
parents | fee96b7345e8 |
children | 2f733f8c983f |
comparison
equal
deleted
inserted
replaced
1622:fee96b7345e8 | 1623:66d4bd637fd7 |
---|---|
63 LayoutWindow *lw = data; | 63 LayoutWindow *lw = data; |
64 | 64 |
65 /* restore image window */ | 65 /* restore image window */ |
66 lw->image = fs->normal_imd; | 66 lw->image = fs->normal_imd; |
67 | 67 |
68 if (lw->slideshow) | |
69 { | |
70 lw->slideshow->imd = lw->image; | |
71 } | |
72 | |
73 lw->full_screen = NULL; | 68 lw->full_screen = NULL; |
74 } | 69 } |
75 | 70 |
76 void layout_image_full_screen_start(LayoutWindow *lw) | 71 void layout_image_full_screen_start(LayoutWindow *lw) |
77 { | 72 { |
82 lw->full_screen = fullscreen_start(lw->window, lw->image, | 77 lw->full_screen = fullscreen_start(lw->window, lw->image, |
83 layout_image_full_screen_stop_func, lw); | 78 layout_image_full_screen_stop_func, lw); |
84 | 79 |
85 /* set to new image window */ | 80 /* set to new image window */ |
86 lw->image = lw->full_screen->imd; | 81 lw->image = lw->full_screen->imd; |
87 | |
88 if (lw->slideshow) | |
89 { | |
90 lw->slideshow->imd = lw->image; | |
91 } | |
92 | 82 |
93 layout_image_set_buttons(lw); | 83 layout_image_set_buttons(lw); |
94 | 84 |
95 g_signal_connect(G_OBJECT(lw->full_screen->window), "key_press_event", | 85 g_signal_connect(G_OBJECT(lw->full_screen->window), "key_press_event", |
96 G_CALLBACK(layout_key_press_cb), lw); | 86 G_CALLBACK(layout_key_press_cb), lw); |
174 | 164 |
175 cd = image_get_collection(lw->image, &info); | 165 cd = image_get_collection(lw->image, &info); |
176 | 166 |
177 if (cd && info) | 167 if (cd && info) |
178 { | 168 { |
179 lw->slideshow = slideshow_start_from_collection(lw->image, cd, | 169 lw->slideshow = slideshow_start_from_collection(lw, NULL, cd, |
180 layout_image_slideshow_stop_func, lw, info); | 170 layout_image_slideshow_stop_func, lw, info); |
181 } | 171 } |
182 else | 172 else |
183 { | 173 { |
184 lw->slideshow = slideshow_start(lw->image, lw, | 174 lw->slideshow = slideshow_start(lw, |
185 layout_list_get_index(lw, layout_image_get_fd(lw)), | 175 layout_list_get_index(lw, layout_image_get_fd(lw)), |
186 layout_image_slideshow_stop_func, lw); | 176 layout_image_slideshow_stop_func, lw); |
187 } | 177 } |
188 | 178 |
189 layout_status_update_info(lw, NULL); | 179 layout_status_update_info(lw, NULL); |
198 { | 188 { |
199 filelist_free(list); | 189 filelist_free(list); |
200 return; | 190 return; |
201 } | 191 } |
202 | 192 |
203 lw->slideshow = slideshow_start_from_filelist(lw->image, list, | 193 lw->slideshow = slideshow_start_from_filelist(lw, NULL, list, |
204 layout_image_slideshow_stop_func, lw); | 194 layout_image_slideshow_stop_func, lw); |
205 | 195 |
206 layout_status_update_info(lw, NULL); | 196 layout_status_update_info(lw, NULL); |
207 } | 197 } |
208 | 198 |