diff --git a/srcpkgs/imhex/patches/no-update-check.patch b/srcpkgs/imhex/patches/no-update-check.patch deleted file mode 100644 index 134ec4625c0..00000000000 --- a/srcpkgs/imhex/patches/no-update-check.patch +++ /dev/null @@ -1,106 +0,0 @@ -running the internal update checker is pointless when updates are managed by xbps - ---- a/plugins/builtin/source/content/welcome_screen.cpp -+++ b/plugins/builtin/source/content/welcome_screen.cpp -@@ -517,20 +517,6 @@ - loadDefaultLayout(); - }); - -- EventManager::subscribe([] { -- // documentation of the value above the setting definition -- int showCheckForUpdates = ContentRegistry::Settings::read("hex.builtin.setting.general", "hex.builtin.setting.general.check_for_updates", 2); -- if (showCheckForUpdates == 2) { -- ContentRegistry::Settings::write("hex.builtin.setting.general", "hex.builtin.setting.general.check_for_updates", 0); -- View::showYesNoQuestionPopup("hex.builtin.welcome.check_for_updates_text"_lang, -- [] { // yes -- ContentRegistry::Settings::write("hex.builtin.setting.general", "hex.builtin.setting.general.check_for_updates", 1); -- ImGui::CloseCurrentPopup(); -- }, [] { // no -- ImGui::CloseCurrentPopup(); -- }); -- } -- }); - - ContentRegistry::Interface::addMenuItem("hex.builtin.menu.file", 1075, [&] { - if (ImGui::BeginMenu("hex.builtin.menu.file.open_recent"_lang, !s_recentProvidersUpdating && !s_recentProviders.empty())) { ---- a/plugins/builtin/source/content/settings_entries.cpp -+++ b/plugins/builtin/source/content/settings_entries.cpp -@@ -35,21 +35,6 @@ - - /* General */ - -- /* Values of this setting : -- 0 - do not check for updates on startup -- 1 - check for updates on startup -- 2 - default value - ask the user if he wants to check for updates. This value should only be encountered on the first startup. -- */ -- ContentRegistry::Settings::add("hex.builtin.setting.general", "hex.builtin.setting.general.check_for_updates", 2, [](auto name, nlohmann::json &setting) { -- static bool enabled = static_cast(setting) == 1; -- -- if (ImGui::Checkbox(name.data(), &enabled)) { -- setting = static_cast(enabled); -- return true; -- } -- -- return false; -- }); - - ContentRegistry::Settings::add("hex.builtin.setting.general", "hex.builtin.setting.general.show_tips", 1, [](auto name, nlohmann::json &setting) { - static bool enabled = static_cast(setting); ---- a/main/source/init/tasks.cpp -+++ b/main/source/init/tasks.cpp -@@ -29,46 +29,6 @@ - - using namespace std::literals::string_literals; - -- static bool checkForUpdates() { -- int showCheckForUpdates = ContentRegistry::Settings::read("hex.builtin.setting.general", "hex.builtin.setting.general.check_for_updates", 2); -- -- // Check if we should check for updates -- if (showCheckForUpdates == 1){ -- HttpRequest request("GET", GitHubApiURL + "/releases/latest"s); -- request.setTimeout(2000); -- -- // Query the GitHub API for the latest release version -- auto response = request.execute().get(); -- if (response.getStatusCode() != 200) -- return false; -- -- nlohmann::json releases; -- try { -- releases = nlohmann::json::parse(response.getData()); -- } catch (std::exception &e) { -- return false; -- } -- -- // Check if the response is valid -- if (!releases.contains("tag_name") || !releases["tag_name"].is_string()) -- return false; -- -- // Convert the current version string to a format that can be compared to the latest release -- auto versionString = std::string(IMHEX_VERSION); -- size_t versionLength = std::min(versionString.find_first_of('-'), versionString.length()); -- auto currVersion = "v" + versionString.substr(0, versionLength); -- -- // Get the latest release version string -- auto latestVersion = releases["tag_name"].get(); -- -- // Check if the latest release is different from the current version -- if (latestVersion != currVersion) -- ImHexApi::System::impl::addInitArgument("update-available", latestVersion.data()); -- -- } -- return true; -- } -- - bool setupEnvironment() { - hex::log::debug("Using romfs: '{}'", romfs::name()); - -@@ -479,7 +439,6 @@ - #endif - { "Loading settings", loadSettings, false }, - { "Loading plugins", loadPlugins, false }, -- { "Checking for updates", checkForUpdates, true }, - { "Loading fonts", loadFonts, true }, - }; - } diff --git a/srcpkgs/imhex/patches/sort-file-chooser.patch b/srcpkgs/imhex/patches/sort-file-chooser.patch new file mode 100644 index 00000000000..90bf07de670 --- /dev/null +++ b/srcpkgs/imhex/patches/sort-file-chooser.patch @@ -0,0 +1,27 @@ +From f57d4f2f7adb44b97f9696c94d3178e4ccebcd99 Mon Sep 17 00:00:00 2001 +From: WerWolv +Date: Sun, 21 May 2023 18:41:43 +0200 +Subject: [PATCH] impr: Manually sort file chooser popup list + +--- + .../builtin/include/content/popups/popup_file_chooser.hpp | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/plugins/builtin/include/content/popups/popup_file_chooser.hpp b/plugins/builtin/include/content/popups/popup_file_chooser.hpp +index ce464aeee76d..e52c040c27ea 100644 +--- a/plugins/builtin/include/content/popups/popup_file_chooser.hpp ++++ b/plugins/builtin/include/content/popups/popup_file_chooser.hpp +@@ -13,7 +13,12 @@ namespace hex::plugin::builtin { + : hex::Popup("hex.builtin.common.choose_file"), + m_indices({ }), m_files(files), + m_openCallback(callback), +- m_validExtensions(validExtensions), m_multiple(multiple) { } ++ m_validExtensions(validExtensions), m_multiple(multiple) { ++ ++ std::sort(this->m_files.begin(), this->m_files.end(), [](const std::fs::path &a, const std::fs::path &b) { ++ return a.filename() < b.filename(); ++ }); ++ } + + void drawContent() override { + bool doubleClicked = false; diff --git a/srcpkgs/imhex/template b/srcpkgs/imhex/template index e826e62967d..6c8761e81fc 100644 --- a/srcpkgs/imhex/template +++ b/srcpkgs/imhex/template @@ -1,6 +1,6 @@ # Template file for 'imhex' pkgname=imhex -version=1.28.0 +version=1.29.0 revision=1 build_wrksrc="ImHex" build_style=cmake @@ -8,7 +8,7 @@ build_helper=qemu # XXX: when capstone v5 is out, -DUSE_SYSTEM_CAPSTONE=ON configure_args="-DIMHEX_OFFLINE_BUILD=ON -DIMHEX_STRIP_RELEASE=OFF -DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_FMT=ON -DUSE_SYSTEM_LLVM=ON - -DUSE_SYSTEM_YARA=ON -DUSE_SYSTEM_NLOHMANN_JSON=ON" + -DUSE_SYSTEM_YARA=ON -DUSE_SYSTEM_NLOHMANN_JSON=ON -DIMHEX_DISABLE_UPDATE_CHECK=ON" hostmakedepends="pkg-config clang-tools-extra" makedepends="libcurl-devel fmt-devel llvm jansson-devel yara-devel json-c++ freetype-devel glfw-devel gtk+3-devel python3-devel file-devel mbedtls-devel @@ -20,8 +20,8 @@ homepage="https://imhex.werwolv.net/" changelog="https://github.com/WerWolv/ImHex/releases" distfiles="https://github.com/WerWolv/ImHex/releases/download/v${version}/Full.Sources.tar.gz>imhex-${version}.tar.gz https://github.com/WerWolv/ImHex-Patterns/archive/refs/tags/ImHex-v${version}.tar.gz>imhex-patterns-${version}.tar.gz" -checksum="6ee6f85dfa58e8bfb8008d1b9794cf38fed0bcc975df24bef3674abbda609d98 - bccfb8fbaa1dfcef8b38a132fa540be672fcaaadef7e5e97aabddfa620e87f1c" +checksum="25a8b250412e5b870871978e58cd5f5c08bd42587122ab7799c59eec31843c46 + a237a4fcf565af6b4ad94ec71f50b284bef3af93a13da744092da7e83d7767c0" patch_args="-Np1 -d $build_wrksrc" if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then