Merge remote branch 'origin/master' into import-gui
[pspp] / src / ui / gui / page-file.c
index 2647bb5c256006656c13d552783e8e26796d53da..fdbda325f8ffdc0771cfb647a108a6124865874d 100644 (file)
@@ -20,7 +20,6 @@
 
 #include <errno.h>
 #include <fcntl.h>
-#include <gtk-contrib/psppire-sheet.h>
 #include <gtk/gtk.h>
 #include <limits.h>
 #include <stdlib.h>
@@ -50,7 +49,6 @@
 #include "ui/gui/psppire-encoding-selector.h"
 #include "ui/gui/psppire-empty-list-store.h"
 #include "ui/gui/psppire-var-sheet.h"
-#include "ui/gui/psppire-var-store.h"
 #include "ui/gui/psppire-scanf.h"
 #include "ui/syntax-gen.h"
 
@@ -81,32 +79,18 @@ init_file (struct import_assistant *ia, GtkWindow *parent_window)
 {
   enum { MAX_LINE_LEN = 16384 }; /* Max length of an acceptable line. */
   struct file *file = &ia->file;
-  struct spreadsheet_read_options opts;
 
   file->lines = NULL;
   file->file_name = choose_file (parent_window, &file->encoding);
   if (file->file_name == NULL)
     return false;
 
-  opts.sheet_name = NULL;
-  opts.cell_range = NULL;
-  opts.sheet_index = 1;
-
-  opts.read_names = true;
-  opts.asw = -1;
-
-  printf ("%s:%d %p\n", __FILE__, __LINE__, ia->spreadsheet);
-
   if (ia->spreadsheet == NULL)
     ia->spreadsheet = gnumeric_probe (file->file_name, false);
 
-  printf ("%s:%d %p\n", __FILE__, __LINE__, ia->spreadsheet);
-
   if (ia->spreadsheet == NULL)
     ia->spreadsheet = ods_probe (file->file_name, false);
 
-  printf ("%s:%d %p\n", __FILE__, __LINE__, ia->spreadsheet);
-  
   if (ia->spreadsheet == NULL)
     {
     struct string input;
@@ -217,7 +201,7 @@ choose_file (GtkWindow *parent_window, gchar **encodingp)
   g_object_set (dialog, "local-only", FALSE, NULL);
 
   filter = gtk_file_filter_new ();
-  gtk_file_filter_set_name (filter, _("Text files"));
+  gtk_file_filter_set_name (filter, _("Text Files"));
   gtk_file_filter_add_mime_type (filter, "text/*");
   gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
 
@@ -260,7 +244,6 @@ choose_file (GtkWindow *parent_window, gchar **encodingp)
   gtk_file_filter_add_mime_type (filter, "application/vnd.oasis.opendocument.spreadsheet");
   gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
 
-
   gtk_file_chooser_set_extra_widget (
     GTK_FILE_CHOOSER (dialog), psppire_encoding_selector_new ("Auto", true));