Skip to content

Commit

Permalink
Opens Zapzap website first access
Browse files Browse the repository at this point in the history
  • Loading branch information
rafatosta committed Jan 25, 2025
1 parent b9891dd commit 0214bfb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions zapzap/__main__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import zapzap
import sys, os
import sys

from PyQt6.QtGui import QDesktopServices
from PyQt6.QtCore import QUrl

from zapzap.config.SetupManager import SetupManager
from zapzap.controllers.MainWindow import MainWindow
Expand All @@ -11,7 +14,7 @@

def main():
# Desativa todos os prints do código
#sys.stdout = open(os.devnull, 'w')
# sys.stdout = open(os.devnull, 'w')

SetupManager.apply()
TranslationManager.apply()
Expand All @@ -37,6 +40,11 @@ def main():

ProxyManager.apply()

# Abre site do ZapZap em primeiro acesso
if SettingsManager.get("website/open_page", True):
QDesktopServices.openUrl(QUrl(zapzap.__website__))
SettingsManager.set("website/open_page", False)

if SettingsManager.get("system/start_background", False) or '--hideStart' in sys.argv:
print("Iniciando em segundo plano...")
main_window.hide()
Expand Down

0 comments on commit 0214bfb

Please sign in to comment.