summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-01-29 00:55:02 +0300
committerAndrei Karas <akaras@inbox.ru>2013-01-29 00:55:02 +0300
commit8f5bec5eeba8f72691c4566575c548216ce1f961 (patch)
tree1131a55c0e7702f8d94445ca06d3f1dfc12f1131
parent295bd10101a7f22f5418bd5ae4e48700ee4a10fd (diff)
downloadplus-8f5bec5eeba8f72691c4566575c548216ce1f961.tar.gz
plus-8f5bec5eeba8f72691c4566575c548216ce1f961.tar.bz2
plus-8f5bec5eeba8f72691c4566575c548216ce1f961.tar.xz
plus-8f5bec5eeba8f72691c4566575c548216ce1f961.zip
Add new 4 tips.
Also fix previous button in did you know window.
-rw-r--r--data/help/tips/CMakeLists.txt3
-rw-r--r--data/help/tips/Makefile.am5
-rw-r--r--src/gui/didyouknowwindow.cpp10
3 files changed, 15 insertions, 3 deletions
diff --git a/data/help/tips/CMakeLists.txt b/data/help/tips/CMakeLists.txt
index 44195aacb..e779e8f5b 100644
--- a/data/help/tips/CMakeLists.txt
+++ b/data/help/tips/CMakeLists.txt
@@ -16,6 +16,9 @@ SET(FILES
13.txt
14.txt
15.txt
+ 16.txt
+ 17.txt
+ 18.txt
)
INSTALL(FILES ${FILES} DESTINATION ${DATA_DIR}/help/tips)
diff --git a/data/help/tips/Makefile.am b/data/help/tips/Makefile.am
index 8551129b6..f1fa9b4f0 100644
--- a/data/help/tips/Makefile.am
+++ b/data/help/tips/Makefile.am
@@ -18,7 +18,10 @@ helptips_DATA = \
12.txt \
13.txt \
14.txt \
- 15.txt
+ 15.txt \
+ 16.txt \
+ 17.txt \
+ 18.txt
EXTRA_DIST = \
$(helptips_DATA) \
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;