Allow themes to customize the icons
Thanks to https://twitter.com/Trancestorm for the dark theme icons!
This commit is contained in:
parent
fae816cc3c
commit
fdf8052d67
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
|
@ -0,0 +1,9 @@
|
|||
[Icon Theme]
|
||||
Name=Dark
|
||||
Comment=Dark icon theme
|
||||
Directories=icons
|
||||
Inherits=Default
|
||||
|
||||
[icons]
|
||||
Size=16
|
||||
Type=Scalable
|
|
@ -13,13 +13,13 @@ AbstractStdTable::AbstractStdTable(QWidget* parent) : AbstractTableView(parent)
|
|||
Initialize();
|
||||
|
||||
// Set up copy menu
|
||||
mCopyLine = makeShortcutAction(DIcon("copy_table_line.png"), tr("&Line"), SLOT(copyLineSlot()), "ActionCopy");
|
||||
mCopyTable = makeShortcutAction(DIcon("copy_cropped_table.png"), tr("Cropped &Table"), SLOT(copyTableSlot()), "ActionCopyCroppedTable");
|
||||
mCopyTableResize = makeShortcutAction(DIcon("copy_full_table.png"), tr("&Full Table"), SLOT(copyTableResizeSlot()), "ActionCopyTable");
|
||||
mCopyLineToLog = makeShortcutAction(DIcon("copy_table_line.png"), tr("Line, To Log"), SLOT(copyLineToLogSlot()), "ActionCopyLineToLog");
|
||||
mCopyTableToLog = makeShortcutAction(DIcon("copy_cropped_table.png"), tr("Cropped Table, To Log"), SLOT(copyTableToLogSlot()), "ActionCopyCroppedTableToLog");
|
||||
mCopyTableResizeToLog = makeShortcutAction(DIcon("copy_full_table.png"), tr("Full Table, To Log"), SLOT(copyTableResizeToLogSlot()), "ActionCopyTableToLog");
|
||||
mExportTableCSV = makeShortcutAction(DIcon("database-export.png"), tr("&Export Table"), SLOT(exportTableSlot()), "ActionExport");
|
||||
mCopyLine = makeShortcutAction(DIcon("copy_table_line"), tr("&Line"), SLOT(copyLineSlot()), "ActionCopy");
|
||||
mCopyTable = makeShortcutAction(DIcon("copy_cropped_table"), tr("Cropped &Table"), SLOT(copyTableSlot()), "ActionCopyCroppedTable");
|
||||
mCopyTableResize = makeShortcutAction(DIcon("copy_full_table"), tr("&Full Table"), SLOT(copyTableResizeSlot()), "ActionCopyTable");
|
||||
mCopyLineToLog = makeShortcutAction(DIcon("copy_table_line"), tr("Line, To Log"), SLOT(copyLineToLogSlot()), "ActionCopyLineToLog");
|
||||
mCopyTableToLog = makeShortcutAction(DIcon("copy_cropped_table"), tr("Cropped Table, To Log"), SLOT(copyTableToLogSlot()), "ActionCopyCroppedTableToLog");
|
||||
mCopyTableResizeToLog = makeShortcutAction(DIcon("copy_full_table"), tr("Full Table, To Log"), SLOT(copyTableResizeToLogSlot()), "ActionCopyTableToLog");
|
||||
mExportTableCSV = makeShortcutAction(DIcon("database-export"), tr("&Export Table"), SLOT(exportTableSlot()), "ActionExport");
|
||||
}
|
||||
|
||||
QString AbstractStdTable::paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h)
|
||||
|
@ -901,7 +901,7 @@ void AbstractStdTable::setupCopyMenu(QMenu* copyMenu)
|
|||
{
|
||||
if(!getColumnCount())
|
||||
return;
|
||||
copyMenu->setIcon(DIcon("copy.png"));
|
||||
copyMenu->setIcon(DIcon("copy"));
|
||||
//Copy->Whole Line
|
||||
copyMenu->addAction(mCopyLine);
|
||||
//Copy->Cropped Table
|
||||
|
@ -933,7 +933,7 @@ void AbstractStdTable::setupCopyColumnMenu(QMenu* copyMenu)
|
|||
QString title = mCopyTitles.at(i);
|
||||
if(!title.length()) //skip empty copy titles
|
||||
continue;
|
||||
QAction* mCopyAction = new QAction(DIcon("copy_item.png"), title, copyMenu);
|
||||
QAction* mCopyAction = new QAction(DIcon("copy_item"), title, copyMenu);
|
||||
mCopyAction->setObjectName(QString::number(i));
|
||||
connect(mCopyAction, SIGNAL(triggered()), this, SLOT(copyEntrySlot()));
|
||||
copyMenu->addAction(mCopyAction);
|
||||
|
@ -977,7 +977,7 @@ void AbstractStdTable::setupCopyColumnMenu(MenuBuilder* copyMenu)
|
|||
QString title = mCopyTitles.at(i);
|
||||
if(!title.length()) //skip empty copy titles
|
||||
continue;
|
||||
QAction* action = new QAction(DIcon("copy_item.png"), title, menu);
|
||||
QAction* action = new QAction(DIcon("copy_item"), title, menu);
|
||||
action->setObjectName(QString::number(i));
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(copyEntrySlot()));
|
||||
menu->addAction(action);
|
||||
|
|
|
@ -295,19 +295,19 @@ QString HexDump::makeCopyText()
|
|||
void HexDump::setupCopyMenu()
|
||||
{
|
||||
// Copy -> Data
|
||||
mCopySelection = new QAction(DIcon("copy_selection.png"), tr("&Selected lines"), this);
|
||||
mCopySelection = new QAction(DIcon("copy_selection"), tr("&Selected lines"), this);
|
||||
connect(mCopySelection, SIGNAL(triggered(bool)), this, SLOT(copySelectionSlot()));
|
||||
mCopySelection->setShortcutContext(Qt::WidgetShortcut);
|
||||
addAction(mCopySelection);
|
||||
|
||||
// Copy -> Address
|
||||
mCopyAddress = new QAction(DIcon("copy_address.png"), tr("&Address"), this);
|
||||
mCopyAddress = new QAction(DIcon("copy_address"), tr("&Address"), this);
|
||||
connect(mCopyAddress, SIGNAL(triggered()), this, SLOT(copyAddressSlot()));
|
||||
mCopyAddress->setShortcutContext(Qt::WidgetShortcut);
|
||||
addAction(mCopyAddress);
|
||||
|
||||
// Copy -> RVA
|
||||
mCopyRva = new QAction(DIcon("copy_address.png"), "&RVA", this);
|
||||
mCopyRva = new QAction(DIcon("copy_address"), "&RVA", this);
|
||||
connect(mCopyRva, SIGNAL(triggered()), this, SLOT(copyRvaSlot()));
|
||||
mCopyRva->setShortcutContext(Qt::WidgetShortcut);
|
||||
addAction(mCopyRva);
|
||||
|
|
|
@ -57,32 +57,32 @@ ReferenceView::ReferenceView(bool sourceView, QWidget* parent) : StdSearchListVi
|
|||
|
||||
void ReferenceView::setupContextMenu()
|
||||
{
|
||||
QIcon disassembler = DIcon(ArchValue("processor32.png", "processor64.png"));
|
||||
QIcon disassembler = DIcon(ArchValue("processor32", "processor64"));
|
||||
mFollowAddress = new QAction(disassembler, tr("&Follow in Disassembler"), this);
|
||||
connect(mFollowAddress, SIGNAL(triggered()), this, SLOT(followAddress()));
|
||||
|
||||
mFollowDumpAddress = new QAction(DIcon("dump.png"), tr("Follow in &Dump"), this);
|
||||
mFollowDumpAddress = new QAction(DIcon("dump"), tr("Follow in &Dump"), this);
|
||||
connect(mFollowDumpAddress, SIGNAL(triggered()), this, SLOT(followDumpAddress()));
|
||||
|
||||
mFollowApiAddress = new QAction(tr("Follow &API Address"), this);
|
||||
connect(mFollowApiAddress, SIGNAL(triggered()), this, SLOT(followApiAddress()));
|
||||
|
||||
mToggleBreakpoint = new QAction(DIcon("breakpoint_toggle.png"), tr("Toggle Breakpoint"), this);
|
||||
mToggleBreakpoint = new QAction(DIcon("breakpoint_toggle"), tr("Toggle Breakpoint"), this);
|
||||
mToggleBreakpoint->setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
||||
addAction(mToggleBreakpoint);
|
||||
StdSearchListView::addAction(mToggleBreakpoint);
|
||||
connect(mToggleBreakpoint, SIGNAL(triggered()), this, SLOT(toggleBreakpoint()));
|
||||
|
||||
mToggleBookmark = new QAction(DIcon("bookmark_toggle.png"), tr("Toggle Bookmark"), this);
|
||||
mToggleBookmark = new QAction(DIcon("bookmark_toggle"), tr("Toggle Bookmark"), this);
|
||||
mToggleBookmark->setShortcutContext(Qt::WidgetWithChildrenShortcut);
|
||||
addAction(mToggleBookmark);
|
||||
StdSearchListView::addAction(mToggleBookmark);
|
||||
connect(mToggleBookmark, SIGNAL(triggered()), this, SLOT(toggleBookmark()));
|
||||
|
||||
mSetBreakpointOnAllCommands = new QAction(DIcon("breakpoint_seton_all_commands.png"), tr("Set breakpoint on all commands"), this);
|
||||
mSetBreakpointOnAllCommands = new QAction(DIcon("breakpoint_seton_all_commands"), tr("Set breakpoint on all commands"), this);
|
||||
connect(mSetBreakpointOnAllCommands, SIGNAL(triggered()), this, SLOT(setBreakpointOnAllCommands()));
|
||||
|
||||
mRemoveBreakpointOnAllCommands = new QAction(DIcon("breakpoint_remove_all_commands.png"), tr("Remove breakpoint on all commands"), this);
|
||||
mRemoveBreakpointOnAllCommands = new QAction(DIcon("breakpoint_remove_all_commands"), tr("Remove breakpoint on all commands"), this);
|
||||
connect(mRemoveBreakpointOnAllCommands, SIGNAL(triggered()), this, SLOT(removeBreakpointOnAllCommands()));
|
||||
|
||||
mSetBreakpointOnAllApiCalls = new QAction(tr("Set breakpoint on all api calls"), this);
|
||||
|
|
|
@ -99,7 +99,7 @@ SearchListView::SearchListView(QWidget* parent, AbstractSearchList* abstractSear
|
|||
mSearchBox->setWindowTitle(parent->metaObject()->className());
|
||||
|
||||
// Setup search menu action
|
||||
mSearchAction = new QAction(DIcon("find.png"), tr("Search..."), this);
|
||||
mSearchAction = new QAction(DIcon("find"), tr("Search..."), this);
|
||||
connect(mSearchAction, SIGNAL(triggered()), this, SLOT(searchSlot()));
|
||||
|
||||
// https://wiki.qt.io/Delay_action_to_wait_for_user_interaction
|
||||
|
@ -300,7 +300,7 @@ void SearchListView::listContextMenu(const QPoint & pos)
|
|||
wMenu.addSeparator();
|
||||
wMenu.addAction(mSearchAction);
|
||||
QMenu wCopyMenu(tr("&Copy"), this);
|
||||
wCopyMenu.setIcon(DIcon("copy.png"));
|
||||
wCopyMenu.setIcon(DIcon("copy"));
|
||||
mCurList->setupCopyMenu(&wCopyMenu);
|
||||
if(wCopyMenu.actions().length())
|
||||
wMenu.addMenu(&wCopyMenu);
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
<string>About x64dbg</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../../resource.qrc">
|
||||
<normaloff>:/icons/images/information.png</normaloff>:/icons/images/information.png</iconset>
|
||||
<iconset theme="information" resource="../../resource.qrc">
|
||||
<normaloff>:/Default/icons/information.png</normaloff>:/Default/icons/information.png</iconset>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<item>
|
||||
|
@ -51,7 +51,7 @@
|
|||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../resource.qrc">:/icons/images/bug.png</pixmap>
|
||||
<pixmap resource="../../resource.qrc">:/Default/icons/bug.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
|
@ -477,7 +477,7 @@
|
|||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../resource.qrc">:/icons/images/donation_qr.png</pixmap>
|
||||
<pixmap resource="../../resource.qrc">:/Default/icons/donation_qr.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
<string>Appearance</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../../resource.qrc">
|
||||
<normaloff>:/icons/images/color-swatches.png</normaloff>:/icons/images/color-swatches.png</iconset>
|
||||
<iconset theme="color-swatches" resource="../../resource.qrc">
|
||||
<normaloff>:/Default/icons/color-swatches.png</normaloff>:/Default/icons/color-swatches.png</iconset>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
<string>0</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../../resource.qrc">
|
||||
<normaloff>:/icons/images/ui-combo-box-edit.png</normaloff>:/icons/images/ui-combo-box-edit.png</iconset>
|
||||
<iconset theme="ui-combo-box-edit" resource="../../resource.qrc">
|
||||
<normaloff>:/Default/icons/ui-combo-box-edit.png</normaloff>:/Default/icons/ui-combo-box-edit.png</iconset>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="bottomMargin">
|
||||
|
|
|
@ -14,12 +14,12 @@ AttachDialog::AttachDialog(QWidget* parent) : QDialog(parent), ui(new Ui::Attach
|
|||
// Setup actions/shortcuts
|
||||
//
|
||||
// Enter key as shortcut for "Attach"
|
||||
mAttachAction = new QAction(DIcon("attach.png"), tr("Attach"), this);
|
||||
mAttachAction = new QAction(DIcon("attach"), tr("Attach"), this);
|
||||
mAttachAction->setShortcut(QKeySequence("enter"));
|
||||
connect(mAttachAction, SIGNAL(triggered()), this, SLOT(on_btnAttach_clicked()));
|
||||
|
||||
// F5 as shortcut to refresh view
|
||||
mRefreshAction = new QAction(DIcon("arrow-restart.png"), tr("Refresh"), this);
|
||||
mRefreshAction = new QAction(DIcon("arrow-restart"), tr("Refresh"), this);
|
||||
mRefreshAction->setShortcut(ConfigShortcut("ActionRefresh"));
|
||||
ui->btnRefresh->setText(tr("Refresh") + QString(" (%1)").arg(mRefreshAction->shortcut().toString()));
|
||||
connect(mRefreshAction, SIGNAL(triggered()), this, SLOT(refresh()));
|
||||
|
@ -100,7 +100,7 @@ retryFindWindow:
|
|||
if(hWndFound == NULL)
|
||||
{
|
||||
QMessageBox retryDialog(QMessageBox::Critical, tr("Find Window"), tr("Cannot find window \"%1\". Retry?").arg(windowText), QMessageBox::Cancel | QMessageBox::Retry, this);
|
||||
retryDialog.setWindowIcon(DIcon("compile-error.png"));
|
||||
retryDialog.setWindowIcon(DIcon("compile-error"));
|
||||
if(retryDialog.exec() == QMessageBox::Retry)
|
||||
goto retryFindWindow;
|
||||
}
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
<string>Attach</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../../resource.qrc">
|
||||
<normaloff>:/icons/images/attach.png</normaloff>:/icons/images/attach.png</iconset>
|
||||
<iconset theme="attach" resource="../../resource.qrc">
|
||||
<normaloff>:/Default/icons/attach.png</normaloff>:/Default/icons/attach.png</iconset>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
|
|
|
@ -50,7 +50,7 @@ void BreakpointsView::setupContextMenu()
|
|||
{
|
||||
return isValidBp();
|
||||
};
|
||||
mMenuBuilder->addAction(makeAction(DIcon(ArchValue("processor32.png", "processor64.png")), tr("Follow breakpoint"), SLOT(followBreakpointSlot())), [this](QMenu*)
|
||||
mMenuBuilder->addAction(makeAction(DIcon(ArchValue("processor32", "processor64")), tr("Follow breakpoint"), SLOT(followBreakpointSlot())), [this](QMenu*)
|
||||
{
|
||||
if(!isValidBp())
|
||||
return false;
|
||||
|
@ -58,26 +58,26 @@ void BreakpointsView::setupContextMenu()
|
|||
return false;
|
||||
return true;
|
||||
});
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("breakpoint_remove.png"), tr("&Remove"), SLOT(removeBreakpointSlot()), "ActionDeleteBreakpoint"), validBp);
|
||||
QAction* enableDisableBreakpoint = makeShortcutAction(DIcon("breakpoint_disable.png"), tr("Disable"), SLOT(toggleBreakpointSlot()), "ActionEnableDisableBreakpoint");
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("breakpoint_remove"), tr("&Remove"), SLOT(removeBreakpointSlot()), "ActionDeleteBreakpoint"), validBp);
|
||||
QAction* enableDisableBreakpoint = makeShortcutAction(DIcon("breakpoint_disable"), tr("Disable"), SLOT(toggleBreakpointSlot()), "ActionEnableDisableBreakpoint");
|
||||
mMenuBuilder->addAction(enableDisableBreakpoint, [this, enableDisableBreakpoint](QMenu*)
|
||||
{
|
||||
if(!isValidBp() || !selectedBp().active)
|
||||
return false;
|
||||
if(selectedBp().enabled)
|
||||
{
|
||||
enableDisableBreakpoint->setIcon(DIcon("breakpoint_disable.png"));
|
||||
enableDisableBreakpoint->setIcon(DIcon("breakpoint_disable"));
|
||||
enableDisableBreakpoint->setText(tr("Disable"));
|
||||
}
|
||||
else
|
||||
{
|
||||
enableDisableBreakpoint->setIcon(DIcon("breakpoint_enable.png"));
|
||||
enableDisableBreakpoint->setIcon(DIcon("breakpoint_enable"));
|
||||
enableDisableBreakpoint->setText(tr("Enable"));
|
||||
}
|
||||
return true;
|
||||
});
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("breakpoint_edit_alt.png"), tr("&Edit"), SLOT(editBreakpointSlot()), "ActionEditBreakpoint"), validBp);
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("breakpoint_reset_hitcount.png"), tr("Reset hit count"), SLOT(resetHitCountBreakpointSlot()), "ActionResetHitCountBreakpoint"), [this](QMenu*)
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("breakpoint_edit_alt"), tr("&Edit"), SLOT(editBreakpointSlot()), "ActionEditBreakpoint"), validBp);
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("breakpoint_reset_hitcount"), tr("Reset hit count"), SLOT(resetHitCountBreakpointSlot()), "ActionResetHitCountBreakpoint"), [this](QMenu*)
|
||||
{
|
||||
if(!isValidBp())
|
||||
return false;
|
||||
|
@ -85,7 +85,7 @@ void BreakpointsView::setupContextMenu()
|
|||
});
|
||||
mMenuBuilder->addSeparator();
|
||||
|
||||
QAction* enableAll = makeShortcutAction(DIcon("breakpoint_enable_all.png"), QString(), SLOT(enableAllBreakpointsSlot()), "ActionEnableAllBreakpoints");
|
||||
QAction* enableAll = makeShortcutAction(DIcon("breakpoint_enable_all"), QString(), SLOT(enableAllBreakpointsSlot()), "ActionEnableAllBreakpoints");
|
||||
mMenuBuilder->addAction(enableAll, [this, enableAll](QMenu*)
|
||||
{
|
||||
if(!isValidBp())
|
||||
|
@ -93,7 +93,7 @@ void BreakpointsView::setupContextMenu()
|
|||
enableAll->setText(tr("Enable all (%1)").arg(bpTypeName(selectedBp().type)));
|
||||
return true;
|
||||
});
|
||||
QAction* disableAll = makeShortcutAction(DIcon("breakpoint_disable_all.png"), QString(), SLOT(disableAllBreakpointsSlot()), "ActionDisableAllBreakpoints");
|
||||
QAction* disableAll = makeShortcutAction(DIcon("breakpoint_disable_all"), QString(), SLOT(disableAllBreakpointsSlot()), "ActionDisableAllBreakpoints");
|
||||
mMenuBuilder->addAction(disableAll, [this, disableAll](QMenu*)
|
||||
{
|
||||
if(!isValidBp())
|
||||
|
@ -101,7 +101,7 @@ void BreakpointsView::setupContextMenu()
|
|||
disableAll->setText(tr("Disable all (%1)").arg(bpTypeName(selectedBp().type)));
|
||||
return true;
|
||||
});
|
||||
QAction* removeAll = makeShortcutAction(DIcon("breakpoint_remove_all.png"), QString(), SLOT(removeAllBreakpointsSlot()), "ActionRemoveAllBreakpoints");
|
||||
QAction* removeAll = makeShortcutAction(DIcon("breakpoint_remove_all"), QString(), SLOT(removeAllBreakpointsSlot()), "ActionRemoveAllBreakpoints");
|
||||
mMenuBuilder->addAction(removeAll, [this, removeAll](QMenu*)
|
||||
{
|
||||
if(!isValidBp())
|
||||
|
@ -111,8 +111,8 @@ void BreakpointsView::setupContextMenu()
|
|||
});
|
||||
mMenuBuilder->addSeparator();
|
||||
|
||||
mMenuBuilder->addAction(makeAction(DIcon("breakpoint_module_add.png"), tr("Add DLL breakpoint"), SLOT(addDllBreakpointSlot())));
|
||||
mMenuBuilder->addAction(makeAction(DIcon("breakpoint_exception_add.png"), tr("Add exception breakpoint"), SLOT(addExceptionBreakpointSlot())));
|
||||
mMenuBuilder->addAction(makeAction(DIcon("breakpoint_module_add"), tr("Add DLL breakpoint"), SLOT(addDllBreakpointSlot())));
|
||||
mMenuBuilder->addAction(makeAction(DIcon("breakpoint_exception_add"), tr("Add exception breakpoint"), SLOT(addExceptionBreakpointSlot())));
|
||||
mMenuBuilder->addSeparator();
|
||||
|
||||
mMenuBuilder->addAction(makeAction(tr("Copy breakpoint conditions"), SLOT(copyConditionalBreakpointSlot())));
|
||||
|
@ -122,7 +122,7 @@ void BreakpointsView::setupContextMenu()
|
|||
});
|
||||
MenuBuilder* copyMenu = new MenuBuilder(this);
|
||||
setupCopyMenu(copyMenu);
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("copy.png"), tr("&Copy")), copyMenu);
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("copy"), tr("&Copy")), copyMenu);
|
||||
}
|
||||
|
||||
void BreakpointsView::updateColors()
|
||||
|
@ -787,14 +787,14 @@ void BreakpointsView::removeAllBreakpointsSlot()
|
|||
void BreakpointsView::addDllBreakpointSlot()
|
||||
{
|
||||
QString fileName;
|
||||
if(SimpleInputBox(this, tr("Enter the module name"), "", fileName, tr("Example: mydll.dll"), &DIcon("breakpoint.png")) && !fileName.isEmpty())
|
||||
if(SimpleInputBox(this, tr("Enter the module name"), "", fileName, tr("Example: mydll.dll"), &DIcon("breakpoint")) && !fileName.isEmpty())
|
||||
DbgCmdExec(QString("bpdll \"%1\"").arg(fileName));
|
||||
}
|
||||
|
||||
void BreakpointsView::addExceptionBreakpointSlot()
|
||||
{
|
||||
QString exception;
|
||||
if(SimpleChoiceBox(this, tr("Enter the exception code"), "", mExceptionList, exception, true, tr("Example: EXCEPTION_ACCESS_VIOLATION"), &DIcon("breakpoint.png"), mExceptionMaxLength) && !exception.isEmpty())
|
||||
if(SimpleChoiceBox(this, tr("Enter the exception code"), "", mExceptionList, exception, true, tr("Example: EXCEPTION_ACCESS_VIOLATION"), &DIcon("breakpoint"), mExceptionMaxLength) && !exception.isEmpty())
|
||||
DbgCmdExec((QString("SetExceptionBPX ") + exception));
|
||||
}
|
||||
|
||||
|
|
|
@ -152,20 +152,20 @@ void CPUArgumentWidget::contextMenuSlot(QPoint pos)
|
|||
return addr >= base && addr < base + size;
|
||||
};
|
||||
|
||||
configAction(wMenu, DIcon(ArchValue("processor32.png", "processor64.png")), mFollowDisasm, valueText, tr("Disassembler"));
|
||||
configAction(wMenu, DIcon("dump.png"), mFollowDump, valueText, tr("Dump"));
|
||||
configAction(wMenu, DIcon(ArchValue("processor32", "processor64")), mFollowDisasm, valueText, tr("Disassembler"));
|
||||
configAction(wMenu, DIcon("dump"), mFollowDump, valueText, tr("Dump"));
|
||||
if(inStackRange(value))
|
||||
configAction(wMenu, DIcon("stack.png"), mFollowStack, valueText, tr("Stack"));
|
||||
configAction(wMenu, DIcon("stack"), mFollowStack, valueText, tr("Stack"));
|
||||
if(DbgMemIsValidReadPtr(valueAddr))
|
||||
{
|
||||
configAction(wMenu, DIcon(ArchValue("processor32.png", "processor64.png")), mFollowAddrDisasm, valueAddrText, tr("Disassembler"));
|
||||
configAction(wMenu, DIcon("dump.png"), mFollowDump, valueAddrText, tr("Dump"));
|
||||
configAction(wMenu, DIcon(ArchValue("processor32", "processor64")), mFollowAddrDisasm, valueAddrText, tr("Disassembler"));
|
||||
configAction(wMenu, DIcon("dump"), mFollowDump, valueAddrText, tr("Dump"));
|
||||
if(inStackRange(valueAddr))
|
||||
configAction(wMenu, DIcon("stack.png"), mFollowAddrStack, valueAddrText, tr("Stack"));
|
||||
configAction(wMenu, DIcon("stack"), mFollowAddrStack, valueAddrText, tr("Stack"));
|
||||
}
|
||||
}
|
||||
QMenu wCopyMenu(tr("&Copy"));
|
||||
wCopyMenu.setIcon(DIcon("copy.png"));
|
||||
wCopyMenu.setIcon(DIcon("copy"));
|
||||
mTable->setupCopyMenu(&wCopyMenu);
|
||||
if(wCopyMenu.actions().length())
|
||||
{
|
||||
|
|
|
@ -272,31 +272,31 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
});
|
||||
|
||||
MenuBuilder* binaryMenu = new MenuBuilder(this);
|
||||
binaryMenu->addAction(makeShortcutAction(DIcon("binary_edit.png"), tr("&Edit"), SLOT(binaryEditSlot()), "ActionBinaryEdit"));
|
||||
binaryMenu->addAction(makeShortcutAction(DIcon("binary_fill.png"), tr("&Fill..."), SLOT(binaryFillSlot()), "ActionBinaryFill"));
|
||||
binaryMenu->addAction(makeShortcutAction(DIcon("binary_fill_nop.png"), tr("Fill with &NOPs"), SLOT(binaryFillNopsSlot()), "ActionBinaryFillNops"));
|
||||
binaryMenu->addAction(makeShortcutAction(DIcon("binary_edit"), tr("&Edit"), SLOT(binaryEditSlot()), "ActionBinaryEdit"));
|
||||
binaryMenu->addAction(makeShortcutAction(DIcon("binary_fill"), tr("&Fill..."), SLOT(binaryFillSlot()), "ActionBinaryFill"));
|
||||
binaryMenu->addAction(makeShortcutAction(DIcon("binary_fill_nop"), tr("Fill with &NOPs"), SLOT(binaryFillNopsSlot()), "ActionBinaryFillNops"));
|
||||
binaryMenu->addSeparator();
|
||||
binaryMenu->addAction(makeShortcutAction(DIcon("binary_copy.png"), tr("&Copy"), SLOT(binaryCopySlot()), "ActionBinaryCopy"));
|
||||
binaryMenu->addAction(makeShortcutAction(DIcon("binary_paste.png"), tr("&Paste"), SLOT(binaryPasteSlot()), "ActionBinaryPaste"), [](QMenu*)
|
||||
binaryMenu->addAction(makeShortcutAction(DIcon("binary_copy"), tr("&Copy"), SLOT(binaryCopySlot()), "ActionBinaryCopy"));
|
||||
binaryMenu->addAction(makeShortcutAction(DIcon("binary_paste"), tr("&Paste"), SLOT(binaryPasteSlot()), "ActionBinaryPaste"), [](QMenu*)
|
||||
{
|
||||
return QApplication::clipboard()->mimeData()->hasText();
|
||||
});
|
||||
binaryMenu->addAction(makeShortcutAction(DIcon("binary_paste_ignoresize.png"), tr("Paste (&Ignore Size)"), SLOT(binaryPasteIgnoreSizeSlot()), "ActionBinaryPasteIgnoreSize"), [](QMenu*)
|
||||
binaryMenu->addAction(makeShortcutAction(DIcon("binary_paste_ignoresize"), tr("Paste (&Ignore Size)"), SLOT(binaryPasteIgnoreSizeSlot()), "ActionBinaryPasteIgnoreSize"), [](QMenu*)
|
||||
{
|
||||
return QApplication::clipboard()->mimeData()->hasText();
|
||||
});
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("binary.png"), tr("&Binary")), binaryMenu);
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("binary"), tr("&Binary")), binaryMenu);
|
||||
|
||||
MenuBuilder* copyMenu = new MenuBuilder(this);
|
||||
copyMenu->addAction(makeShortcutAction(DIcon("copy_selection.png"), tr("&Selection"), SLOT(copySelectionSlot()), "ActionCopy"));
|
||||
copyMenu->addAction(makeAction(DIcon("copy_selection.png"), tr("Selection to &File"), SLOT(copySelectionToFileSlot())));
|
||||
copyMenu->addAction(makeAction(DIcon("copy_selection_no_bytes.png"), tr("Selection (&No Bytes)"), SLOT(copySelectionNoBytesSlot())));
|
||||
copyMenu->addAction(makeAction(DIcon("copy_selection_no_bytes.png"), tr("Selection to File (No Bytes)"), SLOT(copySelectionToFileNoBytesSlot())));
|
||||
copyMenu->addAction(makeShortcutAction(DIcon("copy_address.png"), tr("&Address"), SLOT(copyAddressSlot()), "ActionCopyAddress"));
|
||||
copyMenu->addAction(makeShortcutAction(DIcon("copy_address.png"), tr("&RVA"), SLOT(copyRvaSlot()), "ActionCopyRva"));
|
||||
copyMenu->addAction(makeShortcutAction(DIcon("fileoffset.png"), tr("&File Offset"), SLOT(copyFileOffsetSlot()), "ActionCopyFileOffset"));
|
||||
copyMenu->addAction(makeShortcutAction(DIcon("copy_selection"), tr("&Selection"), SLOT(copySelectionSlot()), "ActionCopy"));
|
||||
copyMenu->addAction(makeAction(DIcon("copy_selection"), tr("Selection to &File"), SLOT(copySelectionToFileSlot())));
|
||||
copyMenu->addAction(makeAction(DIcon("copy_selection_no_bytes"), tr("Selection (&No Bytes)"), SLOT(copySelectionNoBytesSlot())));
|
||||
copyMenu->addAction(makeAction(DIcon("copy_selection_no_bytes"), tr("Selection to File (No Bytes)"), SLOT(copySelectionToFileNoBytesSlot())));
|
||||
copyMenu->addAction(makeShortcutAction(DIcon("copy_address"), tr("&Address"), SLOT(copyAddressSlot()), "ActionCopyAddress"));
|
||||
copyMenu->addAction(makeShortcutAction(DIcon("copy_address"), tr("&RVA"), SLOT(copyRvaSlot()), "ActionCopyRva"));
|
||||
copyMenu->addAction(makeShortcutAction(DIcon("fileoffset"), tr("&File Offset"), SLOT(copyFileOffsetSlot()), "ActionCopyFileOffset"));
|
||||
copyMenu->addAction(makeAction(tr("&Header VA"), SLOT(copyHeaderVaSlot())));
|
||||
copyMenu->addAction(makeAction(DIcon("copy_disassembly.png"), tr("Disassembly"), SLOT(copyDisassemblySlot())));
|
||||
copyMenu->addAction(makeAction(DIcon("copy_disassembly"), tr("Disassembly"), SLOT(copyDisassemblySlot())));
|
||||
copyMenu->addBuilder(new MenuBuilder(this, [this](QMenu * menu)
|
||||
{
|
||||
QSet<QString> labels;
|
||||
|
@ -307,9 +307,9 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
menu->addAction(makeAction(label, SLOT(labelCopySlot())));
|
||||
return true;
|
||||
}));
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("copy.png"), tr("&Copy")), copyMenu);
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("copy"), tr("&Copy")), copyMenu);
|
||||
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("eraser.png"), tr("&Restore selection"), SLOT(undoSelectionSlot()), "ActionUndoSelection"), [this](QMenu*)
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("eraser"), tr("&Restore selection"), SLOT(undoSelectionSlot()), "ActionUndoSelection"), [this](QMenu*)
|
||||
{
|
||||
dsint start = rvaToVa(getSelectionStart());
|
||||
dsint end = rvaToVa(getSelectionEnd());
|
||||
|
@ -322,13 +322,13 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
});
|
||||
mCommonActions->build(mMenuBuilder, CommonActions::ActionBreakpoint);
|
||||
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("dump.png"), tr("&Follow in Dump")), [this](QMenu * menu)
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("dump"), tr("&Follow in Dump")), [this](QMenu * menu)
|
||||
{
|
||||
setupFollowReferenceMenu(rvaToVa(getInitialSelection()), menu, false, false);
|
||||
return true;
|
||||
});
|
||||
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("processor-cpu.png"), tr("&Follow in Disassembler")), [this](QMenu * menu)
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("processor-cpu"), tr("&Follow in Disassembler")), [this](QMenu * menu)
|
||||
{
|
||||
setupFollowReferenceMenu(rvaToVa(getInitialSelection()), menu, false, true);
|
||||
return menu->actions().length() != 0; //only add this menu if there is something to follow
|
||||
|
@ -336,12 +336,12 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
|
||||
mCommonActions->build(mMenuBuilder, CommonActions::ActionMemoryMap | CommonActions::ActionGraph);
|
||||
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("source.png"), tr("Open Source File"), SLOT(openSourceSlot()), "ActionOpenSourceFile"), [this](QMenu*)
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("source"), tr("Open Source File"), SLOT(openSourceSlot()), "ActionOpenSourceFile"), [this](QMenu*)
|
||||
{
|
||||
return DbgFunctions()->GetSourceFromAddr(rvaToVa(getInitialSelection()), 0, 0);
|
||||
});
|
||||
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("help.png"), tr("Help on Symbolic Name")), [this](QMenu * menu)
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("help"), tr("Help on Symbolic Name")), [this](QMenu * menu)
|
||||
{
|
||||
QSet<QString> labels;
|
||||
if(!getLabelsFromInstruction(rvaToVa(getInitialSelection()), labels))
|
||||
|
@ -350,8 +350,8 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
menu->addAction(makeAction(label, SLOT(labelHelpSlot())));
|
||||
return true;
|
||||
});
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("helpmnemonic.png"), tr("Help on mnemonic"), SLOT(mnemonicHelpSlot()), "ActionHelpOnMnemonic"));
|
||||
QAction* mnemonicBrief = makeShortcutAction(DIcon("helpbrief.png"), tr("Show mnemonic brief"), SLOT(mnemonicBriefSlot()), "ActionToggleMnemonicBrief");
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("helpmnemonic"), tr("Help on mnemonic"), SLOT(mnemonicHelpSlot()), "ActionHelpOnMnemonic"));
|
||||
QAction* mnemonicBrief = makeShortcutAction(DIcon("helpbrief"), tr("Show mnemonic brief"), SLOT(mnemonicBriefSlot()), "ActionToggleMnemonicBrief");
|
||||
mMenuBuilder->addAction(mnemonicBrief, [this, mnemonicBrief](QMenu*)
|
||||
{
|
||||
if(mShowMnemonicBrief)
|
||||
|
@ -361,7 +361,7 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
return true;
|
||||
});
|
||||
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("highlight.png"), tr("&Highlighting mode"), SLOT(enableHighlightingModeSlot()), "ActionHighlightingMode"));
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("highlight"), tr("&Highlighting mode"), SLOT(enableHighlightingModeSlot()), "ActionHighlightingMode"));
|
||||
|
||||
MenuBuilder* labelMenu = new MenuBuilder(this);
|
||||
labelMenu->addAction(makeShortcutAction(tr("Label Current Address"), SLOT(setLabelSlot()), "ActionSetLabel"));
|
||||
|
@ -386,15 +386,15 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
|
||||
return DbgMemIsValidReadPtr(addr);
|
||||
});
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("label.png"), tr("Label")), labelMenu);
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("label"), tr("Label")), labelMenu);
|
||||
mCommonActions->build(mMenuBuilder, CommonActions::ActionComment | CommonActions::ActionBookmark);
|
||||
|
||||
QAction* traceRecordDisable = makeAction(DIcon("close-all-tabs.png"), tr("Disable"), SLOT(ActionTraceRecordDisableSlot()));
|
||||
QAction* traceRecordEnableBit = makeAction(DIcon("bit.png"), tr("Bit"), SLOT(ActionTraceRecordBitSlot()));
|
||||
QAction* traceRecordEnableByte = makeAction(DIcon("byte.png"), tr("Byte"), SLOT(ActionTraceRecordByteSlot()));
|
||||
QAction* traceRecordEnableWord = makeAction(DIcon("word.png"), tr("Word"), SLOT(ActionTraceRecordWordSlot()));
|
||||
QAction* traceRecordDisable = makeAction(DIcon("close-all-tabs"), tr("Disable"), SLOT(ActionTraceRecordDisableSlot()));
|
||||
QAction* traceRecordEnableBit = makeAction(DIcon("bit"), tr("Bit"), SLOT(ActionTraceRecordBitSlot()));
|
||||
QAction* traceRecordEnableByte = makeAction(DIcon("byte"), tr("Byte"), SLOT(ActionTraceRecordByteSlot()));
|
||||
QAction* traceRecordEnableWord = makeAction(DIcon("word"), tr("Word"), SLOT(ActionTraceRecordWordSlot()));
|
||||
QAction* traceRecordToggleRunTrace = makeShortcutAction(tr("Start Run Trace"), SLOT(ActionTraceRecordToggleRunTraceSlot()), "ActionToggleRunTrace");
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("trace.png"), tr("Trace record")), [ = ](QMenu * menu)
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("trace"), tr("Trace record")), [ = ](QMenu * menu)
|
||||
{
|
||||
if(DbgFunctions()->GetTraceRecordType(rvaToVa(getInitialSelection())) == TRACERECORDTYPE::TraceRecordNone)
|
||||
{
|
||||
|
@ -416,8 +416,8 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
mMenuBuilder->addSeparator();
|
||||
|
||||
MenuBuilder* analysisMenu = new MenuBuilder(this);
|
||||
QAction* toggleFunctionAction = makeShortcutAction(DIcon("functions.png"), tr("Function"), SLOT(toggleFunctionSlot()), "ActionToggleFunction");
|
||||
analysisMenu->addAction(makeShortcutAction(DIcon("analyzemodule.png"), tr("Analyze module"), SLOT(analyzeModuleSlot()), "ActionAnalyzeModule"));
|
||||
QAction* toggleFunctionAction = makeShortcutAction(DIcon("functions"), tr("Function"), SLOT(toggleFunctionSlot()), "ActionToggleFunction");
|
||||
analysisMenu->addAction(makeShortcutAction(DIcon("analyzemodule"), tr("Analyze module"), SLOT(analyzeModuleSlot()), "ActionAnalyzeModule"));
|
||||
analysisMenu->addAction(toggleFunctionAction, [this, toggleFunctionAction](QMenu*)
|
||||
{
|
||||
if(!DbgFunctionOverlaps(rvaToVa(getSelectionStart()), rvaToVa(getSelectionEnd())))
|
||||
|
@ -426,7 +426,7 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
toggleFunctionAction->setText(tr("Delete function"));
|
||||
return true;
|
||||
});
|
||||
QAction* toggleArgumentAction = makeShortcutAction(DIcon("arguments.png"), tr("Argument"), SLOT(toggleArgumentSlot()), "ActionToggleArgument");
|
||||
QAction* toggleArgumentAction = makeShortcutAction(DIcon("arguments"), tr("Argument"), SLOT(toggleArgumentSlot()), "ActionToggleArgument");
|
||||
analysisMenu->addAction(toggleArgumentAction, [this, toggleArgumentAction](QMenu*)
|
||||
{
|
||||
if(!DbgArgumentOverlaps(rvaToVa(getSelectionStart()), rvaToVa(getSelectionEnd())))
|
||||
|
@ -440,15 +440,15 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
{
|
||||
return findDeepestLoopDepth(rvaToVa(getSelectionStart())) >= 0;
|
||||
});
|
||||
analysisMenu->addAction(makeShortcutAction(DIcon("analysis_single_function.png"), tr("Analyze single function"), SLOT(analyzeSingleFunctionSlot()), "ActionAnalyzeSingleFunction"));
|
||||
analysisMenu->addAction(makeShortcutAction(DIcon("analysis_single_function"), tr("Analyze single function"), SLOT(analyzeSingleFunctionSlot()), "ActionAnalyzeSingleFunction"));
|
||||
analysisMenu->addSeparator();
|
||||
|
||||
analysisMenu->addAction(makeShortcutAction(DIcon("remove_analysis_from_module.png"), tr("Remove type analysis from module"), SLOT(removeAnalysisModuleSlot()), "ActionRemoveTypeAnalysisFromModule"));
|
||||
analysisMenu->addAction(makeShortcutAction(DIcon("remove_analysis_from_selection.png"), tr("Remove type analysis from selection"), SLOT(removeAnalysisSelectionSlot()), "ActionRemoveTypeAnalysisFromSelection"));
|
||||
analysisMenu->addAction(makeShortcutAction(DIcon("remove_analysis_from_module"), tr("Remove type analysis from module"), SLOT(removeAnalysisModuleSlot()), "ActionRemoveTypeAnalysisFromModule"));
|
||||
analysisMenu->addAction(makeShortcutAction(DIcon("remove_analysis_from_selection"), tr("Remove type analysis from selection"), SLOT(removeAnalysisSelectionSlot()), "ActionRemoveTypeAnalysisFromSelection"));
|
||||
analysisMenu->addSeparator();
|
||||
|
||||
QMenu* encodeTypeMenu = makeMenu(DIcon("treat_selection_head_as.png"), tr("Treat selection &head as"));
|
||||
QMenu* encodeTypeRangeMenu = makeMenu(DIcon("treat_from_selection_as.png"), tr("Treat from &selection as"));
|
||||
QMenu* encodeTypeMenu = makeMenu(DIcon("treat_selection_head_as"), tr("Treat selection &head as"));
|
||||
QMenu* encodeTypeRangeMenu = makeMenu(DIcon("treat_from_selection_as"), tr("Treat from &selection as"));
|
||||
|
||||
const char* strTable[] = {"Code", "Byte", "Word", "Dword", "Fword", "Qword", "Tbyte", "Oword", nullptr,
|
||||
"Float", "Double", "Long Double", nullptr,
|
||||
|
@ -488,7 +488,7 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
QAction* action;
|
||||
QIcon icon;
|
||||
if(iconTable[i])
|
||||
icon = DIcon(QString("treat_selection_as_%1.png").arg(iconTable[i]));
|
||||
icon = DIcon(QString("treat_selection_as_%1").arg(iconTable[i]));
|
||||
if(shortcutTable[i])
|
||||
action = makeShortcutAction(icon, tr(strTable[i]), SLOT(setEncodeTypeRangeSlot()), QString("ActionTreatSelectionAs%1").arg(shortcutTable[i]).toUtf8().constData());
|
||||
else
|
||||
|
@ -507,57 +507,57 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
analysisMenu->addMenu(encodeTypeRangeMenu);
|
||||
analysisMenu->addMenu(encodeTypeMenu);
|
||||
|
||||
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*)
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("analysis"), tr("Analysis")), analysisMenu);
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("pdb"), tr("Download Symbols for This Module"), SLOT(downloadCurrentSymbolsSlot()), "ActionDownloadSymbol"), [this](QMenu*)
|
||||
{
|
||||
//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("compile"), tr("Assemble"), SLOT(assembleSlot()), "ActionAssemble"));
|
||||
removeAction(mMenuBuilder->addAction(makeShortcutAction(DIcon("patch"), tr("Patches"), SLOT(showPatchesSlot()), "ViewPatches"))); //prevent conflicting shortcut with the MainWindow
|
||||
mMenuBuilder->addSeparator();
|
||||
|
||||
mCommonActions->build(mMenuBuilder, CommonActions::ActionNewOrigin | CommonActions::ActionNewThread);
|
||||
MenuBuilder* gotoMenu = new MenuBuilder(this);
|
||||
gotoMenu->addAction(makeShortcutAction(DIcon("cbp.png"), tr("Origin"), SLOT(gotoOriginSlot()), "ActionGotoOrigin"));
|
||||
gotoMenu->addAction(makeShortcutAction(DIcon("previous.png"), tr("Previous"), SLOT(gotoPreviousSlot()), "ActionGotoPrevious"), [this](QMenu*)
|
||||
gotoMenu->addAction(makeShortcutAction(DIcon("cbp"), tr("Origin"), SLOT(gotoOriginSlot()), "ActionGotoOrigin"));
|
||||
gotoMenu->addAction(makeShortcutAction(DIcon("previous"), tr("Previous"), SLOT(gotoPreviousSlot()), "ActionGotoPrevious"), [this](QMenu*)
|
||||
{
|
||||
return historyHasPrevious();
|
||||
});
|
||||
gotoMenu->addAction(makeShortcutAction(DIcon("next.png"), tr("Next"), SLOT(gotoNextSlot()), "ActionGotoNext"), [this](QMenu*)
|
||||
gotoMenu->addAction(makeShortcutAction(DIcon("next"), tr("Next"), SLOT(gotoNextSlot()), "ActionGotoNext"), [this](QMenu*)
|
||||
{
|
||||
return historyHasNext();
|
||||
});
|
||||
gotoMenu->addAction(makeShortcutAction(DIcon("geolocation-goto.png"), tr("Expression"), SLOT(gotoExpressionSlot()), "ActionGotoExpression"));
|
||||
gotoMenu->addAction(makeShortcutAction(DIcon("fileoffset.png"), tr("File Offset"), SLOT(gotoFileOffsetSlot()), "ActionGotoFileOffset"), [this](QMenu*)
|
||||
gotoMenu->addAction(makeShortcutAction(DIcon("geolocation-goto"), tr("Expression"), SLOT(gotoExpressionSlot()), "ActionGotoExpression"));
|
||||
gotoMenu->addAction(makeShortcutAction(DIcon("fileoffset"), tr("File Offset"), SLOT(gotoFileOffsetSlot()), "ActionGotoFileOffset"), [this](QMenu*)
|
||||
{
|
||||
char modname[MAX_MODULE_SIZE] = "";
|
||||
return DbgGetModuleAt(rvaToVa(getInitialSelection()), modname);
|
||||
});
|
||||
gotoMenu->addAction(makeShortcutAction(DIcon("top.png"), tr("Start of Page"), SLOT(gotoStartSlot()), "ActionGotoStart"));
|
||||
gotoMenu->addAction(makeShortcutAction(DIcon("bottom.png"), tr("End of Page"), SLOT(gotoEndSlot()), "ActionGotoEnd"));
|
||||
gotoMenu->addAction(makeShortcutAction(DIcon("functionstart.png"), tr("Start of Function"), SLOT(gotoFunctionStartSlot()), "ActionGotoFunctionStart"), [this](QMenu*)
|
||||
gotoMenu->addAction(makeShortcutAction(DIcon("top"), tr("Start of Page"), SLOT(gotoStartSlot()), "ActionGotoStart"));
|
||||
gotoMenu->addAction(makeShortcutAction(DIcon("bottom"), tr("End of Page"), SLOT(gotoEndSlot()), "ActionGotoEnd"));
|
||||
gotoMenu->addAction(makeShortcutAction(DIcon("functionstart"), tr("Start of Function"), SLOT(gotoFunctionStartSlot()), "ActionGotoFunctionStart"), [this](QMenu*)
|
||||
{
|
||||
return DbgFunctionGet(rvaToVa(getInitialSelection()), nullptr, nullptr);
|
||||
});
|
||||
gotoMenu->addAction(makeShortcutAction(DIcon("functionend.png"), tr("End of Function"), SLOT(gotoFunctionEndSlot()), "ActionGotoFunctionEnd"), [this](QMenu*)
|
||||
gotoMenu->addAction(makeShortcutAction(DIcon("functionend"), tr("End of Function"), SLOT(gotoFunctionEndSlot()), "ActionGotoFunctionEnd"), [this](QMenu*)
|
||||
{
|
||||
return DbgFunctionGet(rvaToVa(getInitialSelection()), nullptr, nullptr);
|
||||
});
|
||||
gotoMenu->addAction(makeShortcutAction(DIcon("prevref.png"), tr("Previous Reference"), SLOT(gotoPreviousReferenceSlot()), "ActionGotoPreviousReference"), [](QMenu*)
|
||||
gotoMenu->addAction(makeShortcutAction(DIcon("prevref"), tr("Previous Reference"), SLOT(gotoPreviousReferenceSlot()), "ActionGotoPreviousReference"), [](QMenu*)
|
||||
{
|
||||
return !!DbgEval("refsearch.count() && ($__disasm_refindex > 0 || dis.sel() != refsearch.addr($__disasm_refindex))");
|
||||
});
|
||||
gotoMenu->addAction(makeShortcutAction(DIcon("nextref.png"), tr("Next Reference"), SLOT(gotoNextReferenceSlot()), "ActionGotoNextReference"), [](QMenu*)
|
||||
gotoMenu->addAction(makeShortcutAction(DIcon("nextref"), tr("Next Reference"), SLOT(gotoNextReferenceSlot()), "ActionGotoNextReference"), [](QMenu*)
|
||||
{
|
||||
return !!DbgEval("refsearch.count() && ($__disasm_refindex < refsearch.count()|| dis.sel() != refsearch.addr($__disasm_refindex))");
|
||||
});
|
||||
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("goto.png"), tr("Go to")), gotoMenu);
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("goto"), tr("Go to")), gotoMenu);
|
||||
mMenuBuilder->addSeparator();
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("xrefs.png"), tr("xrefs..."), SLOT(gotoXrefSlot()), "ActionXrefs"), [this](QMenu*)
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("xrefs"), tr("xrefs..."), SLOT(gotoXrefSlot()), "ActionXrefs"), [this](QMenu*)
|
||||
{
|
||||
return mXrefInfo.refcount > 0;
|
||||
});
|
||||
|
@ -578,12 +578,12 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
MenuBuilder* mSearchAllSystemMenu = new MenuBuilder(this);
|
||||
|
||||
// Search in Current Region menu
|
||||
mFindCommandRegion = makeShortcutAction(DIcon("search_for_command.png"), tr("C&ommand"), SLOT(findCommandSlot()), "ActionFind");
|
||||
mFindConstantRegion = makeAction(DIcon("search_for_constant.png"), tr("&Constant"), SLOT(findConstantSlot()));
|
||||
mFindStringsRegion = makeAction(DIcon("search_for_string.png"), tr("&String references"), SLOT(findStringsSlot()));
|
||||
mFindCallsRegion = makeAction(DIcon("call.png"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
|
||||
mFindPatternRegion = makeShortcutAction(DIcon("search_for_pattern.png"), tr("&Pattern"), SLOT(findPatternSlot()), "ActionFindPattern");
|
||||
mFindGUIDRegion = makeAction(DIcon("guid.png"), tr("&GUID"), SLOT(findGUIDSlot()));
|
||||
mFindCommandRegion = makeShortcutAction(DIcon("search_for_command"), tr("C&ommand"), SLOT(findCommandSlot()), "ActionFind");
|
||||
mFindConstantRegion = makeAction(DIcon("search_for_constant"), tr("&Constant"), SLOT(findConstantSlot()));
|
||||
mFindStringsRegion = makeAction(DIcon("search_for_string"), tr("&String references"), SLOT(findStringsSlot()));
|
||||
mFindCallsRegion = makeAction(DIcon("call"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
|
||||
mFindPatternRegion = makeShortcutAction(DIcon("search_for_pattern"), tr("&Pattern"), SLOT(findPatternSlot()), "ActionFindPattern");
|
||||
mFindGUIDRegion = makeAction(DIcon("guid"), tr("&GUID"), SLOT(findGUIDSlot()));
|
||||
mSearchRegionMenu->addAction(mFindCommandRegion);
|
||||
mSearchRegionMenu->addAction(mFindConstantRegion);
|
||||
mSearchRegionMenu->addAction(mFindStringsRegion);
|
||||
|
@ -592,13 +592,13 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
mSearchRegionMenu->addAction(mFindGUIDRegion);
|
||||
|
||||
// Search in Current Module menu
|
||||
mFindCommandModule = makeShortcutAction(DIcon("search_for_command.png"), tr("C&ommand"), SLOT(findCommandSlot()), "ActionFindInModule");
|
||||
mFindConstantModule = makeAction(DIcon("search_for_constant.png"), tr("&Constant"), SLOT(findConstantSlot()));
|
||||
mFindStringsModule = makeShortcutAction(DIcon("search_for_string.png"), tr("&String references"), SLOT(findStringsSlot()), "ActionFindStringsModule");
|
||||
mFindCallsModule = makeAction(DIcon("call.png"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
|
||||
mFindPatternModule = makeShortcutAction(DIcon("search_for_pattern.png"), tr("&Pattern"), SLOT(findPatternSlot()), "ActionFindPatternInModule");
|
||||
mFindGUIDModule = makeAction(DIcon("guid.png"), tr("&GUID"), SLOT(findGUIDSlot()));
|
||||
mFindNamesModule = makeShortcutAction(DIcon("names.png"), tr("&Names"), SLOT(findNamesSlot()), "ActionFindNamesInModule");
|
||||
mFindCommandModule = makeShortcutAction(DIcon("search_for_command"), tr("C&ommand"), SLOT(findCommandSlot()), "ActionFindInModule");
|
||||
mFindConstantModule = makeAction(DIcon("search_for_constant"), tr("&Constant"), SLOT(findConstantSlot()));
|
||||
mFindStringsModule = makeShortcutAction(DIcon("search_for_string"), tr("&String references"), SLOT(findStringsSlot()), "ActionFindStringsModule");
|
||||
mFindCallsModule = makeAction(DIcon("call"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
|
||||
mFindPatternModule = makeShortcutAction(DIcon("search_for_pattern"), tr("&Pattern"), SLOT(findPatternSlot()), "ActionFindPatternInModule");
|
||||
mFindGUIDModule = makeAction(DIcon("guid"), tr("&GUID"), SLOT(findGUIDSlot()));
|
||||
mFindNamesModule = makeShortcutAction(DIcon("names"), tr("&Names"), SLOT(findNamesSlot()), "ActionFindNamesInModule");
|
||||
mSearchModuleMenu->addAction(mFindCommandModule);
|
||||
mSearchModuleMenu->addAction(mFindConstantModule);
|
||||
mSearchModuleMenu->addAction(mFindStringsModule);
|
||||
|
@ -608,12 +608,12 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
mSearchModuleMenu->addAction(mFindNamesModule);
|
||||
|
||||
// Search in Current Function menu
|
||||
mFindCommandFunction = makeAction(DIcon("search_for_command.png"), tr("C&ommand"), SLOT(findCommandSlot()));
|
||||
mFindConstantFunction = makeAction(DIcon("search_for_constant.png"), tr("&Constant"), SLOT(findConstantSlot()));
|
||||
mFindStringsFunction = makeAction(DIcon("search_for_string.png"), tr("&String references"), SLOT(findStringsSlot()));
|
||||
mFindCallsFunction = makeAction(DIcon("call.png"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
|
||||
mFindPatternFunction = makeAction(DIcon("search_for_pattern.png"), tr("&Pattern"), SLOT(findPatternSlot()));
|
||||
mFindGUIDFunction = makeAction(DIcon("guid.png"), tr("&GUID"), SLOT(findGUIDSlot()));
|
||||
mFindCommandFunction = makeAction(DIcon("search_for_command"), tr("C&ommand"), SLOT(findCommandSlot()));
|
||||
mFindConstantFunction = makeAction(DIcon("search_for_constant"), tr("&Constant"), SLOT(findConstantSlot()));
|
||||
mFindStringsFunction = makeAction(DIcon("search_for_string"), tr("&String references"), SLOT(findStringsSlot()));
|
||||
mFindCallsFunction = makeAction(DIcon("call"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
|
||||
mFindPatternFunction = makeAction(DIcon("search_for_pattern"), tr("&Pattern"), SLOT(findPatternSlot()));
|
||||
mFindGUIDFunction = makeAction(DIcon("guid"), tr("&GUID"), SLOT(findGUIDSlot()));
|
||||
mSearchFunctionMenu->addAction(mFindCommandFunction);
|
||||
mSearchFunctionMenu->addAction(mFindConstantFunction);
|
||||
mSearchFunctionMenu->addAction(mFindStringsFunction);
|
||||
|
@ -622,12 +622,12 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
mSearchFunctionMenu->addAction(mFindGUIDFunction);
|
||||
|
||||
// Search in All User Modules menu
|
||||
mFindCommandAllUser = makeAction(DIcon("search_for_command.png"), tr("C&ommand"), SLOT(findCommandSlot()));
|
||||
mFindConstantAllUser = makeAction(DIcon("search_for_constant.png"), tr("&Constant"), SLOT(findConstantSlot()));
|
||||
mFindStringsAllUser = makeAction(DIcon("search_for_string.png"), tr("&String references"), SLOT(findStringsSlot()));
|
||||
mFindCallsAllUser = makeAction(DIcon("call.png"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
|
||||
mFindPatternAllUser = makeAction(DIcon("search_for_pattern.png"), tr("&Pattern"), SLOT(findPatternSlot()));
|
||||
mFindGUIDAllUser = makeAction(DIcon("guid.png"), tr("&GUID"), SLOT(findGUIDSlot()));
|
||||
mFindCommandAllUser = makeAction(DIcon("search_for_command"), tr("C&ommand"), SLOT(findCommandSlot()));
|
||||
mFindConstantAllUser = makeAction(DIcon("search_for_constant"), tr("&Constant"), SLOT(findConstantSlot()));
|
||||
mFindStringsAllUser = makeAction(DIcon("search_for_string"), tr("&String references"), SLOT(findStringsSlot()));
|
||||
mFindCallsAllUser = makeAction(DIcon("call"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
|
||||
mFindPatternAllUser = makeAction(DIcon("search_for_pattern"), tr("&Pattern"), SLOT(findPatternSlot()));
|
||||
mFindGUIDAllUser = makeAction(DIcon("guid"), tr("&GUID"), SLOT(findGUIDSlot()));
|
||||
mSearchAllUserMenu->addAction(mFindCommandAllUser);
|
||||
mSearchAllUserMenu->addAction(mFindConstantAllUser);
|
||||
mSearchAllUserMenu->addAction(mFindStringsAllUser);
|
||||
|
@ -636,12 +636,12 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
mSearchAllUserMenu->addAction(mFindGUIDAllUser);
|
||||
|
||||
// Search in All System Modules menu
|
||||
mFindCommandAllSystem = makeAction(DIcon("search_for_command.png"), tr("C&ommand"), SLOT(findCommandSlot()));
|
||||
mFindConstantAllSystem = makeAction(DIcon("search_for_constant.png"), tr("&Constant"), SLOT(findConstantSlot()));
|
||||
mFindStringsAllSystem = makeAction(DIcon("search_for_string.png"), tr("&String references"), SLOT(findStringsSlot()));
|
||||
mFindCallsAllSystem = makeAction(DIcon("call.png"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
|
||||
mFindPatternAllSystem = makeAction(DIcon("search_for_pattern.png"), tr("&Pattern"), SLOT(findPatternSlot()));
|
||||
mFindGUIDAllSystem = makeAction(DIcon("guid.png"), tr("&GUID"), SLOT(findGUIDSlot()));
|
||||
mFindCommandAllSystem = makeAction(DIcon("search_for_command"), tr("C&ommand"), SLOT(findCommandSlot()));
|
||||
mFindConstantAllSystem = makeAction(DIcon("search_for_constant"), tr("&Constant"), SLOT(findConstantSlot()));
|
||||
mFindStringsAllSystem = makeAction(DIcon("search_for_string"), tr("&String references"), SLOT(findStringsSlot()));
|
||||
mFindCallsAllSystem = makeAction(DIcon("call"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
|
||||
mFindPatternAllSystem = makeAction(DIcon("search_for_pattern"), tr("&Pattern"), SLOT(findPatternSlot()));
|
||||
mFindGUIDAllSystem = makeAction(DIcon("guid"), tr("&GUID"), SLOT(findGUIDSlot()));
|
||||
mSearchAllSystemMenu->addAction(mFindCommandAllSystem);
|
||||
mSearchAllSystemMenu->addAction(mFindConstantAllSystem);
|
||||
mSearchAllSystemMenu->addAction(mFindStringsAllSystem);
|
||||
|
@ -650,12 +650,12 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
mSearchAllSystemMenu->addAction(mFindGUIDAllSystem);
|
||||
|
||||
// Search in All Modules menu
|
||||
mFindCommandAll = makeAction(DIcon("search_for_command.png"), tr("C&ommand"), SLOT(findCommandSlot()));
|
||||
mFindConstantAll = makeAction(DIcon("search_for_constant.png"), tr("&Constant"), SLOT(findConstantSlot()));
|
||||
mFindStringsAll = makeAction(DIcon("search_for_string.png"), tr("&String references"), SLOT(findStringsSlot()));
|
||||
mFindCallsAll = makeAction(DIcon("call.png"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
|
||||
mFindPatternAll = makeAction(DIcon("search_for_pattern.png"), tr("&Pattern"), SLOT(findPatternSlot()));
|
||||
mFindGUIDAll = makeAction(DIcon("guid.png"), tr("&GUID"), SLOT(findGUIDSlot()));
|
||||
mFindCommandAll = makeAction(DIcon("search_for_command"), tr("C&ommand"), SLOT(findCommandSlot()));
|
||||
mFindConstantAll = makeAction(DIcon("search_for_constant"), tr("&Constant"), SLOT(findConstantSlot()));
|
||||
mFindStringsAll = makeAction(DIcon("search_for_string"), tr("&String references"), SLOT(findStringsSlot()));
|
||||
mFindCallsAll = makeAction(DIcon("call"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
|
||||
mFindPatternAll = makeAction(DIcon("search_for_pattern"), tr("&Pattern"), SLOT(findPatternSlot()));
|
||||
mFindGUIDAll = makeAction(DIcon("guid"), tr("&GUID"), SLOT(findGUIDSlot()));
|
||||
mSearchAllMenu->addAction(mFindCommandAll);
|
||||
mSearchAllMenu->addAction(mFindConstantAll);
|
||||
mSearchAllMenu->addAction(mFindStringsAll);
|
||||
|
@ -663,18 +663,18 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
mSearchAllMenu->addAction(mFindPatternAll);
|
||||
mSearchAllMenu->addAction(mFindGUIDAll);
|
||||
|
||||
searchMenu->addMenu(makeMenu(DIcon("search_current_region.png"), tr("Current Region")), mSearchRegionMenu);
|
||||
searchMenu->addMenu(makeMenu(DIcon("search_current_module.png"), tr("Current Module")), mSearchModuleMenu);
|
||||
searchMenu->addMenu(makeMenu(DIcon("search_current_region"), tr("Current Region")), mSearchRegionMenu);
|
||||
searchMenu->addMenu(makeMenu(DIcon("search_current_module"), tr("Current Module")), mSearchModuleMenu);
|
||||
QMenu* searchFunctionMenu = makeMenu(tr("Current Function"));
|
||||
searchMenu->addMenu(searchFunctionMenu, mSearchFunctionMenu);
|
||||
searchMenu->addMenu(makeMenu(DIcon("search_all_modules.png"), tr("All User Modules")), mSearchAllUserMenu);
|
||||
searchMenu->addMenu(makeMenu(DIcon("search_all_modules.png"), tr("All System Modules")), mSearchAllSystemMenu);
|
||||
searchMenu->addMenu(makeMenu(DIcon("search_all_modules.png"), tr("All Modules")), mSearchAllMenu);
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("search-for.png"), tr("&Search for")), searchMenu);
|
||||
searchMenu->addMenu(makeMenu(DIcon("search_all_modules"), tr("All User Modules")), mSearchAllUserMenu);
|
||||
searchMenu->addMenu(makeMenu(DIcon("search_all_modules"), tr("All System Modules")), mSearchAllSystemMenu);
|
||||
searchMenu->addMenu(makeMenu(DIcon("search_all_modules"), tr("All Modules")), mSearchAllMenu);
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("search-for"), tr("&Search for")), searchMenu);
|
||||
|
||||
mReferenceSelectedAddressAction = makeShortcutAction(tr("&Selected Address(es)"), SLOT(findReferencesSlot()), "ActionFindReferencesToSelectedAddress");
|
||||
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("find.png"), tr("Find &references to")), [this](QMenu * menu)
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("find"), tr("Find &references to")), [this](QMenu * menu)
|
||||
{
|
||||
setupFollowReferenceMenu(rvaToVa(getInitialSelection()), menu, true, false);
|
||||
return true;
|
||||
|
@ -701,8 +701,8 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
// Highlight menu
|
||||
mHighlightMenuBuilder = new MenuBuilder(this);
|
||||
|
||||
mHighlightMenuBuilder->addAction(makeAction(DIcon("copy.png"), tr("Copy token &text"), SLOT(copyTokenTextSlot())));
|
||||
mHighlightMenuBuilder->addAction(makeAction(DIcon("copy_address.png"), tr("Copy token &value"), SLOT(copyTokenValueSlot())), [this](QMenu*)
|
||||
mHighlightMenuBuilder->addAction(makeAction(DIcon("copy"), tr("Copy token &text"), SLOT(copyTokenTextSlot())));
|
||||
mHighlightMenuBuilder->addAction(makeAction(DIcon("copy_address"), tr("Copy token &value"), SLOT(copyTokenValueSlot())), [this](QMenu*)
|
||||
{
|
||||
QString text;
|
||||
if(!getTokenValueText(text))
|
||||
|
@ -741,7 +741,7 @@ restart:
|
|||
QMessageBox msg(QMessageBox::Warning, tr("The label may be in use"),
|
||||
tr("The label \"%1\" may be an existing label or a valid expression. Using such label might have undesired effects. Do you still want to continue?").arg(mLineEdit.editText),
|
||||
QMessageBox::Yes | QMessageBox::No, this);
|
||||
msg.setWindowIcon(DIcon("compile-warning.png"));
|
||||
msg.setWindowIcon(DIcon("compile-warning"));
|
||||
msg.setParent(this, Qt::Dialog);
|
||||
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
|
||||
if(msg.exec() == QMessageBox::No)
|
||||
|
@ -787,7 +787,7 @@ restart:
|
|||
QMessageBox msg(QMessageBox::Warning, tr("The label may be in use"),
|
||||
tr("The label \"%1\" may be an existing label or a valid expression. Using such label might have undesired effects. Do you still want to continue?").arg(mLineEdit.editText),
|
||||
QMessageBox::Yes | QMessageBox::No, this);
|
||||
msg.setWindowIcon(DIcon("compile-warning.png"));
|
||||
msg.setWindowIcon(DIcon("compile-warning"));
|
||||
msg.setParent(this, Qt::Dialog);
|
||||
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
|
||||
if(msg.exec() == QMessageBox::No)
|
||||
|
@ -929,7 +929,7 @@ void CPUDisassembly::assembleSlot()
|
|||
if(!DbgFunctions()->AssembleAtEx(wVA, expression.toUtf8().constData(), error, assembleDialog.bFillWithNopsChecked))
|
||||
{
|
||||
QMessageBox msg(QMessageBox::Critical, tr("Error!"), tr("Failed to assemble instruction \" %1 \" (%2)").arg(expression).arg(error));
|
||||
msg.setWindowIcon(DIcon("compile-error.png"));
|
||||
msg.setWindowIcon(DIcon("compile-error"));
|
||||
msg.setParent(this, Qt::Dialog);
|
||||
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
|
||||
msg.exec();
|
||||
|
|
|
@ -47,20 +47,20 @@ void CPUDump::setupContextMenu()
|
|||
});
|
||||
|
||||
MenuBuilder* wBinaryMenu = new MenuBuilder(this);
|
||||
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_edit.png"), tr("&Edit"), SLOT(binaryEditSlot()), "ActionBinaryEdit"));
|
||||
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_fill.png"), tr("&Fill..."), SLOT(binaryFillSlot()), "ActionBinaryFill"));
|
||||
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_edit"), tr("&Edit"), SLOT(binaryEditSlot()), "ActionBinaryEdit"));
|
||||
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_fill"), tr("&Fill..."), SLOT(binaryFillSlot()), "ActionBinaryFill"));
|
||||
wBinaryMenu->addSeparator();
|
||||
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_copy.png"), tr("&Copy"), SLOT(binaryCopySlot()), "ActionBinaryCopy"));
|
||||
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_paste.png"), tr("&Paste"), SLOT(binaryPasteSlot()), "ActionBinaryPaste"), [](QMenu*)
|
||||
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_copy"), tr("&Copy"), SLOT(binaryCopySlot()), "ActionBinaryCopy"));
|
||||
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_paste"), tr("&Paste"), SLOT(binaryPasteSlot()), "ActionBinaryPaste"), [](QMenu*)
|
||||
{
|
||||
return QApplication::clipboard()->mimeData()->hasText();
|
||||
});
|
||||
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_paste_ignoresize.png"), tr("Paste (&Ignore Size)"), SLOT(binaryPasteIgnoreSizeSlot()), "ActionBinaryPasteIgnoreSize"), [](QMenu*)
|
||||
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_paste_ignoresize"), tr("Paste (&Ignore Size)"), SLOT(binaryPasteIgnoreSizeSlot()), "ActionBinaryPasteIgnoreSize"), [](QMenu*)
|
||||
{
|
||||
return QApplication::clipboard()->mimeData()->hasText();
|
||||
});
|
||||
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_save.png"), tr("Save To a File"), SLOT(binarySaveToFileSlot()), "ActionBinarySave"));
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("binary.png"), tr("B&inary")), wBinaryMenu);
|
||||
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_save"), tr("Save To a File"), SLOT(binarySaveToFileSlot()), "ActionBinarySave"));
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("binary"), tr("B&inary")), wBinaryMenu);
|
||||
|
||||
MenuBuilder* wCopyMenu = new MenuBuilder(this);
|
||||
wCopyMenu->addAction(mCopySelection);
|
||||
|
@ -69,14 +69,14 @@ void CPUDump::setupContextMenu()
|
|||
{
|
||||
return DbgFunctions()->ModBaseFromAddr(rvaToVa(getInitialSelection())) != 0;
|
||||
});
|
||||
wCopyMenu->addAction(makeShortcutAction(DIcon("fileoffset.png"), tr("&File Offset"), SLOT(copyFileOffsetSlot()), "ActionCopyFileOffset"), [this](QMenu*)
|
||||
wCopyMenu->addAction(makeShortcutAction(DIcon("fileoffset"), tr("&File Offset"), SLOT(copyFileOffsetSlot()), "ActionCopyFileOffset"), [this](QMenu*)
|
||||
{
|
||||
return DbgFunctions()->VaToFileOffset(rvaToVa(getInitialSelection())) != 0;
|
||||
});
|
||||
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("copy.png"), tr("&Copy")), wCopyMenu);
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("copy"), tr("&Copy")), wCopyMenu);
|
||||
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("eraser.png"), tr("&Restore selection"), SLOT(undoSelectionSlot()), "ActionUndoSelection"), [this](QMenu*)
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("eraser"), tr("&Restore selection"), SLOT(undoSelectionSlot()), "ActionUndoSelection"), [this](QMenu*)
|
||||
{
|
||||
return DbgFunctions()->PatchInRange(rvaToVa(getSelectionStart()), rvaToVa(getSelectionEnd()));
|
||||
});
|
||||
|
@ -90,7 +90,7 @@ void CPUDump::setupContextMenu()
|
|||
return DbgMemIsValidReadPtr(ptr);
|
||||
};
|
||||
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("modify.png"), tr("&Modify Value"), SLOT(modifyValueSlot()), "ActionModifyValue"), [this](QMenu*)
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("modify"), tr("&Modify Value"), SLOT(modifyValueSlot()), "ActionModifyValue"), [this](QMenu*)
|
||||
{
|
||||
auto d = mDescriptor.at(0).data;
|
||||
return getSizeOf(d.itemSize) <= sizeof(duint) || (d.itemSize == 4 && d.dwordMode == FloatDword || d.itemSize == 8 && d.qwordMode == DoubleQword);
|
||||
|
@ -121,84 +121,84 @@ void CPUDump::setupContextMenu()
|
|||
{
|
||||
return (DbgGetBpxTypeAt(rvaToVa(getSelectionStart())) & bp_memory) == 0;
|
||||
});
|
||||
wHardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_byte.png"), tr("&Byte"), "bphws $, r, 1"));
|
||||
wHardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_word.png"), tr("&Word"), "bphws $, r, 2"));
|
||||
wHardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_dword.png"), tr("&Dword"), "bphws $, r, 4"));
|
||||
wHardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_byte"), tr("&Byte"), "bphws $, r, 1"));
|
||||
wHardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_word"), tr("&Word"), "bphws $, r, 2"));
|
||||
wHardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_dword"), tr("&Dword"), "bphws $, r, 4"));
|
||||
#ifdef _WIN64
|
||||
wHardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_qword.png"), tr("&Qword"), "bphws $, r, 8"));
|
||||
wHardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_qword"), tr("&Qword"), "bphws $, r, 8"));
|
||||
#endif //_WIN64
|
||||
wHardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_byte.png"), tr("&Byte"), "bphws $, w, 1"));
|
||||
wHardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_word.png"), tr("&Word"), "bphws $, w, 2"));
|
||||
wHardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_dword.png"), tr("&Dword"), "bphws $, w, 4"));
|
||||
wHardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_byte"), tr("&Byte"), "bphws $, w, 1"));
|
||||
wHardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_word"), tr("&Word"), "bphws $, w, 2"));
|
||||
wHardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_dword"), tr("&Dword"), "bphws $, w, 4"));
|
||||
#ifdef _WIN64
|
||||
wHardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_qword.png"), tr("&Qword"), "bphws $, w, 8"));
|
||||
wHardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_qword"), tr("&Qword"), "bphws $, w, 8 |