mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-06 11:09:05 +03:00
Spreadsheet: Open files using FileSystemAccessClient::try_open_file()
This commit is contained in:
parent
d877c2fcd6
commit
04443eb847
Notes:
sideshowbarker
2024-07-17 10:42:12 +09:00
Author: https://github.com/krkk Commit: https://github.com/SerenityOS/serenity/commit/04443eb847 Pull-request: https://github.com/SerenityOS/serenity/pull/14085 Reviewed-by: https://github.com/kennethmyhra ✅
@ -125,11 +125,7 @@ SpreadsheetWidget::SpreadsheetWidget(GUI::Window& parent_window, NonnullRefPtrVe
|
||||
if (!request_close())
|
||||
return;
|
||||
|
||||
Optional<String> load_path = GUI::FilePicker::get_open_filepath(window());
|
||||
if (!load_path.has_value())
|
||||
return;
|
||||
|
||||
auto response = FileSystemAccessClient::Client::the().try_request_file_read_only_approved(window(), *load_path);
|
||||
auto response = FileSystemAccessClient::Client::the().try_open_file(window());
|
||||
if (response.is_error())
|
||||
return;
|
||||
load_file(*response.value());
|
||||
|
Loading…
Reference in New Issue
Block a user