1
0
Fork 0

GUI: Option to not show close dialog

This commit is contained in:
mrexodia 2016-07-26 21:41:23 +02:00
parent 9bb9716908
commit a9d82f3fae
No known key found for this signature in database
GPG Key ID: D72F9A4FAA0073B4
4 changed files with 26 additions and 4 deletions

View File

@ -408,8 +408,14 @@ void MainWindow::setupLanguagesMenu()
void MainWindow::closeEvent(QCloseEvent* event)
{
mCloseDialog->show();
mCloseDialog->setFocus();
duint noClose = 0;
if(BridgeSettingGetUint("Gui", "NoCloseDialog", &noClose) && noClose)
mCloseDialog->hide();
else
{
mCloseDialog->show();
mCloseDialog->setFocus();
}
static volatile bool bExecuteThread = true;
if(bExecuteThread)
{

View File

@ -179,8 +179,10 @@ void SettingsDialog::LoadSettings()
//Gui tab
GetSettingBool("Gui", "FpuRegistersLittleEndian", &settings.guiFpuRegistersLittleEndian);
GetSettingBool("Gui", "SaveColumnOrder", &settings.guiSaveColumnOrder);
GetSettingBool("Gui", "NoCloseDialog", &settings.guiNoCloseDialog);
ui->chkFpuRegistersLittleEndian->setChecked(settings.guiFpuRegistersLittleEndian);
ui->chkSaveColumnOrder->setChecked(settings.guiSaveColumnOrder);
ui->chkNoCloseDialog->setChecked(settings.guiNoCloseDialog);
//Misc tab
if(DbgFunctions()->GetJit)
@ -289,6 +291,7 @@ void SettingsDialog::SaveSettings()
//Gui tab
BridgeSettingSetUint("Gui", "FpuRegistersLittleEndian", settings.guiFpuRegistersLittleEndian);
BridgeSettingSetUint("Gui", "SaveColumnOrder", settings.guiSaveColumnOrder);
BridgeSettingSetUint("Gui", "NoCloseDialog", settings.guiNoCloseDialog);
//Misc tab
if(DbgFunctions()->GetJit)
@ -683,3 +686,8 @@ void SettingsDialog::on_chkSaveColumnOrder_stateChanged(int arg1)
else
settings.guiSaveColumnOrder = true;
}
void SettingsDialog::on_chkNoCloseDialog_toggled(bool checked)
{
settings.guiNoCloseDialog = checked;
}

View File

@ -63,14 +63,14 @@ private slots:
//Gui Tab
void on_chkFpuRegistersLittleEndian_stateChanged(int arg1);
void on_chkSaveColumnOrder_stateChanged(int arg1);
void on_chkSaveLoadTabOrder_stateChanged(int arg1);
void on_chkNoCloseDialog_toggled(bool checked);
//Misc tab
void on_chkSetJIT_stateChanged(int arg1);
void on_chkConfirmBeforeAtt_stateChanged(int arg1);
void on_editSymbolStore_textEdited(const QString & arg1);
void on_editSymbolCache_textEdited(const QString & arg1);
void on_chkSaveLoadTabOrder_stateChanged(int arg1);
private:
//enums
enum CalcType
@ -135,6 +135,7 @@ private:
//Gui Tab
bool guiFpuRegistersLittleEndian;
bool guiSaveColumnOrder;
bool guiNoCloseDialog;
//Misc Tab
bool miscSetJIT;
bool miscSetJITAuto;

View File

@ -466,6 +466,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkNoCloseDialog">
<property name="text">
<string>Don't show close dialog</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_7">
<property name="orientation">