Added a donation dialogue in some parts of the program

This commit is contained in:
2015-07-29 14:05:26 -05:00
parent f66b2ccbad
commit 10bc483887
4 changed files with 24 additions and 0 deletions

View File

@@ -25,6 +25,8 @@ from mysc.thread_utils import call_threaded
import fixes
#extra variables to control the temporal stdout and stderr, while the final files are opened. We understand that some errors could happen while all outputs are closed, so let's try to avoid it.
import widgetUtils
import webbrowser
from wxUI import commonMessageDialogs
if system == "Windows":
from logger import logger
from update import updater
@@ -63,6 +65,8 @@ def setup():
from sessionmanager import sessionManager
app = widgetUtils.mainLoopObject()
if system == "Windows":
if config.app["app-settings"]["donation_dialog_displayed"] == False:
donation()
updater.do_update()
sm = sessionManager.sessionManagerController()
sm.fill_list()
@@ -82,4 +86,10 @@ def setup():
GLib.idle_add(r.start)
app.run()
def donation():
dlg = commonMessageDialogs.donation()
if dlg == widgetUtils.YES:
webbrowser.open_new_tab("http://twblue.es/donate")
config.app["app-settings"]["donation_dialog_displayed"] = True
setup()