[nautilus] files-view: Add alternative shortcut for renaming files
- From: Răzvan-Mihai Chițu <razvanchitu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] files-view: Add alternative shortcut for renaming files
- Date: Thu, 12 Jan 2017 21:01:21 +0000 (UTC)
commit 3c00fa343ec5b642846bc4c280cec7bb18a299a3
Author: Cristian Nancu <nancucristian yahoo com>
Date: Wed Jan 4 18:33:04 2017 +0000
files-view: Add alternative shortcut for renaming files
The current shortcut for renaming is F2. However, some keyboards
do not have Fn keys. In order to fix this, add Ctrl+M as an
alternative shortcut.
https://bugzilla.gnome.org/show_bug.cgi?id=763727
src/nautilus-files-view.c | 8 +++++++-
src/resources/gtk/help-overlay.ui | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 275d076..8498cb3 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -9049,6 +9049,12 @@ nautilus_files_view_init (NautilusFilesView *view)
"<control>plus",
NULL
};
+ const gchar *rename_shortcuts[] =
+ {
+ "<control>m",
+ "F2",
+ NULL
+ };
nautilus_profile_start (NULL);
@@ -9249,7 +9255,7 @@ nautilus_files_view_init (NautilusFilesView *view)
nautilus_application_set_accelerator (app, "view.permanent-delete-permanently-menu-item",
"<shift>Delete");
nautilus_application_set_accelerators (app, "view.properties", open_properties);
nautilus_application_set_accelerator (app, "view.open-item-location", "<control><alt>o");
- nautilus_application_set_accelerator (app, "view.rename", "F2");
+ nautilus_application_set_accelerators (app, "view.rename", rename_shortcuts);
nautilus_application_set_accelerator (app, "view.cut", "<control>x");
nautilus_application_set_accelerator (app, "view.copy", "<control>c");
nautilus_application_set_accelerator (app, "view.create-link-in-place", "<control><shift>m");
diff --git a/src/resources/gtk/help-overlay.ui b/src/resources/gtk/help-overlay.ui
index 1d17686..d7b42e2 100644
--- a/src/resources/gtk/help-overlay.ui
+++ b/src/resources/gtk/help-overlay.ui
@@ -297,7 +297,7 @@
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes" context="shortcut window">Rename</property>
- <property name="accelerator">F2</property>
+ <property name="accelerator">F2 <Primary>M</property>
</object>
</child>
<child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]