gtk_tree_view_remove_column (GTK_TREE_VIEW (ia->fields_tree_view), tvc);
}
- gint n_fields = gtk_tree_model_get_n_columns (ia->delimiters_model);
+ gint n_fields =
+ gtk_tree_model_get_n_columns (GTK_TREE_MODEL (ia->delimiters_model));
/* ... and put them back again. */
gint f;
static void
prepare_separators_page (PsppireImportAssistant *ia, GtkWidget *page)
{
- gtk_tree_view_set_model (GTK_TREE_VIEW (ia->fields_tree_view), ia->delimiters_model);
+ gtk_tree_view_set_model (GTK_TREE_VIEW (ia->fields_tree_view),
+ GTK_TREE_MODEL (ia->delimiters_model));
- g_signal_connect_swapped (ia->delimiters_model, "notify::delimiters",
+ g_signal_connect_swapped (GTK_TREE_MODEL (ia->delimiters_model), "notify::delimiters",
G_CALLBACK (reset_tree_view_model), ia);
Set the text to a "insensitive" state if the row
is greater than what the user declared to be the maximum.
*/
- PsppireImportAssistant *ia = PSPPIRE_IMPORT_ASSISTANT (data);
GtkTreePath *path = gtk_tree_model_get_path (tree_model, iter);
gint *ii = gtk_tree_path_get_indices (path);
gint max_lines;
gtk_combo_box_set_entry_text_column (cb, 0);
}
-
-
/* Chooses a name for each column on the separators page */
static void
choose_column_names (PsppireImportAssistant *ia)
unsigned long int generated_name_count = 0;
dict_clear (ia->dict);
- for (i = 0; i < gtk_tree_model_get_n_columns (ia->delimiters_model) - 1; ++i)
+ for (i = 0;
+ i < gtk_tree_model_get_n_columns (GTK_TREE_MODEL (ia->delimiters_model)) - 1;
+ ++i)
{
const gchar *candidate_name = NULL;
}
}
-
-
/* Called when the user toggles one of the separators
checkboxes. */
static void
}
- gint n_rows = gtk_tree_model_iter_n_children (ia->delimiters_model, NULL);
+ gint n_rows = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (ia->delimiters_model), NULL);
struct casereader *reader =
casereader_create_random (proto, n_rows, &my_casereader_class, ia);
fg[i] = fmt_guesser_create ();
}
- gint n_rows = gtk_tree_model_iter_n_children (ia->delimiters_model, NULL);
+ gint n_rows = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (ia->delimiters_model), NULL);
GtkTreeIter iter;
gboolean ok;
- for (ok = gtk_tree_model_get_iter_first (ia->delimiters_model, &iter);
+ for (ok = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (ia->delimiters_model), &iter);
ok;
- ok = gtk_tree_model_iter_next (ia->delimiters_model, &iter))
+ ok = gtk_tree_model_iter_next (GTK_TREE_MODEL (ia->delimiters_model), &iter))
{
for (i = 0 ; i < dict_get_var_cnt (ia->dict); ++i)
{
gchar *s = NULL;
- gtk_tree_model_get (ia->delimiters_model, &iter, i+1, &s, -1);
+ gtk_tree_model_get (GTK_TREE_MODEL (ia->delimiters_model), &iter, i+1, &s, -1);
if (s)
fmt_guesser_add (fg[i], ss_cstr (s));
free (s);
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2015 Free Software Foundation
+ Copyright (C) 2015, 2017 Free Software Foundation
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <gtk/gtk.h>
-#include "libpspp/str.h"
#include "psppire-dict.h"
#include "data/spreadsheet-reader.h"
#include "psppire-text-file.h"
+#include "psppire-delimited-text.h"
G_BEGIN_DECLS
int response;
PsppireTextFile *text_file;
- GtkTreeModel *delimiters_model;
+ PsppireDelimitedText *delimiters_model;
struct sheet_spec_page *sheet_spec;