mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Allow using two different tables to hold dives and gps locations
This only changes the infrastructure and actually loses functionality as it no longer does the simplistic "just treat the locations as dives and merge them". The new code that does something "smart" with the gps_location_table is yet to be written. But now we can use the XML parser to put the gps locations downloaded from the webservice into their own data structure. In the process I noticed that we never used the two delete functions in parse-xml.c and removed them. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9099972c20
commit
8843ee6156
4 changed files with 24 additions and 70 deletions
|
@ -6,6 +6,8 @@
|
|||
#include "dive.h"
|
||||
#include "display-gtk.h"
|
||||
|
||||
struct dive_table gps_location_table;
|
||||
|
||||
enum {
|
||||
DD_STATUS_OK,
|
||||
DD_STATUS_ERROR_CONNECT,
|
||||
|
@ -203,8 +205,9 @@ void webservice_download_dialog(void)
|
|||
result = gtk_dialog_run(GTK_DIALOG(dialog));
|
||||
if (result == GTK_RESPONSE_ACCEPT) {
|
||||
/* apply download */
|
||||
parse_xml_buffer(_("Webservice"), state.xmldata, state.xmldata_len, NULL);
|
||||
report_dives(TRUE, FALSE);
|
||||
parse_xml_buffer(_("Webservice"), state.xmldata, state.xmldata_len, &gps_location_table, NULL);
|
||||
/* now merge the data in the gps_location table into the dive_table */
|
||||
// TBD
|
||||
/* store last entered uid in config */
|
||||
subsurface_set_conf("webservice_uid", gtk_entry_get_text(GTK_ENTRY(uid)));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue