diff options
author | Kevin Lopez <kevin@kevlopez.com> | 2017-03-20 06:01:25 +0100 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2017-03-27 22:09:47 +0200 |
commit | fe3afd5d56e8aa24e6732da1ab4380cd01cc417e (patch) | |
tree | c0109ecf5208717850564cde34d3e97d99474963 | |
parent | 77e5bfbd57e7d5c3b372718151b83c181c69e7de (diff) | |
download | nautilus-fe3afd5d56e8aa24e6732da1ab4380cd01cc417e.tar.gz |
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
-rw-r--r-- | 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 e6c7e161f..a305ef873 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); } |