Changeset 225:298b775161db for src/mlx/gui
- Timestamp:
- 06/04/12 12:24:42 (12 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/common.py
r221 r225 228 228 #------------------------------------------------------------------------------ 229 229 230 def formatFlightLogLine(timeStr, line ):230 def formatFlightLogLine(timeStr, line, isFault = False): 231 231 """Format the given flight log line.""" 232 232 """Format the given line for flight logging.""" 233 233 if timeStr is not None: 234 234 line = timeStr + ": " + line 235 #if isFault: 236 # line = "<b>" + line + "</b>" 235 237 return line + "\n" 236 238 -
src/mlx/gui/gui.py
r221 r225 463 463 return True 464 464 465 def addFlightLogLine(self, timeStr, line ):465 def addFlightLogLine(self, timeStr, line, isFault = False): 466 466 """Write the given message line to the log.""" 467 467 gobject.idle_add(self._writeLog, 468 formatFlightLogLine(timeStr, line ),468 formatFlightLogLine(timeStr, line, isFault = isFault), 469 469 self._logView) 470 470 471 def updateFlightLogLine(self, index, timeStr, line ):471 def updateFlightLogLine(self, index, timeStr, line, isFault = False): 472 472 """Update the line with the given index.""" 473 473 gobject.idle_add(self._updateFlightLogLine, index, 474 formatFlightLogLine(timeStr, line)) 474 formatFlightLogLine(timeStr, line, 475 isFault = isFault)) 475 476 476 477 def _updateFlightLogLine(self, index, line): -
src/mlx/gui/pirep.py
r224 r225 234 234 235 235 logBuffer = self._log.get_buffer() 236 print dir(logBuffer) 236 237 logBuffer.set_text("") 238 lineIndex = 0 237 239 for (timeStr, line) in pirep.logLines: 240 isFault = lineIndex in pirep.faultLineIndexes 238 241 logBuffer.insert(logBuffer.get_end_iter(), 239 formatFlightLogLine(timeStr, line)) 242 formatFlightLogLine(timeStr, line, 243 isFault = isFault)) 244 lineIndex += 1 240 245 241 246 self._notebook.set_current_page(0)
Note:
See TracChangeset
for help on using the changeset viewer.