# HG changeset patch # User nenolod # Date 1166246314 28800 # Node ID 7ce26ebe8b6ad0defb6cd26cfb33c7a349386ed7 # Parent dd29f8fd029da68571f37be46c1b6df5c48f7bb6 [svn] - don't use deprecated function playlist_get(). diff -r dd29f8fd029d -r 7ce26ebe8b6a ChangeLog --- a/ChangeLog Fri Dec 15 21:14:16 2006 -0800 +++ b/ChangeLog Fri Dec 15 21:18:34 2006 -0800 @@ -1,3 +1,11 @@ +2006-12-16 05:14:16 +0000 William Pitcock + revision [3275] + - log a warning if deprecated functions from <= 1.2 are used + + trunk/audacious/playlist.c | 4 ++++ + 1 file changed, 4 insertions(+) + + 2006-12-16 04:33:34 +0000 William Pitcock revision [3273] - use g_object_ref() on the list store when we disassociate to make diff -r dd29f8fd029d -r 7ce26ebe8b6a audacious/mainwin.c --- a/audacious/mainwin.c Fri Dec 15 21:14:16 2006 -0800 +++ b/audacious/mainwin.c Fri Dec 15 21:18:34 2006 -0800 @@ -1883,11 +1883,12 @@ /* FIXME: Is not in sync with playlist due to delayed extinfo * reading */ gint row; - GList *playlist; + GList *node; gchar *desc_buf = NULL; gchar *row_str; GtkTreeIter iter; GtkTreeSelection *selection; + Playlist *playlist = playlist_get_active(); GtkTreeModel *store; @@ -1898,9 +1899,9 @@ gtk_list_store_clear(GTK_LIST_STORE(store)); row = 1; - for (playlist = playlist_get(); playlist; - playlist = g_list_next(playlist)) { - PlaylistEntry *entry = PLAYLIST_ENTRY(playlist->data); + for (node = playlist->entries; node; node = g_list_next(node)) + { + PlaylistEntry *entry = PLAYLIST_ENTRY(node->data); if (entry->title) desc_buf = g_strdup(entry->title); @@ -1934,12 +1935,13 @@ GtkTreeView *treeview = GTK_TREE_VIEW(user_data); GtkTreeSelection *selection; GtkTreeIter iter; + Playlist *playlist = playlist_get_active(); GtkListStore *store; gint song_index = 0; gchar **words; - GList *playlist; + GList *node; gboolean match = FALSE; @@ -1966,10 +1968,9 @@ PLAYLIST_LOCK(); - for (playlist = playlist_get(); playlist; - playlist = g_list_next(playlist)) { - - PlaylistEntry *entry = PLAYLIST_ENTRY(playlist->data); + for (node = playlist->entries; node; node = g_list_next(node)) + { + PlaylistEntry *entry = PLAYLIST_ENTRY(node->data); const gchar *title; gchar *filename = NULL; @@ -2046,7 +2047,7 @@ GtkWidget *jump, *queue, *cancel; GtkWidget *rescan, *edit; GtkWidget *search_label, *hbox; - GList *playlist; + GList *node; gchar *desc_buf = NULL; gchar *row_str; gint row; @@ -2058,6 +2059,8 @@ GtkCellRenderer *renderer; GtkTreeViewColumn *column; + Playlist *playlist = playlist_get_active(); + if (mainwin_jtf) { gtk_window_present(GTK_WINDOW(mainwin_jtf)); return; @@ -2182,10 +2185,9 @@ PLAYLIST_LOCK(); - for (playlist = playlist_get(); playlist; - playlist = g_list_next(playlist)) { - - PlaylistEntry *entry = PLAYLIST_ENTRY(playlist->data); + for (node = playlist->entries; node; node = g_list_next(node)) + { + PlaylistEntry *entry = PLAYLIST_ENTRY(node->data); if (entry->title) desc_buf = g_strdup(entry->title);