diff options
author | Joseph-Eugene Winzer <joe.gsoc16@gmail.com> | 2016-03-03 20:05:23 +0100 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2016-03-07 21:13:02 +0100 |
commit | ecb1646ba1f9798ee45d613883e3a5d0663ada13 (patch) | |
tree | 8308836bff02797fe75f6a14c2f6ca3430723b37 | |
parent | bba383bc57831036bda013dd3e700e4b8c8e5402 (diff) | |
download | nautilus-ecb1646ba1f9798ee45d613883e3a5d0663ada13.tar.gz |
files-view: added alt+return shortcut for properties
With nautilus 3.16 the properties shortcut was changed from
alt+return to ctrl+i.
alt+return is a known shortcut in other applications for showing
file properties, so it was proposed to add alt+enter and altgr+enter
as shortcuts in bug 662081.
nautilus_application_add_accelerator() does not accept multiple shortcuts
per action, so I used gtk_application_set_accels_for_action() and bound
view.properties to the array open_properties.
Also the additional shortcut was added to the shortcuts overview.
Unfortunately, I couldn't find a reliable way to bind altgr for the
shortcut, as modifiers are dependend on the X server mapping.
https://bugzilla.gnome.org/show_bug.cgi?id=662081
-rw-r--r-- | src/nautilus-files-view.c | 7 | ||||
-rw-r--r-- | src/resources/gtk/help-overlay.ui | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c index 15ce5483d..e7ab3c98f 100644 --- a/src/nautilus-files-view.c +++ b/src/nautilus-files-view.c @@ -8086,6 +8086,11 @@ nautilus_files_view_init (NautilusFilesView *view) "<alt>Down", NULL }; + const gchar *open_properties[] = { + "<control>i", + "<alt>Return", + NULL + }; nautilus_profile_start (NULL); @@ -8260,7 +8265,7 @@ nautilus_files_view_init (NautilusFilesView *view) * actions active */ nautilus_application_add_accelerator (app, "view.delete-permanently-menu-item", "Delete"); nautilus_application_add_accelerator (app, "view.permanent-delete-permanently-menu-item", "<shift>Delete"); - nautilus_application_add_accelerator (app, "view.properties", "<control>i"); + gtk_application_set_accels_for_action (GTK_APPLICATION (app), "view.properties", open_properties); nautilus_application_add_accelerator (app, "view.open-item-location", "<control><alt>o"); nautilus_application_add_accelerator (app, "view.rename", "F2"); nautilus_application_add_accelerator (app, "view.cut", "<control>x"); diff --git a/src/resources/gtk/help-overlay.ui b/src/resources/gtk/help-overlay.ui index 01c4934d2..a29fadbde 100644 --- a/src/resources/gtk/help-overlay.ui +++ b/src/resources/gtk/help-overlay.ui @@ -374,7 +374,7 @@ <object class="GtkShortcutsShortcut"> <property name="visible">True</property> <property name="title" translatable="yes" context="shortcut window">Show item properties</property> - <property name="accelerator"><Primary>I</property> + <property name="accelerator"><Primary>I <alt>Return</property> </object> </child> </object> |