diff options
author | Alberto Mardegan <mardy@users.sourceforge.net> | 2013-04-02 18:46:41 +0300 |
---|---|---|
committer | Alberto Mardegan <mardy@users.sourceforge.net> | 2013-04-02 19:55:44 +0300 |
commit | 2f759f52e12e2e065f6022797dc51106a7093899 (patch) | |
tree | c0c4c6ec66f6ce3e774d6b5545d28d3fcb4b5023 /qt-gui.cpp | |
parent | 40e3671bd2656be9657abe8c6d955cef612805c5 (diff) | |
download | subsurface-2f759f52e12e2e065f6022797dc51106a7093899.tar.gz |
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 <mardy@users.sourceforge.net>
Diffstat (limited to 'qt-gui.cpp')
-rw-r--r-- | qt-gui.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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) { |