Fix 4294 (#4302)
* save forgot password settings when opening dialog * add restore password menu item
This commit is contained in:
parent
406c0b17ae
commit
1b4543aa11
3 changed files with 14 additions and 1 deletions
|
@ -347,6 +347,11 @@ bool DeleteHighlightedItemWhenShiftDelPressedEventFilter::eventFilter(QObject *o
|
|||
|
||||
void DlgConnect::actForgotPassword()
|
||||
{
|
||||
ServersSettings &servers = SettingsCache::instance().servers();
|
||||
servers.setFPHostName(hostEdit->text());
|
||||
servers.setFPPort(portEdit->text());
|
||||
servers.setFPPlayerName(playernameEdit->text().trimmed());
|
||||
|
||||
emit sigStartForgotPasswordRequest();
|
||||
reject();
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -125,7 +125,7 @@ private:
|
|||
QList<QMenu *> tabMenus;
|
||||
QMenu *cockatriceMenu, *dbMenu, *helpMenu, *trayIconMenu;
|
||||
QAction *aConnect, *aDisconnect, *aSinglePlayer, *aWatchReplay, *aDeckEditor, *aFullScreen, *aSettings, *aExit,
|
||||
*aAbout, *aTips, *aCheckCardUpdates, *aRegister, *aUpdate, *aViewLog, *closeAction;
|
||||
*aAbout, *aTips, *aCheckCardUpdates, *aRegister, *aForgotPassword, *aUpdate, *aViewLog, *closeAction;
|
||||
QAction *aManageSets, *aEditTokens, *aOpenCustomFolder, *aOpenCustomsetsFolder, *aAddCustomSet;
|
||||
TabSupervisor *tabSupervisor;
|
||||
WndSets *wndSets;
|
||||
|
|
Loading…
Reference in a new issue