Whitespace changes only
[pspp] / src / ui / gui / page-sheet-spec.c
index 3d92bfe4100929a074d6718a76c98115b23b1de0..76b3ff6436279836879f4ef127d9afbbc74f90b3 100644 (file)
@@ -22,7 +22,6 @@
 
 #include <errno.h>
 #include <fcntl.h>
-#include <gtk-contrib/psppire-sheet.h>
 #include <gtk/gtk.h>
 #include <limits.h>
 #include <stdlib.h>
@@ -41,7 +40,6 @@
 #include "libpspp/i18n.h"
 #include "libpspp/line-reader.h"
 #include "libpspp/message.h"
-#include "ui/gui/checkbox-treeview.h"
 #include "ui/gui/dialog-common.h"
 #include "ui/gui/executor.h"
 #include "ui/gui/helper.h"
@@ -51,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"
 
@@ -59,7 +56,6 @@
 
 #include <data/casereader.h>
 
-#include "gl/error.h"
 #include "gl/intprops.h"
 #include "gl/xalloc.h"
 
@@ -166,11 +162,14 @@ prepare_sheet_spec_page (struct import_assistant *ia)
 {
   GtkBuilder *builder = ia->asst.builder;
   GtkWidget *sheet_entry = get_widget_assert (builder, "sheet-entry");
+  GtkWidget *readnames_checkbox = get_widget_assert (builder, "readnames-checkbox");
 
   gtk_combo_box_set_model (GTK_COMBO_BOX (sheet_entry), 
                           psppire_spreadsheet_model_new (ia->spreadsheet));
 
   gtk_combo_box_set_active (GTK_COMBO_BOX (sheet_entry), 0);
+
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (readnames_checkbox), FALSE);
 }
 
 
@@ -178,7 +177,13 @@ prepare_sheet_spec_page (struct import_assistant *ia)
 void
 reset_sheet_spec_page (struct import_assistant *ia)
 {
-  printf ("%s\n", __FUNCTION__);
+  GtkBuilder *builder = ia->asst.builder;
+  GtkWidget *sheet_entry = get_widget_assert (builder, "sheet-entry");
+  GtkWidget *readnames_checkbox = get_widget_assert (builder, "readnames-checkbox");
+
+  gtk_combo_box_set_active (GTK_COMBO_BOX (sheet_entry), 0);
+
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (readnames_checkbox), FALSE);
 }
 
 /* Called when the Forward button is clicked, 
@@ -211,7 +216,7 @@ post_sheet_spec_page (struct import_assistant *ia)
 
   if ( convert_cell_ref (range, &col_start, &row_start, &col_stop, &row_stop))
     {
-      ssp->opts.cell_range = range;
+      ssp->opts.cell_range = g_strdup (range);
     }
 
   ssp->opts.read_names = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (readnames_checkbox));