#include <config.h>
+#include "page-intro.h"
+
#include "ui/gui/text-data-import-dialog.h"
#include <errno.h>
\f
/* The "intro" page of the assistant. */
+/* The introduction page of the assistant. */
+struct intro_page
+ {
+ GtkWidget *page;
+ GtkWidget *all_cases_button;
+ GtkWidget *n_cases_button;
+ GtkWidget *n_cases_spin;
+ GtkWidget *percent_button;
+ GtkWidget *percent_spin;
+ };
+
static void on_intro_amount_changed (struct intro_page *);
/* Initializes IA's intro substructure. */
gtk_toggle_button_get_active (
GTK_TOGGLE_BUTTON (p->percent_button)));
}
+
+
+void
+intro_append_syntax (const struct intro_page *p, struct string *s)
+{
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (p->n_cases_button)))
+ ds_put_format (s, " /IMPORTCASES=FIRST %d\n",
+ gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (p->n_cases_spin)));
+ else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (p->percent_button)))
+ ds_put_format (s, " /IMPORTCASES=PERCENT %d\n",
+ gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (p->percent_spin)));
+ else
+ ds_put_cstr (s, " /IMPORTCASES=ALL\n");
+}