From fe627fe6f56f240ff59595ceaa04658e118b726e Mon Sep 17 00:00:00 2001 From: doitux Date: Sat, 10 Oct 2009 22:18:58 +0000 Subject: [PATCH] local nick will also be used as online game login name --- src/config/configfile.cpp | 3 +- .../internetgamelogindialogimpl.cpp | 4 +- src/gui/qt/settingsdialog.ui | 42 ++++++++----------- 3 files changed, 20 insertions(+), 29 deletions(-) diff --git a/src/config/configfile.cpp b/src/config/configfile.cpp index 2ae7331c..3f63152b 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 = 76; + configRev = 77; //standard defaults logOnOffDefault = "1"; @@ -265,7 +265,6 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly) configList.push_back(ConfigInfo("GameTableHeightSave", CONFIG_TYPE_INT, "600")); configList.push_back(ConfigInfo("GameTableWidthSave", CONFIG_TYPE_INT, "1024")); configList.push_back(ConfigInfo("InternetLoginMode", CONFIG_TYPE_INT, "0")); - configList.push_back(ConfigInfo("InternetLoginUserName", CONFIG_TYPE_STRING, "")); configList.push_back(ConfigInfo("InternetLoginPassword", CONFIG_TYPE_STRING, "")); configList.push_back(ConfigInfo("InternetSavePassword", CONFIG_TYPE_INT, "0")); diff --git a/src/gui/qt/internetgamelogindialog/internetgamelogindialogimpl.cpp b/src/gui/qt/internetgamelogindialog/internetgamelogindialogimpl.cpp index 7a4aa089..e82133ad 100644 --- a/src/gui/qt/internetgamelogindialog/internetgamelogindialogimpl.cpp +++ b/src/gui/qt/internetgamelogindialog/internetgamelogindialogimpl.cpp @@ -32,7 +32,7 @@ void internetGameLoginDialogImpl::exec() { if(myConfig->readConfigInt("InternetLoginMode") == 0) { groupBox_reguser->setChecked(true); - lineEdit_username->setText(QString::fromUtf8(myConfig->readConfigString("InternetLoginUserName").c_str())); + lineEdit_username->setText(QString::fromUtf8(myConfig->readConfigString("MyName").c_str())); if(myConfig->readConfigInt("InternetSavePassword")) { checkBox_rememberPassword->setChecked(true); lineEdit_password->setText(QString::fromUtf8(QByteArray::fromBase64(myConfig->readConfigString("InternetLoginPassword").c_str()))); @@ -59,7 +59,7 @@ void internetGameLoginDialogImpl::accept() { if(groupBox_reguser->isChecked()) { myConfig->writeConfigInt("InternetLoginMode", 0); - myConfig->writeConfigString("InternetLoginUserName", lineEdit_username->text().toUtf8().constData()); + myConfig->writeConfigString("MyName", lineEdit_username->text().toUtf8().constData()); if(checkBox_rememberPassword->isChecked()) { myConfig->writeConfigInt("InternetSavePassword", 1); myConfig->writeConfigString("InternetLoginPassword", lineEdit_password->text().toUtf8().toBase64().constData()); diff --git a/src/gui/qt/settingsdialog.ui b/src/gui/qt/settingsdialog.ui index 45a89ded..8ee33606 100644 --- a/src/gui/qt/settingsdialog.ui +++ b/src/gui/qt/settingsdialog.ui @@ -1713,6 +1713,12 @@ p, li { white-space: pre-wrap; } + + 1 + + + 8 + @@ -1740,30 +1746,16 @@ p, li { white-space: pre-wrap; } Qt::Horizontal - - - 40 - 20 - - - - - 0 - 0 - - - - - 200 - 16777215 - - - Human Player: + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Nimbus Sans L'; font-size:8pt; font-weight:400; font-style:normal;"> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Human Player:<br /><span style=" font-style:italic;">(This nick will also be used for the online game login)</span></p></body></html> Qt::AlignCenter @@ -1775,12 +1767,6 @@ p, li { white-space: pre-wrap; } Qt::Horizontal - - - 40 - 20 - - @@ -1897,6 +1883,12 @@ p, li { white-space: pre-wrap; } Computer Engine + + 0 + + + 4 +