[nautilus/gnome-3-20] files-view: added alt+return shortcut for properties
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-3-20] files-view: added alt+return shortcut for properties
- Date: Mon, 7 Mar 2016 20:08:50 +0000 (UTC)
commit 91a5591d60229297cdf58c2075bf5e0f8f702036
Author: Joseph-Eugene Winzer <joe gsoc16 gmail com>
Date: Thu Mar 3 20:05:23 2016 +0100
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
src/nautilus-files-view.c | 7 ++++++-
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 15ce548..e7ab3c9 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 01c4934..a29fadb 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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]