aeb149a3e9
Lgndr: Add `get_boolean_choice` to relevant args dataclasses Lgndr: Move mock functions to `api_monkeys` InstallDialog: Add status queue to prepare_overlay_install arguments, fixes missing download stats
21 lines
No EOL
527 B
Python
21 lines
No EOL
527 B
Python
import logging
|
|
|
|
from PyQt5.QtWidgets import QMessageBox, QLabel
|
|
|
|
|
|
def get_boolean_choice(a0):
|
|
choice = QMessageBox.question(None, "Import DLCs?", a0)
|
|
return True if choice == QMessageBox.StandardButton.Yes else False
|
|
|
|
|
|
def return_exit(__status):
|
|
return __status
|
|
|
|
|
|
class UILogHandler(logging.Handler):
|
|
def __init__(self, dest: QLabel):
|
|
super(UILogHandler, self).__init__()
|
|
self.widget = dest
|
|
|
|
def emit(self, record: logging.LogRecord) -> None:
|
|
self.widget.setText(record.getMessage()) |