From: Jordi Albornoz Date: Mon, 28 Oct 2002 00:37:31 +0000 (+0000) Subject: patch from James Antill. Save & restore the last used server. X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=39470b841979a6494f9c50e7458750931b24163e;p=gtetrinet patch from James Antill. Save & restore the last used server. --- diff --git a/ChangeLog b/ChangeLog index c8a58a6..049ea21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-10-28 Jordi Mallach + + * src/config.c (config_loadconfig): patch from James Antill. Save + and restore the server, as well as the server history. + 2002-10-27 Jordi Mallach * NEWS, configure.in: released gtetrinet 0.4.4. diff --git a/src/config.c b/src/config.c index 8b67e46..ced841f 100644 --- a/src/config.c +++ b/src/config.c @@ -181,6 +181,12 @@ void config_loadconfig (void) g_free(p); } + p = gnome_config_get_string ("Player/Server"); + if (p) { + GTET_O_STRCPY(server, p); + g_free(p); + } + p = gnome_config_get_string ("Player/Team"); if (p) { GTET_O_STRCPY(team, p); @@ -218,6 +224,7 @@ void config_saveconfig (void) gnome_config_set_int ("Sound/EnableMidi", midienable); gnome_config_set_string ("Player/Nickname", nick); + gnome_config_set_string ("Player/Server", server); gnome_config_set_string ("Player/Team", team); gnome_config_set_int ("Keys/Right", keys[K_RIGHT]);