derive captable image formats from Qt

This commit is contained in:
M2j 2010-06-07 01:40:24 +02:00
parent 69608de08c
commit d7a84fb592

View File

@ -60,8 +60,11 @@ class ImageMediaItem(MediaManagerItem):
def retranslateUi(self): def retranslateUi(self):
self.OnNewPrompt = self.trUtf8('Select Image(s)') self.OnNewPrompt = self.trUtf8('Select Image(s)')
self.OnNewFileMasks = self.trUtf8( file_formats = u''
'Images (*.jpg *.jpeg *.gif *.png *.bmp);; All files (*)') for file_format in QtGui.QImageReader.supportedImageFormats():
file_formats += u'*.%s ' % file_format
self.OnNewFileMasks = unicode(
self.trUtf8('Images (%s);; All files (*)')) % file_formats
def requiredIcons(self): def requiredIcons(self):
MediaManagerItem.requiredIcons(self) MediaManagerItem.requiredIcons(self)