summaryrefslogtreecommitdiffstats
path: root/gtk-gui.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2011-10-21 06:12:04 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2011-10-21 06:12:04 -0700
commite55b95b415e28e053ad3941f9bd3c41ea461ca58 (patch)
treed9ce56b20fbc3b6d2785c2c9a58866373deb8404 /gtk-gui.c
parent41084817eaa30204c1144f5c1fd1b5567d486da8 (diff)
downloadsubsurface-e55b95b415e28e053ad3941f9bd3c41ea461ca58.tar.gz
Make the first filename on the command line the default filename
From a usecase point of view - if we call with multiple file names then most likely it's subsurface MyDives.xml new_dive1.xml new_dive2.xml and therefore the existing "database" is the first filename, not the last one (as the current implementation assumes). Frankly, this is a bit arbitrary - but this one seems to make more sense. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r--gtk-gui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk-gui.c b/gtk-gui.c
index 351e7b9f4..b28ca2513 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -989,7 +989,7 @@ void update_progressbar(progressbar_t *progress, double value)
void set_filename(const char *filename)
{
- if (filename)
+ if (!existing_filename && filename)
existing_filename = strdup(filename);
return;
}