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




commit 85943de52ee7620bdb37d37aca70f46b8154ebd6
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 aad91694c..f522b932b 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -9552,6 +9552,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]