@@ -71,7 +71,14 @@ def closeCodeEditorWindow(self):
7171 '''
7272 def updateInstrument (self , labels , instr ):
7373 ''' labels: <instrument path>, <work dir> '''
74- self .mw .ui .lblInstrument .setText (labels [0 ])
74+ if len (labels [0 ])> 70 :
75+ label = str (pathlib .Path ("(..long dirname..)" ,pathlib .Path (labels [0 ]).name ))
76+ tooltip = "Located in: " + str (pathlib .Path (labels [0 ]).parent )
77+ else :
78+ label = labels [0 ]
79+ tooltip = labels [0 ]
80+ self .mw .ui .lblInstrument .setText (label )
81+ self .mw .ui .lblInstrument .setToolTip (tooltip )
7582 if str (labels [0 ]) == '' :
7683 self .__ssd = None
7784 if Qsci :
@@ -85,11 +92,11 @@ def updateLog(self, text='', error=False, gui=False, clear=False):
8592 if clear :
8693 self .mw .ui .txtbrwMcgui .setText ('Cleared messages.' )
8794 if error :
88- self .mw .ui .txtbrwMcgui .setTextColor (QtGui .QColor ('red' ))
95+ self .mw .ui .txtbrwMcgui .setTextColor (QtGui .QColor (mccode_config . configuration [ "GUIERRCOLOR" ] ))
8996 elif gui :
90- self .mw .ui .txtbrwMcgui .setTextColor (QtGui .QColor ('blue' ))
97+ self .mw .ui .txtbrwMcgui .setTextColor (QtGui .QColor (mccode_config . configuration [ "GUILOGCOLOR" ] ))
9198 else :
92- self .mw .ui .txtbrwMcgui .setTextColor (QtGui .QColor ('green' ))
99+ self .mw .ui .txtbrwMcgui .setTextColor (QtGui .QColor (mccode_config . configuration [ "GUIINFOCOLOR" ] ))
93100 self .mw .ui .txtbrwMcgui .append (text )
94101
95102 def disableRunBtn (self ):
@@ -116,9 +123,9 @@ def updateSimState(self, state=[]):
116123 ui .btnEdit .setEnabled (enableRun )
117124 ui .btnPlot .setEnabled (enablePlot )
118125 if enableRun :
119- ui .lblInstrument .setStyleSheet ('color: green' )
126+ ui .lblInstrument .setStyleSheet ('color: ' + mccode_config . configuration [ "GUILOGCOLOR" ] )
120127 else :
121- ui .lblInstrument .setStyleSheet ('color: red' )
128+ ui .lblInstrument .setStyleSheet ('color: ' + mccode_config . configuration [ "GUIERRCOLOR" ] )
122129 ui .actionClose_Instrument .setEnabled (enableRun )
123130 ui .actionPlot .setEnabled (enablePlot )
124131 ui .actionDisplay .setEnabled (enableRun )
0 commit comments