mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-01 21:17:44 -05:00
impr: Swap some items between File and Edit menu to fit better
This commit is contained in:
@@ -206,7 +206,7 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
|
||||
[[nodiscard]] UnlocalizedString getTitle() const override {
|
||||
return "hex.builtin.view.hex_editor.menu.file.select";
|
||||
return "hex.builtin.view.hex_editor.menu.edit.select";
|
||||
}
|
||||
|
||||
[[nodiscard]] bool canBePinned() const override {
|
||||
@@ -1085,15 +1085,6 @@ namespace hex::plugin::builtin {
|
||||
},
|
||||
ImHexApi::Provider::isValid);
|
||||
|
||||
/* Select */
|
||||
ContentRegistry::Interface::addMenuItem({ "hex.builtin.menu.file", "hex.builtin.view.hex_editor.menu.file.select" }, ICON_VS_SELECTION, 1650,
|
||||
CTRLCMD + SHIFT + Keys::A,
|
||||
[this] {
|
||||
auto selection = ImHexApi::HexEditor::getSelection().value_or(ImHexApi::HexEditor::ProviderRegion{ { 0, 1 }, nullptr });
|
||||
this->openPopup<PopupSelect>(selection.getStartAddress(), selection.getSize());
|
||||
},
|
||||
ImHexApi::Provider::isValid);
|
||||
|
||||
|
||||
|
||||
ContentRegistry::Interface::addMenuItemSeparator({ "hex.builtin.menu.edit" }, 1100);
|
||||
@@ -1185,8 +1176,17 @@ namespace hex::plugin::builtin {
|
||||
ImHexApi::HexEditor::isSelectionValid,
|
||||
this);
|
||||
|
||||
/* Select */
|
||||
ContentRegistry::Interface::addMenuItem({ "hex.builtin.menu.edit", "hex.builtin.view.hex_editor.menu.edit.select" }, ICON_VS_SELECTION, 1525,
|
||||
CTRLCMD + SHIFT + Keys::A,
|
||||
[this] {
|
||||
auto selection = ImHexApi::HexEditor::getSelection().value_or(ImHexApi::HexEditor::ProviderRegion{ { 0, 1 }, nullptr });
|
||||
this->openPopup<PopupSelect>(selection.getStartAddress(), selection.getSize());
|
||||
},
|
||||
ImHexApi::Provider::isValid);
|
||||
|
||||
/* Select All */
|
||||
ContentRegistry::Interface::addMenuItem({ "hex.builtin.menu.edit", "hex.builtin.view.hex_editor.menu.edit.select_all" }, ICON_VS_SELECTION, 1550, CurrentView + CTRLCMD + Keys::A,
|
||||
ContentRegistry::Interface::addMenuItem({ "hex.builtin.menu.edit", "hex.builtin.view.hex_editor.menu.edit.select_all" }, ICON_VS_LIST_FLAT, 1550, CurrentView + CTRLCMD + Keys::A,
|
||||
[] {
|
||||
auto provider = ImHexApi::Provider::get();
|
||||
ImHexApi::HexEditor::setSelection(provider->getBaseAddress(), provider->getActualSize());
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace hex::plugin::builtin {
|
||||
|
||||
|
||||
ViewHighlightRules::ViewHighlightRules() : View::Floating("hex.builtin.view.highlight_rules.name") {
|
||||
ContentRegistry::Interface::addMenuItem({ "hex.builtin.menu.edit", "hex.builtin.view.highlight_rules.menu.edit.rules" }, ICON_VS_TAG, 1870, Shortcut::None, [&, this] {
|
||||
ContentRegistry::Interface::addMenuItem({ "hex.builtin.menu.file", "hex.builtin.view.highlight_rules.menu.file.rules" }, ICON_VS_TAG, 1650, Shortcut::None, [&, this] {
|
||||
this->getWindowOpenState() = true;
|
||||
}, ImHexApi::Provider::isValid);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user