more bits

This commit is contained in:
Tim Bentley 2018-04-22 07:59:35 +01:00
parent e2c3d9d3f1
commit 44bb70122e
11 changed files with 18 additions and 23 deletions

View File

@ -242,7 +242,7 @@ class ServiceItem(RegistryProperties):
self.icon = UiIcons().presentation
elif self.name == 'images':
self.icon = UiIcons().picture
elif self.name == 'medias':
elif self.name == 'media':
self.icon = UiIcons().video
else:
self.icon = UiIcons().clone
@ -370,7 +370,6 @@ class ServiceItem(RegistryProperties):
'plugin': self.name,
'theme': self.theme,
'title': self.title,
'icon': self.icon,
'footer': self.raw_footer,
'type': self.service_item_type,
'audit': self.audit,

View File

@ -60,6 +60,7 @@ class UiIcons(object):
'arrow_left': 'fa.arrow-left',
'arrow_right': 'fa.arrow-right',
'arrow_up': 'fa.arrow-up',
'audio': 'fa.file-sound-o',
'address': 'fa.book',
'back': 'fa.step-backward',
'bible': 'fa.book',
@ -73,10 +74,11 @@ class UiIcons(object):
'default': 'fa.info-circle',
'desktop': 'fa.desktop',
'delete': 'fa.trash',
'download': 'fa.cloud-download',
'edit': 'fa.edit',
'email': 'fa.envelope',
'exit': 'fa.sign-out',
'download': 'fa.cloud-download',
'group': 'fa.object-group',
'info': 'fa.info',
'live': 'fa.desktop',
'manual': 'fa.graduation-cap',
@ -86,6 +88,7 @@ class UiIcons(object):
'new_group': 'fa.folder',
'notes': 'fa.sticky-note',
'open': 'fa.folder-open',
'optical': 'fa.file-video-o',
'pause': 'fa.pause',
'play': 'fa.play',
'plus': 'fa.plus',

View File

@ -183,7 +183,7 @@ class ImageMediaItem(MediaManagerItem):
create_widget_action(self.list_view, separator=True)
create_widget_action(
self.list_view,
text=UiStrings().AddGroup, icon=':/images/image_new_group.png', triggers=self.on_add_group_click)
text=UiStrings().AddGroup, icon=UiIcons().group, triggers=self.on_add_group_click)
create_widget_action(
self.list_view,
text=translate('ImagePlugin', 'Add new image(s)'),
@ -201,7 +201,7 @@ class ImageMediaItem(MediaManagerItem):
Add custom buttons to the start of the toolbar.
"""
self.add_group_action = self.toolbar.add_toolbar_action('add_group_action',
icon=':/images/image_new_group.png',
icon=UiIcons().group,
triggers=self.on_add_group_click)
def add_end_header_bar(self):
@ -283,7 +283,7 @@ class ImageMediaItem(MediaManagerItem):
"""
image_groups = self.manager.get_all_objects(ImageGroups, ImageGroups.parent_id == parent_group_id)
image_groups.sort(key=lambda group_object: get_natural_key(group_object.group_name))
folder_icon = build_icon(':/images/image_group.png')
folder_icon = UiIcons().group
for image_group in image_groups:
group = QtWidgets.QTreeWidgetItem()
group.setText(0, image_group.group_name)

View File

@ -32,7 +32,7 @@ from openlp.core.common.path import Path, path_to_str, create_paths
from openlp.core.common.registry import Registry
from openlp.core.common.settings import Settings
from openlp.core.lib import ItemCapabilities, MediaManagerItem, MediaType, ServiceItem, ServiceItemContext, \
build_icon, check_item_selected
check_item_selected
from openlp.core.lib.ui import create_widget_action, critical_error_message_box, create_horizontal_adjusting_combo_box
from openlp.core.ui import DisplayControllerType
from openlp.core.ui.icons import UiIcons
@ -68,9 +68,6 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties):
self.icon_path = 'images/image'
self.background = False
self.automatic = ''
self.optical_icon = build_icon(':/media/media_optical.png')
self.video_icon = build_icon(':/media/media_video.png')
self.audio_icon = build_icon(':/media/media_audio.png')
self.error_icon = UiIcons().delete
def setup_item(self):
@ -138,7 +135,7 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties):
optical_button_text = translate('MediaPlugin.MediaItem', 'Load CD/DVD')
optical_button_tooltip = translate('MediaPlugin.MediaItem',
'CD/DVD playback is only supported if VLC is installed and enabled.')
self.load_optical = self.toolbar.add_toolbar_action('load_optical', icon=self.optical_icon,
self.load_optical = self.toolbar.add_toolbar_action('load_optical', icon=UiIcons().optical,
text=optical_button_text,
tooltip=optical_button_tooltip,
triggers=self.on_load_optical)
@ -206,7 +203,7 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties):
def video_background_replaced(self):
"""
Triggered by main display on change of serviceitem.
Triggered by main display on change of service item.
"""
self.reset_action.setVisible(False)
self.reset_action_context.setVisible(False)
@ -370,7 +367,7 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties):
# Handle optical based item
(file_name, title, audio_track, subtitle_track, start, end, clip_name) = parse_optical_path(track)
item_name = QtWidgets.QListWidgetItem(clip_name)
item_name.setIcon(self.optical_icon)
item_name.setIcon(UiIcons().optical)
item_name.setData(QtCore.Qt.UserRole, track)
item_name.setToolTip('{name}@{start}-{end}'.format(name=file_name,
start=format_milliseconds(start),
@ -379,7 +376,7 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties):
# File doesn't exist, mark as error.
file_name = os.path.split(str(track))[1]
item_name = QtWidgets.QListWidgetItem(file_name)
item_name.setIcon(self.error_icon)
item_name.setIcon(UiIcons().error)
item_name.setData(QtCore.Qt.UserRole, track)
item_name.setToolTip(track)
elif track_info.isFile():
@ -388,9 +385,9 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties):
item_name = QtWidgets.QListWidgetItem(file_name)
search = file_name.split('.')[-1].lower()
if '*.{text}'.format(text=search) in self.media_controller.audio_extensions_list:
item_name.setIcon(self.audio_icon)
item_name.setIcon(UiIcons().audio)
else:
item_name.setIcon(self.video_icon)
item_name.setIcon(UiIcons().video)
item_name.setData(QtCore.Qt.UserRole, track)
item_name.setToolTip(track)
if item_name:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 762 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -10,9 +10,7 @@
<file>topic_maintenance.png</file>
</qresource>
<qresource prefix="images">
<file>image_group.png</file>
<file>image_new_group.png</file>
</qresource>
</qresource>
<qresource prefix="bibles">
<file>bibles_book_sort.png</file>
<file>bibles_search_combined.png</file>
@ -68,9 +66,6 @@
</qresource>
<qresource prefix="media">
<file>media_time.png</file>
<file>media_audio.png</file>
<file>media_video.png</file>
<file>media_optical.png</file>
<file>media_repeat.png</file>
<file>slidecontroller_multimedia.png</file>
<file>auto-start_active.png</file>

View File

@ -98,7 +98,8 @@ MODULES = [
'waitress',
'six',
'webob',
'requests'
'requests',
'qtawesome'
]