From 2f759f52e12e2e065f6022797dc51106a7093899 Mon Sep 17 00:00:00 2001 From: Alberto Mardegan Date: Tue, 2 Apr 2013 18:46:41 +0300 Subject: Move set_filename() calls outside of parse_file() Remove the boolean parameter from parse_file; the code is more readable by having an explicit call to set_filename() where necessary, rather than a boolean parameter. Signed-off-by: Alberto Mardegan --- qt-gui.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'qt-gui.cpp') diff --git a/qt-gui.cpp b/qt-gui.cpp index 0fbcf2555..2e3f2c903 100644 --- a/qt-gui.cpp +++ b/qt-gui.cpp @@ -348,7 +348,8 @@ static void file_open(GtkWidget *w, gpointer data) GError *error = NULL; filename = (char *)fn_glist->data; - parse_file(filename, &error, TRUE); + parse_file(filename, &error); + set_filename(filename, TRUE); if (error != NULL) { report_error(error); @@ -2236,7 +2237,7 @@ static GtkWidget *dive_profile_widget(void) static void do_import_file(gpointer data, gpointer user_data) { GError *error = NULL; - parse_file((const char *)data, &error, FALSE); + parse_file((const char *)data, &error); if (error != NULL) { -- cgit v1.2.3-70-g09d2