Mercurial > audlegacy
changeset 2081:b98891c9e155 trunk
[svn] - update playlist_delete_filenames() and friends
author | nenolod |
---|---|
date | Mon, 11 Dec 2006 03:30:07 -0800 |
parents | df6cf9cb531e |
children | fbcea190a607 |
files | ChangeLog audacious/playlist.c |
diffstat | 2 files changed, 19 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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 <nenolod@nenolod.net> + 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 <yaz@cc.rim.or.jp> revision [3161] remove plugin-reactivation loops for general and visualization plugins
--- 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;