forked from openlp/openlp
and again
This commit is contained in:
parent
abb3827817
commit
be7ed23c1d
@ -361,9 +361,9 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
thumbdate = os.stat(thumb).st_mtime
|
thumbdate = os.stat(thumb).st_mtime
|
||||||
#if file updated rebuild icon
|
#if file updated rebuild icon
|
||||||
if filedate > thumbdate:
|
if filedate > thumbdate:
|
||||||
self.icon_from_file(file, thumb)
|
self.IconFromFile(file, thumb)
|
||||||
|
|
||||||
def icon_from_file(self, file, thumb):
|
def IconFromFile(self, file, thumb):
|
||||||
icon = build_icon(unicode(file))
|
icon = build_icon(unicode(file))
|
||||||
pixmap = icon.pixmap(QtCore.QSize(88,50))
|
pixmap = icon.pixmap(QtCore.QSize(88,50))
|
||||||
ext = os.path.splitext(thumb)[1].lower()
|
ext = os.path.splitext(thumb)[1].lower()
|
||||||
|
@ -127,7 +127,7 @@ class ImageMediaItem(MediaManagerItem):
|
|||||||
self.validate(file, thumb)
|
self.validate(file, thumb)
|
||||||
icon = build_icon(thumb)
|
icon = build_icon(thumb)
|
||||||
else:
|
else:
|
||||||
icon = self.icon_from_file(file, thumb)
|
icon = self.IconFromFile(file, thumb)
|
||||||
item_name = QtGui.QListWidgetItem(filename)
|
item_name = QtGui.QListWidgetItem(filename)
|
||||||
item_name.setIcon(icon)
|
item_name.setIcon(icon)
|
||||||
item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(file))
|
item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(file))
|
||||||
|
@ -248,7 +248,7 @@ class ImpressDocument(PresentationDocument):
|
|||||||
preview = resize_image(path, 640, 480)
|
preview = resize_image(path, 640, 480)
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
os.remove(path)
|
os.remove(path)
|
||||||
preview.save(patha, u'png')
|
preview.save(path, u'png')
|
||||||
except:
|
except:
|
||||||
log.exception(u'%s - Unable to store openoffice preview' % path)
|
log.exception(u'%s - Unable to store openoffice preview' % path)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user