A file that we import should never become the default file we save to

Only files that are opened should be considered r/w. Files that are
imported should be treated as if they were r/o.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2012-10-09 21:50:16 +09:00
parent ffd3b8591d
commit a2afe41280
5 changed files with 18 additions and 14 deletions

View file

@ -336,7 +336,7 @@ static void file_open(GtkWidget *w, gpointer data)
GError *error = NULL;
filename = fn_glist->data;
parse_file(filename, &error);
parse_file(filename, &error, TRUE);
if (error != NULL)
{
report_error(error);
@ -1371,7 +1371,7 @@ static GtkEntry *dive_computer_device(GtkWidget *vbox)
static void do_import_file(gpointer data, gpointer user_data)
{
GError *error = NULL;
parse_file(data, &error);
parse_file(data, &error, FALSE);
if (error != NULL)
{
@ -1440,7 +1440,7 @@ static GError *setup_uemis_import(device_data_t *data)
#ifdef DEBUGFILE
fprintf(debugfile, "xml buffer \"%s\"\n\n", buf);
#endif
parse_xml_buffer("Uemis Download", buf, strlen(buf), &error);
parse_xml_buffer("Uemis Download", buf, strlen(buf), &error, FALSE);
set_uemis_last_dive(uemis_max_dive_data);
#if UEMIS_DEBUG
fprintf(debugfile, "uemis_max_dive_data: %s\n", uemis_max_dive_data);