X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpage-assistant.c;h=e287516f2ae22ceb9dbef2456a6758f9158e582a;hb=refs%2Fheads%2Fpivot-table2;hp=f6af6871117e8441e07ca65e79fb0e68c2488df2;hpb=2d6d9b367124748b98ae650d5e5b4f227b5f2339;p=pspp diff --git a/src/ui/gui/page-assistant.c b/src/ui/gui/page-assistant.c index f6af687111..e287516f2a 100644 --- a/src/ui/gui/page-assistant.c +++ b/src/ui/gui/page-assistant.c @@ -35,7 +35,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" @@ -46,7 +45,6 @@ #include "ui/gui/psppire-empty-list-store.h" #include "ui/gui/psppire-var-sheet.h" -#include "gl/error.h" #include "gl/intprops.h" #include "gl/xalloc.h" @@ -158,19 +156,34 @@ on_prepare (GtkAssistant *assistant, GtkWidget *page, if ( ia->spreadsheet) { if (pn == 0) - { - } + { + prepare_sheet_spec_page (ia); + } else if (pn == 1) { + post_sheet_spec_page (ia); prepare_formats_page (ia); } } else { - if (pn == 0) - prepare_separators_page (ia); - else if (pn == 3) - prepare_formats_page (ia); + switch (pn) + { + case 0: + reset_intro_page (ia); + break; + case 1: + reset_first_line_page (ia); + break; + case 2: + prepare_separators_page (ia); + reset_separators_page (ia); + break; + case 3: + prepare_formats_page (ia); + reset_formats_page (ia); + break; + } } @@ -204,21 +217,26 @@ on_paste (GtkButton *button, struct import_assistant *ia) close_assistant (ia, PSPPIRE_RESPONSE_PASTE); } -static GtkWidget * -assist_get_page (struct assist_page *ap) -{ - if (ap == NULL) - return NULL; - - return ap->page; -} - /* Called when the Reset button is clicked. */ static void on_reset (GtkButton *button, struct import_assistant *ia) { gint pn = gtk_assistant_get_current_page (ia->asst.assistant); + if ( ia->spreadsheet) + { + switch (pn) + { + case 0: + reset_sheet_spec_page (ia); + break; + case 1: + reset_formats_page (ia); + break; + } + } + else + { switch (pn) { case 0: @@ -234,6 +252,7 @@ on_reset (GtkButton *button, struct import_assistant *ia) reset_formats_page (ia); break; } + } } /* Causes the assistant to close, returning RESPONSE for