value_destroy_from_variant (&v, vrnt);
}
-gboolean myreversefunc (GtkTreeModel *model, gint col, gint row, const gchar *in,
- GValue *out);
-
\f
static 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);
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))
{
#ifndef __PSPPIRE_DATA_STORE_H__
#define __PSPPIRE_DATA_STORE_H__
+#include <gtk/gtk.h>
#include "psppire-dict.h"
#define FIRST_CASE_NUMBER 1
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,