mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:47:45 +00:00
WidgetGallery: Use the non-deprecated API of LibFileSystemAccessClient
The patch is tiny as WidgetGallery is only using `LibFSAC` for its file picker.
This commit is contained in:
parent
01db302a33
commit
c0ada49a24
1 changed files with 2 additions and 2 deletions
|
@ -108,10 +108,10 @@ GalleryWidget::GalleryWidget()
|
||||||
m_file_button->set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/open.png"sv).release_value_but_fixme_should_propagate_errors());
|
m_file_button->set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/open.png"sv).release_value_but_fixme_should_propagate_errors());
|
||||||
|
|
||||||
m_file_button->on_click = [&](auto) {
|
m_file_button->on_click = [&](auto) {
|
||||||
auto response = FileSystemAccessClient::Client::the().try_open_file_deprecated(window());
|
auto response = FileSystemAccessClient::Client::the().open_file(window());
|
||||||
if (response.is_error())
|
if (response.is_error())
|
||||||
return;
|
return;
|
||||||
m_text_editor->set_text(response.release_value()->filename());
|
m_text_editor->set_text(response.release_value().filename());
|
||||||
};
|
};
|
||||||
|
|
||||||
m_input_button = basics_tab->find_descendant_of_type_named<GUI::Button>("input_button");
|
m_input_button = basics_tab->find_descendant_of_type_named<GUI::Button>("input_button");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue