[nautilus/wip/antoniof/menu-reorganization: 29/29] files-view: Bind Return to the open-with-default-application action




commit 2dac5a7fc8ce610b4df72df10ed7f90f02d83f34
Author: António Fernandes <antoniof gnome org>
Date:   Wed Aug 3 11:56:47 2022 +0100

    files-view: Bind Return to the open-with-default-application action
    
    This is not necessary per-se, because it's the default activation
    keybinding. But in order for it to appear in the context menu as a
    the suggested keyboard shortcut, we need to bind it to the menu item
    action.

 src/nautilus-files-view.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index a32b63ea1..612265b3f 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -9609,6 +9609,10 @@ nautilus_files_view_class_init (NautilusFilesViewClass *klass)
     gtk_widget_class_add_binding_action (widget_class, GDK_KEY_F10, GDK_SHIFT_MASK, "view.popup-menu", NULL);
     gtk_widget_class_add_binding_action (widget_class, GDK_KEY_o, GDK_CONTROL_MASK, 
"view.open-with-default-application", NULL);
     gtk_widget_class_add_binding_action (widget_class, GDK_KEY_Down, GDK_ALT_MASK, 
"view.open-with-default-application", NULL);
+    /* This is not necessary per-se, because it's the default activation
+     * keybinding. But in order for it to appear in the context menu as a
+     * keyboard shortcut, we need to bind it to the menu item action here. */
+    gtk_widget_class_add_binding_action (widget_class, GDK_KEY_Return, 0, 
"view.open-with-default-application", NULL);
     gtk_widget_class_add_binding_action (widget_class, GDK_KEY_i, GDK_CONTROL_MASK, "view.properties", NULL);
     gtk_widget_class_add_binding_action (widget_class, GDK_KEY_Return, GDK_ALT_MASK, "view.properties", 
NULL);
     gtk_widget_class_add_binding_action (widget_class, GDK_KEY_a, GDK_CONTROL_MASK, "view.select-all", NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]