Call dictionary callbacks on replaced dictionary.
[pspp-builds.git] / src / ui / gui / data-editor.c
index 0d60b9cd7dcb842164c6a9b2fd6608504572ed45..4d7d6b5c5deec4bbcc81d5ab409b7191777f5407 100644 (file)
@@ -948,14 +948,19 @@ data_save_as_dialog (GtkAction *action, struct data_editor *de)
 /* Callback for data_new action.
    Performs the NEW FILE command */
 static void
-new_file (GtkAction *action, struct editor_window *de)
+new_file (GtkAction *action, struct editor_window *e)
 {
+  struct data_editor *de = (struct data_editor *) e;
+
   struct getl_interface *sss =
     create_syntax_string_source ("NEW FILE.");
 
   execute_syntax (sss);
 
-  default_window_name (de);
+  g_free (de->file_name);
+  de->file_name = NULL;
+
+  default_window_name (e);
 }