# HG changeset patch # User nenolod # Date 1165836607 28800 # Node ID b98891c9e15598385d7270d252122b0600f0688e # Parent df6cf9cb531e33ef284cb9d011bb5c54aa5f77e9 [svn] - update playlist_delete_filenames() and friends diff -r df6cf9cb531e -r b98891c9e155 ChangeLog --- a/ChangeLog Mon Dec 11 03:25:21 2006 -0800 +++ b/ChangeLog Mon Dec 11 03:30:07 2006 -0800 @@ -1,3 +1,14 @@ +2006-12-11 11:25:21 +0000 William Pitcock + revision [3165] + - this commit breaks the API. I'm not done here, but hopefully the new API is + stable enough now that the other chunks of the code can be converted by + Chainsaw ;) + + trunk/audacious/playlist.c | 288 ++++++++++++++++++++++++--------------------- + trunk/audacious/playlist.h | 153 ++++++++++++----------- + 2 files changed, 237 insertions(+), 204 deletions(-) + + 2006-12-11 10:17:12 +0000 Yoshiki Yazawa revision [3161] remove plugin-reactivation loops for general and visualization plugins diff -r df6cf9cb531e -r b98891c9e155 audacious/playlist.c --- a/audacious/playlist.c Mon Dec 11 03:25:21 2006 -0800 +++ b/audacious/playlist.c Mon Dec 11 03:30:07 2006 -0800 @@ -342,7 +342,7 @@ playlist->position = NULL; /* Make sure the entry did not disappear under us */ - if (g_list_index(playlist_get(), entry) == -1) + if (g_list_index(playlist->entries, entry) == -1) return; } @@ -400,7 +400,7 @@ } void -playlist_delete_filenames(GList * filenames) +playlist_delete_filenames(Playlist * playlist, GList * filenames) { GList *node, *fnode; gboolean set_info_text = FALSE, restart_playing = FALSE; @@ -415,7 +415,7 @@ PlaylistEntry *entry = node->data; if (!strcmp(entry->filename, fnode->data)) - playlist_delete_node(node, &set_info_text, &restart_playing); + playlist_delete_node(playlist, node, &set_info_text, &restart_playing); node = next; } @@ -441,15 +441,17 @@ } void -playlist_delete(gboolean crop) +playlist_delete(Playlist * playlist, gboolean crop) { gboolean restart_playing = FALSE, set_info_text = FALSE; GList *node, *next_node; PlaylistEntry *entry; + g_return_if_fail(playlist != NULL); + PLAYLIST_LOCK(); - node = playlist; + node = playlist->entries; while (node) { entry = PLAYLIST_ENTRY(node->data); @@ -457,7 +459,7 @@ next_node = g_list_next(node); if ((entry->selected && !crop) || (!entry->selected && crop)) { - playlist_delete_node(node, &set_info_text, &restart_playing); + playlist_delete_node(playlist, node, &set_info_text, &restart_playing); } node = next_node;