Mercurial > audlegacy
changeset 4378:342a1a1de225
Mark the playlist as modified when moving/adding/removing/sorting/randomizing the playlist, so that the jump to file cache picks up the change.
author | Ivan N. Zlatev <contact@i-nz.net> |
---|---|
date | Fri, 28 Mar 2008 02:18:10 +0000 |
parents | 335f4ac3993a |
children | 3a9a83c95daf |
files | src/audacious/playlist.c src/audacious/ui_skinned_playlist.c |
diffstat | 2 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audacious/playlist.c Sun Mar 23 20:31:28 2008 +0200 +++ b/src/audacious/playlist.c Fri Mar 28 02:18:10 2008 +0000 @@ -756,6 +756,8 @@ g_return_val_if_fail(playlist != NULL, FALSE); g_return_val_if_fail(filename != NULL, FALSE); + PLAYLIST_INCR_SERIAL(playlist); + /* load playlist */ if (is_playlist_name(filename)) { playlist->loading_playlist = TRUE; @@ -2193,6 +2195,7 @@ playlist->entries = g_list_sort(playlist->entries, (GCompareFunc) playlist_compare_func_table[type]); + PLAYLIST_INCR_SERIAL(playlist); PLAYLIST_UNLOCK(playlist); } @@ -2252,6 +2255,7 @@ playlist->entries = playlist_sort_selected_generic(playlist->entries, (GCompareFunc) playlist_compare_func_table [type]); + PLAYLIST_INCR_SERIAL(playlist); PLAYLIST_UNLOCK(playlist); } @@ -2260,6 +2264,7 @@ { PLAYLIST_LOCK(playlist); playlist->entries = g_list_reverse(playlist->entries); + PLAYLIST_INCR_SERIAL(playlist); PLAYLIST_UNLOCK(playlist); } @@ -2312,6 +2317,7 @@ { PLAYLIST_LOCK(playlist); playlist->entries = playlist_shuffle_list(playlist, playlist->entries); + PLAYLIST_INCR_SERIAL(playlist); PLAYLIST_UNLOCK(playlist); } @@ -2341,6 +2347,7 @@ for (node = playlist->entries; node; node = g_list_next(node), i++) { PLAYLIST_ENTRY(node->data)->selected = FALSE; } + PLAYLIST_INCR_SERIAL(playlist); PLAYLIST_UNLOCK(playlist); playlist_recalc_total_time(playlist); playlist_manager_update();
--- a/src/audacious/ui_skinned_playlist.c Sun Mar 23 20:31:28 2008 +0200 +++ b/src/audacious/ui_skinned_playlist.c Fri Mar 28 02:18:10 2008 +0000 @@ -303,6 +303,7 @@ glist_moveup(list); list = g_list_next(list); } + PLAYLIST_INCR_SERIAL(playlist); PLAYLIST_UNLOCK(playlist); if (pl->prev_selected != -1) pl->prev_selected--; @@ -338,6 +339,7 @@ list = g_list_previous(list); } + PLAYLIST_INCR_SERIAL(playlist); PLAYLIST_UNLOCK(playlist); if (pl->prev_selected != -1)