X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fdialog-common.c;h=cdc0758cb3e77ca4f115aa67c7a6699331476d66;hb=f20d313de2b85419c3e2e22a78cdcdce499af43d;hp=0d32904d141434e55488b5c9ee1c59e6a79adf5a;hpb=0df9cdd3df66caf4353128feff3008289cda8115;p=pspp diff --git a/src/ui/gui/dialog-common.c b/src/ui/gui/dialog-common.c index 0d32904d14..cdc0758cb3 100644 --- a/src/ui/gui/dialog-common.c +++ b/src/ui/gui/dialog-common.c @@ -24,8 +24,8 @@ #include "helper.h" -/* - If m is not a base TreeModel type (ie, is a filter or sorter) then +/* + If m is not a base TreeModel type (ie, is a filter or sorter) then convert OP to a TreePath for the base and return it. The return value must be freed by the caller. */ @@ -33,10 +33,10 @@ static GtkTreePath * get_base_tree_path (GtkTreeModel *m, GtkTreePath *op) { GtkTreePath *p = gtk_tree_path_copy (op); - while ( ! PSPPIRE_IS_DICT (m)) + 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); @@ -51,7 +51,7 @@ get_base_tree_path (GtkTreeModel *m, GtkTreePath *op) { g_error ("Unexpected model type: %s", G_OBJECT_TYPE_NAME (m)); } - + gtk_tree_path_free (oldp); } @@ -112,10 +112,10 @@ homogeneous_types (GtkWidget *source, GtkWidget *dest) have_type = true; } - g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL); + g_list_foreach (list, GFUNC_COMPAT_CAST (gtk_tree_path_free), NULL); g_list_free (list); - if ( retval == FALSE ) + if (retval == FALSE) return FALSE; /* now deal with the dest widget */ @@ -128,7 +128,7 @@ homogeneous_types (GtkWidget *source, GtkWidget *dest) const struct variable *v; gtk_tree_model_get (model, &iter, 0, &v, -1); - if ( have_type && var_get_type (v) != type ) + if (have_type && var_get_type (v) != type) { retval = FALSE; break; @@ -172,14 +172,14 @@ numeric_only (GtkWidget *source, GtkWidget *dest) const struct variable *v = psppire_dict_get_variable (dict, idx[0]); gtk_tree_path_free (p); - if ( var_is_alpha (v)) + if (var_is_alpha (v)) { retval = FALSE; break; } } - g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL); + g_list_foreach (list, GFUNC_COMPAT_CAST (gtk_tree_path_free), NULL); g_list_free (list); return retval;