Set the filename on loading a new file
authorJohn Darrington <john@darrington.wattle.id.au>
Mon, 23 Feb 2009 04:29:17 +0000 (13:29 +0900)
committerJohn Darrington <john@darrington.wattle.id.au>
Mon, 23 Feb 2009 04:29:17 +0000 (13:29 +0900)
src/ui/gui/psppire-data-window.c

index e2fa79692c112534e756b622601b02af6e2fa848..1afa9e6c70840c4cd7fde949f0ee4b8cdbdd8b16 100644 (file)
@@ -340,6 +340,8 @@ psppire_data_window_load_file (PsppireDataWindow *de,
   }
 
   psppire_window_set_unsaved (PSPPIRE_WINDOW (de), FALSE);
+  free (de->file_name);
+  de->file_name = g_strdup (file_name);
 }
 
 
@@ -563,7 +565,7 @@ data_save_as_dialog (GtkAction *action, PsppireDataWindow *de)
 static void
 data_save (GtkAction *action, PsppireDataWindow *de)
 {
-  if ( de->file_name)
+  if (de->file_name)
     save_file (de);
   else
     data_save_as_dialog (action, de);