(svn r1022) -Fix: [Network] [ 1083690 ] The password dialog made the network
authortruelight
Sun, 12 Dec 2004 13:46:10 +0000
changeset 598 b8c5ae66f9ff
parent 597 f8f94a1d3d4a
child 599 30da691a5561
(svn r1022) -Fix: [Network] [ 1083690 ] The password dialog made the network
disconnect without cleaning up.
main_gui.c
misc_gui.c
network.c
--- a/main_gui.c	Sat Dec 11 19:20:00 2004 +0000
+++ b/main_gui.c	Sun Dec 12 13:46:10 2004 +0000
@@ -51,6 +51,7 @@
 #ifdef ENABLE_NETWORK
 	case 4:
 		NetworkDisconnect();
+		ShowNetworkGameWindow();
 		break;
 #endif /* ENABLE_NETWORK */
 	}
@@ -2228,7 +2229,7 @@
 			DrawSprite(SPR_OTTD_T, off_x +  34, 50);
 			DrawSprite(SPR_OTTD_T, off_x +  65, 50);
 			DrawSprite(SPR_OTTD_D, off_x +  96, 50);
-			
+
 			/*
 			DrawSprite(SPR_OTTD_R, off_x + 119, 50);
 			DrawSprite(SPR_OTTD_A, off_x + 148, 50);
--- a/misc_gui.c	Sat Dec 11 19:20:00 2004 +0000
+++ b/misc_gui.c	Sun Dec 12 13:46:10 2004 +0000
@@ -791,11 +791,11 @@
 				WindowNumber wnd_num = WP(w,querystr_d).wnd_num;
 				Window *parent;
 
-				DeleteWindow(w);
-
 				// Mask the edit-box as closed, so we don't send out a CANCEL
 				closed = true;
 
+				DeleteWindow(w);
+
 				parent = FindWindowById(wnd_class, wnd_num);
 				if (parent != NULL) {
 					WindowEvent e;
--- a/network.c	Sat Dec 11 19:20:00 2004 +0000
+++ b/network.c	Sun Dec 12 13:46:10 2004 +0000
@@ -896,6 +896,8 @@
 		}
 	}
 
+	DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0);
+
 	NetworkClose();
 
 	// Free all queued commands