mirror of
https://github.com/Omni-guides/Jackify.git
synced 2026-08-14 04:13:45 +02:00
Release v0.7 - Tools Hub, Engine Choice, NXM Link Handling, Native Component Install, NSF/CSF Support
This commit is contained in:
@@ -24,36 +24,12 @@ class NonFocusMessageBox(QMessageBox):
|
||||
self._setup_no_focus_attributes(critical, safety_level)
|
||||
|
||||
def _setup_no_focus_attributes(self, critical, safety_level):
|
||||
"""Configure the message box to not steal focus"""
|
||||
# Set modality based on criticality and safety level
|
||||
if critical or safety_level == "high":
|
||||
self.setWindowModality(Qt.ApplicationModal)
|
||||
elif safety_level == "medium":
|
||||
self.setWindowModality(Qt.NonModal)
|
||||
else:
|
||||
self.setWindowModality(Qt.NonModal)
|
||||
|
||||
# Prevent focus stealing
|
||||
|
||||
self.setAttribute(Qt.WA_ShowWithoutActivating, True)
|
||||
self.setWindowFlags(
|
||||
self.windowFlags() |
|
||||
Qt.WindowStaysOnTopHint |
|
||||
Qt.WindowDoesNotAcceptFocus
|
||||
)
|
||||
|
||||
# Set focus policy to prevent taking focus
|
||||
self.setFocusPolicy(Qt.NoFocus)
|
||||
|
||||
# Make sure child widgets don't steal focus either
|
||||
for child in self.findChildren(QWidget):
|
||||
child.setFocusPolicy(Qt.NoFocus)
|
||||
|
||||
def showEvent(self, event):
|
||||
"""Override to ensure no focus stealing on show"""
|
||||
super().showEvent(event)
|
||||
# Ensure we don't steal focus
|
||||
self.activateWindow()
|
||||
self.raise_()
|
||||
|
||||
|
||||
class SafeMessageBox(NonFocusMessageBox):
|
||||
|
||||
@@ -194,7 +194,10 @@ class VNVAutomationController(QObject):
|
||||
logger.warning("VNV non-premium: Nexus API query failed, cannot open download manager")
|
||||
try:
|
||||
import subprocess
|
||||
subprocess.Popen(['xdg-open', 'https://www.nexusmods.com/newvegas/mods/62552?tab=files'])
|
||||
import os
|
||||
_strip = {"LD_LIBRARY_PATH", "LD_PRELOAD", "QT_PLUGIN_PATH", "QML2_IMPORT_PATH", "PYTHONPATH", "PYTHONHOME"}
|
||||
clean_env = {k: v for k, v in os.environ.items() if k not in _strip}
|
||||
subprocess.Popen(['xdg-open', 'https://www.nexusmods.com/newvegas/mods/62552?tab=files'], env=clean_env, start_new_session=True)
|
||||
except Exception:
|
||||
pass
|
||||
from .message_service import MessageService
|
||||
|
||||
Reference in New Issue
Block a user