(svn r7402) -Fix: [FS#255] Long Delay for Message Windows to Appear. Immediately show a new message
authorDarkvater
Wed, 06 Dec 2006 17:28:14 +0000
changeset 5264 b2b3c60af210
parent 5263 8246ff317c2c
child 5265 a15469628808
(svn r7402) -Fix: [FS#255] Long Delay for Message Windows to Appear. Immediately show a new message
if present if no news window is open, or has just been closed instead of waiting for the
timer of the current news to time out.
news_gui.c
--- a/news_gui.c	Wed Dec 06 11:16:02 2006 +0000
+++ b/news_gui.c	Wed Dec 06 17:28:14 2006 +0000
@@ -471,15 +471,11 @@
 	w = FindWindowById(WC_STATUS_BAR, 0);
 	if (w != NULL && WP(w, const def_d).data_1 > -1280) return false;
 
-	// Newspaper message
-	// Wait until duration reaches 0
-	if (ni->duration != 0) {
-		ni->duration--;
-		return false;
-	}
+	// Newspaper message, decrement duration counter
+	if (ni->duration != 0) ni->duration--;
 
 	// neither newsticker nor newspaper are running
-	return true;
+	return (ni->duration == 0 || FindWindowById(WC_NEWS_WINDOW, 0) == NULL);
 }
 
 static void MoveToNextItem(void)