浏览代码

FileManager: Specify "Open in Text Editor" action as default in context menu

Since double-clicking the item would trigger the "Open in Text Editor"
action, specify it as the default action when displaying the
context menu.
Tom 5 年之前
父节点
当前提交
8d5fde440a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Applications/FileManager/main.cpp

+ 1 - 1
Applications/FileManager/main.cpp

@@ -764,7 +764,7 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
                 folder_specific_paste_action->set_enabled(should_get_enabled);
                 folder_specific_paste_action->set_enabled(should_get_enabled);
                 directory_context_menu->popup(event.screen_position());
                 directory_context_menu->popup(event.screen_position());
             } else {
             } else {
-                file_context_menu->popup(event.screen_position());
+                file_context_menu->popup(event.screen_position(), open_in_text_editor_action);
             }
             }
         } else {
         } else {
             directory_view_context_menu->popup(event.screen_position());
             directory_view_context_menu->popup(event.screen_position());