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




commit 2a5ea7de12e5bc5e44d03da6a011fc8c4496dff4
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 a08338f46..0486c8a17 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -9608,6 +9608,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]