feat(core): 优化主窗口信号连接和状态管理

- 更新主窗口信号连接,使用私有方法处理关闭和最小化按钮点击事件,增强代码可读性。
- 根据离线模式和配置状态统一管理开始安装按钮的状态,简化逻辑。
- 增强日志记录,确保在用户操作时提供详细的调试信息,便于后续排查和用户反馈。
- 优化卸载处理程序的日志记录,提升用户体验和系统稳定性。
This commit is contained in:
hyb-oyqq
2025-08-12 18:02:10 +08:00
parent 4f2217ca95
commit a97cdf4c23
7 changed files with 135 additions and 122 deletions

View File

@@ -9,6 +9,7 @@ import traceback
from utils import load_base64_image, msgbox_frame, resource_path
from config.config import APP_NAME, APP_VERSION, LOG_FILE
from core.managers.ipv6_manager import IPv6Manager # 导入新的IPv6Manager类
from workers.download import ProgressWindow
logger = logging.getLogger(__name__)
@@ -1025,6 +1026,11 @@ class UIManager:
Returns:
QDialog: 配置好的进度窗口实例.
"""
# 如果是下载进度窗口使用专用的ProgressWindow类
if "下载" in title:
return ProgressWindow(self.main_window)
# 其他情况使用基本的进度窗口
progress_window = QDialog(self.main_window)
progress_window.setWindowTitle(f"{title} - {APP_NAME}")
progress_window.setFixedSize(400, 150)