mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-07-21 07:16:07 -04:00
Added a donation dialogue in some parts of the program
This commit is contained in:
10
src/main.py
10
src/main.py
@@ -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()
|
||||
|
Reference in New Issue
Block a user