and again

This commit is contained in:
Tim Bentley 2010-04-07 19:32:54 +01:00
parent abb3827817
commit be7ed23c1d
3 changed files with 5 additions and 5 deletions

View File

@ -361,9 +361,9 @@ class MediaManagerItem(QtGui.QWidget):
thumbdate = os.stat(thumb).st_mtime
#if file updated rebuild icon
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))
pixmap = icon.pixmap(QtCore.QSize(88,50))
ext = os.path.splitext(thumb)[1].lower()

View File

@ -127,7 +127,7 @@ class ImageMediaItem(MediaManagerItem):
self.validate(file, thumb)
icon = build_icon(thumb)
else:
icon = self.icon_from_file(file, thumb)
icon = self.IconFromFile(file, thumb)
item_name = QtGui.QListWidgetItem(filename)
item_name.setIcon(icon)
item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(file))
@ -162,4 +162,4 @@ class ImageMediaItem(MediaManagerItem):
self.parent.maindisplay.addImageWithText(frame)
def onPreviewClick(self):
MediaManagerItem.onPreviewClick(self)
MediaManagerItem.onPreviewClick(self)

View File

@ -248,7 +248,7 @@ class ImpressDocument(PresentationDocument):
preview = resize_image(path, 640, 480)
if os.path.exists(path):
os.remove(path)
preview.save(patha, u'png')
preview.save(path, u'png')
except:
log.exception(u'%s - Unable to store openoffice preview' % path)