From 8f5bec5eeba8f72691c4566575c548216ce1f961 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 29 Jan 2013 00:55:02 +0300 Subject: Add new 4 tips. Also fix previous button in did you know window. --- src/gui/didyouknowwindow.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/gui/didyouknowwindow.cpp') diff --git a/src/gui/didyouknowwindow.cpp b/src/gui/didyouknowwindow.cpp index ab8f5366f..f0e61536a 100644 --- a/src/gui/didyouknowwindow.cpp +++ b/src/gui/didyouknowwindow.cpp @@ -44,7 +44,7 @@ #include "debug.h" static const int minTip = 1; -static const int maxTip = 16; +static const int maxTip = 18; DidYouKnowWindow::DidYouKnowWindow(): Window(_("Did You Know?"), false, nullptr, "didyouknow.xml"), @@ -112,7 +112,13 @@ void DidYouKnowWindow::loadData(int num) { mBrowserBox->clearRows(); if (!num) - num = config.getIntValue("currentTip") + 1; + { + const int curTip = config.getIntValue("currentTip"); + if (curTip == 1) + num = maxTip; + else + num = curTip + 1; + } if (num < minTip || num > maxTip) num = minTip; -- cgit v1.2.3-70-g09d2