Ignore:
Timestamp:
06/04/12 12:24:42 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Started the possibilities to log faults differently

Location:
src/mlx/gui
Files:
3 edited

Legend:

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

    r221 r225  
    228228#------------------------------------------------------------------------------
    229229
    230 def formatFlightLogLine(timeStr, line):
     230def formatFlightLogLine(timeStr, line, isFault = False):
    231231    """Format the given flight log line."""
    232232    """Format the given line for flight logging."""
    233233    if timeStr is not None:
    234234        line = timeStr + ": " + line
     235    #if isFault:
     236    #    line = "<b>" + line + "</b>"
    235237    return line + "\n"
    236238
  • src/mlx/gui/gui.py

    r221 r225  
    463463        return True
    464464           
    465     def addFlightLogLine(self, timeStr, line):
     465    def addFlightLogLine(self, timeStr, line, isFault = False):
    466466        """Write the given message line to the log."""
    467467        gobject.idle_add(self._writeLog,
    468                          formatFlightLogLine(timeStr, line),
     468                         formatFlightLogLine(timeStr, line, isFault = isFault),
    469469                         self._logView)
    470470
    471     def updateFlightLogLine(self, index, timeStr, line):
     471    def updateFlightLogLine(self, index, timeStr, line, isFault = False):
    472472        """Update the line with the given index."""
    473473        gobject.idle_add(self._updateFlightLogLine, index,
    474                          formatFlightLogLine(timeStr, line))
     474                         formatFlightLogLine(timeStr, line,
     475                                             isFault = isFault))
    475476
    476477    def _updateFlightLogLine(self, index, line):
  • src/mlx/gui/pirep.py

    r224 r225  
    234234
    235235        logBuffer = self._log.get_buffer()
     236        print dir(logBuffer)
    236237        logBuffer.set_text("")
     238        lineIndex = 0
    237239        for (timeStr, line) in pirep.logLines:
     240            isFault = lineIndex in pirep.faultLineIndexes
    238241            logBuffer.insert(logBuffer.get_end_iter(),
    239                              formatFlightLogLine(timeStr, line))
     242                             formatFlightLogLine(timeStr, line,
     243                                                 isFault = isFault))
     244            lineIndex += 1
    240245
    241246        self._notebook.set_current_page(0)
Note: See TracChangeset for help on using the changeset viewer.