mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-09 06:40:13 +00:00
Add asm.size option in preferences (#374)
This commit is contained in:
parent
c127772dc1
commit
742690afd0
@ -536,6 +536,7 @@ void CutterCore::resetDefaultAsmOptions()
|
||||
setConfig("asm.cmt.right", Config()->getAsmCmtRight());
|
||||
setConfig("asm.varsum", Config()->getAsmVarSum());
|
||||
setConfig("asm.bytes", Config()->getAsmBytes());
|
||||
setConfig("asm.size", Config()->getAsmSize());
|
||||
setConfig("asm.bytespace", Config()->getAsmBytespace());
|
||||
setConfig("asm.lbytes", Config()->getAsmLBytes());
|
||||
setConfig("asm.nbytes", Config()->getAsmNBytes());
|
||||
@ -561,6 +562,7 @@ void CutterCore::saveDefaultAsmOptions()
|
||||
Config()->setAsmCmtRight(getConfigb("asm.cmt.right"));
|
||||
Config()->setAsmVarSum(getConfigb("asm.varsum"));
|
||||
Config()->setAsmBytes(getConfigb("asm.bytes"));
|
||||
Config()->setAsmSize(getConfigb("asm.size"));
|
||||
Config()->setAsmBytespace(getConfigb("asm.bytespace"));
|
||||
Config()->setAsmLBytes(getConfigb("asm.lbytes"));
|
||||
Config()->setAsmNBytes(getConfigi("asm.nbytes"));
|
||||
|
@ -46,6 +46,7 @@ void AsmOptionsWidget::updateAsmOptionsFromVars()
|
||||
qhelpers::setCheckedWithoutSignals(ui->emuCheckBox, Core()->getConfigb("asm.emu"));
|
||||
qhelpers::setCheckedWithoutSignals(ui->cmtrightCheckBox, Core()->getConfigb("asm.cmtright"));
|
||||
qhelpers::setCheckedWithoutSignals(ui->varsumCheckBox, Core()->getConfigb("asm.varsum"));
|
||||
qhelpers::setCheckedWithoutSignals(ui->sizeCheckBox, Core()->getConfigb("asm.size"));
|
||||
|
||||
bool bytesEnabled = Core()->getConfigb("asm.bytes");
|
||||
qhelpers::setCheckedWithoutSignals(ui->bytesCheckBox, bytesEnabled);
|
||||
@ -196,6 +197,12 @@ void AsmOptionsWidget::on_bytesCheckBox_toggled(bool checked)
|
||||
triggerAsmOptionsChanged();
|
||||
}
|
||||
|
||||
void AsmOptionsWidget::on_sizeCheckBox_toggled(bool checked)
|
||||
{
|
||||
Core()->setConfig("asm.size", checked);
|
||||
triggerAsmOptionsChanged();
|
||||
}
|
||||
|
||||
void AsmOptionsWidget::on_bytespaceCheckBox_toggled(bool checked)
|
||||
{
|
||||
Core()->setConfig("asm.bytespace", checked);
|
||||
|
@ -46,6 +46,7 @@ private slots:
|
||||
void on_cmtrightCheckBox_toggled(bool checked);
|
||||
void on_varsumCheckBox_toggled(bool checked);
|
||||
void on_bytesCheckBox_toggled(bool checked);
|
||||
void on_sizeCheckBox_toggled(bool checked);
|
||||
void on_bytespaceCheckBox_toggled(bool checked);
|
||||
void on_lbytesCheckBox_toggled(bool checked);
|
||||
void on_syntaxComboBox_currentIndexChanged(int index);
|
||||
|
@ -98,6 +98,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="sizeCheckBox">
|
||||
<property name="text">
|
||||
<string>Show size of opcodes in disassembly (asm.size)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="leftMargin">
|
||||
|
@ -85,6 +85,9 @@ public:
|
||||
bool getAsmBytes() const { return s.value("asm.bytes", false).toBool(); }
|
||||
void setAsmBytes(bool v) { s.setValue("asm.bytes", v); }
|
||||
|
||||
bool getAsmSize() const { return s.value("asm.size", false).toBool(); }
|
||||
void setAsmSize(bool v) { s.setValue("asm.size", v); }
|
||||
|
||||
bool getAsmBytespace() const { return s.value("asm.bytespace", false).toBool(); }
|
||||
void setAsmBytespace(bool v) { s.setValue("asm.bytespace", v); }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user