{
PsppireDataStore *store = PSPPIRE_DATA_STORE (tree_model);
+ if (store->datasheet == NULL)
+ return 0;
+
gint n = datasheet_get_n_rows (store->datasheet);
return n;
PsppireDataStore *store = PSPPIRE_DATA_STORE (tree_model);
g_assert (parent == NULL);
-
g_return_val_if_fail (store, FALSE);
- g_return_val_if_fail (store->datasheet, FALSE);
- if (n >= datasheet_get_n_rows (store->datasheet))
+ if (!store->datasheet || n >= datasheet_get_n_rows (store->datasheet))
{
iter->stamp = -1;
iter->user_data = NULL;
#include "psppire-spreadsheet-model.h"
#include "psppire-text-file.h"
#include "psppire-delimited-text.h"
+#include "psppire-data-sheet.h"
+#include "psppire-data-store.h"
+#include "psppire-dict.h"
+#include "psppire-variable-sheet.h"
#include "ui/syntax-gen.h"
{
PsppireDict *dict = psppire_dict_new_from_dict (ia->dict);
g_object_set (ia->var_sheet, "data-model", dict, NULL);
+
+ PsppireDataStore *store = psppire_data_store_new (dict);
+ g_object_set (ia->data_sheet, "data-model", store, NULL);
}
static void
gtk_widget_show_all (vars_scroller);
}
+ GtkWidget *data_scroller = get_widget_assert (builder, "data-scroller");
+ if (ia->data_sheet == NULL)
+ {
+ ia->data_sheet = psppire_data_sheet_new ();
+
+ gtk_container_add (GTK_CONTAINER (data_scroller), ia->data_sheet);
+
+ gtk_widget_show_all (data_scroller);
+ }
add_page_to_assistant (ia, w,
GTK_ASSISTANT_PAGE_CONFIRM, _("Adjust Variable Formats"));