1
0
Fork 0

Added setting that controls MaxModuleSize. (#1765)

* Added spinbox that controls maximum module name size in the disassembler settings.

* Restored settings dialog default tab index to zero.
This commit is contained in:
Alexandros Naskos 2017-10-18 23:47:43 +03:00 committed by Duncan Ogilvie
parent 390bf4c5ca
commit f519f322da
3 changed files with 63 additions and 0 deletions

View File

@ -72,6 +72,7 @@ void SettingsDialog::LoadSettings()
settings.disasmNoCurrentModuleText = false;
settings.disasm0xPrefixValues = false;
settings.disasmNoSourceLineAutoComments = false;
settings.disasmMaxModuleSize = -1;
settings.guiNoForegroundWindow = true;
//Events tab
@ -200,6 +201,8 @@ void SettingsDialog::LoadSettings()
GetSettingBool("Disassembler", "NoCurrentModuleText", &settings.disasmNoCurrentModuleText);
GetSettingBool("Disassembler", "0xPrefixValues", &settings.disasm0xPrefixValues);
GetSettingBool("Disassembler", "NoSourceLineAutoComments", &settings.disasmNoSourceLineAutoComments);
if(BridgeSettingGetUint("Disassembler", "MaxModuleSize", &cur))
settings.disasmMaxModuleSize = int(cur);
ui->chkArgumentSpaces->setChecked(settings.disasmArgumentSpaces);
ui->chkMemorySpaces->setChecked(settings.disasmMemorySpaces);
ui->chkUppercase->setChecked(settings.disasmUppercase);
@ -210,6 +213,7 @@ void SettingsDialog::LoadSettings()
ui->chkNoCurrentModuleText->setChecked(settings.disasmNoCurrentModuleText);
ui->chk0xPrefixValues->setChecked(settings.disasm0xPrefixValues);
ui->chkNoSourceLinesAutoComments->setChecked(settings.disasmNoSourceLineAutoComments);
ui->spinMaximumModuleNameSize->setValue(settings.disasmMaxModuleSize);
//Gui tab
GetSettingBool("Gui", "FpuRegistersLittleEndian", &settings.guiFpuRegistersLittleEndian);
@ -354,6 +358,7 @@ void SettingsDialog::SaveSettings()
BridgeSettingSetUint("Disassembler", "NoCurrentModuleText", settings.disasmNoCurrentModuleText);
BridgeSettingSetUint("Disassembler", "0xPrefixValues", settings.disasm0xPrefixValues);
BridgeSettingSetUint("Disassembler", "NoSourceLineAutoComments", settings.disasmNoSourceLineAutoComments);
BridgeSettingSetUint("Disassembler", "MaxModuleSize", settings.disasmMaxModuleSize);
//Gui tab
BridgeSettingSetUint("Gui", "FpuRegistersLittleEndian", settings.guiFpuRegistersLittleEndian);
@ -810,6 +815,11 @@ void SettingsDialog::on_chkNoSourceLinesAutoComments_toggled(bool checked)
settings.disasmNoSourceLineAutoComments = checked;
}
void SettingsDialog::on_spinMaximumModuleNameSize_valueChanged(int arg1)
{
settings.disasmMaxModuleSize = arg1;
}
void SettingsDialog::on_chkShowGraphRva_toggled(bool checked)
{
bTokenizerConfigUpdated = true;

View File

@ -72,6 +72,7 @@ private slots:
void on_chkPermanentHighlightingMode_toggled(bool checked);
void on_chk0xPrefixValues_toggled(bool checked);
void on_chkNoSourceLinesAutoComments_toggled(bool checked);
void on_spinMaximumModuleNameSize_valueChanged(int arg1);
//Gui Tab
void on_chkFpuRegistersLittleEndian_stateChanged(int arg1);
void on_chkSaveColumnOrder_stateChanged(int arg1);
@ -165,6 +166,7 @@ private:
bool disasmPermanentHighlightingMode;
bool disasm0xPrefixValues;
bool disasmNoSourceLineAutoComments;
int disasmMaxModuleSize;
//Gui Tab
bool guiFpuRegistersLittleEndian;
bool guiSaveColumnOrder;

View File

@ -545,6 +545,57 @@
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="lblMaximumModuleNameSize">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Maximum module name size</string>
</property>
<property name="buddy">
<cstring>spinMaximumModuleNameSize</cstring>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinMaximumModuleNameSize">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="minimum">
<number>-1</number>
</property>
<property name="maximum">
<number>2147483647</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">