changeset 2136:7ce26ebe8b6a trunk

[svn] - don't use deprecated function playlist_get().
author nenolod
date Fri, 15 Dec 2006 21:18:34 -0800
parents dd29f8fd029d
children 6bfa0777a57a
files ChangeLog audacious/mainwin.c
diffstat 2 files changed, 24 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- 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 <nenolod@nenolod.net>
+  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 <nenolod@nenolod.net>
   revision [3273]
   - use g_object_ref() on the list store when we disassociate to make
--- 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);