1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 14:57:34 +00:00

LibGUI+Userland: Take ByteString in set_most_recently_open_file()

This commit is contained in:
Sam Atkins 2024-01-19 16:18:03 +00:00 committed by Sam Atkins
parent d30f13a88d
commit 9657f4cabb
11 changed files with 24 additions and 24 deletions

View file

@ -293,7 +293,7 @@ MainWidget::MainWidget()
}
set_path(file.filename());
GUI::Application::the()->set_most_recently_open_file(file.filename());
GUI::Application::the()->set_most_recently_open_file(file.filename().to_byte_string());
dbgln("Wrote document to {}", file.filename());
});
@ -803,7 +803,7 @@ ErrorOr<void> MainWidget::read_file(String const& filename, Core::File& file)
{
m_editor->set_text(TRY(file.read_until_eof()));
set_path(filename);
GUI::Application::the()->set_most_recently_open_file(filename);
GUI::Application::the()->set_most_recently_open_file(filename.to_byte_string());
m_editor->set_focus(true);
return {};
}