Change the signature of myreversefunc to return bool
authorJohn Darrington <john@darrington.wattle.id.au>
Fri, 7 Apr 2017 11:47:09 +0000 (13:47 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Fri, 7 Apr 2017 11:47:09 +0000 (13:47 +0200)
src/ui/gui/psppire-data-editor.c
src/ui/gui/psppire-data-store.c

index 2546c8e7a980b9aff761c3b6161b7efe0fbeb7da..436405e24706982dff2aa904d7534472bec51b3f 100644 (file)
@@ -568,7 +568,7 @@ on_data_selection_change (PsppireDataEditor *de, JmdRange *sel)
 
 static void set_font_recursively (GtkWidget *w, gpointer data);
 
-void myreversefunc (GtkTreeModel *model, gint col, gint row, const gchar *in,
+gboolean myreversefunc (GtkTreeModel *model, gint col, gint row, const gchar *in,
                    GValue *out);
 
 
index a8e86072de74c453a9c20914bca999b74f3e5e38..c7dc55afa5d4898ded22d0f41047ac4f34b7ff8c 100644 (file)
@@ -129,14 +129,14 @@ __iter_nth_child (GtkTreeModel *tree_model,
   return TRUE;
 }
 
-void
+gboolean
 myreversefunc (GtkTreeModel *model, gint col, gint row,
               const gchar *in, GValue *out)
 {
   PsppireDataStore *store  = PSPPIRE_DATA_STORE (model);
 
   const struct variable *variable = psppire_dict_get_variable (store->dict, col);
-  g_return_if_fail (variable);
+  g_return_val_if_fail (variable, FALSE);
 
   const struct fmt_spec *fmt = var_get_print_format (variable);
 
@@ -154,6 +154,7 @@ myreversefunc (GtkTreeModel *model, gint col, gint row,
   g_value_init (out, G_TYPE_VARIANT);
   g_value_set_variant (out, vrnt);
   free (xx);
+  return TRUE;
 }
 
 gchar *