gui: trim displayed string for string variables (spaces)
authorFriedrich Beckmann <friedrich.beckmann@gmx.de>
Wed, 8 Jul 2020 07:53:51 +0000 (09:53 +0200)
committerFriedrich Beckmann <friedrich.beckmann@gmx.de>
Wed, 8 Jul 2020 12:10:04 +0000 (14:10 +0200)
The current gui always renders strings in the datasheet view
with the full width by adding spaces to the end of a string.
This patch renders the strings in the same way as they are rendered
in the status edit box above the cells array, i.e. trailing whitespace
is removed. Editing strings is straightforward.

src/ui/gui/psppire-data-store.c

index 8ac492884c1c11b88709e809dfc56793443ff828..c780e06eb0e2dd75024e5c4059ab31a1556856f7 100644 (file)
@@ -176,7 +176,7 @@ unlabeled_value (PsppireDataStore *store, const struct variable *variable, const
     return g_strdup ("");
 
   const struct fmt_spec *fmt = var_get_print_format (variable);
-  return data_out (val, psppire_dict_encoding (store->dict),  fmt);
+  return value_to_text__ (*val, fmt, psppire_dict_encoding (store->dict));
 }
 
 gchar *