1- # launchers.py
21import subprocess
32import time
43import os
@@ -24,20 +23,20 @@ def check_app_installed(command, app_name):
2423 result = subprocess .run (['flatpak' , 'list' , '--app' , '--columns=application' ], capture_output = True , text = True )
2524 installed = flatpak_id in result .stdout .splitlines ()
2625 if not installed :
27- QMessageBox .warning (None , "Warning" , get_text ('app_not_installed' ))
26+ QMessageBox .warning (None , "Warning" , get_text ('app_not_installed' , { 'app' : app_name } ))
2827 logging .error (f'{ app_name } not installed' )
2928 return False
3029 return True
3130 else :
3231 result = subprocess .run (['which' , command [0 ]], capture_output = True )
3332 if result .returncode != 0 :
34- QMessageBox .warning (None , "Warning" , get_text ('app_not_installed' ))
33+ QMessageBox .warning (None , "Warning" , get_text ('app_not_installed' , { 'app' : app_name } ))
3534 logging .error (f'{ app_name } not installed' )
3635 return False
3736 return True
3837 except Exception as e :
3938 logging .error (f'Error checking if { app_name } is installed: { e } ' )
40- QMessageBox .warning (None , "Warning" , get_text ('app_not_installed' ))
39+ QMessageBox .warning (None , "Warning" , get_text ('app_not_installed' , { 'app' : app_name } ))
4140 return False
4241
4342def check_internet ():
@@ -68,7 +67,7 @@ def launch_app(app_name, main_window):
6867 logging .info ('Launching Steam with gamescope-session-plus and closing application' )
6968 main_window .close ()
7069 subprocess .Popen (['gamescope-session-plus' , 'steam' ])
71- sys .exit (0 ) # Ensure the application exits completely
70+ sys .exit (0 )
7271 return
7372
7473 current_time = time .time ()
0 commit comments