Ignore:
Timestamp:
06/05/12 15:42:34 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
hg-Phase:
(<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
Message:

Faults are logged highlighted

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gui/gui.py

    r225 r226  
    112112       
    113113        (logWidget, self._logView)  = self._buildLogWidget()
     114        addFaultTag(self._logView.get_buffer())       
    114115        label = gtk.Label(xstr("tab_log"))
    115116        label.set_use_underline(True)
     
    466467        """Write the given message line to the log."""
    467468        gobject.idle_add(self._writeLog,
    468                          formatFlightLogLine(timeStr, line, isFault = isFault),
    469                          self._logView)
    470 
    471     def updateFlightLogLine(self, index, timeStr, line, isFault = False):
     469                         formatFlightLogLine(timeStr, line),
     470                         self._logView, isFault)
     471
     472    def updateFlightLogLine(self, index, timeStr, line):
    472473        """Update the line with the given index."""
    473474        gobject.idle_add(self._updateFlightLogLine, index,
    474                          formatFlightLogLine(timeStr, line,
    475                                              isFault = isFault))
     475                         formatFlightLogLine(timeStr, line))
    476476
    477477    def _updateFlightLogLine(self, index, line):
     
    914914        return (alignment, logView)
    915915
    916     def _writeLog(self, msg, logView):
     916    def _writeLog(self, msg, logView, isFault = False):
    917917        """Write the given message to the log."""
    918918        buffer = logView.get_buffer()
    919         buffer.insert(buffer.get_end_iter(), msg)
     919        appendTextBuffer(buffer, msg, isFault = isFault)
    920920        logView.scroll_mark_onscreen(buffer.get_insert())
    921921
Note: See TracChangeset for help on using the changeset viewer.