6363from qtvcp .widgets .status_label import StatusLabel as STATLABEL
6464from qtvcp .widgets .stylesheeteditor import StyleSheetEditor as SSE
6565from qtvcp .lib .aux_program_loader import Aux_program_loader
66- from qtvcp .lib .notify import Notify
6766from plasmac import run_from_line as RFL
6867from rs274 .glcanon import GlCanonDraw
6968from qt5_graphics import Lcnc_3dGraphics as DRO
7473INFO = Info ()
7574ACTION = Action ()
7675TOOL = Tool ()
77- NOTICE = Notify ()
7876AUX_PRGM = Aux_program_loader ()
7977INIPATH = os .environ .get ('INI_FILE_NAME' , '/dev/null' )
8078
@@ -591,9 +589,10 @@ def screen_options_patch(self):
591589 # we want custom notifications for jog errors
592590 def new_process_error (self , w , kind , text ):
593591 O = self .w .screen_options
592+ N = O .QTVCP_INSTANCE_ ._NOTICE
594593 if O .desktop_notify :
595594 if 'on limit switch error' in text :
596- NOTICE .update (O .notify_hard_limits , title = 'Machine Error:' , message = text , msgs = O .notify_max_msgs )
595+ N .update (O .notify_hard_limits , title = 'Machine Error:' , message = text , msgs = O .notify_max_msgs )
597596 elif 'jog-inhibit' in text :
598597 if self .w .led_float_switch .hal_pin .get ():
599598 trigger = _translate ('HandlerClass' , 'Float Switch' )
@@ -603,21 +602,21 @@ def new_process_error(self, w, kind, text):
603602 trigger = _translate ('HandlerClass' , 'Breakaway Switch' )
604603 msg0 = _translate ('HandlerClass' , 'has disabled jogging' )
605604 text = '{} {}\n ' .format (trigger , msg0 )
606- NOTICE .update (O .notify_critical , title = 'Operator Error:' , message = text , msgs = O .notify_max_msgs )
605+ N .update (O .notify_critical , title = 'Operator Error:' , message = text , msgs = O .notify_max_msgs )
607606 elif kind == linuxcnc .OPERATOR_ERROR :
608- NOTICE .update (O .notify_critical , title = 'Operator Error:' , message = text , msgs = O .notify_max_msgs )
607+ N .update (O .notify_critical , title = 'Operator Error:' , message = text , msgs = O .notify_max_msgs )
609608 elif kind == linuxcnc .OPERATOR_TEXT :
610- NOTICE .update (O .notify_critical , title = 'Operator Text:' , message = text , msgs = O .notify_max_msgs )
609+ N .update (O .notify_critical , title = 'Operator Text:' , message = text , msgs = O .notify_max_msgs )
611610 elif kind == linuxcnc .OPERATOR_DISPLAY :
612- NOTICE .update (O .notify_critical , title = 'Operator Display:' , message = text , msgs = O .notify_max_msgs )
611+ N .update (O .notify_critical , title = 'Operator Display:' , message = text , msgs = O .notify_max_msgs )
613612 elif kind == linuxcnc .NML_ERROR :
614- NOTICE .update (O .notify_critical , title = 'Internal NML Error:' , message = text , msgs = O .notify_max_msgs )
613+ N .update (O .notify_critical , title = 'Internal NML Error:' , message = text , msgs = O .notify_max_msgs )
615614 elif kind == linuxcnc .NML_TEXT :
616- NOTICE .update (O .notify_critical , title = 'Internal NML Text:' , message = text , msgs = O .notify_max_msgs )
615+ N .update (O .notify_critical , title = 'Internal NML Text:' , message = text , msgs = O .notify_max_msgs )
617616 elif kind == linuxcnc .NML_DISPLAY :
618- NOTICE .update (O .notify_critical , title = 'Internal NML Display:' , message = text , msgs = O .notify_max_msgs )
617+ N .update (O .notify_critical , title = 'Internal NML Display:' , message = text , msgs = O .notify_max_msgs )
619618 elif kind == STATUS .TEMPARARY_MESSAGE :
620- NOTICE .update (O .notify_normal ,
619+ N .update (O .notify_normal ,
621620 title = 'Operator Info:' ,
622621 message = text ,
623622 status_timeout = 0 ,
0 commit comments