Rename myreversefunc -> psppire_data_store_string_to_value
authorJohn Darrington <john@darrington.wattle.id.au>
Fri, 29 Sep 2017 09:46:52 +0000 (11:46 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Fri, 29 Sep 2017 09:46:52 +0000 (11:46 +0200)
src/ui/gui/psppire-data-sheet.c
src/ui/gui/psppire-data-store.c
src/ui/gui/psppire-data-store.h

index 6aa3d19d683fa9b89453b237f80c9e0e003680ed..4b7df0dc287f5919b4b69a00e988976397ea9746 100644 (file)
@@ -104,9 +104,6 @@ change_data_value (PsppireDataSheet *sheet, gint col, gint row, GValue *value)
   value_destroy_from_variant (&v, vrnt);
 }
 
-gboolean myreversefunc (GtkTreeModel *model, gint col, gint row, const gchar *in,
-                   GValue *out);
-
 \f
 
 static void
@@ -351,7 +348,7 @@ psppire_data_sheet_new (void)
   GObject *obj =
     g_object_new (PSPPIRE_TYPE_DATA_SHEET,
                  "forward-conversion", psppire_data_store_value_to_string,
-                 "reverse-conversion", myreversefunc,
+                 "reverse-conversion", psppire_data_store_string_to_value,
                  "editable", TRUE,
                  "horizontal-draggable", TRUE,
                  NULL);
index 04b6da0858ea3d1336d75674b1b00bd6b4d21ac7..f97b8eaf1cdc5b246ec81685e590640b79686fd0 100644 (file)
@@ -130,11 +130,13 @@ __iter_nth_child (GtkTreeModel *tree_model,
   return TRUE;
 }
 
+/* Set the contents of OUT to reflect the information provided by IN, COL, and
+   ROW, for MODEL.  Returns TRUE if successful. */
 gboolean
-myreversefunc (GtkTreeModel *model, gint col, gint row,
-              const gchar *in, GValue *out)
+psppire_data_store_string_to_value (GtkTreeModel *model, gint col, gint row,
+                                   const gchar *in, GValue *out)
 {
-  PsppireDataStore *store  = PSPPIRE_DATA_STORE (model);
+  PsppireDataStore *store = PSPPIRE_DATA_STORE (model);
 
   while (col >= psppire_dict_get_var_cnt (store->dict))
     {
index 65e3d24ad3d495fe4531f63da7d51443ebd4546b..efeb886864e4ab1c2105bf563b407c56c0e2a017 100644 (file)
@@ -17,6 +17,7 @@
 #ifndef __PSPPIRE_DATA_STORE_H__
 #define __PSPPIRE_DATA_STORE_H__
 
+#include <gtk/gtk.h>
 #include "psppire-dict.h"
 
 #define FIRST_CASE_NUMBER 1
@@ -113,10 +114,13 @@ gchar * psppire_data_store_value_to_string (gpointer unused, PsppireDataStore *s
                                            gint col, gint row,
                                            const GValue *v);
 
-gchar * psppire_data_store_value_to_string_with_labels (gpointer unused, PsppireDataStore *store,
-                                           gint col, gint row,
-                                           const GValue *v);
+gchar * psppire_data_store_value_to_string_with_labels (gpointer unused,
+                                                       PsppireDataStore *store,
+                                                       gint col, gint row,
+                                                       const GValue *v);
 
+gboolean psppire_data_store_string_to_value (GtkTreeModel *model, gint col, gint row,
+                                            const gchar *in, GValue *out);
 
 gboolean psppire_data_store_get_value (PsppireDataStore *store,
                                       glong row, const struct variable *var,