Mercurial > mplayer.hg
annotate gui/ui/actions.c @ 35527:b89f8ab15c5e
Rebuild GUI directory structure.
Remove obsolete directory ui/gtk/.
author | ib |
---|---|
date | Thu, 06 Dec 2012 14:32:33 +0000 |
parents | e27855a45128 |
children | ab07b17fddfb |
rev | line source |
---|---|
26458 | 1 /* |
2 * This file is part of MPlayer. | |
3 * | |
4 * MPlayer is free software; you can redistribute it and/or modify | |
5 * it under the terms of the GNU General Public License as published by | |
6 * the Free Software Foundation; either version 2 of the License, or | |
7 * (at your option) any later version. | |
8 * | |
9 * MPlayer is distributed in the hope that it will be useful, | |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 * GNU General Public License for more details. | |
13 * | |
14 * You should have received a copy of the GNU General Public License along | |
15 * with MPlayer; if not, write to the Free Software Foundation, Inc., | |
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
17 */ | |
23077 | 18 |
35437 | 19 /** |
20 * @file | |
21 * @brief User interface actions | |
22 */ | |
23 | |
23077 | 24 #include <stdlib.h> |
25 #include <string.h> | |
26 | |
33556 | 27 #include "actions.h" |
32881 | 28 #include "gmplayer.h" |
35525 | 29 #include "gui/app/app.h" |
30 #include "gui/app/gui.h" | |
32881 | 31 #include "gui/interface.h" |
32 #include "gui/skin/skin.h" | |
33742
e1539e14d60f
Move purely list related parts of gtkSet() from interface.c to list.c.
ib
parents:
33740
diff
changeset
|
33 #include "gui/util/list.h" |
33739 | 34 #include "gui/util/mem.h" |
33737 | 35 #include "gui/util/string.h" |
35435 | 36 #include "gui/wm/ws.h" |
32881 | 37 #include "gui/wm/wsxdnd.h" |
23077 | 38 |
26382
b2f4abcf20ed
Make include paths consistent; do not use ../ in them.
diego
parents:
26365
diff
changeset
|
39 #include "help_mp.h" |
32881 | 40 #include "input/input.h" |
35431 | 41 #include "libmpdemux/demuxer.h" |
26382
b2f4abcf20ed
Make include paths consistent; do not use ../ in them.
diego
parents:
26365
diff
changeset
|
42 #include "libvo/video_out.h" |
32881 | 43 #include "mp_core.h" |
35435 | 44 #include "mp_msg.h" |
45 #include "mplayer.h" | |
23077 | 46 |
35437 | 47 /** |
48 * @brief Switch video window fullscreen mode. | |
49 * | |
50 * Switch normal video to fullscreen and fullscreen video to normal. | |
51 */ | |
33555 | 52 void uiFullScreen(void) |
23077 | 53 { |
33960 | 54 if (!guiInfo.VideoWindow) |
32881 | 55 return; |
56 | |
34697 | 57 wsFullScreen(&guiApp.videoWindow); |
23077 | 58 |
34697 | 59 vo_fs = guiApp.videoWindow.isFullScreen; |
23077 | 60 |
34697 | 61 wsSetLayer(wsDisplay, guiApp.mainWindow.WindowID, guiApp.videoWindow.isFullScreen); |
32881 | 62 |
33555 | 63 if (guiApp.menuIsPresent) |
34697 | 64 wsSetLayer(wsDisplay, guiApp.menuWindow.WindowID, guiApp.videoWindow.isFullScreen); |
32881 | 65 |
33555 | 66 if (guiInfo.Playing) |
34697 | 67 wsSetBackgroundRGB(&guiApp.videoWindow, 0, 0, 0); |
32881 | 68 else |
34697 | 69 wsSetBackgroundRGB(&guiApp.videoWindow, guiApp.video.R, guiApp.video.G, guiApp.video.B); |
23077 | 70 } |
71 | |
35437 | 72 /** |
73 * @brief Switch to play mode. | |
74 */ | |
33555 | 75 void uiPlay(void) |
23077 | 76 { |
34401
af8838c2b60b
Allow uiPlay() without guiInfo.Filename for some stream types.
ib
parents:
34400
diff
changeset
|
77 if (guiInfo.Playing == GUI_PLAY) |
af8838c2b60b
Allow uiPlay() without guiInfo.Filename for some stream types.
ib
parents:
34400
diff
changeset
|
78 return; |
af8838c2b60b
Allow uiPlay() without guiInfo.Filename for some stream types.
ib
parents:
34400
diff
changeset
|
79 |
af8838c2b60b
Allow uiPlay() without guiInfo.Filename for some stream types.
ib
parents:
34400
diff
changeset
|
80 if (guiInfo.StreamType != STREAMTYPE_CDDA && |
af8838c2b60b
Allow uiPlay() without guiInfo.Filename for some stream types.
ib
parents:
34400
diff
changeset
|
81 guiInfo.StreamType != STREAMTYPE_VCD && |
af8838c2b60b
Allow uiPlay() without guiInfo.Filename for some stream types.
ib
parents:
34400
diff
changeset
|
82 guiInfo.StreamType != STREAMTYPE_DVD && |
af8838c2b60b
Allow uiPlay() without guiInfo.Filename for some stream types.
ib
parents:
34400
diff
changeset
|
83 (!guiInfo.Filename || (guiInfo.Filename[0] == 0))) |
32881 | 84 return; |
23077 | 85 |
33615
1f9a31d4f114
Replace all playback integer constants by their symbolic constants.
ib
parents:
33614
diff
changeset
|
86 if (guiInfo.Playing == GUI_PAUSE) { |
33555 | 87 uiPause(); |
32881 | 88 return; |
89 } | |
90 | |
33731
81f71d910333
Cosmetic: Change prefix for symbolic constants from GMP to GUI.
ib
parents:
33725
diff
changeset
|
91 gui(GUI_SET_STATE, (void *)GUI_PLAY); |
35493 | 92 uiVideoRender = False; |
34697 | 93 wsSetBackgroundRGB(&guiApp.videoWindow, 0, 0, 0); |
35357
80fe9ad7f318
Pass guiApp's wsTWindow parameters always by reference (if possible).
ib
parents:
34697
diff
changeset
|
94 wsClearWindow(&guiApp.videoWindow); |
23077 | 95 } |
96 | |
35437 | 97 /** |
98 * @brief Switch to pause mode. | |
99 */ | |
33555 | 100 void uiPause(void) |
23077 | 101 { |
33555 | 102 if (!guiInfo.Playing) |
32881 | 103 return; |
104 | |
33615
1f9a31d4f114
Replace all playback integer constants by their symbolic constants.
ib
parents:
33614
diff
changeset
|
105 if (guiInfo.Playing == GUI_PLAY) { |
32881 | 106 mp_cmd_t *cmd = calloc(1, sizeof(*cmd)); |
35433 | 107 |
35432 | 108 if (cmd) { |
35433 | 109 cmd->id = MP_CMD_PAUSE; |
110 cmd->name = strdup("pause"); | |
111 mp_input_queue_cmd(cmd); | |
35432 | 112 } |
32881 | 113 } else |
33615
1f9a31d4f114
Replace all playback integer constants by their symbolic constants.
ib
parents:
33614
diff
changeset
|
114 guiInfo.Playing = GUI_PLAY; |
23077 | 115 } |
116 | |
35437 | 117 /** |
118 * @brief Adjust GUI items to reflect current state (i.e. current playing mode). | |
119 */ | |
33555 | 120 void uiState(void) |
32881 | 121 { |
33615
1f9a31d4f114
Replace all playback integer constants by their symbolic constants.
ib
parents:
33614
diff
changeset
|
122 if (guiInfo.Playing == GUI_STOP || guiInfo.Playing == GUI_PAUSE) { |
33978 | 123 btnSet(evPlaySwitchToPause, btnReleased); |
124 btnSet(evPauseSwitchToPlay, btnDisabled); | |
32881 | 125 } else { |
35434 | 126 btnSet(evPauseSwitchToPlay, btnReleased); |
33978 | 127 btnSet(evPlaySwitchToPause, btnDisabled); |
32881 | 128 } |
23077 | 129 } |
130 | |
35437 | 131 /** |
132 * @brief Seek new playback position. | |
133 * | |
35438 | 134 * The new position is a relative one. |
35437 | 135 * |
136 * @param sec seconds to seek (either forward (> 0) or backward (< 0)) | |
137 */ | |
33555 | 138 void uiRelSeek(float sec) |
32881 | 139 { |
32971 | 140 rel_seek_secs = sec; |
32881 | 141 abs_seek_pos = 0; |
142 } | |
143 | |
35437 | 144 /** |
145 * @brief Seek new playback position. | |
146 * | |
35438 | 147 * The new position is an absolute one. |
35437 | 148 * |
149 * @param percent percentage of playback time to position to | |
150 */ | |
33555 | 151 void uiAbsSeek(float percent) |
32881 | 152 { |
32971 | 153 rel_seek_secs = percent / 100.0; |
35431 | 154 abs_seek_pos = SEEK_ABSOLUTE | SEEK_FACTOR; |
23077 | 155 } |
156 | |
35437 | 157 /** |
158 * @brief Change to a different skin. | |
159 * | |
160 * @param name name of the skin to change to | |
161 */ | |
33555 | 162 void uiChangeSkin(char *name) |
23077 | 163 { |
32893 | 164 int prev, bprev; |
32881 | 165 |
33555 | 166 prev = guiApp.menuIsPresent; |
167 bprev = guiApp.playbarIsPresent; | |
32881 | 168 |
35493 | 169 mainVisible = False; |
32881 | 170 |
32893 | 171 if (skinRead(name) != 0) { |
172 if (skinRead(skinName) != 0) { | |
35493 | 173 mainVisible = True; |
32894 | 174 return; |
32893 | 175 } |
32881 | 176 } |
177 | |
34684 | 178 /* reload menu window */ |
23077 | 179 |
33555 | 180 if (prev && guiApp.menuIsPresent) { |
181 free(menuDrawBuffer); | |
182 menuDrawBuffer = calloc(1, guiApp.menu.Bitmap.ImageSize); | |
32881 | 183 |
33555 | 184 if (!menuDrawBuffer) { |
33530 | 185 gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_NEMDB); |
33768 | 186 mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); |
32881 | 187 } |
23077 | 188 |
33555 | 189 wsResizeWindow(&guiApp.menuWindow, guiApp.menu.width, guiApp.menu.height); |
190 wsResizeImage(&guiApp.menuWindow, guiApp.menu.width, guiApp.menu.height); | |
191 wsSetShape(&guiApp.menuWindow, guiApp.menu.Mask.Image); | |
192 wsVisibleWindow(&guiApp.menuWindow, wsHideWindow); | |
32881 | 193 } else |
33555 | 194 uiMenuInit(); |
32881 | 195 |
34697 | 196 /* reload video window */ |
23077 | 197 |
34697 | 198 if (guiApp.video.Bitmap.Image) |
199 wsResizeImage(&guiApp.videoWindow, guiApp.video.Bitmap.Width, guiApp.video.Bitmap.Height); | |
32881 | 200 |
34697 | 201 if (!guiApp.videoWindow.isFullScreen && !guiInfo.Playing) { |
202 wsResizeWindow(&guiApp.videoWindow, guiApp.video.width, guiApp.video.height); | |
203 wsMoveWindow(&guiApp.videoWindow, False, guiApp.video.x, guiApp.video.y); | |
32881 | 204 } |
205 | |
34697 | 206 if (guiApp.video.Bitmap.Image) |
207 wsConvert(&guiApp.videoWindow, guiApp.video.Bitmap.Image); | |
23077 | 208 |
33555 | 209 if (!guiInfo.Playing) { |
35493 | 210 uiVideoRender = True; |
34697 | 211 wsSetBackgroundRGB(&guiApp.videoWindow, guiApp.video.R, guiApp.video.G, guiApp.video.B); |
35357
80fe9ad7f318
Pass guiApp's wsTWindow parameters always by reference (if possible).
ib
parents:
34697
diff
changeset
|
212 wsClearWindow(&guiApp.videoWindow); |
34697 | 213 wsPostRedisplay(&guiApp.videoWindow); |
32881 | 214 } |
215 | |
34684 | 216 /* reload playbar */ |
32881 | 217 |
218 if (bprev) | |
33555 | 219 wsDestroyWindow(&guiApp.playbarWindow); |
32881 | 220 |
33555 | 221 uiPlaybarInit(); |
23077 | 222 |
34684 | 223 /* reload main window */ |
32881 | 224 |
33555 | 225 free(mainDrawBuffer); |
226 mainDrawBuffer = calloc(1, guiApp.main.Bitmap.ImageSize); | |
23077 | 227 |
33555 | 228 if (!mainDrawBuffer) { |
33530 | 229 gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_NEMDB); |
33768 | 230 mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); |
32881 | 231 } |
23077 | 232 |
33555 | 233 wsDestroyWindow(&guiApp.mainWindow); |
32881 | 234 |
33555 | 235 wsCreateWindow(&guiApp.mainWindow, guiApp.main.x, guiApp.main.y, guiApp.main.width, guiApp.main.height, wsNoBorder, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, wsShowFrame | wsMaxSize | wsHideWindow, "MPlayer"); |
236 wsCreateImage(&guiApp.mainWindow, guiApp.main.Bitmap.Width, guiApp.main.Bitmap.Height); | |
237 wsSetShape(&guiApp.mainWindow, guiApp.main.Mask.Image); | |
238 wsSetIcon(wsDisplay, guiApp.mainWindow.WindowID, &guiIcon); | |
23077 | 239 |
33555 | 240 guiApp.mainWindow.ReDraw = (void *)uiMainDraw; |
241 guiApp.mainWindow.MouseHandler = uiMainMouseHandle; | |
242 guiApp.mainWindow.KeyHandler = uiMainKeyHandle; | |
243 guiApp.mainWindow.DandDHandler = uiDandDHandler; | |
32881 | 244 |
33555 | 245 wsXDNDMakeAwareness(&guiApp.mainWindow); |
23077 | 246 |
33555 | 247 if (!guiApp.mainDecoration) |
35497 | 248 wsWindowDecoration(&guiApp.mainWindow, False); |
32881 | 249 |
33555 | 250 wsVisibleWindow(&guiApp.mainWindow, wsShowWindow); |
35493 | 251 mainVisible = True; |
32881 | 252 |
33555 | 253 btnModify(evSetVolume, guiInfo.Volume); |
254 btnModify(evSetBalance, guiInfo.Balance); | |
255 btnModify(evSetMoviePosition, guiInfo.Position); | |
34697 | 256 btnSet(evFullScreen, (guiApp.videoWindow.isFullScreen ? btnPressed : btnReleased)); |
23077 | 257 |
34697 | 258 wsSetLayer(wsDisplay, guiApp.mainWindow.WindowID, guiApp.videoWindow.isFullScreen); |
259 wsSetLayer(wsDisplay, guiApp.menuWindow.WindowID, guiApp.videoWindow.isFullScreen); | |
32881 | 260 } |
261 | |
35437 | 262 /** |
35452 | 263 * @brief Set the file to be played. |
35437 | 264 * |
265 * @param dir directory (optional, else NULL) | |
266 * @param name filename | |
267 * @param type stream type of the file | |
35483
8ac7761bcb7c
Clear information associated with a file when setting a new one.
ib
parents:
35462
diff
changeset
|
268 * |
8ac7761bcb7c
Clear information associated with a file when setting a new one.
ib
parents:
35462
diff
changeset
|
269 * @note All #guiInfo members associated with the file will be cleared. |
35437 | 270 */ |
35452 | 271 void uiSetFile(char *dir, char *name, int type) |
32881 | 272 { |
273 if (!dir) | |
33740
2c02269701bd
Remove macros guiSetFilename() and guiSetDF() from interface.h.
ib
parents:
33739
diff
changeset
|
274 setdup(&guiInfo.Filename, name); |
32881 | 275 else |
33740
2c02269701bd
Remove macros guiSetFilename() and guiSetDF() from interface.h.
ib
parents:
33739
diff
changeset
|
276 setddup(&guiInfo.Filename, dir, name); |
23077 | 277 |
34064 | 278 filename = guiInfo.Filename; |
34399
f2c03009068d
Don't explicitly set stream type if the type doesn't change.
ib
parents:
34387
diff
changeset
|
279 |
35483
8ac7761bcb7c
Clear information associated with a file when setting a new one.
ib
parents:
35462
diff
changeset
|
280 if (type != SAME_STREAMTYPE) { |
34400 | 281 guiInfo.StreamType = type; |
34064 | 282 |
35483
8ac7761bcb7c
Clear information associated with a file when setting a new one.
ib
parents:
35462
diff
changeset
|
283 guiInfo.VideoWidth = 0; |
8ac7761bcb7c
Clear information associated with a file when setting a new one.
ib
parents:
35462
diff
changeset
|
284 guiInfo.VideoHeight = 0; |
8ac7761bcb7c
Clear information associated with a file when setting a new one.
ib
parents:
35462
diff
changeset
|
285 guiInfo.AudioChannels = 0; |
8ac7761bcb7c
Clear information associated with a file when setting a new one.
ib
parents:
35462
diff
changeset
|
286 guiInfo.RunningTime = 0; |
8ac7761bcb7c
Clear information associated with a file when setting a new one.
ib
parents:
35462
diff
changeset
|
287 guiInfo.Track = 0; |
8ac7761bcb7c
Clear information associated with a file when setting a new one.
ib
parents:
35462
diff
changeset
|
288 guiInfo.Chapter = 0; |
8ac7761bcb7c
Clear information associated with a file when setting a new one.
ib
parents:
35462
diff
changeset
|
289 guiInfo.Angle = 0; |
8ac7761bcb7c
Clear information associated with a file when setting a new one.
ib
parents:
35462
diff
changeset
|
290 |
8ac7761bcb7c
Clear information associated with a file when setting a new one.
ib
parents:
35462
diff
changeset
|
291 nfree(guiInfo.CodecName); |
8ac7761bcb7c
Clear information associated with a file when setting a new one.
ib
parents:
35462
diff
changeset
|
292 nfree(guiInfo.AudioFilename); |
8ac7761bcb7c
Clear information associated with a file when setting a new one.
ib
parents:
35462
diff
changeset
|
293 nfree(guiInfo.SubtitleFilename); |
8ac7761bcb7c
Clear information associated with a file when setting a new one.
ib
parents:
35462
diff
changeset
|
294 } |
23077 | 295 } |
296 | |
35437 | 297 /** |
35453 | 298 * @brief Unset the file being played. |
299 */ | |
300 void uiUnsetFile(void) | |
301 { | |
302 uiSetFile(NULL, NULL, STREAMTYPE_DUMMY); | |
303 } | |
304 | |
305 /** | |
35437 | 306 * @brief Set file to be played to current playlist entry. |
307 */ | |
33555 | 308 void uiCurr(void) |
23077 | 309 { |
32881 | 310 plItem *curr; |
23077 | 311 |
33615
1f9a31d4f114
Replace all playback integer constants by their symbolic constants.
ib
parents:
33614
diff
changeset
|
312 if (guiInfo.Playing == GUI_PAUSE) |
32881 | 313 return; |
23077 | 314 |
33555 | 315 switch (guiInfo.StreamType) { |
34387 | 316 case STREAMTYPE_CDDA: |
34077 | 317 case STREAMTYPE_VCD: |
318 case STREAMTYPE_DVD: | |
35433 | 319 |
32881 | 320 break; |
321 | |
322 default: | |
323 | |
34663 | 324 curr = listMgr(PLAYLIST_ITEM_GET_CURR, 0); |
32881 | 325 |
326 if (curr) { | |
35452 | 327 uiSetFile(curr->path, curr->name, STREAMTYPE_FILE); |
35493 | 328 guiInfo.PlaylistNext = False; |
35485 | 329 guiInfo.Track = (int)listMgr(PLAYLIST_ITEM_GET_POS, curr); |
32881 | 330 break; |
331 } | |
332 | |
333 return; | |
334 } | |
335 | |
33615
1f9a31d4f114
Replace all playback integer constants by their symbolic constants.
ib
parents:
33614
diff
changeset
|
336 if (guiInfo.Playing == GUI_PLAY) |
33555 | 337 uiEventHandling(evPlay, 0); |
23077 | 338 } |
339 | |
35437 | 340 /** |
341 * @brief Switch to previous playback track. | |
342 */ | |
33555 | 343 void uiPrev(void) |
23077 | 344 { |
35493 | 345 int stop = False; |
32881 | 346 plItem *prev; |
347 | |
33615
1f9a31d4f114
Replace all playback integer constants by their symbolic constants.
ib
parents:
33614
diff
changeset
|
348 if (guiInfo.Playing == GUI_PAUSE) |
32881 | 349 return; |
350 | |
33555 | 351 switch (guiInfo.StreamType) { |
34387 | 352 case STREAMTYPE_CDDA: |
35426 | 353 |
34387 | 354 if (--guiInfo.Track == 0) { |
355 guiInfo.Track = 1; | |
35493 | 356 stop = True; |
34387 | 357 } |
35426 | 358 |
34387 | 359 break; |
360 | |
34077 | 361 case STREAMTYPE_VCD: |
35426 | 362 |
34077 | 363 if (--guiInfo.Track == 1) { |
364 guiInfo.Track = 2; | |
35493 | 365 stop = True; |
34077 | 366 } |
35426 | 367 |
34077 | 368 break; |
369 | |
32881 | 370 case STREAMTYPE_DVD: |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27370
diff
changeset
|
371 |
33876
4789b8eed97e
Get rid of a bunch of needless or redundant guiInfo members.
ib
parents:
33874
diff
changeset
|
372 if (--guiInfo.Chapter == 0) { |
4789b8eed97e
Get rid of a bunch of needless or redundant guiInfo members.
ib
parents:
33874
diff
changeset
|
373 guiInfo.Chapter = 1; |
32881 | 374 |
35428 | 375 if (--guiInfo.Track == 0) { |
33876
4789b8eed97e
Get rid of a bunch of needless or redundant guiInfo members.
ib
parents:
33874
diff
changeset
|
376 guiInfo.Track = 1; |
35493 | 377 stop = True; |
32881 | 378 } |
379 } | |
380 | |
381 break; | |
382 | |
383 default: | |
384 | |
34663 | 385 prev = listMgr(PLAYLIST_ITEM_GET_PREV, 0); |
32881 | 386 |
387 if (prev) { | |
35452 | 388 uiSetFile(prev->path, prev->name, STREAMTYPE_FILE); |
35500 | 389 guiInfo.PlaylistNext = !guiInfo.Playing; |
35458 | 390 guiInfo.Track = (int)listMgr(PLAYLIST_ITEM_GET_POS, prev); |
32881 | 391 break; |
392 } | |
393 | |
394 return; | |
395 } | |
396 | |
397 if (stop) | |
33555 | 398 uiEventHandling(evStop, 0); |
32881 | 399 |
33615
1f9a31d4f114
Replace all playback integer constants by their symbolic constants.
ib
parents:
33614
diff
changeset
|
400 if (guiInfo.Playing == GUI_PLAY) |
33555 | 401 uiEventHandling(evPlay, 0); |
23077 | 402 } |
403 | |
35437 | 404 /** |
405 * @brief Switch to next playback track. | |
406 */ | |
33555 | 407 void uiNext(void) |
23077 | 408 { |
35493 | 409 int stop = False; |
32881 | 410 plItem *next; |
23077 | 411 |
33615
1f9a31d4f114
Replace all playback integer constants by their symbolic constants.
ib
parents:
33614
diff
changeset
|
412 if (guiInfo.Playing == GUI_PAUSE) |
32881 | 413 return; |
414 | |
33555 | 415 switch (guiInfo.StreamType) { |
34387 | 416 case STREAMTYPE_CDDA: |
35425 | 417 case STREAMTYPE_VCD: |
34387 | 418 |
419 if (++guiInfo.Track > guiInfo.Tracks) { | |
420 guiInfo.Track = guiInfo.Tracks; | |
35493 | 421 stop = True; |
34387 | 422 } |
423 | |
424 break; | |
425 | |
32881 | 426 case STREAMTYPE_DVD: |
427 | |
33876
4789b8eed97e
Get rid of a bunch of needless or redundant guiInfo members.
ib
parents:
33874
diff
changeset
|
428 if (guiInfo.Chapter++ == guiInfo.Chapters) { |
4789b8eed97e
Get rid of a bunch of needless or redundant guiInfo members.
ib
parents:
33874
diff
changeset
|
429 guiInfo.Chapter = 1; |
32881 | 430 |
33876
4789b8eed97e
Get rid of a bunch of needless or redundant guiInfo members.
ib
parents:
33874
diff
changeset
|
431 if (++guiInfo.Track > guiInfo.Tracks) { |
4789b8eed97e
Get rid of a bunch of needless or redundant guiInfo members.
ib
parents:
33874
diff
changeset
|
432 guiInfo.Track = guiInfo.Tracks; |
35493 | 433 stop = True; |
32881 | 434 } |
435 } | |
436 | |
437 break; | |
438 | |
439 default: | |
440 | |
34663 | 441 next = listMgr(PLAYLIST_ITEM_GET_NEXT, 0); |
32881 | 442 |
443 if (next) { | |
35452 | 444 uiSetFile(next->path, next->name, STREAMTYPE_FILE); |
35500 | 445 guiInfo.PlaylistNext = !guiInfo.Playing; |
35458 | 446 guiInfo.Track = (int)listMgr(PLAYLIST_ITEM_GET_POS, next); |
32881 | 447 break; |
448 } | |
449 | |
450 return; | |
451 } | |
452 | |
453 if (stop) | |
33555 | 454 uiEventHandling(evStop, 0); |
32881 | 455 |
33615
1f9a31d4f114
Replace all playback integer constants by their symbolic constants.
ib
parents:
33614
diff
changeset
|
456 if (guiInfo.Playing == GUI_PLAY) |
33555 | 457 uiEventHandling(evPlay, 0); |
23077 | 458 } |