check if settingsdialog is called from ingame and disable reset settings

button
This commit is contained in:
doitux
2012-01-06 09:34:26 +00:00
parent cd3eaaf2b9
commit bc8f9b9b89
6 changed files with 40 additions and 10 deletions
@@ -486,11 +486,22 @@ void settingsDialogImpl::prepareDialog()
//set this AFTER switch combobox like config-settings. This IS a currentIndexChanged() ;-)
languageIsChanged = FALSE;
//disable reset config button when dialog is called from ingame
if(calledIngame) {
pushButton_resetSettings->setDisabled(true);
label_resetNote->show();
}
else {
pushButton_resetSettings->setEnabled(true);
label_resetNote->hide();
}
}
void settingsDialogImpl::exec()
void settingsDialogImpl::exec(bool in_game)
{
calledIngame = in_game;
prepareDialog();
QDialog::exec();
@@ -1371,7 +1382,7 @@ void settingsDialogImpl::showLogFilePreview()
void settingsDialogImpl::resetSettings()
{
int ret = QMessageBox::warning(this, tr("PokerTH - Settings"),
tr("Attention: this will delete all your personal settings!\n"
tr("Attention: this will delete all your personal settings and close PokerTH!\n"
"Do you really want to reset factory settings?"),
QMessageBox::Yes | QMessageBox::No);
if(ret == QMessageBox::Yes)