X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-var-view.c;h=0e72cb3717d784c1df0f7a0fba1d6561a72d0692;hb=c2d972816fce591524db963390a97ff32d55117c;hp=f8625d5bd749ec2df021c924d0891793b6e28b69;hpb=cdfb21de2cbbf921b4e1fe0662439da1c460eabc;p=pspp diff --git a/src/ui/gui/psppire-var-view.c b/src/ui/gui/psppire-var-view.c index f8625d5bd7..0e72cb3717 100644 --- a/src/ui/gui/psppire-var-view.c +++ b/src/ui/gui/psppire-var-view.c @@ -371,6 +371,31 @@ psppire_var_view_append_names (PsppireVarView *vv, gint column, GString *string) return n_vars; } +/* Return a linked list of struct variables which are + contained in VV. + The caller is responsible for freeing the returned list. + The variables however are owned by their dictionary + and should not be freed. + */ +GSList * +psppire_var_view_list_names (PsppireVarView *vv, gint column) +{ + GtkTreeIter iter; + GSList *list = NULL; + + if ( psppire_var_view_get_iter_first (vv, &iter) ) + { + do + { + const struct variable *var = psppire_var_view_get_variable (vv, column, &iter); + list = g_slist_prepend (list, var); + } + while (psppire_var_view_get_iter_next (vv, &iter)); + } + + return list; +} + /* Append the names of selected variables to STR