#include "psppire-import-assistant.h"
#include "psppire-scanf.h"
#include "psppire-dialog.h"
#include "psppire-empty-list-store.h"
#include "psppire-encoding-selector.h"
#include "psppire-spreadsheet-model.h"
#include "psppire-import-assistant.h"
#include "psppire-scanf.h"
#include "psppire-dialog.h"
#include "psppire-empty-list-store.h"
#include "psppire-encoding-selector.h"
#include "psppire-spreadsheet-model.h"
static GtkWidget *
add_page_to_assistant (PsppireImportAssistant *ia,
GtkWidget *page, GtkAssistantPageType type, const gchar *);
static GtkWidget *
add_page_to_assistant (PsppireImportAssistant *ia,
GtkWidget *page, GtkAssistantPageType type, const gchar *);
g_object_set (cell, "text", ds_cstr (&lines[row]), NULL);
}
g_object_set (cell, "text", ds_cstr (&lines[row]), NULL);
}
/* Sets the widgets to match IA's first_line substructure. */
static void
set_first_line (PsppireImportAssistant *ia)
{
GtkTreePath *path = gtk_tree_path_new_from_indices (ia->skip_lines, -1);
/* Sets the widgets to match IA's first_line substructure. */
static void
set_first_line (PsppireImportAssistant *ia)
{
GtkTreePath *path = gtk_tree_path_new_from_indices (ia->skip_lines, -1);
/* Sets IA's first_line substructure to match the widgets. */
static void
set_first_line_options (PsppireImportAssistant *ia)
/* Sets IA's first_line substructure to match the widgets. */
static void
set_first_line_options (PsppireImportAssistant *ia)
add_page_to_assistant (ia, w,
GTK_ASSISTANT_PAGE_CONTENT, _("Select the First Line"));
add_page_to_assistant (ia, w,
GTK_ASSISTANT_PAGE_CONTENT, _("Select the First Line"));
ia->tree_view = GTK_WIDGET (create_lines_tree_view (
GTK_CONTAINER (get_widget_assert (ia->builder, "first-line-scroller")), ia));
ia->variable_names_cb = get_widget_assert (ia->builder, "variable-names");
ia->tree_view = GTK_WIDGET (create_lines_tree_view (
GTK_CONTAINER (get_widget_assert (ia->builder, "first-line-scroller")), ia));
ia->variable_names_cb = get_widget_assert (ia->builder, "variable-names");
/* Parses the contents of the field at (ROW,COLUMN) according to
its variable format. If OUTPUTP is non-null, then *OUTPUTP
/* Parses the contents of the field at (ROW,COLUMN) according to
its variable format. If OUTPUTP is non-null, then *OUTPUTP
static PsppSheetViewColumn *
make_data_column (PsppireImportAssistant *ia, GtkWidget *tree_view,
bool input, gint dict_idx)
static PsppSheetViewColumn *
make_data_column (PsppireImportAssistant *ia, GtkWidget *tree_view,
bool input, gint dict_idx)
static GtkWidget *
create_data_tree_view (gboolean input, GtkContainer *parent,
PsppireImportAssistant *ia)
{
gint i;
static GtkWidget *
create_data_tree_view (gboolean input, GtkContainer *parent,
PsppireImportAssistant *ia)
{
gint i;
GtkWidget *tree_view = make_tree_view (ia);
set_model_on_treeview (ia, tree_view, ia->skip_lines);
GtkWidget *tree_view = make_tree_view (ia);
set_model_on_treeview (ia, tree_view, ia->skip_lines);
pspp_sheet_selection_set_mode (pspp_sheet_view_get_selection (PSPP_SHEET_VIEW (tree_view)),
PSPP_SHEET_SELECTION_NONE);
pspp_sheet_selection_set_mode (pspp_sheet_view_get_selection (PSPP_SHEET_VIEW (tree_view)),
PSPP_SHEET_SELECTION_NONE);
/* Chooses a name for each column on the separators page */
static void
choose_column_names (PsppireImportAssistant *ia)
/* Chooses a name for each column on the separators page */
static void
choose_column_names (PsppireImportAssistant *ia)
gchar *
psppire_import_assistant_generate_syntax (PsppireImportAssistant *ia)
{
struct string s = DS_EMPTY_INITIALIZER;
gchar *
psppire_import_assistant_generate_syntax (PsppireImportAssistant *ia)
{
struct string s = DS_EMPTY_INITIALIZER;