1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:07:36 +00:00

Presenter: Use the non-deprecated API of LibFileSystemAccessClient

The patch is tiny as Presenter is only using `LibFSAC` for its file
picker. Using only `LibFSAC` in Presenter would be nice.
This commit is contained in:
Lucas CHOLLET 2023-01-14 23:40:25 -05:00 committed by Andreas Kling
parent bfacbe1e0d
commit 667ac961b5

View file

@ -56,10 +56,10 @@ ErrorOr<void> PresenterWidget::initialize_menubar()
// Set up the menu bar. // Set up the menu bar.
auto& file_menu = window->add_menu("&File"); auto& file_menu = window->add_menu("&File");
auto open_action = GUI::CommonActions::make_open_action([this](auto&) { auto open_action = GUI::CommonActions::make_open_action([this](auto&) {
auto response = FileSystemAccessClient::Client::the().try_open_file_deprecated(this->window()); auto response = FileSystemAccessClient::Client::the().open_file(this->window());
if (response.is_error()) if (response.is_error())
return; return;
this->set_file(response.value()->filename()); this->set_file(response.value().filename());
}); });
auto about_action = GUI::CommonActions::make_about_action("Presenter", GUI::Icon::default_icon("app-display-settings"sv)); auto about_action = GUI::CommonActions::make_about_action("Presenter", GUI::Icon::default_icon("app-display-settings"sv));