mirror of
https://github.com/hyb-oyqq/FRAISEMOE-Addons-Installer-NEXT.git
synced 2025-12-21 06:18:36 +00:00
feat(core): 更新窗口状态管理,统一使用window_manager
- 在多个模块中,将安装按钮状态管理从ui_manager迁移至window_manager,确保窗口状态的一致性和可维护性。 - 优化了ExtractionHandler、CloudflareOptimizer、DownloadManager、OfflineModeManager、PatchDetector等类中的状态更新逻辑,提升了代码的可读性和一致性。
This commit is contained in:
@@ -847,7 +847,8 @@ class OfflineModeManager:
|
||||
QMessageBox.StandardButton.Ok
|
||||
).exec()
|
||||
self.main_window.setEnabled(True)
|
||||
self.main_window.ui_manager.set_install_button_state("ready")
|
||||
if hasattr(self.main_window, 'window_manager'):
|
||||
self.main_window.window_manager.change_window_state(self.main_window.window_manager.STATE_READY)
|
||||
|
||||
return True
|
||||
|
||||
@@ -907,7 +908,8 @@ class OfflineModeManager:
|
||||
else:
|
||||
# 恢复UI状态
|
||||
self.main_window.setEnabled(True)
|
||||
self.main_window.ui_manager.set_install_button_state("ready")
|
||||
if hasattr(self.main_window, 'window_manager'):
|
||||
self.main_window.window_manager.change_window_state(self.main_window.window_manager.STATE_READY)
|
||||
|
||||
return
|
||||
|
||||
@@ -1040,4 +1042,5 @@ class OfflineModeManager:
|
||||
|
||||
# 恢复UI状态
|
||||
self.main_window.setEnabled(True)
|
||||
self.main_window.ui_manager.set_install_button_state("ready")
|
||||
if hasattr(self.main_window, 'window_manager'):
|
||||
self.main_window.window_manager.change_window_state(self.main_window.window_manager.STATE_READY)
|
||||
Reference in New Issue
Block a user