summaryrefslogtreecommitdiffstats
path: root/gtk-gui.c
diff options
context:
space:
mode:
authorGravatar Alberto Mardegan <mardy@users.sourceforge.net>2013-04-02 18:46:41 +0300
committerGravatar Henrik Brautaset Aronsen <subsurface@henrik.synth.no>2013-04-07 17:37:09 +0200
commit68119c5b5415c2797e11356dc8db63bd84c577cf (patch)
tree69984129fe914f3cae60523227fc20f1c62eb173 /gtk-gui.c
parent0b8462bd584c7606e3a9091947ccdbf04a32dea8 (diff)
downloadsubsurface-68119c5b5415c2797e11356dc8db63bd84c577cf.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: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Alberto Mardegan <mardy@users.sourceforge.net>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r--gtk-gui.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk-gui.c b/gtk-gui.c
index 91a70acf0..becf0fdac 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -321,7 +321,8 @@ static void file_open(GtkWidget *w, gpointer data)
GError *error = NULL;
filename = fn_glist->data;
- parse_file(filename, &error, TRUE);
+ parse_file(filename, &error);
+ set_filename(filename, TRUE);
if (error != NULL)
{
report_error(error);
@@ -2204,7 +2205,7 @@ static GtkWidget *dive_profile_widget(void)
static void do_import_file(gpointer data, gpointer user_data)
{
GError *error = NULL;
- parse_file(data, &error, FALSE);
+ parse_file((const char *)data, &error);
if (error != NULL)
{