mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Feature/3139 new features for tips (#3152)
* "Tip of the Day" option added to Help menu * Tip of the Day setting moved * If no new tips are availabe, don't show tip of the day again * list storing try #1 * first unseen tip shown first * lastShownTip removed * fixed next/previous buttons * spaces > tab * "Show this window on startup" is not checked by default
This commit is contained in:
parent
6374d157fc
commit
e1394bd851
8 changed files with 62 additions and 22 deletions
|
|
@ -41,6 +41,7 @@
|
|||
#include "dlg_forgotpasswordreset.h"
|
||||
#include "dlg_register.h"
|
||||
#include "dlg_settings.h"
|
||||
#include "dlg_tip_of_the_day.h"
|
||||
#include "dlg_update.h"
|
||||
#include "dlg_viewlog.h"
|
||||
#include "localclient.h"
|
||||
|
|
@ -312,6 +313,14 @@ void MainWindow::actAbout()
|
|||
mb.exec();
|
||||
}
|
||||
|
||||
void MainWindow::actTips()
|
||||
{
|
||||
DlgTipOfTheDay tip;
|
||||
if (tip.successfulInit) {
|
||||
tip.exec();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::actUpdate()
|
||||
{
|
||||
DlgUpdate dlg(this);
|
||||
|
|
@ -627,6 +636,7 @@ void MainWindow::retranslateUi()
|
|||
aEditTokens->setText(tr("Edit &tokens..."));
|
||||
|
||||
aAbout->setText(tr("&About Cockatrice"));
|
||||
aTips->setText(tr("&Tip of the Day"));
|
||||
aUpdate->setText(tr("Check for Client Updates"));
|
||||
aViewLog->setText(tr("View &debug log"));
|
||||
helpMenu->setTitle(tr("&Help"));
|
||||
|
|
@ -659,6 +669,8 @@ void MainWindow::createActions()
|
|||
|
||||
aAbout = new QAction(this);
|
||||
connect(aAbout, SIGNAL(triggered()), this, SLOT(actAbout()));
|
||||
aTips = new QAction(this);
|
||||
connect(aTips, SIGNAL(triggered()), this, SLOT(actTips()));
|
||||
aUpdate = new QAction(this);
|
||||
connect(aUpdate, SIGNAL(triggered()), this, SLOT(actUpdate()));
|
||||
aViewLog = new QAction(this);
|
||||
|
|
@ -729,6 +741,7 @@ void MainWindow::createMenus()
|
|||
|
||||
helpMenu = menuBar()->addMenu(QString());
|
||||
helpMenu->addAction(aAbout);
|
||||
helpMenu->addAction(aTips);
|
||||
helpMenu->addAction(aUpdate);
|
||||
helpMenu->addAction(aViewLog);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue