Made the text import dialogs sort of work again
[pspp] / src / ui / gui / page-separators.c
index 999950bcaf45f8d13213c148b9a5eb589344d78c..fee511e0c308c99d43dd019d3323daf9289ab851 100644 (file)
@@ -16,6 +16,8 @@
 
 #include <config.h>
 
+#include "page-separators.h"
+
 #include "ui/gui/text-data-import-dialog.h"
 
 #include <errno.h>
@@ -159,6 +161,7 @@ separators_page_create (struct import_assistant *ia)
 
   p->page = add_page_to_assistant (ia, get_widget_assert (builder, "Separators"),
                                    GTK_ASSISTANT_PAGE_CONTENT);
+
   p->custom_cb = get_widget_assert (builder, "custom-cb");
   p->custom_entry = get_widget_assert (builder, "custom-entry");
   p->quote_combo = get_widget_assert (builder, "quote-combo");
@@ -347,14 +350,13 @@ split_fields (struct import_assistant *ia)
 static void
 choose_column_names (struct import_assistant *ia)
 {
-  const struct first_line_page *f = ia->first_line;
   struct dictionary *dict;
   unsigned long int generated_name_count = 0;
   struct column *col;
   size_t name_row;
 
   dict = dict_create (get_default_encoding ());
-  name_row = f->variable_names && f->skip_lines ? f->skip_lines : 0;
+  name_row = ia->variable_names && ia->skip_lines ? ia->skip_lines : 0;
   for (col = ia->columns; col < &ia->columns[ia->column_cnt]; col++)
     {
       char *hint, *name;