mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-07 00:19:27 +00:00
SpaceAnalyzer: Give the Analyze action an icon and F5 shortcut
This action is basically equivalent to "Refresh", so let's use the common shortcut for that.
This commit is contained in:
parent
1ec59cc52a
commit
87f4c9e580
|
@ -62,7 +62,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
treemapwidget.set_focus(true);
|
||||
|
||||
auto file_menu = TRY(window->try_add_menu("&File"));
|
||||
TRY(file_menu->try_add_action(GUI::Action::create("&Analyze", [&](auto&) {
|
||||
TRY(file_menu->try_add_action(GUI::Action::create("&Analyze", { KeyCode::Key_F5 }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/reload.png"sv)), [&](auto&) {
|
||||
// FIXME: Just modify the tree in memory instead of traversing the entire file system
|
||||
if (auto result = treemapwidget.analyze(statusbar); result.is_error()) {
|
||||
GUI::MessageBox::show_error(window, DeprecatedString::formatted("{}", result.error()));
|
||||
|
|
Loading…
Reference in a new issue