+ GtkTreePath *p = gtk_tree_path_copy (op);
+ while (! PSPPIRE_IS_DICT (m))
+ {
+ GtkTreePath *oldp = p;
+
+ if (GTK_IS_TREE_MODEL_FILTER (m))
+ {
+ p = gtk_tree_model_filter_convert_path_to_child_path (GTK_TREE_MODEL_FILTER (m), oldp);
+ m = gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (m));
+ }
+ else if (GTK_IS_TREE_MODEL_SORT (m))
+ {
+ p = gtk_tree_model_sort_convert_path_to_child_path (GTK_TREE_MODEL_SORT (m), oldp);
+ m = gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT (m));
+ }
+ else
+ {
+ g_error ("Unexpected model type: %s", G_OBJECT_TYPE_NAME (m));
+ }
+
+ gtk_tree_path_free (oldp);
+ }
+
+ return p;
+}
+
+
+/* Returns FALSE if the variables represented by the union of the rows
+ currently selected by SOURCE widget, and contents of the DEST
+ widget, are of different types.
+
+ In other words, this function when passed as the argument to
+ psppire_selector_set_allow, ensures that the selector selects only
+ string variables, or only numeric variables, not a mixture.
+*/
+gboolean
+homogeneous_types (GtkWidget *source, GtkWidget *dest)
+{
+ gboolean ok;