forked from openlp/openlp
more bits
This commit is contained in:
parent
422823eff5
commit
154ca14120
@ -404,6 +404,7 @@ def main(args=None):
|
|||||||
if not Settings().value('core/has run wizard'):
|
if not Settings().value('core/has run wizard'):
|
||||||
if not FirstTimeLanguageForm().exec():
|
if not FirstTimeLanguageForm().exec():
|
||||||
# if cancel then stop processing
|
# if cancel then stop processing
|
||||||
|
server.close_server()
|
||||||
sys.exit()
|
sys.exit()
|
||||||
# i18n Set Language
|
# i18n Set Language
|
||||||
language = LanguageManager.get_language()
|
language = LanguageManager.get_language()
|
||||||
|
@ -560,7 +560,7 @@ import qtawesome as qta
|
|||||||
|
|
||||||
class UiIcons(object):
|
class UiIcons(object):
|
||||||
"""
|
"""
|
||||||
Provide standard strings for objects to use.
|
Provide standard icons for objects to use.
|
||||||
"""
|
"""
|
||||||
__instance__ = None
|
__instance__ = None
|
||||||
|
|
||||||
@ -574,9 +574,16 @@ class UiIcons(object):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
"""
|
"""
|
||||||
These strings should need a good reason to be retranslated elsewhere.
|
These are the font icons used in the code.
|
||||||
Should some/more/less of these have an & attached?
|
|
||||||
"""
|
"""
|
||||||
|
self.clone = qta.icon('fa.clone')
|
||||||
self.database = qta.icon('fa.database')
|
self.database = qta.icon('fa.database')
|
||||||
|
self.delete = qta.icon('fa.trash')
|
||||||
|
self.edit = qta.icon('fa.edit')
|
||||||
|
self.download = qta.icon('fa.download')
|
||||||
|
self.music = qta.icon('fa.music')
|
||||||
|
self.new = qta.icon('fa.file')
|
||||||
|
self.print = qta.icon('fa.print')
|
||||||
self.save = qta.icon('fa.save')
|
self.save = qta.icon('fa.save')
|
||||||
#self.images = qta.icon('fa.images')
|
self.upload = qta.icon('fa.upload')
|
||||||
|
#self.video = qta.icon('fa.video')
|
||||||
|
@ -24,7 +24,7 @@ The UI widgets for the formatting tags window.
|
|||||||
"""
|
"""
|
||||||
from PyQt5 import QtCore, QtWidgets
|
from PyQt5 import QtCore, QtWidgets
|
||||||
|
|
||||||
from openlp.core.common.i18n import UiStrings, translate
|
from openlp.core.common.i18n import UiStrings, UiIcons, translate
|
||||||
from openlp.core.lib import build_icon
|
from openlp.core.lib import build_icon
|
||||||
from openlp.core.lib.ui import create_button_box
|
from openlp.core.lib.ui import create_button_box
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ class Ui_FormattingTagDialog(object):
|
|||||||
self.list_data_grid_layout.addWidget(self.tag_table_widget)
|
self.list_data_grid_layout.addWidget(self.tag_table_widget)
|
||||||
self.edit_button_layout = QtWidgets.QHBoxLayout()
|
self.edit_button_layout = QtWidgets.QHBoxLayout()
|
||||||
self.new_button = QtWidgets.QPushButton(formatting_tag_dialog)
|
self.new_button = QtWidgets.QPushButton(formatting_tag_dialog)
|
||||||
self.new_button.setIcon(build_icon(':/general/general_new.png'))
|
self.new_button.setIcon(build_icon(UiIcons().new))
|
||||||
self.new_button.setObjectName('new_button')
|
self.new_button.setObjectName('new_button')
|
||||||
self.edit_button_layout.addWidget(self.new_button)
|
self.edit_button_layout.addWidget(self.new_button)
|
||||||
self.delete_button = QtWidgets.QPushButton(formatting_tag_dialog)
|
self.delete_button = QtWidgets.QPushButton(formatting_tag_dialog)
|
||||||
|
@ -165,7 +165,7 @@ class Ui_MainWindow(object):
|
|||||||
# Create the menu items
|
# Create the menu items
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.add_category(UiStrings().File, CategoryOrder.standard_menu)
|
action_list.add_category(UiStrings().File, CategoryOrder.standard_menu)
|
||||||
self.file_new_item = create_action(main_window, 'fileNewItem', icon=':/general/general_new.png',
|
self.file_new_item = create_action(main_window, 'fileNewItem', icon=UiIcons().new,
|
||||||
can_shortcuts=True, category=UiStrings().File,
|
can_shortcuts=True, category=UiStrings().File,
|
||||||
triggers=self.service_manager_contents.on_new_service_clicked)
|
triggers=self.service_manager_contents.on_new_service_clicked)
|
||||||
self.file_open_item = create_action(main_window, 'fileOpenItem', icon=':/general/general_open.png',
|
self.file_open_item = create_action(main_window, 'fileOpenItem', icon=':/general/general_open.png',
|
||||||
|
@ -137,7 +137,7 @@ class Ui_ServiceManager(object):
|
|||||||
self.layout.setContentsMargins(0, 0, 0, 0)
|
self.layout.setContentsMargins(0, 0, 0, 0)
|
||||||
# Create the top toolbar
|
# Create the top toolbar
|
||||||
self.toolbar = OpenLPToolbar(self)
|
self.toolbar = OpenLPToolbar(self)
|
||||||
self.toolbar.add_toolbar_action('newService', text=UiStrings().NewService, icon=':/general/general_new.png',
|
self.toolbar.add_toolbar_action('newService', text=UiStrings().NewService, icon=UiIcons().new,
|
||||||
tooltip=UiStrings().CreateService, triggers=self.on_new_service_clicked)
|
tooltip=UiStrings().CreateService, triggers=self.on_new_service_clicked)
|
||||||
self.toolbar.add_toolbar_action('openService', text=UiStrings().OpenService,
|
self.toolbar.add_toolbar_action('openService', text=UiStrings().OpenService,
|
||||||
icon=':/general/general_open.png',
|
icon=':/general/general_open.png',
|
||||||
|
@ -30,7 +30,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
|||||||
|
|
||||||
from openlp.core.common import delete_file
|
from openlp.core.common import delete_file
|
||||||
from openlp.core.common.applocation import AppLocation
|
from openlp.core.common.applocation import AppLocation
|
||||||
from openlp.core.common.i18n import UiStrings, translate, get_locale_key
|
from openlp.core.common.i18n import UiStrings, UiIcons, translate, get_locale_key
|
||||||
from openlp.core.common.mixins import LogMixin, RegistryProperties
|
from openlp.core.common.mixins import LogMixin, RegistryProperties
|
||||||
from openlp.core.common.path import Path, copyfile, create_paths, path_to_str
|
from openlp.core.common.path import Path, copyfile, create_paths, path_to_str
|
||||||
from openlp.core.common.registry import Registry, RegistryBase
|
from openlp.core.common.registry import Registry, RegistryBase
|
||||||
@ -79,12 +79,12 @@ class Ui_ThemeManager(object):
|
|||||||
self.toolbar.addSeparator()
|
self.toolbar.addSeparator()
|
||||||
self.toolbar.add_toolbar_action('importTheme',
|
self.toolbar.add_toolbar_action('importTheme',
|
||||||
text=translate('OpenLP.ThemeManager', 'Import Theme'),
|
text=translate('OpenLP.ThemeManager', 'Import Theme'),
|
||||||
icon=':/general/general_import.png',
|
icon=build_icon(UiIcons().upload),
|
||||||
tooltip=translate('OpenLP.ThemeManager', 'Import a theme.'),
|
tooltip=translate('OpenLP.ThemeManager', 'Import a theme.'),
|
||||||
triggers=self.on_import_theme)
|
triggers=self.on_import_theme)
|
||||||
self.toolbar.add_toolbar_action('exportTheme',
|
self.toolbar.add_toolbar_action('exportTheme',
|
||||||
text=translate('OpenLP.ThemeManager', 'Export Theme'),
|
text=translate('OpenLP.ThemeManager', 'Export Theme'),
|
||||||
icon=':/general/general_export.png',
|
icon=build_icon(UiIcons().download),
|
||||||
tooltip=translate('OpenLP.ThemeManager', 'Export a theme.'),
|
tooltip=translate('OpenLP.ThemeManager', 'Export a theme.'),
|
||||||
triggers=self.on_export_theme)
|
triggers=self.on_export_theme)
|
||||||
self.layout.addWidget(self.toolbar)
|
self.layout.addWidget(self.toolbar)
|
||||||
|
@ -64,7 +64,7 @@ class Ui_AlertDialog(object):
|
|||||||
self.manage_button_layout = QtWidgets.QVBoxLayout()
|
self.manage_button_layout = QtWidgets.QVBoxLayout()
|
||||||
self.manage_button_layout.setObjectName('manage_button_layout')
|
self.manage_button_layout.setObjectName('manage_button_layout')
|
||||||
self.new_button = QtWidgets.QPushButton(alert_dialog)
|
self.new_button = QtWidgets.QPushButton(alert_dialog)
|
||||||
self.new_button.setIcon(build_icon(':/general/general_new.png'))
|
self.new_button.setIcon(build_icon(UiIcons().new))
|
||||||
self.new_button.setObjectName('new_button')
|
self.new_button.setObjectName('new_button')
|
||||||
self.manage_button_layout.addWidget(self.new_button)
|
self.manage_button_layout.addWidget(self.new_button)
|
||||||
self.save_button = QtWidgets.QPushButton(alert_dialog)
|
self.save_button = QtWidgets.QPushButton(alert_dialog)
|
||||||
|
@ -33,7 +33,7 @@ from PyQt5 import QtCore, QtWidgets
|
|||||||
|
|
||||||
from openlp.core.api.http import register_endpoint
|
from openlp.core.api.http import register_endpoint
|
||||||
from openlp.core.common.actions import ActionList
|
from openlp.core.common.actions import ActionList
|
||||||
from openlp.core.common.i18n import UiStrings, translate
|
from openlp.core.common.i18n import UiStrings, UiIcons, translate
|
||||||
from openlp.core.common.registry import Registry
|
from openlp.core.common.registry import Registry
|
||||||
from openlp.core.lib import Plugin, StringContent, build_icon
|
from openlp.core.lib import Plugin, StringContent, build_icon
|
||||||
from openlp.core.lib.db import Manager
|
from openlp.core.lib.db import Manager
|
||||||
@ -92,7 +92,7 @@ class SongsPlugin(Plugin):
|
|||||||
super(SongsPlugin, self).__init__('songs', __default_settings__, SongMediaItem, SongsTab)
|
super(SongsPlugin, self).__init__('songs', __default_settings__, SongMediaItem, SongsTab)
|
||||||
self.manager = Manager('songs', init_schema, upgrade_mod=upgrade)
|
self.manager = Manager('songs', init_schema, upgrade_mod=upgrade)
|
||||||
self.weight = -10
|
self.weight = -10
|
||||||
self.icon_path = ':/plugins/plugin_songs.png'
|
self.icon_path = UiIcons().music
|
||||||
self.icon = build_icon(self.icon_path)
|
self.icon = build_icon(self.icon_path)
|
||||||
self.songselect_form = None
|
self.songselect_form = None
|
||||||
register_endpoint(songs_endpoint)
|
register_endpoint(songs_endpoint)
|
||||||
|
Loading…
Reference in New Issue
Block a user