Plugins/ViewManagerPlugins/Listspace/Listspace.py

changeset 5646
22f42d9cb264
parent 5588
6ba512d9f46a
child 6048
82ad8ec9548c
equal deleted inserted replaced
5645:e8f9bf06b804 5646:22f42d9cb264
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):

eric ide

mercurial