From 39470b841979a6494f9c50e7458750931b24163e Mon Sep 17 00:00:00 2001 From: Jordi Albornoz Date: Mon, 28 Oct 2002 00:37:31 +0000 Subject: [PATCH] patch from James Antill. Save & restore the last used server. --- ChangeLog | 5 +++++ src/config.c | 7 +++++++ 2 files changed, 12 insertions(+) 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]); -- 2.50.1