From: Friedrich Beckmann Date: Wed, 8 Jul 2020 07:53:51 +0000 (+0200) Subject: gui: trim displayed string for string variables (spaces) X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7d38ad8abd34beaec3f9078c9ade9c422707a5c;p=pspp 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. --- 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 *