1
0
Fork 0
mirror of synced 2024-09-29 08:51:43 +13:00
Rare/rare/lgndr/api_monkeys.py
loathingKernel aeb149a3e9 Lgndr: Use custom wrapped decorator to wrap LegendaryCLI functions
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
2022-08-02 10:42:38 +03:00

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())