From: Dirk Hohndel Date: Fri, 21 Oct 2011 13:12:04 +0000 (-0700) Subject: Make the first filename on the command line the default filename X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=e55b95b415e28e053ad3941f9bd3c41ea461ca58;p=ext%2Fsubsurface.git 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 --- diff --git a/gtk-gui.c b/gtk-gui.c index 351e7b9..b28ca25 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; }