improvements for notifications and prepare for release

This commit is contained in:
tyler committed 2026-10-24 17:42:54 -07:00
1 parent d1c9346e57
commit a2456daca7
7 files changed
+221 -22

No files matched your search

+23 -4
View File
@@ -31,7 +31,7 @@ if sys.platform.startswith("linux"):
import psutil
from PySide6.QtWidgets import (
QApplication, QWidget, QMessageBox, QVBoxLayout, QHBoxLayout, QTextEdit, QScrollArea, QComboBox, QGridLayout, QSplitter, QDialogButtonBox, QHeaderView,
QApplication, QStyle, QSystemTrayIcon, QWidget, QMessageBox, QVBoxLayout, QHBoxLayout, QTextEdit, QScrollArea, QComboBox, QGridLayout, QSplitter, QDialogButtonBox, QHeaderView,
QPushButton, QMainWindow, QLabel, QLineEdit, QGroupBox, QDialog, QMenu, QSpinBox, QTableWidget, QTableWidgetItem
)
from PySide6.QtCore import QEvent, QObject, Signal, Qt, QTimer
@@ -738,6 +738,18 @@ class MainApplication(QMainWindow):
self.plugin_manager.reload_plugins()
self.tray_icon = QSystemTrayIcon(self)
stock_icon = self.style().standardIcon(QStyle.StandardPixmap.SP_ComputerIcon) # Or use your own QIcon("path_to_logo.png")
self.tray_icon.setIcon(stock_icon)
self.tray_icon.show()
def bring_to_front():
self.showNormal() # Restores if minimized
self.raise_() # Brings to top of window stack (macOS/Linux)
self.activateWindow() # Focuses the window (Windows)
self.tray_icon.messageClicked.connect(bring_to_front)
self.show()
# Check if we should pop up the welcome screen
@@ -2361,9 +2373,16 @@ class MainApplication(QMainWindow):
elapsed_str = self._format_elapsed(msg.get("elapsed", getattr(self, "_last_elapsed", 0)))
speedup = msg.get("speedup")
speedup_str = f" | Speedup: {speedup:.1f}x" if speedup else ""
self.statusbar.showMessage(
f"Complete: {success_count} succeeded, {fail_count} failed. | Total time: {elapsed_str}{speedup_str}"
)
status_text = f"Complete: {success_count} succeeded, {fail_count} failed. | Total time: {elapsed_str}{speedup_str}"
self.statusbar.showMessage(status_text)
if hasattr(self, "tray_icon") and self.tray_icon.isSystemTrayAvailable():
self.tray_icon.showMessage(
"Process Completed",
status_text,
QSystemTrayIcon.MessageIcon.Information,
4000 # Duration in milliseconds
)
if success_count > 0:
self.is_saved = False