File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 11"""JABS UI Module"""
22
33from .main_window import MainWindow
4- from .message_dialog import MessageDialog , MessageType
54
65__all__ = [
76 "MainWindow" ,
8- "MessageDialog" ,
9- "MessageType" ,
107]
Original file line number Diff line number Diff line change @@ -52,12 +52,15 @@ def __init__(
5252
5353 # Set default title based on message type if not provided
5454 if title is None :
55- title_map = {
56- MessageType .ERROR : "Error" ,
57- MessageType .WARNING : "Warning" ,
58- MessageType .INFO : "Information" ,
59- }
60- title = title_map .get (message_type , "Message" )
55+ match message_type :
56+ case MessageType .ERROR :
57+ title = "Error"
58+ case MessageType .WARNING :
59+ title = "Warning"
60+ case MessageType .INFO :
61+ title = "Information"
62+ case _:
63+ title = "Message"
6164
6265 self .setWindowTitle (title )
6366 self .setMinimumWidth (500 )
You can’t perform that action at this time.
0 commit comments