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
This commit is contained in:
Sabri Ünal 2020-01-23 22:02:04 +00:00 committed by António Fernandes
parent 2088419991
commit 130def8c12

View file

@ -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");