mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
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:
@@ -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
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user