refactor: Rework features that use external libraries into optional plugins (#1470)

This commit is contained in:
Nik
2023-12-23 21:09:41 +01:00
committed by GitHub
parent 84bfd10416
commit 61bfe10bc2
149 changed files with 2940 additions and 2390 deletions

View File

@@ -3,7 +3,7 @@
#include <hex/api/project_file_manager.hpp>
#include <hex/helpers/logger.hpp>
#include <content/popups/popup_notification.hpp>
#include <popups/popup_notification.hpp>
#include <wolv/utils/string.hpp>
@@ -13,7 +13,7 @@ namespace hex::plugin::builtin {
fs::openFileBrowser(fs::DialogMode::Open, { {"Project File", "hexproj"} },
[](const auto &path) {
if (!ProjectFile::load(path)) {
PopupError::open(hex::format("hex.builtin.popup.error.project.load"_lang, wolv::util::toUTF8String(path)));
ui::PopupError::open(hex::format("hex.builtin.popup.error.project.load"_lang, wolv::util::toUTF8String(path)));
}
});
}
@@ -21,7 +21,7 @@ namespace hex::plugin::builtin {
void saveProject() {
if (ImHexApi::Provider::isValid() && ProjectFile::hasPath()) {
if (!ProjectFile::store()) {
PopupError::open("hex.builtin.popup.error.project.save"_lang);
ui::PopupError::open("hex.builtin.popup.error.project.save"_lang);
} else {
log::debug("Project saved");
}
@@ -36,7 +36,7 @@ namespace hex::plugin::builtin {
}
if (!ProjectFile::store(path)) {
PopupError::open("hex.builtin.popup.error.project.save"_lang);
ui::PopupError::open("hex.builtin.popup.error.project.save"_lang);
}
});
}