Whitespace changes only
[pspp] / src / ui / gui / page-sheet-spec.c
index 5bd1aa40b869729aaa2acee46d98ec1ccc444948..76b3ff6436279836879f4ef127d9afbbc74f90b3 100644 (file)
@@ -40,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"
@@ -57,7 +56,6 @@
 
 #include <data/casereader.h>
 
-#include "gl/error.h"
 #include "gl/intprops.h"
 #include "gl/xalloc.h"
 
@@ -164,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);
 }
 
 
@@ -176,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, 
@@ -209,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));