forked from openlp/openlp
HEAD
This commit is contained in:
commit
5c2b70ff07
@ -90,12 +90,13 @@ def upgrade_screens(number, x_position, y_position, height, width, can_override,
|
|||||||
number: {
|
number: {
|
||||||
'number': number,
|
'number': number,
|
||||||
geometry_key: {
|
geometry_key: {
|
||||||
'x': x_position,
|
'x': int(x_position),
|
||||||
'y': y_position,
|
'y': int(y_position),
|
||||||
'height': height,
|
'height': int(height),
|
||||||
'width': width
|
'width': int(width)
|
||||||
},
|
},
|
||||||
'is_display': is_display_screen
|
'is_display': is_display_screen,
|
||||||
|
'is_primary': can_override
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -309,7 +310,7 @@ class Settings(QtCore.QSettings):
|
|||||||
('songuasge/db hostname', 'songusage/db hostname', []),
|
('songuasge/db hostname', 'songusage/db hostname', []),
|
||||||
('songuasge/db database', 'songusage/db database', []),
|
('songuasge/db database', 'songusage/db database', []),
|
||||||
('presentations / Powerpoint Viewer', '', []),
|
('presentations / Powerpoint Viewer', '', []),
|
||||||
(['core/monitor', 'core/x position', 'core/y position', 'core/height', 'core/width', 'core/override',
|
(['core/monitor', 'core/x position', 'core/y position', 'core/height', 'core/width', 'core/override position',
|
||||||
'core/display on monitor'], 'core/screens', [(upgrade_screens, [1, 0, 0, None, None, False, False])]),
|
'core/display on monitor'], 'core/screens', [(upgrade_screens, [1, 0, 0, None, None, False, False])]),
|
||||||
('bibles/proxy name', '', []), # Just remove these bible proxy settings. They weren't used in 2.4!
|
('bibles/proxy name', '', []), # Just remove these bible proxy settings. They weren't used in 2.4!
|
||||||
('bibles/proxy address', '', []),
|
('bibles/proxy address', '', []),
|
||||||
|
@ -482,6 +482,7 @@ class ThemePreviewRenderer(LogMixin, DisplayWindow):
|
|||||||
|
|
||||||
:param theme_data: The theme to generated a preview for.
|
:param theme_data: The theme to generated a preview for.
|
||||||
:param force_page: Flag to tell message lines per page need to be generated.
|
:param force_page: Flag to tell message lines per page need to be generated.
|
||||||
|
:param generate_screenshot: Do I need to generate a screen shot?
|
||||||
:rtype: QtGui.QPixmap
|
:rtype: QtGui.QPixmap
|
||||||
"""
|
"""
|
||||||
# save value for use in format_slide
|
# save value for use in format_slide
|
||||||
|
@ -134,8 +134,13 @@ class Screen(object):
|
|||||||
self.number = int(screen_dict['number'])
|
self.number = int(screen_dict['number'])
|
||||||
self.is_display = screen_dict['is_display']
|
self.is_display = screen_dict['is_display']
|
||||||
self.is_primary = screen_dict['is_primary']
|
self.is_primary = screen_dict['is_primary']
|
||||||
|
try:
|
||||||
self.geometry = QtCore.QRect(screen_dict['geometry']['x'], screen_dict['geometry']['y'],
|
self.geometry = QtCore.QRect(screen_dict['geometry']['x'], screen_dict['geometry']['y'],
|
||||||
screen_dict['geometry']['width'], screen_dict['geometry']['height'])
|
screen_dict['geometry']['width'], screen_dict['geometry']['height'])
|
||||||
|
except KeyError:
|
||||||
|
# Preserve the current values as this has come from the settings update which does not have
|
||||||
|
# the geometry information
|
||||||
|
pass
|
||||||
if 'custom_geometry' in screen_dict:
|
if 'custom_geometry' in screen_dict:
|
||||||
self.custom_geometry = QtCore.QRect(screen_dict['custom_geometry']['x'],
|
self.custom_geometry = QtCore.QRect(screen_dict['custom_geometry']['x'],
|
||||||
screen_dict['custom_geometry']['y'],
|
screen_dict['custom_geometry']['y'],
|
||||||
|
@ -24,10 +24,11 @@ The :mod:`openlp.core.threading` module contains some common threading code
|
|||||||
"""
|
"""
|
||||||
from PyQt5 import QtCore
|
from PyQt5 import QtCore
|
||||||
|
|
||||||
|
from openlp.core.common.mixins import LogMixin
|
||||||
from openlp.core.common.registry import Registry
|
from openlp.core.common.registry import Registry
|
||||||
|
|
||||||
|
|
||||||
class ThreadWorker(QtCore.QObject):
|
class ThreadWorker(QtCore.QObject, LogMixin):
|
||||||
"""
|
"""
|
||||||
The :class:`~openlp.core.threading.ThreadWorker` class provides a base class for all worker objects
|
The :class:`~openlp.core.threading.ThreadWorker` class provides a base class for all worker objects
|
||||||
"""
|
"""
|
||||||
|
@ -635,7 +635,10 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow, LogMixin, RegistryPropert
|
|||||||
# if self.live_controller.display.isVisible():
|
# if self.live_controller.display.isVisible():
|
||||||
# self.live_controller.display.setFocus()
|
# self.live_controller.display.setFocus()
|
||||||
self.activateWindow()
|
self.activateWindow()
|
||||||
if self.application.args:
|
# We have -disable-web-security added by our code.
|
||||||
|
# If a file is passed in we will have that as well so count of 2
|
||||||
|
# If not we need to see if we want to use the previous file.so count of 1
|
||||||
|
if self.application.args and len(self.application.args) > 1:
|
||||||
self.open_cmd_line_files(self.application.args)
|
self.open_cmd_line_files(self.application.args)
|
||||||
elif Settings().value(self.general_settings_section + '/auto open'):
|
elif Settings().value(self.general_settings_section + '/auto open'):
|
||||||
self.service_manager_contents.load_last_file()
|
self.service_manager_contents.load_last_file()
|
||||||
|
@ -219,13 +219,13 @@ class PrintServiceForm(QtWidgets.QDialog, Ui_PrintServiceDialog, RegistryPropert
|
|||||||
verse_def = None
|
verse_def = None
|
||||||
verse_html = None
|
verse_html = None
|
||||||
for slide in item.get_frames():
|
for slide in item.get_frames():
|
||||||
if not verse_def or verse_def != slide['verseTag'] or verse_html == slide['printing_html']:
|
if not verse_def or verse_def != slide['verse'] or verse_html == slide['text']:
|
||||||
text_div = self._add_element('div', parent=div, class_id='itemText')
|
text_div = self._add_element('div', parent=div, class_id='itemText')
|
||||||
elif 'chordspacing' not in slide['printing_html']:
|
elif 'chordspacing' not in slide['text']:
|
||||||
self._add_element('br', parent=text_div)
|
self._add_element('br', parent=text_div)
|
||||||
self._add_element('span', slide['printing_html'], text_div)
|
self._add_element('span', slide['text'], text_div)
|
||||||
verse_def = slide['verseTag']
|
verse_def = slide['verse']
|
||||||
verse_html = slide['printing_html']
|
verse_html = slide['text']
|
||||||
# Break the page before the div element.
|
# Break the page before the div element.
|
||||||
if index != 0 and self.page_break_after_text.isChecked():
|
if index != 0 and self.page_break_after_text.isChecked():
|
||||||
div.set('class', 'item newPage')
|
div.set('class', 'item newPage')
|
||||||
|
@ -34,6 +34,7 @@ from tempfile import NamedTemporaryFile
|
|||||||
|
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
|
from openlp.core.state import State
|
||||||
from openlp.core.common import ThemeLevel, delete_file
|
from openlp.core.common import ThemeLevel, delete_file
|
||||||
from openlp.core.common.actions import ActionList, CategoryOrder
|
from openlp.core.common.actions import ActionList, CategoryOrder
|
||||||
from openlp.core.common.applocation import AppLocation
|
from openlp.core.common.applocation import AppLocation
|
||||||
@ -828,7 +829,7 @@ class ServiceManager(QtWidgets.QWidget, RegistryBase, Ui_ServiceManager, LogMixi
|
|||||||
self.auto_start_action.setIcon(UiIcons().inactive)
|
self.auto_start_action.setIcon(UiIcons().inactive)
|
||||||
self.auto_start_action.setText(translate('OpenLP.ServiceManager', '&Auto Start - inactive'))
|
self.auto_start_action.setText(translate('OpenLP.ServiceManager', '&Auto Start - inactive'))
|
||||||
if service_item['service_item'].is_text():
|
if service_item['service_item'].is_text():
|
||||||
for plugin in self.plugin_manager.plugins:
|
for plugin in State().list_plugins():
|
||||||
if plugin.name == 'custom' and plugin.status == PluginStatus.Active:
|
if plugin.name == 'custom' and plugin.status == PluginStatus.Active:
|
||||||
self.create_custom_action.setVisible(True)
|
self.create_custom_action.setVisible(True)
|
||||||
break
|
break
|
||||||
|
@ -30,6 +30,7 @@ from xml.etree.ElementTree import XML, ElementTree
|
|||||||
|
|
||||||
from PyQt5 import QtCore, QtWidgets
|
from PyQt5 import QtCore, QtWidgets
|
||||||
|
|
||||||
|
from openlp.core.state import State
|
||||||
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, get_locale_key, translate
|
from openlp.core.common.i18n import UiStrings, get_locale_key, translate
|
||||||
@ -293,7 +294,7 @@ class ThemeManager(QtWidgets.QWidget, RegistryBase, Ui_ThemeManager, LogMixin, R
|
|||||||
old_theme_data = self.get_theme_data(old_theme_name)
|
old_theme_data = self.get_theme_data(old_theme_name)
|
||||||
self.clone_theme_data(old_theme_data, new_theme_name)
|
self.clone_theme_data(old_theme_data, new_theme_name)
|
||||||
self.delete_theme(old_theme_name)
|
self.delete_theme(old_theme_name)
|
||||||
for plugin in self.plugin_manager.plugins:
|
for plugin in State().list_plugins():
|
||||||
if plugin.uses_theme(old_theme_name):
|
if plugin.uses_theme(old_theme_name):
|
||||||
plugin.rename_theme(old_theme_name, new_theme_name)
|
plugin.rename_theme(old_theme_name, new_theme_name)
|
||||||
self.renderer.set_theme(self.get_theme_data(new_theme_name))
|
self.renderer.set_theme(self.get_theme_data(new_theme_name))
|
||||||
@ -771,7 +772,7 @@ class ThemeManager(QtWidgets.QWidget, RegistryBase, Ui_ThemeManager, LogMixin, R
|
|||||||
# check for use in the system else where.
|
# check for use in the system else where.
|
||||||
if test_plugin:
|
if test_plugin:
|
||||||
plugin_usage = ""
|
plugin_usage = ""
|
||||||
for plugin in self.plugin_manager.plugins:
|
for plugin in State().list_plugins():
|
||||||
used_count = plugin.uses_theme(theme)
|
used_count = plugin.uses_theme(theme)
|
||||||
if used_count:
|
if used_count:
|
||||||
plugin_usage = "{plug}{text}".format(plug=plugin_usage,
|
plugin_usage = "{plug}{text}".format(plug=plugin_usage,
|
||||||
|
@ -349,7 +349,7 @@ class CustomMediaItem(MediaManagerItem):
|
|||||||
custom.credits = ''
|
custom.credits = ''
|
||||||
custom_xml = CustomXMLBuilder()
|
custom_xml = CustomXMLBuilder()
|
||||||
for (idx, slide) in enumerate(item.slides):
|
for (idx, slide) in enumerate(item.slides):
|
||||||
custom_xml.add_verse_to_lyrics('custom', str(idx + 1), slide['raw_slide'])
|
custom_xml.add_verse_to_lyrics('custom', str(idx + 1), slide['text'])
|
||||||
custom.text = str(custom_xml.extract_xml(), 'utf-8')
|
custom.text = str(custom_xml.extract_xml(), 'utf-8')
|
||||||
self.plugin.db_manager.save_object(custom)
|
self.plugin.db_manager.save_object(custom)
|
||||||
self.on_search_text_button_clicked()
|
self.on_search_text_button_clicked()
|
||||||
|
@ -29,6 +29,7 @@ from shutil import copyfile
|
|||||||
|
|
||||||
from PyQt5 import QtCore, QtWidgets
|
from PyQt5 import QtCore, QtWidgets
|
||||||
|
|
||||||
|
from openlp.core.state import State
|
||||||
from openlp.core.common.applocation import AppLocation
|
from openlp.core.common.applocation import AppLocation
|
||||||
from openlp.core.common.i18n import UiStrings, get_natural_key, translate
|
from openlp.core.common.i18n import UiStrings, get_natural_key, translate
|
||||||
from openlp.core.common.mixins import RegistryProperties
|
from openlp.core.common.mixins import RegistryProperties
|
||||||
@ -416,7 +417,7 @@ class EditSongForm(QtWidgets.QDialog, Ui_EditSongDialog, RegistryProperties):
|
|||||||
Load the media files into a combobox.
|
Load the media files into a combobox.
|
||||||
"""
|
"""
|
||||||
self.from_media_button.setVisible(False)
|
self.from_media_button.setVisible(False)
|
||||||
for plugin in self.plugin_manager.plugins:
|
for plugin in State().list_plugins():
|
||||||
if plugin.name == 'media' and plugin.status == PluginStatus.Active:
|
if plugin.name == 'media' and plugin.status == PluginStatus.Active:
|
||||||
self.from_media_button.setVisible(True)
|
self.from_media_button.setVisible(True)
|
||||||
self.media_form.populate_files(plugin.media_item.get_list(MediaType.Audio))
|
self.media_form.populate_files(plugin.media_item.get_list(MediaType.Audio))
|
||||||
|
Loading…
Reference in New Issue
Block a user