Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
extern void parse_xml_init(void);
extern void parse_xml_file(const char *filename, GError **error);
+extern void set_filename(const char *filename);
extern void show_dive_info(struct dive *);
extern void flush_dive_info_changes(struct dive *);
{
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress->bar), value);
}
+
+
+void set_filename(const char *filename)
+{
+ if (filename)
+ existing_filename = strdup(filename);
+ return;
+}
}
return;
}
-
+ /* we assume that the last (or only) filename passed as argument is a
+ * great filename to use as default when saving the dives */
+ set_filename(filename);
reset_all();
dive_start();
traverse(xmlDocGetRootElement(doc));