"Variable format type",
("Whether variables have input or output "
"formats"),
- G_TYPE_PSPPIRE_VAR_STORE_FORMAT_TYPE,
+ PSPPIRE_TYPE_VAR_STORE_FORMAT_TYPE,
PSPPIRE_VAR_STORE_OUTPUT_FORMATS,
G_PARAM_READWRITE);
iface->get_row_title = get_row_title;
iface->get_row_sensitivity = get_row_sensitivity;
+
+ iface->get_row_overstrike = NULL;
}
/**
switch (col)
{
case PSPPIRE_VAR_STORE_COL_NAME:
- return psppire_dict_rename_var (var_store->dict, pv, text);
- break;
+ {
+ int i;
+ /* Until non-ascii in variable names is better managed,
+ simply refuse to allow them to be entered. */
+ for (i = 0 ; i < strlen (text) ; ++i )
+ if (!g_ascii_isprint (text[i]))
+ return FALSE;
+ return psppire_dict_rename_var (var_store->dict, pv, text);
+ break;
+ }
case PSPPIRE_VAR_STORE_COL_COLUMNS:
if ( ! text) return FALSE;
var_set_display_width (pv, atoi (text));
}
break;
case PSPPIRE_VAR_STORE_COL_LABEL:
- var_set_label (pv, text);
- return TRUE;
+ {
+ gchar *s = utf8_to_pspp_locale (text, -1, NULL);
+ var_set_label (pv, s);
+ free (s);
+ return TRUE;
+ }
break;
case PSPPIRE_VAR_STORE_COL_TYPE:
case PSPPIRE_VAR_STORE_COL_VALUES: