Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/util/messages.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import threading

from win32api import MessageBoxEx

from constants.app_info import APP_NAME_WITH_VERSION, TITLE_ERROR, APP_TITLE
Expand All @@ -21,7 +23,7 @@ def _message_box(title: str, message: str, icon: MBIcon, btn: MBButton) -> MBRes


def show_info(message: str, title: str = APP_TITLE):
_message_box(title, message, MBIcon.INFORMATION, MBButton.OK)
threading.Thread(target=lambda: _message_box(title, message, MBIcon.INFORMATION, MBButton.OK)).start()


def yesno_info_box(message: str, title: str = APP_TITLE) -> bool:
Expand All @@ -33,7 +35,7 @@ def yesno_question_box(message: str, title: str = APP_TITLE) -> bool:


def show_error(message: str, title: str = TITLE_ERROR):
_message_box(title, message, MBIcon.ERROR, MBButton.OK)
threading.Thread(target=lambda: _message_box(title, message, MBIcon.ERROR, MBButton.OK)).start()


def yesno_error_box(message: str, title: str = TITLE_ERROR) -> bool:
Expand Down