[nautilus] files-view: Support keypad in zoom in/out accels



commit 130def8c1205a00444789c7784b3874827ef278f
Author: Sabri Ünal <libreajans gmail com>
Date:   Thu Jan 23 22:02:04 2020 +0000

    files-view: Support keypad in zoom in/out accels
    
    The view can be zoomed in and out by pressing the + and - keys on the
    keyboard while holding the Ctrl modifier key.
    
    However, pressing the look-alike + and - keys from the numeric keypad
    doesn't work as an alternative, as one would expect.
    
    Add these keys as alternatives for the zoom shortcuts, like GtkScale
    and GtkTreeView already do in similar cases.
    
    Closes: https://gitlab.gnome.org/GNOME/nautilus/issues/1349

 src/nautilus-files-view.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index db84bd191..18b714a71 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -9601,6 +9601,13 @@ nautilus_files_view_init (NautilusFilesView *view)
     {
         "<control>equal",
         "<control>plus",
+        "<control>KP_Add",
+        NULL
+    };
+    const gchar *zoom_out_accels[] =
+    {
+        "<control>minus",
+        "<control>KP_Subtract",
         NULL
     };
     const gchar *move_to_trash_accels[] =
@@ -9803,7 +9810,7 @@ nautilus_files_view_init (NautilusFilesView *view)
 
     /* Toolbar menu */
     nautilus_application_set_accelerators (app, "view.zoom-in", zoom_in_accels);
-    nautilus_application_set_accelerator (app, "view.zoom-out", "<control>minus");
+    nautilus_application_set_accelerators (app, "view.zoom-out", zoom_out_accels);
     nautilus_application_set_accelerator (app, "view.show-hidden-files", "<control>h");
     /* Background menu */
     nautilus_application_set_accelerator (app, "view.select-all", "<control>a");


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