forked from openlp/openlp
Fix the icons for the media plugin so they are shown.
bzr-revno: 2078
This commit is contained in:
commit
f52859c2f8
@ -855,7 +855,11 @@ class SlideController(Controller):
|
||||
else:
|
||||
label = QtGui.QLabel()
|
||||
label.setMargin(4)
|
||||
label.setScaledContents(True)
|
||||
if serviceItem.is_media():
|
||||
label.setAlignment(QtCore.Qt.AlignHCenter |
|
||||
QtCore.Qt.AlignVCenter)
|
||||
else:
|
||||
label.setScaledContents(True)
|
||||
if self.serviceItem.is_command():
|
||||
label.setPixmap(QtGui.QPixmap(frame[u'image']))
|
||||
else:
|
||||
|
@ -42,8 +42,9 @@ from openlp.core.ui.media import get_media_players, set_media_players
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
CLAPPERBOARD = QtGui.QImage(u':/media/media_video.png')
|
||||
#TODO: Add an appropriate Icon for DVDs, CDs, ...
|
||||
CLAPPERBOARD = u':/media/slidecontroller_multimedia.png'
|
||||
VIDEO = QtGui.QImage(u':/media/media_video.png')
|
||||
AUDIO = QtGui.QImage(u':/media/media_audio.png')
|
||||
DVD_ICON = QtGui.QImage(u':/media/media_video.png')
|
||||
|
||||
class MediaMediaItem(MediaManagerItem):
|
||||
@ -218,7 +219,7 @@ class MediaMediaItem(MediaManagerItem):
|
||||
service_item.add_capability(ItemCapabilities.RequiresMedia)
|
||||
# force a non-existent theme
|
||||
service_item.theme = -1
|
||||
frame = u':/media/image_clapperboard.png'
|
||||
frame = CLAPPERBOARD
|
||||
(path, name) = os.path.split(filename)
|
||||
service_item.add_from_command(path, name, frame)
|
||||
return True
|
||||
@ -290,10 +291,10 @@ class MediaMediaItem(MediaManagerItem):
|
||||
key=lambda filename: os.path.split(unicode(filename))[1].lower())
|
||||
for track in media:
|
||||
track_info = QtCore.QFileInfo(track)
|
||||
if not track_info.isFile():
|
||||
if track_info.isFile():
|
||||
filename = os.path.split(unicode(track))[1]
|
||||
item_name = QtGui.QListWidgetItem(filename)
|
||||
item_name.setIcon(build_icon(CLAPPERBOARD))
|
||||
item_name.setIcon(build_icon(VIDEO))
|
||||
item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(track))
|
||||
else:
|
||||
filename = os.path.split(unicode(track))[1]
|
||||
|
BIN
resources/images/media_audio.png
Normal file
BIN
resources/images/media_audio.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
resources/images/media_video.png
Normal file
BIN
resources/images/media_video.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
@ -130,7 +130,9 @@
|
||||
<qresource prefix="media">
|
||||
<file>media_time.png</file>
|
||||
<file>media_stop.png</file>
|
||||
<file>image_clapperboard.png</file>
|
||||
<file>media_audio.png</file>
|
||||
<file>media_video.png</file>
|
||||
<file>slidecontroller_multimedia.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="messagebox">
|
||||
<file>messagebox_critical.png</file>
|
||||
|
BIN
resources/images/slidecontroller_multimedia.png
Normal file
BIN
resources/images/slidecontroller_multimedia.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
Loading…
Reference in New Issue
Block a user