From f3d1401d5ebc04e3bcc298c83825985d00cbeca5 Mon Sep 17 00:00:00 2001
From: mcmlxxix <>
Date: Thu, 30 Sep 2010 17:47:59 +0000
Subject: [PATCH] fix wallpaper display, dont display chat msg notice while in
 chat,

---
 exec/load/cshell_menu.js |  2 --
 exec/load/cshell_obj.js  | 13 ++++++++-----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/exec/load/cshell_menu.js b/exec/load/cshell_menu.js
index c09608c320..483ca8f163 100644
--- a/exec/load/cshell_menu.js
+++ b/exec/load/cshell_menu.js
@@ -1379,7 +1379,6 @@ menuinfo["main"]=function() {
 	}
 }
 menuinfo["xtrnsec"]=function() {
-	center.clear();
 	if(!xtrn_area.sec_list[left.xtrnsec].prog_list[left.menu.current]) return false;
 	var wp=directory(system.text_dir + "cshell/xtrn/" + 
 			xtrn_area.sec_list[left.xtrnsec].prog_list[left.menu.current].code + ".*.bin")[0];
@@ -1389,7 +1388,6 @@ menuinfo["xtrnsec"]=function() {
 	}
 }
 menuinfo["xtrnsecs"]=function() {
-	center.clear();
 	if(!xtrn_area.sec_list[left.xtrnsec]) return false;
 	var wp=directory(system.text_dir + "cshell/xtrn/" + 
 			xtrn_area.sec_list[left.xtrnsec].code + ".*.bin")[0];
diff --git a/exec/load/cshell_obj.js b/exec/load/cshell_obj.js
index 25d1807a08..4106c4b5a4 100644
--- a/exec/load/cshell_obj.js
+++ b/exec/load/cshell_obj.js
@@ -154,9 +154,9 @@ function RightWindow()
 		
 		displayInfo("");
 		if(this.chat_msgs > 0) 
-			displayInfo(printPadded("\1r\1h *" + this.chat_msgs + " NEW CHAT MSGS*",this.width-1));
+			displayInfo(printPadded("\1r\1h " + this.chat_msgs + " NEW CHAT MSGS",this.width-1));
 		if(this.notices > 0)
-			displayInfo(printPadded("\1r\1h *" + this.notices + " NEW NOTICES*",this.width-1));
+			displayInfo(printPadded("\1r\1h " + this.notices + " NEW NOTICES",this.width-1));
 	}
 	this.listNodes=function()
 	{
@@ -238,12 +238,11 @@ function MainWindow()
 		var posx=center.chat.chatroom.x;
 		var posy=center.chat.chatroom.y-3;
 		clearBlock(posx,posy,center.chat.chatroom.columns,center.chat.chatroom.rows+3);
-		this.wp=false;
 		this.wp_shown=false;
 	}
 	this.cycle=function()
 	{
-		if(this.chat.cycle())
+		if(this.chat.cycle() && !this.in_chat)
 			right.chatAlert();
 	}
 	this.restore=function()
@@ -295,6 +294,7 @@ function MainWindow()
 		if(gapx != 0 || gapy != 0) {
 			posx+=parseInt(gapx/2,10);
 			posy+=parseInt(gapy/2,10);
+			this.clear();
 		}
 		this.wp.draw(posx,posy);
 		this.wp_shown=true;
@@ -370,7 +370,10 @@ function LeftWindow()
 			bbs.node_action=this.menu.node_action;
 		}
 		this.title_shown=false;
-		if(center.wp_shown) center.clear();
+		if(center.wp_shown) {
+			center.clear();
+			center.wp=false;
+		}
 	}
 }
 function SideBar()
-- 
GitLab