528 index = self.editors.index(editor) |
528 index = self.editors.index(editor) |
529 txt = os.path.basename(newName) |
529 txt = os.path.basename(newName) |
530 if not QFileInfo(newName).isWritable(): |
530 if not QFileInfo(newName).isWritable(): |
531 txt = self.tr("{0} (ro)").format(txt) |
531 txt = self.tr("{0} (ro)").format(txt) |
532 itm = self.viewlist.item(index) |
532 itm = self.viewlist.item(index) |
533 itm.setText(txt) |
533 if itm: |
534 itm.setToolTip(newName) |
534 itm.setText(txt) |
|
535 itm.setToolTip(newName) |
535 self.viewlist.setCurrentRow(currentRow) |
536 self.viewlist.setCurrentRow(currentRow) |
536 self.changeCaption.emit(newName) |
537 self.changeCaption.emit(newName) |
537 |
538 |
538 def _modificationStatusChanged(self, m, editor): |
539 def _modificationStatusChanged(self, m, editor): |
539 """ |
540 """ |
574 keys.append("syntaxError22.png") |
575 keys.append("syntaxError22.png") |
575 elif editor.hasWarnings(): |
576 elif editor.hasWarnings(): |
576 keys.append("warning22.png") |
577 keys.append("warning22.png") |
577 if not keys: |
578 if not keys: |
578 keys.append("empty.png") |
579 keys.append("empty.png") |
579 self.viewlist.item(index).setIcon( |
580 item = self.viewlist.item(index) |
580 UI.PixmapCache.getCombinedIcon(keys)) |
581 if item: |
|
582 item.setIcon(UI.PixmapCache.getCombinedIcon(keys)) |
581 self.viewlist.setCurrentRow(currentRow) |
583 self.viewlist.setCurrentRow(currentRow) |
582 |
584 |
583 ViewManager._syntaxErrorToggled(self, editor) |
585 ViewManager._syntaxErrorToggled(self, editor) |
584 |
586 |
585 def addSplit(self): |
587 def addSplit(self): |