mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
KeyboardMapper: Add GUI alert in case load from file fails
Previously there was no visual clue letting the user know that loading from file failed.
This commit is contained in:
parent
b9980ffd07
commit
484ec94624
Notes:
sideshowbarker
2024-07-18 15:19:55 +09:00
Author: https://github.com/NonStandardModel Commit: https://github.com/SerenityOS/serenity/commit/484ec946246 Pull-request: https://github.com/SerenityOS/serenity/pull/7789
1 changed files with 2 additions and 1 deletions
|
@ -127,7 +127,8 @@ void KeyboardMapperWidget::load_from_file(String filename)
|
|||
{
|
||||
auto result = Keyboard::CharacterMapFile::load_from_file(filename);
|
||||
if (!result.has_value()) {
|
||||
dbgln("Failed to load character map from file {}", filename);
|
||||
auto error_message = String::formatted("Failed to load character map from file {}", filename);
|
||||
GUI::MessageBox::show(window(), error_message, "Error", GUI::MessageBox::Type::Error);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue