From: Kaj-Michael Lang Date: Wed, 31 Oct 2007 07:12:52 +0000 (+0200) Subject: Call *_deinit/_init routines when reconnecting to database. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de927c64b442002e3f9e87cefc713f24deb7bcb1;p=mapper Call *_deinit/_init routines when reconnecting to database. --- 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. */