* save forgot password settings when opening dialog

* add restore password menu item
This commit is contained in:
ebbit1q 2021-04-01 07:46:53 +02:00 committed by GitHub
parent 406c0b17ae
commit 1b4543aa11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 1 deletions

View file

@ -146,12 +146,14 @@ void MainWindow::statusChanged(ClientStatus _status)
aConnect->setEnabled(true);
aRegister->setEnabled(true);
aDisconnect->setEnabled(false);
aForgotPassword->setEnabled(true);
break;
case StatusLoggingIn:
aSinglePlayer->setEnabled(false);
aConnect->setEnabled(false);
aRegister->setEnabled(false);
aDisconnect->setEnabled(true);
aForgotPassword->setEnabled(false);
break;
case StatusConnecting:
case StatusRegistering:
@ -219,6 +221,7 @@ void MainWindow::actSinglePlayer()
aConnect->setEnabled(false);
aRegister->setEnabled(false);
aForgotPassword->setEnabled(false);
aSinglePlayer->setEnabled(false);
localServer = new LocalServer(this);
@ -269,6 +272,7 @@ void MainWindow::localGameEnded()
aConnect->setEnabled(true);
aRegister->setEnabled(true);
aForgotPassword->setEnabled(true);
aSinglePlayer->setEnabled(true);
}
@ -628,6 +632,7 @@ void MainWindow::retranslateUi()
aDeckEditor->setText(tr("&Deck editor"));
aFullScreen->setText(tr("&Full screen"));
aRegister->setText(tr("&Register to server..."));
aForgotPassword->setText(tr("&Restore password..."));
aSettings->setText(tr("&Settings..."));
aSettings->setIcon(QPixmap("theme:icons/settings"));
aExit->setText(tr("&Exit"));
@ -672,6 +677,8 @@ void MainWindow::createActions()
connect(aFullScreen, SIGNAL(toggled(bool)), this, SLOT(actFullScreen(bool)));
aRegister = new QAction(this);
connect(aRegister, SIGNAL(triggered()), this, SLOT(actRegister()));
aForgotPassword = new QAction(this);
connect(aForgotPassword, SIGNAL(triggered()), this, SLOT(actForgotPasswordRequest()));
aSettings = new QAction(this);
connect(aSettings, SIGNAL(triggered()), this, SLOT(actSettings()));
aExit = new QAction(this);
@ -739,6 +746,7 @@ void MainWindow::createMenus()
cockatriceMenu->addAction(aConnect);
cockatriceMenu->addAction(aDisconnect);
cockatriceMenu->addAction(aRegister);
cockatriceMenu->addAction(aForgotPassword);
cockatriceMenu->addSeparator();
cockatriceMenu->addAction(aSinglePlayer);
cockatriceMenu->addAction(aWatchReplay);