mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:37:37 +00:00
FileManager: Put file launch actions first
The default action (shown in bold) indicates what would you get by double-clicking on file. Since it's a default option, I think it deserves to be on top (together with alternative launch options). :^) Also they're not task actions like "Extract .zip here" or "Add to bookmarks".
This commit is contained in:
parent
e3254bf4c5
commit
d184e5327a
1 changed files with 10 additions and 8 deletions
|
@ -392,6 +392,11 @@ int run_in_desktop_mode()
|
|||
desktop_context_menu->popup(event.screen_position());
|
||||
} else {
|
||||
file_context_menu = GUI::Menu::construct("Directory View File");
|
||||
|
||||
bool added_open_menu_items = add_launch_handler_actions_to_menu(file_context_menu, directory_view, node.full_path(), file_context_menu_action_default_action, current_file_handlers);
|
||||
if (added_open_menu_items)
|
||||
file_context_menu->add_separator();
|
||||
|
||||
file_context_menu->add_action(cut_action);
|
||||
file_context_menu->add_action(copy_action);
|
||||
file_context_menu->add_action(paste_action);
|
||||
|
@ -404,10 +409,6 @@ int run_in_desktop_mode()
|
|||
file_context_menu->add_separator();
|
||||
}
|
||||
|
||||
bool added_open_menu_items = add_launch_handler_actions_to_menu(file_context_menu, directory_view, node.full_path(), file_context_menu_action_default_action, current_file_handlers);
|
||||
if (added_open_menu_items)
|
||||
file_context_menu->add_separator();
|
||||
|
||||
file_context_menu->add_action(properties_action);
|
||||
file_context_menu->popup(event.screen_position(), file_context_menu_action_default_action);
|
||||
}
|
||||
|
@ -1055,6 +1056,11 @@ int run_in_windowed_mode(String initial_location, String entry_focused_on_init)
|
|||
directory_context_menu->popup(event.screen_position());
|
||||
} else {
|
||||
file_context_menu = GUI::Menu::construct("Directory View File");
|
||||
|
||||
bool added_launch_file_handlers = add_launch_handler_actions_to_menu(file_context_menu, directory_view, node.full_path(), file_context_menu_action_default_action, current_file_handlers);
|
||||
if (added_launch_file_handlers)
|
||||
file_context_menu->add_separator();
|
||||
|
||||
file_context_menu->add_action(cut_action);
|
||||
file_context_menu->add_action(copy_action);
|
||||
file_context_menu->add_action(paste_action);
|
||||
|
@ -1068,10 +1074,6 @@ int run_in_windowed_mode(String initial_location, String entry_focused_on_init)
|
|||
file_context_menu->add_separator();
|
||||
}
|
||||
|
||||
bool added_launch_file_handlers = add_launch_handler_actions_to_menu(file_context_menu, directory_view, node.full_path(), file_context_menu_action_default_action, current_file_handlers);
|
||||
if (added_launch_file_handlers)
|
||||
file_context_menu->add_separator();
|
||||
|
||||
file_context_menu->add_action(properties_action);
|
||||
file_context_menu->popup(event.screen_position(), file_context_menu_action_default_action);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue