mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 13:05:25 -05:00
build: Added option to disable update checking (#1036)
This is aimed at use by linux distros, where package updates come from a central location, and users shouldn't need to worry about updating ImHex on their own. This disables parts of the ImHex UI that would not be useful in that case. Tested and confirmed that this works in both states of the of the `-DIMHEX_DISABLE_UPDATE_CHECK` switch.
This commit is contained in:
@@ -535,6 +535,7 @@ namespace hex::plugin::builtin {
|
||||
loadDefaultLayout();
|
||||
});
|
||||
|
||||
#if defined(HEX_UPDATE_CHECK)
|
||||
EventManager::subscribe<EventWindowInitialized>([] {
|
||||
// documentation of the value above the setting definition
|
||||
auto showCheckForUpdates = ContentRegistry::Settings::read("hex.builtin.setting.general", "hex.builtin.setting.general.check_for_updates", 2);
|
||||
@@ -550,6 +551,7 @@ namespace hex::plugin::builtin {
|
||||
);
|
||||
}
|
||||
});
|
||||
#endif
|
||||
|
||||
// Clear project context if we go back to the welcome screen
|
||||
EventManager::subscribe<EventProviderChanged>([](hex::prv::Provider *oldProvider, hex::prv::Provider *newProvider) {
|
||||
|
||||
Reference in New Issue
Block a user