From e7d38ad8abd34beaec3f9078c9ade9c422707a5c Mon Sep 17 00:00:00 2001 From: Friedrich Beckmann Date: Wed, 8 Jul 2020 09:53:51 +0200 Subject: [PATCH] gui: trim displayed string for string variables (spaces) 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/gui/psppire-data-store.c b/src/ui/gui/psppire-data-store.c index 8ac492884c..c780e06eb0 100644 --- a/src/ui/gui/psppire-data-store.c +++ b/src/ui/gui/psppire-data-store.c @@ -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 * -- 2.30.2