[nautilus/wip/ernestask/rolling-around-at-the-speed-of-diagonal: 3/5] location-entry: Focus away on ESC when always visible



commit 0a5a6b5179239c40170b2cb15a33873a1296f614
Author: Ernestas Kulik <ekulik redhat com>
Date:   Fri Nov 30 14:47:06 2018 +0100

    location-entry: Focus away on ESC when always visible
    
    Currently, if org.gnome.nautilus.preferences.always-use-location-entry
    is enabled, pressing Escape will be treated as if it would insert text
    and trigger auto-completion. This is inconsistent when the location
    entry is conditionally visible.

 src/nautilus-location-entry.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/nautilus-location-entry.c b/src/nautilus-location-entry.c
index 0aea63c8e..ac7379159 100644
--- a/src/nautilus-location-entry.c
+++ b/src/nautilus-location-entry.c
@@ -440,6 +440,9 @@ entry_would_have_inserted_characters (const GdkEvent *event)
         case GDK_KEY_KP_Left:
         case GDK_KEY_KP_Right:
         case GDK_KEY_Return:
+        /* For when the entry is set to be always visible.
+         */
+        case GDK_KEY_Escape:
         {
             return FALSE;
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]