summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Pablo Ugarte <juanpablougarte@gmail.com>2020-07-09 17:51:21 -0300
committerJuan Pablo Ugarte <juanpablougarte@gmail.com>2020-07-09 17:51:21 -0300
commitffa9c2fef824f36107be5c59c3d5719722aab171 (patch)
tree7f67bce422e88159cee9bb74c7285fe5b6037291
parent8b5e90f8571507dcd2bf561075cbbdd03e69c65c (diff)
downloadglade-ffa9c2fef824f36107be5c59c3d5719722aab171.tar.gz
Gtk plugin / GladeDataModel: ignore non printable chars
Do not commit non printable characters for gchar and guchar column types.
-rw-r--r--plugins/gtk+/glade-model-data.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/gtk+/glade-model-data.c b/plugins/gtk+/glade-model-data.c
index 26f66758..3296dad6 100644
--- a/plugins/gtk+/glade-model-data.c
+++ b/plugins/gtk+/glade-model-data.c
@@ -733,6 +733,9 @@ value_text_edited (GtkCellRendererText *cell,
else
val = *new_text;
+ if (!g_ascii_isprint (val))
+ return;
+
value = g_new0 (GValue, 1);
g_value_init (value, G_VALUE_TYPE (&data->value));