From fe9a3aff41bd1b0ae5ccd721e1c3793cd8854914 Mon Sep 17 00:00:00 2001 From: damies13 Date: Wed, 23 Oct 2024 01:17:35 +1000 Subject: [PATCH] Stage 1 adding the donation reminder for reporter issue #252 --- rfswarm_reporter/rfswarm_reporter.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/rfswarm_reporter/rfswarm_reporter.py b/rfswarm_reporter/rfswarm_reporter.py index 2a0421b39..b316cf31e 100644 --- a/rfswarm_reporter/rfswarm_reporter.py +++ b/rfswarm_reporter/rfswarm_reporter.py @@ -26,6 +26,7 @@ import time import tkinter as tk # python3 import tkinter.colorchooser as tkac +import tkinter.messagebox as tkm # python3 import tkinter.filedialog as tkf # python3 import tkinter.font as tkFont @@ -3557,6 +3558,10 @@ def __init__(self, master=None): base.config['GUI']['win_height'] = "390" base.saveini() + if 'donation_reminder' not in base.config['GUI']: + base.config['GUI']['donation_reminder'] = "0" + base.saveini() + # # Reporter # @@ -7134,6 +7139,7 @@ def __init__(self, master=None): base.debugmsg(5, "BuildUI") self.BuildUI() self.BuildMenu() + self.dispaly_donation_reminder() def load_icons(self): # "New Report Template" page_add.png @@ -7796,6 +7802,23 @@ def content_load(self, id): cp = threading.Thread(target=lambda: self.content_preview(id)) cp.start() + def dispaly_donation_reminder(self): + if 'donation_reminder' not in base.config['GUI']: + base.config['GUI']['donation_reminder'] = "0" + base.saveini() + + reminder = int(base.config['GUI']['donation_reminder']) + + donatemsg = "RFSwarm's mission is to give you a an industry leading performance test tool, that is easy to use, quick to develop test scripts and free from limitations so that you can just get on with testing." + donatemsg += "\n\n" + donatemsg += "Accomplishing this mission costs us resources, and requires the time of many talented people to fix bugs and develop new features and generally improve RFSwarm." + donatemsg += "\n\n" + donatemsg += "RFSwarm is proud to be a completely open source application that is 100% community funded and does not harvest and sell your data in any way." + donatemsg += "\n\n" + donatemsg += "So today we're asking for you help to make RFSwarm better, please consider giving a donation to support RFSwarm." + + tkm.showinfo("RFSwarm Reporter - Donation Reminder", donatemsg) + # # Settings #