mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:38:10 +00:00
LibGUI: Make Menu::add_recent_files_list() infallible
This commit is contained in:
parent
f2faf2767f
commit
676ef0cc3d
11 changed files with 20 additions and 21 deletions
|
@ -221,11 +221,11 @@ ErrorOr<void> PDFViewerWidget::initialize_menubar(GUI::Window& window)
|
|||
open_file(response.value().filename(), response.value().release_stream());
|
||||
}));
|
||||
file_menu->add_separator();
|
||||
TRY(file_menu->add_recent_files_list([&](auto& action) {
|
||||
file_menu->add_recent_files_list([&](auto& action) {
|
||||
auto response = FileSystemAccessClient::Client::the().request_file_read_only_approved(&window, action.text());
|
||||
if (!response.is_error())
|
||||
open_file(response.value().filename(), response.value().release_stream());
|
||||
}));
|
||||
});
|
||||
file_menu->add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
||||
GUI::Application::the()->quit();
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue