[Libreoffice-commits] core.git: cui/source

Justin Luth (via logerrit) logerrit at kemper.freedesktop.org
Mon May 13 09:04:40 UTC 2019


 cui/source/dialogs/tipofthedaydlg.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d1d44e1dde7b1b6001e6b9c672770265ba9cb7db
Author:     Justin Luth <justin_luth at sil.org>
AuthorDate: Fri May 10 10:27:46 2019 +0300
Commit:     Heiko Tietze <tietze.heiko at gmail.com>
CommitDate: Mon May 13 11:03:58 2019 +0200

    tdf#124743 TipOfTheDay: Next tip should not be random
    
    A user pressing "next tip" will expect to cycle sequentially
    through the list of tips, and not get a random one each time.
    
    Change-Id: I331d35d623b6449a9daef407a498b4ba08eaff6f
    Reviewed-on: https://gerrit.libreoffice.org/72099
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    Reviewed-by: Heiko Tietze <tietze.heiko at gmail.com>

diff --git a/cui/source/dialogs/tipofthedaydlg.cxx b/cui/source/dialogs/tipofthedaydlg.cxx
index 0f634876ddd8..894768f5de99 100644
--- a/cui/source/dialogs/tipofthedaydlg.cxx
+++ b/cui/source/dialogs/tipofthedaydlg.cxx
@@ -127,8 +127,8 @@ IMPL_LINK_NOARG(TipOfTheDayDialog, OnLinkClick, weld::LinkButton&, void)
 
 IMPL_LINK_NOARG(TipOfTheDayDialog, OnNextClick, weld::Button&, void)
 {
-    nCurrentTip = rand() % nNumberOfTips;
+    nCurrentTip = (nCurrentTip + 1) % nNumberOfTips;
     UpdateTip();
 }
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list