From 87f4c9e580500a6a48db225232c5670e7b9fa5b1 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Fri, 3 Feb 2023 14:03:46 +0000 Subject: [PATCH] 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. --- Userland/Applications/SpaceAnalyzer/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Applications/SpaceAnalyzer/main.cpp b/Userland/Applications/SpaceAnalyzer/main.cpp index 2cd91bfa2f..20c8c04f4d 100644 --- a/Userland/Applications/SpaceAnalyzer/main.cpp +++ b/Userland/Applications/SpaceAnalyzer/main.cpp @@ -62,7 +62,7 @@ ErrorOr 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()));