[nautilus] nautilus-view: allow F5 and ctrl+r for reload



commit 457f833602ecf5071d2eb6d7a9620d9a331cdef7
Author: Carlos Soriano <csoriano gnome org>
Date:   Wed May 13 19:19:58 2015 +0200

    nautilus-view: allow F5 and ctrl+r for reload
    
    After back and forward on this, users used both, and most of them
    didn't know about the other shortcut, which makes trying to use
    only one shortcut for this action too controversial for what it worth.
    
    So allow both shortcuts for this specific case.

 src/nautilus-window.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 3749e72..a17779f 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -538,6 +538,11 @@ nautilus_window_initialize_actions (NautilusWindow *window)
        gchar detailed_action[80];
        gchar accel[80];
        gint i;
+       const gchar *reload_accels[] = {
+                "F5",
+                "<ctrl>r",
+                NULL
+        };
 
        g_action_map_add_action_entries (G_ACTION_MAP (window),
                                         win_entries, G_N_ELEMENTS (win_entries),
@@ -552,7 +557,10 @@ nautilus_window_initialize_actions (NautilusWindow *window)
        nautilus_application_add_accelerator (app, "win.view-mode('list')", "<control>1");
        nautilus_application_add_accelerator (app, "win.view-mode('grid')", "<control>2");
        nautilus_application_add_accelerator (app, "win.close-current-view", "<control>w");
-       nautilus_application_add_accelerator (app, "win.reload", "F5");
+
+        /* Special case reload, since users are used to use two shortcuts instead of one */
+       gtk_application_set_accels_for_action (GTK_APPLICATION (app), "win.reload", reload_accels);
+
        nautilus_application_add_accelerator (app, "win.undo", "<control>z");
        nautilus_application_add_accelerator (app, "win.redo", "<shift><control>z");
        /* Only accesible by shorcuts */


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