Icon fixes

This commit is contained in:
Tim Bentley 2010-04-19 17:45:13 +01:00
parent 5a311c6f77
commit e463e83ed5
2 changed files with 8 additions and 3 deletions

View File

@ -362,6 +362,9 @@ class MediaManagerItem(QtGui.QWidget):
#if file updated rebuild icon
if filedate > thumbdate:
self.IconFromFile(file, thumb)
if os.path.exists(file):
return True
return False
def IconFromFile(self, file, thumb):
icon = build_icon(unicode(file))
@ -471,4 +474,4 @@ class MediaManagerItem(QtGui.QWidget):
if self.generateSlideData(service_item, item):
return service_item
else:
return None
return None

View File

@ -124,8 +124,10 @@ class ImageMediaItem(MediaManagerItem):
(path, filename) = os.path.split(unicode(file))
thumb = os.path.join(self.servicePath, filename)
if os.path.exists(thumb):
self.validate(file, thumb)
icon = build_icon(thumb)
if self.validate(file, thumb):
icon = build_icon(thumb)
else:
icon = build_icon(u':/general/general_delete.png')
else:
icon = self.IconFromFile(file, thumb)
item_name = QtGui.QListWidgetItem(filename)