tPass old file name to GetOpenFileName if it is non-NULL. - vaccinewars - be a doctor and try to vaccinate the world
 (HTM) git clone git://src.adamsgaard.dk/vaccinewars
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 70816929c3600588b49fe43ccae0ac579719a84f
 (DIR) parent 35f822749aa9f3d6331d8327f721d55d7f748eef
 (HTM) Author: Ben Webb <ben@salilab.org>
       Date:   Mon,  2 Sep 2002 13:44:03 +0000
       
       Pass old file name to GetOpenFileName if it is non-NULL.
       
       
       Diffstat:
         M src/gtkport/gtkport.c               |       6 ++++++
       
       1 file changed, 6 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/src/gtkport/gtkport.c b/src/gtkport/gtkport.c
       t@@ -5217,6 +5217,12 @@ gchar *GtkGetFile(const GtkWidget *parent, const gchar *oldname,
          OPENFILENAME ofn;
          char file[800];
        
       +  if (oldname) {
       +    strncpy(file, oldname, sizeof(file));
       +    file[sizeof(file) - 1] = '\0';
       +  } else {
       +    file[0] = '\0';
       +  }
          ofn.lStructSize = sizeof(OPENFILENAME);
          ofn.hwndOwner = parent ? parent->hWnd : NULL;
          ofn.hInstance = NULL;