1- # main_window.py
21from PySide6 .QtWidgets import QMainWindow , QWidget , QVBoxLayout , QHBoxLayout , QTableWidget , QTableWidgetItem , QPushButton , QTabWidget , QComboBox , QLineEdit , QLabel , QMessageBox , QFileDialog , QDialog , QGridLayout , QProgressDialog , QCheckBox , QTextEdit
32from PySide6 .QtCore import Qt , QThread , Signal
43from PySide6 .QtGui import QIcon
1312class InstallThread (QThread ):
1413 update_progress = Signal (str , int , int )
1514 finished = Signal (bool , str )
16-
1715 def __init__ (self , manager , version , proton_type , custom_path = None , custom_type = None ):
1816 super ().__init__ ()
1917 self .manager = manager
2018 self .version = version
2119 self .proton_type = proton_type
2220 self .custom_path = custom_path
2321 self .custom_type = custom_type
24-
2522 def run (self ):
2623 def progress_callback (stage , value , total ):
2724 self .update_progress .emit (stage , value , total )
@@ -39,17 +36,16 @@ def progress_callback(stage, value, total):
3936
4037class LoadProtonsThread (QThread ):
4138 protons_loaded = Signal (list )
42-
4339 def __init__ (self , manager ):
4440 super ().__init__ ()
4541 self .manager = manager
46-
4742 def run (self ):
4843 try :
4944 protons = self .manager .get_installed_protons ()
5045 self .protons_loaded .emit (protons )
5146 except Exception as e :
5247 logging .error (f"Error loading protons: { e } " )
48+ print (f"Error loading protons: { e } " )
5349 self .protons_loaded .emit ([])
5450
5551class MainWindow (QMainWindow ):
@@ -61,7 +57,7 @@ def __init__(self):
6157 self .proton_manager = ProtonManager ()
6258 self .game_manager = GameManager (self .proton_manager )
6359 self .games = []
64- self .settings = self .config_manager .load_settings ()
60+ self .settings = self .config_manager .settings # Use stored settings
6561 self .apply_fullscreen ()
6662 self .setup_ui ()
6763 self .load_games ()
@@ -421,6 +417,7 @@ def launch_game(self):
421417 self .game_manager .launch_game (game , '--gamescope' in game .get ('launch_options' , '' ))
422418 except Exception as e :
423419 logging .error (f"Error launching { name } : { e } " )
420+ print (f"Error launching { name } : { e } " )
424421 QMessageBox .warning (self , 'Error' , str (e ))
425422
426423 def remove_game (self ):
@@ -622,3 +619,4 @@ def remove_proton(self):
622619 else :
623620 QMessageBox .warning (self , 'Error' , f'Failed to remove { version } ' )
624621 self .start_proton_loading ()
622+
0 commit comments