(svn r1126) -Fix: [Network] Pressing Disconnect on the GUI puts you back to the
authortruelight
Thu, 16 Dec 2004 11:12:59 +0000
changeset 685 c52bdb4cac92
parent 684 639c3ca13086
child 686 719f01ca0175
(svn r1126) -Fix: [Network] Pressing Disconnect on the GUI puts you back to the
main-menu (so you no longer stay ingame (if you were))
network_gui.c
--- a/network_gui.c	Thu Dec 16 11:09:00 2004 +0000
+++ b/network_gui.c	Thu Dec 16 11:12:59 2004 +0000
@@ -1189,6 +1189,8 @@
 	AllocateWindowDesc(&_client_list_desc);
 }
 
+extern void SwitchMode(int new_mode);
+
 static void NetworkJoinStatusWindowWndProc(Window *w, WindowEvent *e)
 {
 	switch(e->event) {
@@ -1224,8 +1226,9 @@
 		switch(e->click.widget) {
 		case 0: case 3: /* Close 'X' | Disconnect button */
 			NetworkDisconnect();
+			DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0);
+			SwitchMode(SM_MENU);
 			ShowNetworkGameWindow();
-			DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0);
 			break;
 		}
 		break;