forked from openlp/openlp
Fix up Presentation and Image Imports
This commit is contained in:
parent
188431ce37
commit
34838aba06
@ -108,7 +108,10 @@ class ImageMediaItem(MediaManagerItem):
|
||||
self.settingsSection, self.getFileList())
|
||||
|
||||
def loadList(self, list):
|
||||
Receiver.send_message(u'cursor_busy')
|
||||
self.parent.formparent.displayProgressBar(len(list))
|
||||
for imageFile in list:
|
||||
self.parent.formparent.incrementProgressBar()
|
||||
filename = os.path.split(unicode(imageFile))[1]
|
||||
thumb = os.path.join(self.servicePath, filename)
|
||||
if os.path.exists(thumb):
|
||||
@ -122,6 +125,8 @@ class ImageMediaItem(MediaManagerItem):
|
||||
item_name.setIcon(icon)
|
||||
item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(imageFile))
|
||||
self.listView.addItem(item_name)
|
||||
Receiver.send_message(u'cursor_normal')
|
||||
self.parent.formparent.finishedProgressBar()
|
||||
|
||||
def generateSlideData(self, service_item, item=None, xmlVersion=False):
|
||||
items = self.listView.selectedIndexes()
|
||||
@ -201,4 +206,4 @@ class ImageMediaItem(MediaManagerItem):
|
||||
critical_error_message_box(UiStrings().LiveBGError,
|
||||
unicode(translate('ImagePlugin.MediaItem',
|
||||
'There was a problem replacing your background, '
|
||||
'the image file "%s" no longer exists.')) % filename)
|
||||
'the image file "%s" no longer exists.')) % filename)
|
||||
|
@ -158,7 +158,10 @@ class PresentationMediaItem(MediaManagerItem):
|
||||
titles = []
|
||||
for file in currlist:
|
||||
titles.append(os.path.split(file)[1])
|
||||
Receiver.send_message(u'cursor_busy')
|
||||
self.parent.formparent.displayProgressBar(len(list))
|
||||
for file in list:
|
||||
self.parent.formparent.incrementProgressBar()
|
||||
if currlist.count(file) > 0:
|
||||
continue
|
||||
filename = os.path.split(unicode(file))[1]
|
||||
@ -198,6 +201,8 @@ class PresentationMediaItem(MediaManagerItem):
|
||||
item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(file))
|
||||
item_name.setIcon(icon)
|
||||
self.listView.addItem(item_name)
|
||||
Receiver.send_message(u'cursor_normal')
|
||||
self.parent.formparent.finishedProgressBar()
|
||||
|
||||
def onDeleteClick(self):
|
||||
"""
|
||||
@ -296,4 +301,4 @@ class PresentationMediaItem(MediaManagerItem):
|
||||
if self.controllers[controller].enabled():
|
||||
if filetype in self.controllers[controller].alsosupports:
|
||||
return controller
|
||||
return None
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user