This fixes the adding of images and media to the media manager. Copied from lp:~rafaellerm/openlp/media_import_fix

This commit is contained in:
Tomas Groth 2014-10-27 14:14:12 +01:00
parent d2f388bb59
commit e9a151cec0
3 changed files with 3 additions and 3 deletions

View File

@ -109,6 +109,6 @@ class ListWidgetWithDnD(QtGui.QListWidget):
listing = os.listdir(local_file)
for file in listing:
files.append(os.path.join(local_file, file))
Registry().execute('%s_dnd' % self.mime_data_text, files)
Registry().execute('%s_dnd' % self.mime_data_text, {'files': files, 'target': self.itemAt(event.pos())})
else:
event.ignore()

View File

@ -127,7 +127,7 @@ class TreeWidgetWithDnD(QtGui.QTreeWidget):
listing = os.listdir(local_file)
for file_name in listing:
files.append(os.path.join(local_file, file_name))
Registry().execute('%s_dnd' % self.mime_Data_Text, {'files': files, 'target': self.itemAt(event.pos())})
Registry().execute('%s_dnd' % self.mime_data_text, {'files': files, 'target': self.itemAt(event.pos())})
elif self.allow_internal_dnd:
event.setDropAction(QtCore.Qt.CopyAction)
event.accept()

View File

@ -146,7 +146,7 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties):
if player.is_active:
for item in player.video_extensions_list:
if item not in self.video_extensions_list:
self.video_extensions_list.extend(item)
self.video_extensions_list.append(item)
suffix_list.append(item[2:])
self.service_manager.supported_suffixes(suffix_list)