X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpage-sheet-spec.c;h=76b3ff6436279836879f4ef127d9afbbc74f90b3;hb=03a7b96a587a58bda342b4eb5ce5f935880ba2b7;hp=3d92bfe4100929a074d6718a76c98115b23b1de0;hpb=bbc9e4f23035409965750a6970f888a3dfe649c6;p=pspp diff --git a/src/ui/gui/page-sheet-spec.c b/src/ui/gui/page-sheet-spec.c index 3d92bfe410..76b3ff6436 100644 --- a/src/ui/gui/page-sheet-spec.c +++ b/src/ui/gui/page-sheet-spec.c @@ -22,7 +22,6 @@ #include #include -#include #include #include #include @@ -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 -#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));