- return n_vars;
-}
-
-
-
-struct variable *
-get_selected_variable (GtkTreeModel *treemodel,
- GtkTreeIter *iter,
- PsppireDict *dict)
-{
- struct variable *var;
- GValue value = {0};
-
- GtkTreePath *path = gtk_tree_model_get_path (treemodel, iter);
-
- gtk_tree_model_get_value (treemodel, iter, 0, &value);
-
- gtk_tree_path_free (path);
-
- var = psppire_dict_get_variable (dict, g_value_get_int (&value));
-
- g_value_unset (&value);
-
- return var;
-}
-
-
-
-
-/* A (*GtkTreeCellDataFunc) function.
- This function expects TREEMODEL to hold G_TYPE_INT. The ints it holds
- are the indices of the variables in the dictionary, which DATA points to.
- It renders the name of the variable into CELL.
-*/
-void
-cell_var_name (GtkTreeViewColumn *tree_column,
- GtkCellRenderer *cell,
- GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- gpointer data)
-{
- PsppireDict *dict = data;
- const struct variable *var = get_selected_variable (tree_model, iter, dict);
-
- g_object_set (cell, "text", var_get_name (var), NULL);