impr: Better experience when first starting ImHex (#1510)

This commit is contained in:
Nik
2024-01-21 18:39:51 +01:00
committed by GitHub
parent d005b5d2d9
commit 58603ed12a
33 changed files with 533 additions and 215 deletions

View File

@@ -194,6 +194,14 @@ namespace hex::plugin::builtin {
RequestOpenFile::post(path);
});
EventWindowInitialized::subscribe([] {
if (ContentRegistry::Settings::read("hex.builtin.setting.general", "hex.builtin.setting.general.prev_launch_version", "") == "") {
EventFirstLaunch::post();
}
ContentRegistry::Settings::write("hex.builtin.setting.general", "hex.builtin.setting.general.prev_launch_version", ImHexApi::System::getImHexVersion());
});
fs::setFileBrowserErrorCallback([](const std::string& errMsg){
#if defined(NFD_PORTAL)
ui::PopupError::open(hex::format("hex.builtin.popup.error.file_dialog.portal"_lang, errMsg));