- g_object_set (cell, "text", var_get_name (var), NULL);
- }
-}
-
-
-#if GTK_CHECK_VERSION (2, 12, 0)
-/* Sets the tooltip to be the name of the variable under the cursor */
-static gboolean
-set_tooltip_for_variable (GtkTreeView *treeview,
- gint x,
- gint y,
- gboolean keyboard_mode,
- GtkTooltip *tooltip,
- gpointer user_data)
-
-{
- gint bx, by;
- GtkTreeIter iter;
- GtkTreePath *path;
- GtkTreeModel *tree_model;
- struct variable *var = NULL;
- gboolean ok;
-
-
- gtk_tree_view_convert_widget_to_bin_window_coords (treeview,
- x, y, &bx, &by);
-
- if (!gtk_tree_view_get_path_at_pos (treeview, bx, by,
- &path, NULL, NULL, NULL))
- return FALSE;
-
- tree_model = gtk_tree_view_get_model (treeview);
-
-
- gtk_tree_view_set_tooltip_row (treeview, tooltip, path);
-
- ok = gtk_tree_model_get_iter (tree_model, &iter, path);
-
- gtk_tree_path_free (path);
- if (!ok)
- return FALSE;
-
-
- gtk_tree_model_get (tree_model, &iter, DICT_TVM_COL_VAR, &var, -1);
-
- if ( ! var_has_label (var))
- return FALSE;
-
- {
- char *name = pspp_locale_to_utf8 (var_get_name (var), -1, NULL);
-
- gtk_tooltip_set_text (tooltip, name);
-
- g_free (name);
- }
-
- return TRUE;
-}
-#endif
-
- /* Sets up TREEVIEW to display the variables of DICT.
- MODE is the selection mode for TREEVIEW.
- PREDICATE determines which variables should be visible, or NULL if
- all are to be visible.
- */
-void
-attach_dictionary_to_treeview (GtkTreeView *treeview, PsppireDict *dict,
- GtkSelectionMode mode,
- var_predicate_func *predicate
- )
-{
- GtkTreeViewColumn *col;