From 52b5bad316d0659e8f26fa31cbbde7bee0ca89e6 Mon Sep 17 00:00:00 2001 From: "Neil J. Patel" Date: Fri, 29 Jun 2007 17:18:13 +0000 Subject: [PATCH] 2007-06-29 Neil J. Patel * clutter/clutter-entry.c: (clutter_entry_handle_key_event), (clutter_entry_add), (clutter_entry_remove): Check if unichar == 0, and if so, return, as it will cause a delete in the GString. --- ChangeLog | 7 +++++++ clutter/clutter-entry.c | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index c1a38b6cf..ed5bdfbb3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-06-29 Neil J. Patel + + * clutter/clutter-entry.c: (clutter_entry_handle_key_event), + (clutter_entry_add), (clutter_entry_remove): + Check if unichar == 0, and if so, return, as it will cause a delete in + the GString. + 2007-06-29 Matthew Allum * clutter/clutter-texture.c: (texture_upload_data): diff --git a/clutter/clutter-entry.c b/clutter/clutter-entry.c index 43ce7e35f..ba7486a89 100644 --- a/clutter/clutter-entry.c +++ b/clutter/clutter-entry.c @@ -1080,6 +1080,8 @@ clutter_entry_handle_key_event (ClutterEntry *entry, ClutterKeyEvent *kev) priv = entry->priv; + g_print ("%d, %d\n", kev, keyval); + pos = priv->position; if (priv->text) len = g_utf8_strlen (priv->text, -1); @@ -1162,6 +1164,9 @@ clutter_entry_add (ClutterEntry *entry, gunichar wc) g_return_if_fail (CLUTTER_IS_ENTRY (entry)); g_return_if_fail (g_unichar_validate (wc)); + if (wc == 0) + return; + priv = entry->priv; g_object_ref (entry); @@ -1196,6 +1201,7 @@ clutter_entry_remove (ClutterEntry *entry, guint num) g_return_if_fail (CLUTTER_IS_ENTRY (entry)); + priv = entry->priv; g_object_ref (entry);