impr: Only show remaining Open File / New File menu options when they make sense

This commit is contained in:
WerWolv
2025-12-03 19:21:23 +01:00
parent 09006588fc
commit 94b53592d9
5 changed files with 26 additions and 13 deletions

View File

@@ -24,6 +24,7 @@
#include <ranges>
#include <unordered_set>
#include <hex/api/content_registry/views.hpp>
#include <hex/helpers/menu_items.hpp>
namespace hex::plugin::builtin::recent {
@@ -426,6 +427,6 @@ namespace hex::plugin::builtin::recent {
}
}, [] {
return TaskManager::getRunningTaskCount() == 0 && !s_recentEntriesUpdating && !s_recentEntries.empty();
});
}, ContentRegistry::Views::getViewByName("hex.builtin.view.hex_editor.name"), true);
}
}