From a56c8bbc66326d69c881964dc4427e355b0115d0 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Mon, 25 Feb 2013 18:06:50 +0000 Subject: [PATCH] * 1/10000 chance for the donation reminder to popup --- source/net/sourceforge/filebot/Main.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/net/sourceforge/filebot/Main.java b/source/net/sourceforge/filebot/Main.java index 3541ae1b..445dc4aa 100644 --- a/source/net/sourceforge/filebot/Main.java +++ b/source/net/sourceforge/filebot/Main.java @@ -32,6 +32,7 @@ import java.util.Collections; import java.util.List; import java.util.Locale; import java.util.Properties; +import java.util.Random; import java.util.logging.Level; import java.util.logging.Logger; @@ -225,7 +226,7 @@ public class Main { int donateStep = 10000; int usage = history.totalSize(); - if (usage / donateStep > donateLv) { + if (usage / donateStep > donateLv || new Random().nextInt(donateStep) == 777) { persistentDonateLv.setValue(String.valueOf(Math.max(donateLv + 1, usage / donateStep))); String message = String.format(Locale.ROOT, "

Thank you for using FileBot!


It has taken many nights to develop this application. If you enjoy using it,
please consider a donation to the author of this software. It will help to
make FileBot even better!

You've renamed %,d files.


", history.totalSize());