From de927c64b442002e3f9e87cefc713f24deb7bcb1 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Wed, 31 Oct 2007 09:12:52 +0200 Subject: [PATCH] Call *_deinit/_init routines when reconnecting to database. --- src/settings-gui.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/settings-gui.c b/src/settings-gui.c index d4c35bc..541a977 100644 --- a/src/settings-gui.c +++ b/src/settings-gui.c @@ -656,15 +656,19 @@ settings_dialog(void) speak_set_parameters(_voice_speed, _voice_pitch); if (_db) { + poi_deinit(_db); + osm_deinit(_db); db_close(&_db); _db = NULL; } g_free(_mapper_db); if (strlen(gtk_entry_get_text(GTK_ENTRY(txt_mapper_db)))) { - _mapper_db = g_strdup(gtk_entry_get_text(GTK_ENTRY(txt_mapper_db))); + _mapper_db=g_strdup(gtk_entry_get_text(GTK_ENTRY(txt_mapper_db))); db_connect(&_db, _mapper_db); + poi_init(&_db); + osm_init(&_db); } else { - _mapper_db = NULL; + _mapper_db=NULL; } /* Sensitize menus based on whether we have a database conn. */ -- 2.39.5