forked from openlp/openlp
bugfixing
This commit is contained in:
parent
a2ebf30b68
commit
1f84c4c685
@ -42,6 +42,8 @@ from openlp.plugins.media.forms import MediaOpenForm
|
|||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
CLAPPERBOARD = QtGui.QImage(u':/media/media_video.png')
|
CLAPPERBOARD = QtGui.QImage(u':/media/media_video.png')
|
||||||
|
#TODO: Add an appropriate Icon for DVDs, CDs, ...
|
||||||
|
DVD_ICON = QtGui.QImage(u':/media/media_video.png')
|
||||||
|
|
||||||
class MediaMediaItem(MediaManagerItem):
|
class MediaMediaItem(MediaManagerItem):
|
||||||
"""
|
"""
|
||||||
@ -52,7 +54,7 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
def __init__(self, parent, plugin, icon):
|
def __init__(self, parent, plugin, icon):
|
||||||
self.iconPath = u'images/image'
|
self.iconPath = u'images/image'
|
||||||
self.background = False
|
self.background = False
|
||||||
self.PreviewFunction = CLAPPERBOARD
|
self.previewFunction = CLAPPERBOARD
|
||||||
self.Automatic = u''
|
self.Automatic = u''
|
||||||
MediaManagerItem.__init__(self, parent, plugin, icon)
|
MediaManagerItem.__init__(self, parent, plugin, icon)
|
||||||
self.singleServiceItem = False
|
self.singleServiceItem = False
|
||||||
@ -66,7 +68,7 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
self.plugin.mediaController.set_controls_visible(self.mediaController, \
|
self.plugin.mediaController.set_controls_visible(self.mediaController, \
|
||||||
False)
|
False)
|
||||||
self.mediaController.previewDisplay = Display(self.mediaController, \
|
self.mediaController.previewDisplay = Display(self.mediaController, \
|
||||||
False, self.mediaController, self.plugin.pluginManager.plugins)
|
False, self.mediaController)
|
||||||
self.mediaController.previewDisplay.setup()
|
self.mediaController.previewDisplay.setup()
|
||||||
self.plugin.mediaController.setup_display( \
|
self.plugin.mediaController.setup_display( \
|
||||||
self.mediaController.previewDisplay)
|
self.mediaController.previewDisplay)
|
||||||
@ -144,10 +146,6 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
Add a folder to the list widget to make it available for showing
|
Add a folder to the list widget to make it available for showing
|
||||||
"""
|
"""
|
||||||
self.mediaOpenForm.exec_()
|
self.mediaOpenForm.exec_()
|
||||||
# folder = QtGui.QFileDialog.getExistingDirectory (
|
|
||||||
# self, self.onNewPrompt,
|
|
||||||
# SettingsManager.get_last_dir(self.settingsSection))
|
|
||||||
# log.info(u'New folder(s) %s', unicode(folder))
|
|
||||||
|
|
||||||
def overrideApiChanged(self, index):
|
def overrideApiChanged(self, index):
|
||||||
Receiver.send_message(u'media_overrideApi', \
|
Receiver.send_message(u'media_overrideApi', \
|
||||||
@ -289,10 +287,8 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
else:
|
else:
|
||||||
filename = os.path.split(unicode(track))[1]
|
filename = os.path.split(unicode(track))[1]
|
||||||
item_name = QtGui.QListWidgetItem(filename)
|
item_name = QtGui.QListWidgetItem(filename)
|
||||||
#imageFile = u'F:/Computer/Platform/pythonDev/openlp/branches/media/media-optical-dvd-video.png'
|
#TODO: add the appropriate Icon
|
||||||
#thumbFile = u'F:/Computer/Platform/pythonDev/openlp/branches/media/media-optical-dvd-video_thumb.png'
|
#item_name.setIcon(build_icon(DVD_ICON))
|
||||||
#icon = self.iconFromFile(imageFile, thumbFile)
|
|
||||||
#item_name.setIcon(icon)
|
|
||||||
item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(track))
|
item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(track))
|
||||||
item_name.setToolTip(track)
|
item_name.setToolTip(track)
|
||||||
self.listView.addItem(item_name)
|
self.listView.addItem(item_name)
|
||||||
|
@ -200,4 +200,3 @@ class MediaTab(SettingsTab):
|
|||||||
Receiver.send_message(u'mediaitem_media_rebuild')
|
Receiver.send_message(u'mediaitem_media_rebuild')
|
||||||
if api_string_changed:
|
if api_string_changed:
|
||||||
Receiver.send_message(u'config_screen_changed')
|
Receiver.send_message(u'config_screen_changed')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user