[clutter] text: Don't accept new line characters in single line mode
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [clutter] text: Don't accept new line characters in single line mode
- Date: Sun,  9 Sep 2012 21:52:31 +0000 (UTC)
commit ea50df6bb616542f8a159ad3ea7ce031d856f712
Author: Rui Matos <tiagomatos gmail com>
Date:   Sun Sep 9 20:44:43 2012 +0200
    text: Don't accept new line characters in single line mode
    
    Modified Return key presses don't trigger ::activate so we would end
    up adding an unprintable character to a single paragraph mode pango
    layout which renders it as a box.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=623344
 clutter/clutter-text.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c
index 74b3d4d..3cefa83 100644
--- a/clutter/clutter-text.c
+++ b/clutter/clutter-text.c
@@ -2074,7 +2074,7 @@ clutter_text_key_press (ClutterActor    *actor,
       if (key_unichar == '\r')
         key_unichar = '\n';
 
-      if (key_unichar == '\n' ||
+      if ((key_unichar == '\n' && !priv->single_line_mode) ||
           (g_unichar_validate (key_unichar) &&
            !g_unichar_iscntrl (key_unichar)))
         {
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]