diff src/audacious/playlist.c @ 3165:8775dfc57ead trunk

Remove mainwin_set_info_text() craq. Still some work to do.
author William Pitcock <nenolod@atheme-project.org>
date Wed, 25 Jul 2007 15:46:00 -0500
parents a2d552ea48f0
children 5dd8bc77a590
line wrap: on
line diff
--- a/src/audacious/playlist.c	Tue Jul 24 13:17:23 2007 -0500
+++ b/src/audacious/playlist.c	Wed Jul 25 15:46:00 2007 -0500
@@ -526,9 +526,6 @@
             mainwin_clear_song_info();
         }
     }
-    else if (set_info_text) {
-        mainwin_set_info_text();
-    }
 
     playlist_manager_update();
 }
@@ -568,9 +565,6 @@
             mainwin_clear_song_info();
         }
     }
-    else if (set_info_text) {
-        mainwin_set_info_text();
-    }
 
     playlist_manager_update();
 }
@@ -604,10 +598,6 @@
 
     playlist_recalc_total_time(playlist);
 
-    if (set_info_text) {
-        mainwin_set_info_text();
-    }
-
     if (restart_playing) {
         if (playlist->position) {
             playback_initiate();
@@ -1045,6 +1035,7 @@
 {
     Playlist *playlist = playlist_get_active();
     PlaylistEventInfoChange *msg;
+    gchar *text;
 
     g_return_if_fail(playlist != NULL);
 
@@ -1072,6 +1063,9 @@
 
     event_queue("playlist info change", msg);
 
+    text = playlist_get_info_text(playlist);
+    event_queue("title change", text);
+
     if ( playlist->position )
         hook_call( "playlist set info" , playlist->position );
 }
@@ -1177,7 +1171,6 @@
     if (restart_playing)
         playback_initiate();
     else {
-        mainwin_set_info_text();
         playlistwin_update_list(playlist);
     }
 }
@@ -1239,7 +1232,6 @@
     if (restart_playing)
         playback_initiate();
     else {
-        mainwin_set_info_text();
         playlistwin_update_list(playlist);
     }
 }
@@ -1422,7 +1414,6 @@
     if (restart_playing)
         playback_initiate();
     else {
-        mainwin_set_info_text();
         playlistwin_update_list(playlist);
     }
 }
@@ -1480,7 +1471,6 @@
             PLAYLIST_UNLOCK(playlist->mutex);
 	    hook_call("playlist end reached", playlist->position);
             mainwin_clear_song_info();
-            mainwin_set_info_text();
             return;
         }
     }
@@ -1491,7 +1481,6 @@
 
     playlist_check_pos_current(playlist);
     playback_initiate();
-    mainwin_set_info_text();
     playlistwin_update_list(playlist);
 }
 
@@ -2490,7 +2479,6 @@
 {
     GList *node;
     gboolean update_playlistwin = FALSE;
-    gboolean update_mainwin = FALSE;
 
     while (playlist_get_info_is_going()) {
         PlaylistEntry *entry;
@@ -2518,8 +2506,6 @@
                 }
                 else if ((entry->tuple != NULL || entry->title != NULL) && entry->length != -1) {
                     update_playlistwin = TRUE;
-                    if (entry == playlist->position)
-                        update_mainwin = TRUE;
                     break;
                 }
             }
@@ -2563,8 +2549,6 @@
                  }
                  else if ((entry->tuple != NULL || entry->title != NULL) && entry->length != -1) {
                      update_playlistwin = TRUE;
-                     if (entry == playlist->position)
-                         update_mainwin = TRUE;
                         // no need for break here since this iteration is very short.
                 }
             }
@@ -2590,11 +2574,6 @@
             update_playlistwin = FALSE;
         }
 
-        if (update_mainwin) {
-            mainwin_set_info_text();
-            update_mainwin = FALSE;
-        }
-
         if (playlist_get_info_scan_active) {
             continue;
         }