summaryrefslogtreecommitdiff
path: root/src/nautilus-files-view.c
diff options
context:
space:
mode:
authorOliver Calder <olivercalder@protonmail.ch>2022-07-30 15:16:18 +0000
committerAntónio Fernandes <antoniof@gnome.org>2022-07-30 15:16:18 +0000
commit08fb4e81877122701a4483f1bdfb3b183c744ac1 (patch)
treec83be982f4732bb0b4190050aaa59baacac8c5a5 /src/nautilus-files-view.c
parent0b036d37859bc4c554e9e3b5ee5570d66fc37f20 (diff)
downloadnautilus-08fb4e81877122701a4483f1bdfb3b183c744ac1.tar.gz
files-view.c: Fixed delete key hint
The keypad hint for deleting a file displays as "Delete (keypad)" instead of "Delete". It appears that this is due to the order in which the Delete key and the Keypad Delete key are bound to the delete action. In particular, for each of the five delete actions, the GDK_KEY_Delete (0xffff) had been bound before the GDK_KEY_KP_Delete (0xff9f). As a result, when one of those delete actions was later enabled, the most recently bound key was used to populate the shortcut hint. In this commit, each GDK_KEY_Delete binding is moved below the corresponding GDK_KEY_KP_Delete binding so that the non-keypad delete is the most recent binding, and thus the shortcut hint correctly displays "Delete" instead of "Delete (keypad)". Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2357
Diffstat (limited to 'src/nautilus-files-view.c')
-rw-r--r--src/nautilus-files-view.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index fe13d576a..1ba862c7a 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -9496,20 +9496,20 @@ nautilus_files_view_class_init (NautilusFilesViewClass *klass)
* delete or trash actions with the same shortcut without worrying: only the
* enabled one will be activated.
*/
- gtk_widget_class_add_binding_action (widget_class, GDK_KEY_Delete, GDK_SHIFT_MASK, "view.delete-permanently-shortcut", NULL);
gtk_widget_class_add_binding_action (widget_class, GDK_KEY_KP_Delete, GDK_SHIFT_MASK, "view.delete-permanently-shortcut", NULL);
- gtk_widget_class_add_binding_action (widget_class, GDK_KEY_Delete, GDK_SHIFT_MASK, "view.permanent-delete-permanently-menu-item", NULL);
+ gtk_widget_class_add_binding_action (widget_class, GDK_KEY_Delete, GDK_SHIFT_MASK, "view.delete-permanently-shortcut", NULL);
gtk_widget_class_add_binding_action (widget_class, GDK_KEY_KP_Delete, GDK_SHIFT_MASK, "view.permanent-delete-permanently-menu-item", NULL);
- gtk_widget_class_add_binding_action (widget_class, GDK_KEY_Delete, 0, "view.move-to-trash", NULL);
+ gtk_widget_class_add_binding_action (widget_class, GDK_KEY_Delete, GDK_SHIFT_MASK, "view.permanent-delete-permanently-menu-item", NULL);
gtk_widget_class_add_binding_action (widget_class, GDK_KEY_KP_Delete, 0, "view.move-to-trash", NULL);
- gtk_widget_class_add_binding_action (widget_class, GDK_KEY_Delete, 0, "view.delete-from-trash", NULL);
+ gtk_widget_class_add_binding_action (widget_class, GDK_KEY_Delete, 0, "view.move-to-trash", NULL);
gtk_widget_class_add_binding_action (widget_class, GDK_KEY_KP_Delete, 0, "view.delete-from-trash", NULL);
+ gtk_widget_class_add_binding_action (widget_class, GDK_KEY_Delete, 0, "view.delete-from-trash", NULL);
/* When trash is not available, allow the "Delete" keys to delete permanently, that is, when
* the menu item is available, since we never make both the trash and delete-permanently-menu-item
* actions active.
*/
- gtk_widget_class_add_binding_action (widget_class, GDK_KEY_Delete, 0, "view.delete-permanently-menu-item", NULL);
gtk_widget_class_add_binding_action (widget_class, GDK_KEY_KP_Delete, 0, "view.delete-permanently-menu-item", NULL);
+ gtk_widget_class_add_binding_action (widget_class, GDK_KEY_Delete, 0, "view.delete-permanently-menu-item", NULL);
gtk_widget_class_add_binding_action (widget_class, GDK_KEY_F2, 0, "view.rename", NULL);
gtk_widget_class_add_binding_action (widget_class, GDK_KEY_Menu, 0, "view.popup-menu", NULL);