From e463e83ed5238f86350266582255b9cfd5a845a5 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Mon, 19 Apr 2010 17:45:13 +0100 Subject: [PATCH] Icon fixes --- openlp/core/lib/mediamanageritem.py | 5 ++++- openlp/plugins/images/lib/mediaitem.py | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/openlp/core/lib/mediamanageritem.py b/openlp/core/lib/mediamanageritem.py index 7ac2a6f0a..fdc81092f 100644 --- a/openlp/core/lib/mediamanageritem.py +++ b/openlp/core/lib/mediamanageritem.py @@ -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 \ No newline at end of file + return None diff --git a/openlp/plugins/images/lib/mediaitem.py b/openlp/plugins/images/lib/mediaitem.py index 6fbf66022..914a6ce20 100644 --- a/openlp/plugins/images/lib/mediaitem.py +++ b/openlp/plugins/images/lib/mediaitem.py @@ -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)