X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-data-store.c;h=f97b8eaf1cdc5b246ec81685e590640b79686fd0;hb=4eb2e820b01d92ef662c741f5ac30f08bedd1de6;hp=d0322204e413da1bb97de98c48203c6d1d76ad59;hpb=17ca35e4ca8abf4ba0c0ae82920b985fa17648cf;p=pspp diff --git a/src/ui/gui/psppire-data-store.c b/src/ui/gui/psppire-data-store.c index d0322204e4..f97b8eaf1c 100644 --- a/src/ui/gui/psppire-data-store.c +++ b/src/ui/gui/psppire-data-store.c @@ -130,11 +130,22 @@ __iter_nth_child (GtkTreeModel *tree_model, return TRUE; } +/* Set the contents of OUT to reflect the information provided by IN, COL, and + ROW, for MODEL. Returns TRUE if successful. */ gboolean -myreversefunc (GtkTreeModel *model, gint col, gint row, - const gchar *in, GValue *out) +psppire_data_store_string_to_value (GtkTreeModel *model, gint col, gint row, + const gchar *in, GValue *out) { - PsppireDataStore *store = PSPPIRE_DATA_STORE (model); + PsppireDataStore *store = PSPPIRE_DATA_STORE (model); + + while (col >= psppire_dict_get_var_cnt (store->dict)) + { + const struct variable *var = + psppire_dict_insert_variable (store->dict, + psppire_dict_get_var_cnt (store->dict), + NULL); + g_return_val_if_fail (var, FALSE); + } const struct variable *variable = psppire_dict_get_variable (store->dict, col); g_return_val_if_fail (variable, FALSE);