518 @param m flag indicating the modification status (boolean) |
518 @param m flag indicating the modification status (boolean) |
519 @param editor editor window changed |
519 @param editor editor window changed |
520 """ |
520 """ |
521 currentRow = self.viewlist.currentRow() |
521 currentRow = self.viewlist.currentRow() |
522 index = self.editors.index(editor) |
522 index = self.editors.index(editor) |
|
523 keys = [] |
523 if m: |
524 if m: |
524 self.viewlist.item(index).setIcon( |
525 keys.append("fileModified.png") |
525 UI.PixmapCache.getIcon("fileModified.png")) |
526 if editor.hasSyntaxErrors(): |
526 elif editor.hasSyntaxErrors(): |
527 keys.append("syntaxError22.png") |
527 self.viewlist.item(index).setIcon( |
|
528 UI.PixmapCache.getIcon("syntaxError.png")) |
|
529 elif editor.hasWarnings(): |
528 elif editor.hasWarnings(): |
530 self.viewlist.item(index).setIcon( |
529 keys.append("warning22.png") |
531 UI.PixmapCache.getIcon("warning.png")) |
530 if not keys: |
532 else: |
531 keys.append("empty.png") |
533 self.viewlist.item(index).setIcon( |
532 self.viewlist.item(index).setIcon( |
534 UI.PixmapCache.getIcon("empty.png")) |
533 UI.PixmapCache.getCombinedIcon(keys)) |
535 self.viewlist.setCurrentRow(currentRow) |
534 self.viewlist.setCurrentRow(currentRow) |
536 self._checkActions(editor) |
535 self._checkActions(editor) |
537 |
536 |
538 def _syntaxErrorToggled(self, editor): |
537 def _syntaxErrorToggled(self, editor): |
539 """ |
538 """ |
541 |
540 |
542 @param editor editor that sent the signal |
541 @param editor editor that sent the signal |
543 """ |
542 """ |
544 currentRow = self.viewlist.currentRow() |
543 currentRow = self.viewlist.currentRow() |
545 index = self.editors.index(editor) |
544 index = self.editors.index(editor) |
|
545 keys = [] |
|
546 if editor.isModified(): |
|
547 keys.append("fileModified.png") |
546 if editor.hasSyntaxErrors(): |
548 if editor.hasSyntaxErrors(): |
547 self.viewlist.item(index).setIcon( |
549 keys.append("syntaxError22.png") |
548 UI.PixmapCache.getIcon("syntaxError.png")) |
|
549 elif editor.hasWarnings(): |
550 elif editor.hasWarnings(): |
550 self.viewlist.item(index).setIcon( |
551 keys.append("warning22.png") |
551 UI.PixmapCache.getIcon("warning.png")) |
552 if not keys: |
552 elif editor.isModified(): |
553 keys.append("empty.png") |
553 self.viewlist.item(index).setIcon( |
554 self.viewlist.item(index).setIcon( |
554 UI.PixmapCache.getIcon("fileModified.png")) |
555 UI.PixmapCache.getCombinedIcon(keys)) |
555 else: |
|
556 self.viewlist.item(index).setIcon( |
|
557 UI.PixmapCache.getIcon("empty.png")) |
|
558 self.viewlist.setCurrentRow(currentRow) |
556 self.viewlist.setCurrentRow(currentRow) |
559 |
557 |
560 ViewManager._syntaxErrorToggled(self, editor) |
558 ViewManager._syntaxErrorToggled(self, editor) |
561 |
559 |
562 def addSplit(self): |
560 def addSplit(self): |