forked from openlp/openlp
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:
parent
d2f388bb59
commit
e9a151cec0
@ -109,6 +109,6 @@ class ListWidgetWithDnD(QtGui.QListWidget):
|
|||||||
listing = os.listdir(local_file)
|
listing = os.listdir(local_file)
|
||||||
for file in listing:
|
for file in listing:
|
||||||
files.append(os.path.join(local_file, file))
|
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:
|
else:
|
||||||
event.ignore()
|
event.ignore()
|
||||||
|
@ -127,7 +127,7 @@ class TreeWidgetWithDnD(QtGui.QTreeWidget):
|
|||||||
listing = os.listdir(local_file)
|
listing = os.listdir(local_file)
|
||||||
for file_name in listing:
|
for file_name in listing:
|
||||||
files.append(os.path.join(local_file, file_name))
|
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:
|
elif self.allow_internal_dnd:
|
||||||
event.setDropAction(QtCore.Qt.CopyAction)
|
event.setDropAction(QtCore.Qt.CopyAction)
|
||||||
event.accept()
|
event.accept()
|
||||||
|
@ -146,7 +146,7 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties):
|
|||||||
if player.is_active:
|
if player.is_active:
|
||||||
for item in player.video_extensions_list:
|
for item in player.video_extensions_list:
|
||||||
if item not in self.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:])
|
suffix_list.append(item[2:])
|
||||||
self.service_manager.supported_suffixes(suffix_list)
|
self.service_manager.supported_suffixes(suffix_list)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user