[nautilus] nautilus-files-view: focus to newly created folder
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] nautilus-files-view: focus to newly created folder
- Date: Mon, 27 Mar 2017 20:10:10 +0000 (UTC)
commit fe3afd5d56e8aa24e6732da1ab4380cd01cc417e
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 e6c7e16..a305ef8 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]