mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-31 16:47:26 +00:00
Combine Set-As menu items (#1601)
This commit is contained in:
parent
d59ea03f87
commit
a3657f913b
@ -64,7 +64,7 @@ DisassemblyContextMenu::DisassemblyContextMenu(QWidget *parent)
|
|||||||
SLOT(on_actionDeleteFunction_triggered()));
|
SLOT(on_actionDeleteFunction_triggered()));
|
||||||
addAction(&actionDeleteFunction);
|
addAction(&actionDeleteFunction);
|
||||||
|
|
||||||
initAction(&actionAnalyzeFunction, tr("Define function here..."),
|
initAction(&actionAnalyzeFunction, tr("Define function here"),
|
||||||
SLOT(on_actionAnalyzeFunction_triggered()));
|
SLOT(on_actionAnalyzeFunction_triggered()));
|
||||||
addAction(&actionAnalyzeFunction);
|
addAction(&actionAnalyzeFunction);
|
||||||
|
|
||||||
@ -82,15 +82,7 @@ DisassemblyContextMenu::DisassemblyContextMenu(QWidget *parent)
|
|||||||
SLOT(on_actionLinkType_triggered()), getLinkTypeSequence());
|
SLOT(on_actionLinkType_triggered()), getLinkTypeSequence());
|
||||||
addAction(&actionLinkType);
|
addAction(&actionLinkType);
|
||||||
|
|
||||||
initAction(&actionSetToCode, tr("Set as Code"),
|
addSetAsMenu();
|
||||||
SLOT(on_actionSetToCode_triggered()), getSetToCodeSequence());
|
|
||||||
addAction(&actionSetToCode);
|
|
||||||
|
|
||||||
initAction(&actionSetAsString, tr("Set as String"),
|
|
||||||
SLOT(on_actionSetAsString_triggered()), getSetAsStringSequence());
|
|
||||||
addAction(&actionSetAsString);
|
|
||||||
|
|
||||||
addSetToDataMenu();
|
|
||||||
|
|
||||||
addSeparator();
|
addSeparator();
|
||||||
|
|
||||||
@ -174,9 +166,25 @@ void DisassemblyContextMenu::addSetBitsMenu()
|
|||||||
connect(&actionSetBits64, &QAction::triggered, this, [this] { setBits(64); });
|
connect(&actionSetBits64, &QAction::triggered, this, [this] { setBits(64); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DisassemblyContextMenu::addSetAsMenu()
|
||||||
|
{
|
||||||
|
setAsMenu = addMenu(tr("Set as..."));
|
||||||
|
|
||||||
|
initAction(&actionSetToCode, tr("Code"),
|
||||||
|
SLOT(on_actionSetToCode_triggered()), getSetToCodeSequence());
|
||||||
|
setAsMenu->addAction(&actionSetToCode);
|
||||||
|
|
||||||
|
initAction(&actionSetAsString, tr("String"),
|
||||||
|
SLOT(on_actionSetAsString_triggered()), getSetAsStringSequence());
|
||||||
|
setAsMenu->addAction(&actionSetAsString);
|
||||||
|
|
||||||
|
addSetToDataMenu();
|
||||||
|
}
|
||||||
|
|
||||||
void DisassemblyContextMenu::addSetToDataMenu()
|
void DisassemblyContextMenu::addSetToDataMenu()
|
||||||
{
|
{
|
||||||
setToDataMenu = addMenu(tr("Set to Data..."));
|
setToDataMenu = setAsMenu->addMenu(tr("Data..."));
|
||||||
|
|
||||||
initAction(&actionSetToDataByte, tr("Byte"));
|
initAction(&actionSetToDataByte, tr("Byte"));
|
||||||
setToDataMenu->addAction(&actionSetToDataByte);
|
setToDataMenu->addAction(&actionSetToDataByte);
|
||||||
|
@ -157,6 +157,7 @@ private:
|
|||||||
QAction actionSetAsString;
|
QAction actionSetAsString;
|
||||||
|
|
||||||
QMenu *setToDataMenu;
|
QMenu *setToDataMenu;
|
||||||
|
QMenu *setAsMenu;
|
||||||
QAction actionSetToDataEx;
|
QAction actionSetToDataEx;
|
||||||
QAction actionSetToDataByte;
|
QAction actionSetToDataByte;
|
||||||
QAction actionSetToDataWord;
|
QAction actionSetToDataWord;
|
||||||
@ -176,6 +177,7 @@ private:
|
|||||||
|
|
||||||
void addSetBaseMenu();
|
void addSetBaseMenu();
|
||||||
void addSetBitsMenu();
|
void addSetBitsMenu();
|
||||||
|
void addSetAsMenu();
|
||||||
void addSetToDataMenu();
|
void addSetToDataMenu();
|
||||||
void addEditMenu();
|
void addEditMenu();
|
||||||
void addDebugMenu();
|
void addDebugMenu();
|
||||||
|
Loading…
Reference in New Issue
Block a user