[nautilus/gnome-3-24] nautilus-files-view: focus to newly created folder



commit 5d5e16989484933181d374dd9afbd3981617cacc
Author: Kevin Lopez <kevin kevlopez com>
Date:   Mon Mar 20 06:01:25 2017 +0100

    nautilus-files-view: focus to newly created folder
    
    After creating a new folder through the hamburger menu, the
    keyboard focus stays on the hamburger menu button, so you
    can't go to the newly created folder by simply pressing enter
    again.
    
    To solve that, we simply need focus the NautilusFilesView after
    destroy the dialog, in the case where name is accepted.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754744

 src/nautilus-files-view.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 3f2b9fb..0bb513e 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -2021,6 +2021,13 @@ new_folder_dialog_controller_on_name_accepted (NautilusFileNameWidgetController
                                          new_folder_done, data);
 
     g_clear_object (&priv->new_folder_controller);
+    
+    /* After the dialog is destroyed the focus, is probably in the menu item
+     * that created the dialog, but we want the focus to be in the newly created
+     * folder.
+     */
+    gtk_widget_grab_focus (GTK_WIDGET (view));
+
     g_object_unref (parent);
 }
 


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