ux: Display an error message if file picker can't be opened (#748)

* add error message for the file picker

* set a different message for Windows/MacOS

* fix typos

* Moved file dialog error handling to a callback function

Co-authored-by: Nik <werwolv98@gmail.com>
This commit is contained in:
iTrooz_
2022-09-20 15:47:59 +02:00
committed by GitHub
parent 9656b40d53
commit 3a94be9abb
11 changed files with 144 additions and 7 deletions

View File

@@ -123,6 +123,14 @@ namespace hex::plugin::builtin {
ProviderExtraData::erase(provider);
});
fs::setFileBrowserErrorCallback([]{
#if defined(NFD_PORTAL)
View::showErrorPopup("hex.builtin.popup.error.file_dialog.portal"_lang);
#else
View::showErrorPopup("hex.builtin.popup.error.file_dialog.common"_lang);
#endif
});
}
}