From a6146399d4680a205f1178291f49242c7867839b Mon Sep 17 00:00:00 2001 From: doitux Date: Sun, 7 Jun 2009 20:23:06 +0000 Subject: [PATCH] readd disable startsplash option --- src/config/configfile.cpp | 7 ++++--- src/gui/qt/settingsdialog.ui | 9 ++++++++- .../qt/settingsdialog/settingsdialogimpl.cpp | 18 ++++++++++-------- src/pokerth.cpp | 14 ++++++++------ 4 files changed, 30 insertions(+), 18 deletions(-) diff --git a/src/config/configfile.cpp b/src/config/configfile.cpp index b3ad62cb..53323833 100644 --- a/src/config/configfile.cpp +++ b/src/config/configfile.cpp @@ -48,7 +48,7 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly) myQtToolsInterface = CreateQtToolsWrapper(); // !!!! Revisionsnummer der Configdefaults !!!!! - configRev = 67; + configRev = 68; //standard defaults logOnOffDefault = "1"; @@ -139,6 +139,7 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly) configList.push_back(ConfigInfo("ShowBlindButtons", CONFIG_TYPE_INT, "1")); configList.push_back(ConfigInfo("ShowCardsChanceMonitor", CONFIG_TYPE_INT, "1")); configList.push_back(ConfigInfo("DontTranslateInternationalPokerStringsFromStyle", CONFIG_TYPE_INT, "0")); + configList.push_back(ConfigInfo("DisableSplashScreenOnStartup", CONFIG_TYPE_INT, "0")); configList.push_back(ConfigInfo("AntiPeekMode", CONFIG_TYPE_INT, "0")); configList.push_back(ConfigInfo("AlternateFKeysUserActionMode", CONFIG_TYPE_INT, "0")); configList.push_back(ConfigInfo("EnableBetInputFocusSwitch", CONFIG_TYPE_INT, "0")); @@ -149,8 +150,8 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly) configList.push_back(ConfigInfo("CurrentGameTableStyle", CONFIG_TYPE_STRING, "")); configList.push_back(ConfigInfo("CardDeckStylesList", CONFIG_TYPE_STRING_LIST, "CardDeckStyles")); configList.push_back(ConfigInfo("CurrentCardDeckStyle", CONFIG_TYPE_STRING, "")); - configList.push_back(ConfigInfo("LastGameTableStyleDir", CONFIG_TYPE_STRING, "")); - configList.push_back(ConfigInfo("LastCardDeckStyleDir", CONFIG_TYPE_STRING, "")); + configList.push_back(ConfigInfo("LastGameTableStyleDir", CONFIG_TYPE_STRING, "")); + configList.push_back(ConfigInfo("LastCardDeckStyleDir", CONFIG_TYPE_STRING, "")); configList.push_back(ConfigInfo("PlaySoundEffects", CONFIG_TYPE_INT, "1")); configList.push_back(ConfigInfo("SoundVolume", CONFIG_TYPE_INT, "8")); configList.push_back(ConfigInfo("PlayGameActions", CONFIG_TYPE_INT, "1")); diff --git a/src/gui/qt/settingsdialog.ui b/src/gui/qt/settingsdialog.ui index 3b71ec9b..91569ef6 100644 --- a/src/gui/qt/settingsdialog.ui +++ b/src/gui/qt/settingsdialog.ui @@ -206,7 +206,7 @@ - + Don't translate poker strings like check, call, raise from game table style @@ -241,6 +241,13 @@ + + + + Disable splashscreen on startup + + + diff --git a/src/gui/qt/settingsdialog/settingsdialogimpl.cpp b/src/gui/qt/settingsdialog/settingsdialogimpl.cpp index 489c7ad8..a212d933 100644 --- a/src/gui/qt/settingsdialog/settingsdialogimpl.cpp +++ b/src/gui/qt/settingsdialog/settingsdialogimpl.cpp @@ -227,14 +227,7 @@ void settingsDialogImpl::exec() { checkBox_enableBetInputFocusSwitch->setChecked(myConfig->readConfigInt("EnableBetInputFocusSwitch")); checkBox_cardsChanceMonitor->setChecked(myConfig->readConfigInt("ShowCardsChanceMonitor")); checkBox_dontTranslatePokerStrings->setChecked(myConfig->readConfigInt("DontTranslateInternationalPokerStringsFromStyle")); - - radioButton_flipsideTux->setChecked(myConfig->readConfigInt("FlipsideTux")); - radioButton_flipsideOwn->setChecked(myConfig->readConfigInt("FlipsideOwn")); - if(radioButton_flipsideOwn->isChecked()) { - lineEdit_OwnFlipsideFilename->setEnabled(TRUE); - pushButton_openFlipsidePicture->setEnabled(TRUE); - } - lineEdit_OwnFlipsideFilename->setText(QString::fromUtf8(myConfig->readConfigString("FlipsideOwnFile").c_str())); + checkBox_disableSplashscreen->setChecked(myConfig->readConfigInt("DisableSplashScreenOnStartup")); //S t y l e //TABLE @@ -384,6 +377,14 @@ void settingsDialogImpl::exec() { // refresh Card Deck Style Preview showCurrentCardDeckStylePreview(); + radioButton_flipsideTux->setChecked(myConfig->readConfigInt("FlipsideTux")); + radioButton_flipsideOwn->setChecked(myConfig->readConfigInt("FlipsideOwn")); + if(radioButton_flipsideOwn->isChecked()) { + lineEdit_OwnFlipsideFilename->setEnabled(TRUE); + pushButton_openFlipsidePicture->setEnabled(TRUE); + } + lineEdit_OwnFlipsideFilename->setText(QString::fromUtf8(myConfig->readConfigString("FlipsideOwnFile").c_str())); + //Sound groupBox_playSoundEffects->setChecked(myConfig->readConfigInt("PlaySoundEffects")); horizontalSlider_soundVolume->setValue(myConfig->readConfigInt("SoundVolume")); @@ -552,6 +553,7 @@ void settingsDialogImpl::isAccepted() { myConfig->writeConfigInt("AntiPeekMode", checkBox_antiPeekMode->isChecked()); myConfig->writeConfigInt("AlternateFKeysUserActionMode", checkBox_alternateFKeysUserActionMode->isChecked()); myConfig->writeConfigInt("DontTranslateInternationalPokerStringsFromStyle", checkBox_dontTranslatePokerStrings->isChecked()); + myConfig->writeConfigInt("DisableSplashScreenOnStartup", checkBox_disableSplashscreen->isChecked()); myConfig->writeConfigInt("EnableBetInputFocusSwitch", checkBox_enableBetInputFocusSwitch->isChecked()); myConfig->writeConfigInt("FlipsideTux", radioButton_flipsideTux->isChecked()); myConfig->writeConfigInt("FlipsideOwn", radioButton_flipsideOwn->isChecked()); diff --git a/src/pokerth.cpp b/src/pokerth.cpp index 8fd2425a..39dd1887 100755 --- a/src/pokerth.cpp +++ b/src/pokerth.cpp @@ -58,9 +58,9 @@ #endif //Uncomment this for RELEASE on Linux/Unix/BSD (static Qt only) -// #include -// Q_IMPORT_PLUGIN(qjpeg) -// Q_IMPORT_PLUGIN(qgif) +//#include +//Q_IMPORT_PLUGIN(qjpeg) +//Q_IMPORT_PLUGIN(qgif) #ifdef _WIN32 // Always use static Qt on Windows. #include @@ -112,9 +112,11 @@ int main( int argc, char **argv ) a.setStyleSheet("QDialogButtonBox, QMessageBox { dialogbuttonbox-buttons-have-icons: 1; dialog-ok-icon: url(:/gfx/dialog_ok_apply.png); dialog-cancel-icon: url(:/gfx/dialog_close.png); dialog-close-icon: url(:/gfx/dialog_close.png); dialog-yes-icon: url(:/gfx/dialog_ok_apply.png); dialog-no-icon: url(:/gfx/dialog_close.png) }"); QPixmap *pixmap = new QPixmap(myAppDataPath + "gfx/gui/misc/welcomepokerth.png"); - StartSplash splash(*pixmap); - splash.show(); - splash.showMessage(QString("Version %1").arg(POKERTH_BETA_RELEASE_STRING), 0x0042, QColor(153,213,0)); + StartSplash splash(*pixmap); + if(!myConfig->readConfigInt("DisableSplashScreenOnStartup")) { + splash.show(); + splash.showMessage(QString("Version %1").arg(POKERTH_BETA_RELEASE_STRING), 0x0042, QColor(153,213,0)); + } //Set translations QTranslator qtTranslator;