[nautilus/639-folders-not-expanding-with-arrow-keys] list_view: Fix key events regression



commit 92436eb06af996de32b73c8e65da9444ece4a762
Author: António Fernandes <antoniojpfernandes gmail com>
Date:   Sun Sep 23 09:28:35 2018 +0000

    list_view: Fix key events regression
    
    Since f692a93d, the left/right keys do not expand/collapse trees.
    Also, the [Spacebar] key opens the file instead of previewing it.
    
    This is because we return earlier when we get a state field. This
    is a typo, because it should be the reverse.
    
    But actually, it is safe to assume it is always TRUE, because at this
    point we got a keval field already. So, skip the condition checking.
    
    Fixes: https://gitlab.gnome.org/GNOME/nautilus/issues/639

 src/nautilus-list-view.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 6b78eded4..b118c785a 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -911,10 +911,7 @@ key_press_callback (GtkWidget *widget,
     {
         g_return_val_if_reached (GDK_EVENT_PROPAGATE);
     }
-    if (gdk_event_get_state (event, &state))
-    {
-        return GDK_EVENT_PROPAGATE;
-    }
+    gdk_event_get_state (event, &state);
 
     if (keyval == GDK_KEY_F10)
     {


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