GUI: hide the "Disable Branch Destination Preview" menu + symbol menu in system modules only
This commit is contained in:
parent
ed1dd3c6c1
commit
bdde5d3cce
|
@ -358,7 +358,7 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
mMenuBuilder->addAction(togglePreview, [this, togglePreview](QMenu*)
|
||||
{
|
||||
togglePreview->setText(mPopupEnabled ? tr("Disable Branch Destination Preview") : tr("Enable Branch Destination Preview"));
|
||||
return true;
|
||||
return false; //hide this menu from the user, but keep the shortcut working
|
||||
});
|
||||
|
||||
MenuBuilder* labelMenu = new MenuBuilder(this);
|
||||
|
@ -504,12 +504,11 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
mMenuBuilder->addMenu(makeMenu(DIcon("analysis.png"), tr("Analysis")), analysisMenu);
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("pdb.png"), tr("Download Symbols for This Module"), SLOT(downloadCurrentSymbolsSlot()), "ActionDownloadSymbol"), [this](QMenu*)
|
||||
{
|
||||
char module[MAX_MODULE_SIZE] = "";
|
||||
return DbgGetModuleAt(rvaToVa(getInitialSelection()), module);
|
||||
//only show this action in system modules (generally user modules don't have downloadable symbols)
|
||||
return DbgFunctions()->ModGetParty(rvaToVa(getInitialSelection())) == 1;
|
||||
});
|
||||
mMenuBuilder->addSeparator();
|
||||
|
||||
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("compile.png"), tr("Assemble"), SLOT(assembleSlot()), "ActionAssemble"));
|
||||
removeAction(mMenuBuilder->addAction(makeShortcutAction(DIcon("patch.png"), tr("Patches"), SLOT(showPatchesSlot()), "ViewPatches"))); //prevent conflicting shortcut with the MainWindow
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("yara.png"), tr("&Yara..."), SLOT(yaraSlot()), "ActionYara"));
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <functional>
|
||||
|
||||
/**
|
||||
* @brief The MenuBuilder class implements the dynamical context menu system for many views.
|
||||
* @brief The MenuBuilder class implements the dynamic context menu system for many views.
|
||||
*/
|
||||
class MenuBuilder : public QObject
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue