tRemember which game type was chosen from the New Game dialog, and use it again… | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit a2c5b5500aed221db5a5aa03bfa43b902be20315 | |
parent 9fdbf2a07443ea5177408b70705bf8e6a574fbc9 | |
Author: Ben Webb <[email protected]> | |
Date: Mon, 2 Sep 2002 13:38:41 +0000 | |
Remember which game type was chosen from the New Game dialog, and use it | |
again next time round. | |
Diffstat: | |
M src/gui_client/newgamedia.c | 8 ++++++-- | |
1 file changed, 6 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/src/gui_client/newgamedia.c b/src/gui_client/newgamedia.c | |
t@@ -36,7 +36,8 @@ | |
#include "newgamedia.h" | |
struct StartGameStruct { | |
- GtkWidget *dialog, *name, *hostname, *port, *antique, *status, *metaserv; | |
+ GtkWidget *dialog, *name, *hostname, *port, *antique, *status, | |
+ *metaserv, *notebook; | |
Player *play; | |
#ifdef NETWORKING | |
HttpConnection *MetaConn; | |
t@@ -424,6 +425,9 @@ static void CloseNewGameDia(GtkWidget *widget, gpointer da… | |
} | |
ClearServerList(&stgam.NewMetaList); | |
#endif | |
+ | |
+ /* Remember which tab we chose for the next time we use this dialog */ | |
+ NewGameType = gtk_notebook_get_current_page(GTK_NOTEBOOK(stgam.notebook)); | |
} | |
#ifdef NETWORKING | |
t@@ -491,7 +495,7 @@ void NewGameDialog(Player *play) | |
gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | |
- notebook = gtk_notebook_new(); | |
+ notebook = stgam.notebook = gtk_notebook_new(); | |
#ifdef NETWORKING | |
frame = gtk_frame_new(_("Server")); |