splitted ui.py into two files; changed imports

This commit is contained in:
Andreas Preikschat 2013-01-11 01:19:11 +01:00
parent 2616f63007
commit 91fbf037a2
54 changed files with 283 additions and 287 deletions

View File

@ -43,8 +43,7 @@ from traceback import format_exception
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import Receiver, Settings, check_directory_exists, ScreenList from openlp.core.lib import Receiver, Settings, check_directory_exists, ScreenList, UiStrings
from openlp.core.lib.ui import UiStrings
from openlp.core.resources import qInitResources from openlp.core.resources import qInitResources
from openlp.core.ui.mainwindow import MainWindow from openlp.core.ui.mainwindow import MainWindow
from openlp.core.ui.firsttimelanguageform import FirstTimeLanguageForm from openlp.core.ui.firsttimelanguageform import FirstTimeLanguageForm

View File

@ -382,6 +382,7 @@ def create_separated_list(stringlist):
u'Locale list separator: start') % (stringlist[0], merged) u'Locale list separator: start') % (stringlist[0], merged)
from uistrings import UiStrings
from eventreceiver import Receiver from eventreceiver import Receiver
from screen import ScreenList from screen import ScreenList
from settings import Settings from settings import Settings

View File

@ -36,9 +36,10 @@ import re
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import SettingsManager, OpenLPToolbar, ServiceItem, StringContent, build_icon, translate, \ from openlp.core.lib import SettingsManager, OpenLPToolbar, ServiceItem, StringContent, build_icon, translate, \
Receiver, ListWidgetWithDnD, ServiceItemContext, Settings Receiver, ListWidgetWithDnD, ServiceItemContext, Settings, UiStrings
from openlp.core.lib.searchedit import SearchEdit from openlp.core.lib.searchedit import SearchEdit
from openlp.core.lib.ui import UiStrings, create_widget_action, critical_error_message_box from openlp.core.lib.ui import create_widget_action, critical_error_message_box
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -336,8 +337,7 @@ class MediaManagerItem(QtGui.QWidget):
def loadFile(self, files): def loadFile(self, files):
""" """
Turn file from Drag and Drop into an array so the Validate code Turn file from Drag and Drop into an array so the Validate code can run it.
can run it.
``files`` ``files``
The list of files to be loaded The list of files to be loaded

View File

@ -33,8 +33,7 @@ import logging
from PyQt4 import QtCore from PyQt4 import QtCore
from openlp.core.lib import Receiver, Settings from openlp.core.lib import Receiver, Settings, UiStrings
from openlp.core.lib.ui import UiStrings
from openlp.core.utils import get_application_version from openlp.core.utils import get_application_version
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View File

@ -38,7 +38,7 @@ from PyQt4 import QtCore, QtGui
from openlp.core.lib import SlideLimits, ScreenList from openlp.core.lib import SlideLimits, ScreenList
from openlp.core.lib.theme import ThemeLevel from openlp.core.lib.theme import ThemeLevel
from openlp.core.lib.ui import UiStrings from openlp.core.lib import UiStrings
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -55,16 +55,16 @@ class Settings(QtCore.QSettings):
__filePath__ = u'' __filePath__ = u''
# Fix for bug #1014422. # Fix for bug #1014422.
x11_bypass_default = True X11_BYPASS_DEFAULT = True
if sys.platform.startswith(u'linux'): if sys.platform.startswith(u'linux'):
# Default to False on Gnome. # Default to False on Gnome.
x11_bypass_default = bool(not os.environ.get(u'GNOME_DESKTOP_SESSION_ID')) X11_BYPASS_DEFAULT = bool(not os.environ.get(u'GNOME_DESKTOP_SESSION_ID'))
# Default to False on XFce # Default to False on Xfce.
if os.environ.get(u'DESKTOP_SESSION') == u'xfce': if os.environ.get(u'DESKTOP_SESSION') == u'xfce':
x11_bypass_default = False X11_BYPASS_DEFAULT = False
__default_settings__ = { __default_settings__ = {
u'advanced/x11 bypass wm': x11_bypass_default, u'advanced/x11 bypass wm': X11_BYPASS_DEFAULT,
u'advanced/default service enabled': True, u'advanced/default service enabled': True,
u'advanced/enable exit confirmation': True, u'advanced/enable exit confirmation': True,
u'advanced/save current plugin': False, u'advanced/save current plugin': False,
@ -118,6 +118,8 @@ class Settings(QtCore.QSettings):
u'general/audio start paused': True, u'general/audio start paused': True,
u'general/last version test': datetime.datetime.now().date(), u'general/last version test': datetime.datetime.now().date(),
u'general/blank warning': False, u'general/blank warning': False,
u'players/background color': u'#000000',
u'servicemanager/service theme': u'',
u'shortcuts/viewPreviewPanel': [QtGui.QKeySequence(u'F11')], u'shortcuts/viewPreviewPanel': [QtGui.QKeySequence(u'F11')],
u'shortcuts/settingsImportItem': [], u'shortcuts/settingsImportItem': [],
u'shortcuts/settingsPluginListItem': [QtGui.QKeySequence(u'Alt+F7')], u'shortcuts/settingsPluginListItem': [QtGui.QKeySequence(u'Alt+F7')],
@ -196,9 +198,6 @@ class Settings(QtCore.QSettings):
u'user interface/live splitter geometry': QtCore.QByteArray(), u'user interface/live splitter geometry': QtCore.QByteArray(),
u'user interface/main window state': QtCore.QByteArray(), u'user interface/main window state': QtCore.QByteArray(),
u'servicemanager/service theme': u'',
u'players/background color': u'#000000',
# HAS TO BE HERE. Should be FIXED. # HAS TO BE HERE. Should be FIXED.
u'media/players': u'webkit', u'media/players': u'webkit',
u'media/override player': QtCore.Qt.Unchecked u'media/override player': QtCore.Qt.Unchecked
@ -221,59 +220,40 @@ class Settings(QtCore.QSettings):
Settings.__filePath__ = iniFile Settings.__filePath__ = iniFile
def __init__(self, *args): def __init__(self, *args):
if not args and Settings.__filePath__ and \ if not args and Settings.__filePath__ and Settings.defaultFormat() == Settings.IniFormat:
Settings.defaultFormat() == Settings.IniFormat:
QtCore.QSettings.__init__(self, Settings.__filePath__, Settings.IniFormat) QtCore.QSettings.__init__(self, Settings.__filePath__, Settings.IniFormat)
else: else:
QtCore.QSettings.__init__(self, *args) QtCore.QSettings.__init__(self, *args)
def value(self, key, defaultValue=0): def value(self, key):
""" """
Returns the value for the given ``key``. The returned ``value`` is Returns the value for the given ``key``. The returned ``value`` is of the same type as the default value in the
of the same type as the ``defaultValue``. *Settings.__default_settings__* dict.
**Note**, this method only converts a few types and might need to be extended if a certain type is missing!
``key`` ``key``
The key to return the value from. The key to return the value from.
``defaultValue``
The value to be returned if the given ``key`` is not present in the
config. Note, the ``defaultValue``'s type defines the type the
returned is converted to. In other words, if the ``defaultValue`` is
a boolean, then the returned value will be converted to a boolean.
**Note**, this method only converts a few types and might need to be
extended if a certain type is missing!
""" """
if defaultValue:
raise Exception(u'Should not happen')
if u'/' not in key: if u'/' not in key:
key = u'/'.join((self.group(), key)) key = u'/'.join((self.group(), key))
# Check for none as u'' is passed as default and is valid! This is try:
# needed because the settings export does not know the default values, defaultValue = Settings.__default_settings__[key]
# thus just passes None. except KeyError:
defaultValue = Settings.__default_settings__[key] print u'KeyError: %s' % key
# try: return None
# defaultValue = Settings.__default_settings__[key]
# except KeyError:
# return None
#if defaultValue is None and not super(Settings, self).contains(key):
#return None
setting = super(Settings, self).value(key, defaultValue) setting = super(Settings, self).value(key, defaultValue)
# On OS X (and probably on other platforms too) empty value from QSettings # On OS X (and probably on other platforms too) empty value from QSettings is represented as type
# is represented as type PyQt4.QtCore.QPyNullVariant. This type has to be # PyQt4.QtCore.QPyNullVariant. This type has to be converted to proper 'None' Python type.
# converted to proper 'None' Python type.
if isinstance(setting, QtCore.QPyNullVariant) and setting.isNull(): if isinstance(setting, QtCore.QPyNullVariant) and setting.isNull():
setting = None setting = None
# Handle 'None' type (empty value) properly. # Handle 'None' type (empty value) properly.
if setting is None: if setting is None:
# An empty string saved to the settings results in a None type being # An empty string saved to the settings results in a None type being returned.
# returned. Convert it to empty unicode string. # Convert it to empty unicode string.
if isinstance(defaultValue, unicode): if isinstance(defaultValue, unicode):
return u'' return u''
# An empty list saved to the settings results in a None type being # An empty list saved to the settings results in a None type being returned.
# returned.
else: else:
return [] return []
# Convert the setting to the correct type. # Convert the setting to the correct type.
@ -286,6 +266,3 @@ class Settings(QtCore.QSettings):
return int(setting) return int(setting)
return setting return setting

View File

@ -27,9 +27,8 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Temple Place, Suite 330, Boston, MA 02111-1307 USA #
############################################################################### ###############################################################################
""" """
Provide handling for persisting OpenLP settings. OpenLP uses QSettings to Provide handling for persisting OpenLP settings. OpenLP uses QSettings to manage settings persistence. QSettings
manage settings persistence. QSettings provides a single API for saving and provides a single API for saving and retrieving settings from the application but writes to disk in an OS dependant
retrieving settings from the application but writes to disk in an OS dependant
format. format.
""" """
import os import os
@ -39,10 +38,10 @@ from PyQt4 import QtCore
from openlp.core.lib import Settings from openlp.core.lib import Settings
from openlp.core.utils import AppLocation from openlp.core.utils import AppLocation
class SettingsManager(object): class SettingsManager(object):
""" """
Class to provide helper functions for the loading and saving of application Class to provide helper functions for the loading and saving of application settings.
settings.
""" """
@staticmethod @staticmethod
@ -51,8 +50,7 @@ class SettingsManager(object):
Read the last directory used for plugin. Read the last directory used for plugin.
``section`` ``section``
The section of code calling the method. This is used in the The section of code calling the method. This is used in the settings key.
settings key.
``num`` ``num``
Defaults to *None*. A further qualifier. Defaults to *None*. A further qualifier.
@ -69,8 +67,7 @@ class SettingsManager(object):
Save the last directory used for plugin. Save the last directory used for plugin.
``section`` ``section``
The section of code calling the method. This is used in the The section of code calling the method. This is used in the settings key.
settings key.
``directory`` ``directory``
The directory being stored in the settings. The directory being stored in the settings.
@ -140,8 +137,7 @@ class SettingsManager(object):
Get a list of files from the data files path. Get a list of files from the data files path.
``section`` ``section``
Defaults to *None*. The section of code getting the files - used Defaults to *None*. The section of code getting the files - used to load from a section's data subdirectory.
to load from a section's data subdirectory.
``extension`` ``extension``
Defaults to *None*. The extension to search for. Defaults to *None*. The extension to search for.
@ -154,8 +150,7 @@ class SettingsManager(object):
except OSError: except OSError:
return [] return []
if extension: if extension:
return [filename for filename in files return [filename for filename in files if extension == os.path.splitext(filename)[1]]
if extension == os.path.splitext(filename)[1]]
else: else:
# no filtering required # no filtering required
return files return files

View File

@ -33,118 +33,11 @@ import logging
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import build_icon, translate, Receiver from openlp.core.lib import build_icon, translate, Receiver, UiStrings
from openlp.core.utils.actions import ActionList
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
class UiStrings(object):
"""
Provide standard strings for objects to use.
"""
__instance__ = None
def __new__(cls):
"""
Override the default object creation method to return a single instance.
"""
if not cls.__instance__:
cls.__instance__ = object.__new__(cls)
return cls.__instance__
def __init__(self):
"""
These strings should need a good reason to be retranslated elsewhere.
Should some/more/less of these have an & attached?
"""
self.About = translate('OpenLP.Ui', 'About')
self.Add = translate('OpenLP.Ui', '&Add')
self.Advanced = translate('OpenLP.Ui', 'Advanced')
self.AllFiles = translate('OpenLP.Ui', 'All Files')
self.Automatic = translate('OpenLP.Ui', 'Automatic')
self.BackgroundColor = translate('OpenLP.Ui', 'Background Color')
self.Bottom = translate('OpenLP.Ui', 'Bottom')
self.Browse = translate('OpenLP.Ui', 'Browse...')
self.Cancel = translate('OpenLP.Ui', 'Cancel')
self.CCLINumberLabel = translate('OpenLP.Ui', 'CCLI number:')
self.CreateService = translate('OpenLP.Ui', 'Create a new service.')
self.ConfirmDelete = translate('OpenLP.Ui', 'Confirm Delete')
self.Continuous = translate('OpenLP.Ui', 'Continuous')
self.Default = translate('OpenLP.Ui', 'Default')
self.DefaultColor = translate('OpenLP.Ui', 'Default Color:')
self.DefaultServiceName = translate('OpenLP.AdvancedTab', 'Service %Y-%m-%d %H-%M',
'This may not contain any of the following characters: /\\?*|<>\[\]":+\n'
'See http://docs.python.org/library/datetime.html#strftime-strptime-behavior for more information.')
self.Delete = translate('OpenLP.Ui', '&Delete')
self.DisplayStyle = translate('OpenLP.Ui', 'Display style:')
self.Duplicate = translate('OpenLP.Ui', 'Duplicate Error')
self.Edit = translate('OpenLP.Ui', '&Edit')
self.EmptyField = translate('OpenLP.Ui', 'Empty Field')
self.Error = translate('OpenLP.Ui', 'Error')
self.Export = translate('OpenLP.Ui', 'Export')
self.File = translate('OpenLP.Ui', 'File')
self.FontSizePtUnit = translate('OpenLP.Ui', 'pt', 'Abbreviated font pointsize unit')
self.Help = translate('OpenLP.Ui', 'Help')
self.Hours = translate('OpenLP.Ui', 'h', 'The abbreviated unit for hours')
self.IFdSs = translate('OpenLP.Ui', 'Invalid Folder Selected', 'Singular')
self.IFSs = translate('OpenLP.Ui', 'Invalid File Selected', 'Singular')
self.IFSp = translate('OpenLP.Ui', 'Invalid Files Selected', 'Plural')
self.Image = translate('OpenLP.Ui', 'Image')
self.Import = translate('OpenLP.Ui', 'Import')
self.LayoutStyle = translate('OpenLP.Ui', 'Layout style:')
self.Live = translate('OpenLP.Ui', 'Live')
self.LiveBGError = translate('OpenLP.Ui', 'Live Background Error')
self.LiveToolbar = translate('OpenLP.Ui', 'Live Toolbar')
self.Load = translate('OpenLP.Ui', 'Load')
self.Minutes = translate('OpenLP.Ui', 'm', 'The abbreviated unit for minutes')
self.Middle = translate('OpenLP.Ui', 'Middle')
self.New = translate('OpenLP.Ui', 'New')
self.NewService = translate('OpenLP.Ui', 'New Service')
self.NewTheme = translate('OpenLP.Ui', 'New Theme')
self.NextTrack = translate('OpenLP.Ui', 'Next Track')
self.NFdSs = translate('OpenLP.Ui', 'No Folder Selected', 'Singular')
self.NFSs = translate('OpenLP.Ui', 'No File Selected', 'Singular')
self.NFSp = translate('OpenLP.Ui', 'No Files Selected', 'Plural')
self.NISs = translate('OpenLP.Ui', 'No Item Selected', 'Singular')
self.NISp = translate('OpenLP.Ui', 'No Items Selected', 'Plural')
self.OLPV1 = translate('OpenLP.Ui', 'openlp.org 1.x')
self.OLPV2 = translate('OpenLP.Ui', 'OpenLP 2')
self.OLPV2x = translate('OpenLP.Ui', 'OpenLP 2.1')
self.OpenLPStart = translate('OpenLP.Ui', 'OpenLP is already running. Do you wish to continue?')
self.OpenService = translate('OpenLP.Ui', 'Open service.')
self.PlaySlidesInLoop = translate('OpenLP.Ui','Play Slides in Loop')
self.PlaySlidesToEnd = translate('OpenLP.Ui','Play Slides to End')
self.Preview = translate('OpenLP.Ui', 'Preview')
self.PrintService = translate('OpenLP.Ui', 'Print Service')
self.ReplaceBG = translate('OpenLP.Ui', 'Replace Background')
self.ReplaceLiveBG = translate('OpenLP.Ui', 'Replace live background.')
self.ResetBG = translate('OpenLP.Ui', 'Reset Background')
self.ResetLiveBG = translate('OpenLP.Ui', 'Reset live background.')
self.Seconds = translate('OpenLP.Ui', 's', 'The abbreviated unit for seconds')
self.SaveAndPreview = translate('OpenLP.Ui', 'Save && Preview')
self.Search = translate('OpenLP.Ui', 'Search')
self.SearchThemes = translate('OpenLP.Ui', 'Search Themes...', 'Search bar place holder text ')
self.SelectDelete = translate('OpenLP.Ui', 'You must select an item to delete.')
self.SelectEdit = translate('OpenLP.Ui', 'You must select an item to edit.')
self.Settings = translate('OpenLP.Ui', 'Settings')
self.SaveService = translate('OpenLP.Ui', 'Save Service')
self.Service = translate('OpenLP.Ui', 'Service')
self.Split = translate('OpenLP.Ui', 'Optional &Split')
self.SplitToolTip = translate('OpenLP.Ui',
'Split a slide into two only if it does not fit on the screen as one slide.')
self.StartTimeCode = translate('OpenLP.Ui', 'Start %s')
self.StopPlaySlidesInLoop = translate('OpenLP.Ui', 'Stop Play Slides in Loop')
self.StopPlaySlidesToEnd = translate('OpenLP.Ui', 'Stop Play Slides to End')
self.Theme = translate('OpenLP.Ui', 'Theme', 'Singular')
self.Themes = translate('OpenLP.Ui', 'Themes', 'Plural')
self.Tools = translate('OpenLP.Ui', 'Tools')
self.Top = translate('OpenLP.Ui', 'Top')
self.UnsupportedFile = translate('OpenLP.Ui', 'Unsupported File')
self.VersePerSlide = translate('OpenLP.Ui', 'Verse Per Slide')
self.VersePerLine = translate('OpenLP.Ui', 'Verse Per Line')
self.Version = translate('OpenLP.Ui', 'Version')
self.View = translate('OpenLP.Ui', 'View')
self.ViewMode = translate('OpenLP.Ui', 'View Mode')
def add_welcome_page(parent, image): def add_welcome_page(parent, image):
""" """
@ -288,7 +181,6 @@ def create_button(parent, name, **kwargs):
``enabled`` ``enabled``
False in case the button should be disabled. False in case the button should be disabled.
""" """
from openlp.core.utils.actions import ActionList
if u'role' in kwargs: if u'role' in kwargs:
role = kwargs.pop(u'role') role = kwargs.pop(u'role')
if role == u'delete': if role == u'delete':
@ -374,7 +266,6 @@ def create_action(parent, name, **kwargs):
``triggers`` ``triggers``
A slot which is connected to the actions ``triggered()`` slot. A slot which is connected to the actions ``triggered()`` slot.
""" """
from openlp.core.utils.actions import ActionList
action = QtGui.QAction(parent) action = QtGui.QAction(parent)
action.setObjectName(name) action.setObjectName(name)
if kwargs.get(u'text'): if kwargs.get(u'text'):

View File

@ -0,0 +1,145 @@
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2013 Raoul Snyman #
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
# Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Dave Warnock, #
# Frode Woldsund, Martin Zibricky, Patrick Zimmermann #
# --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it #
# under the terms of the GNU General Public License as published by the Free #
# Software Foundation; version 2 of the License. #
# #
# This program is distributed in the hope that it will be useful, but WITHOUT #
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
# more details. #
# #
# You should have received a copy of the GNU General Public License along #
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
"""
The :mod:`ui` module provides standard UI components for OpenLP.
"""
import logging
from openlp.core.lib import translate
log = logging.getLogger(__name__)
class UiStrings(object):
"""
Provide standard strings for objects to use.
"""
__instance__ = None
def __new__(cls):
"""
Override the default object creation method to return a single instance.
"""
if not cls.__instance__:
cls.__instance__ = object.__new__(cls)
return cls.__instance__
def __init__(self):
"""
These strings should need a good reason to be retranslated elsewhere.
Should some/more/less of these have an &amp; attached?
"""
self.About = translate('OpenLP.Ui', 'About')
self.Add = translate('OpenLP.Ui', '&Add')
self.Advanced = translate('OpenLP.Ui', 'Advanced')
self.AllFiles = translate('OpenLP.Ui', 'All Files')
self.Automatic = translate('OpenLP.Ui', 'Automatic')
self.BackgroundColor = translate('OpenLP.Ui', 'Background Color')
self.Bottom = translate('OpenLP.Ui', 'Bottom')
self.Browse = translate('OpenLP.Ui', 'Browse...')
self.Cancel = translate('OpenLP.Ui', 'Cancel')
self.CCLINumberLabel = translate('OpenLP.Ui', 'CCLI number:')
self.CreateService = translate('OpenLP.Ui', 'Create a new service.')
self.ConfirmDelete = translate('OpenLP.Ui', 'Confirm Delete')
self.Continuous = translate('OpenLP.Ui', 'Continuous')
self.Default = translate('OpenLP.Ui', 'Default')
self.DefaultColor = translate('OpenLP.Ui', 'Default Color:')
self.DefaultServiceName = translate('OpenLP.AdvancedTab', 'Service %Y-%m-%d %H-%M',
'This may not contain any of the following characters: /\\?*|<>\[\]":+\n'
'See http://docs.python.org/library/datetime.html#strftime-strptime-behavior for more information.')
self.Delete = translate('OpenLP.Ui', '&Delete')
self.DisplayStyle = translate('OpenLP.Ui', 'Display style:')
self.Duplicate = translate('OpenLP.Ui', 'Duplicate Error')
self.Edit = translate('OpenLP.Ui', '&Edit')
self.EmptyField = translate('OpenLP.Ui', 'Empty Field')
self.Error = translate('OpenLP.Ui', 'Error')
self.Export = translate('OpenLP.Ui', 'Export')
self.File = translate('OpenLP.Ui', 'File')
self.FontSizePtUnit = translate('OpenLP.Ui', 'pt', 'Abbreviated font pointsize unit')
self.Help = translate('OpenLP.Ui', 'Help')
self.Hours = translate('OpenLP.Ui', 'h', 'The abbreviated unit for hours')
self.IFdSs = translate('OpenLP.Ui', 'Invalid Folder Selected', 'Singular')
self.IFSs = translate('OpenLP.Ui', 'Invalid File Selected', 'Singular')
self.IFSp = translate('OpenLP.Ui', 'Invalid Files Selected', 'Plural')
self.Image = translate('OpenLP.Ui', 'Image')
self.Import = translate('OpenLP.Ui', 'Import')
self.LayoutStyle = translate('OpenLP.Ui', 'Layout style:')
self.Live = translate('OpenLP.Ui', 'Live')
self.LiveBGError = translate('OpenLP.Ui', 'Live Background Error')
self.LiveToolbar = translate('OpenLP.Ui', 'Live Toolbar')
self.Load = translate('OpenLP.Ui', 'Load')
self.Minutes = translate('OpenLP.Ui', 'm', 'The abbreviated unit for minutes')
self.Middle = translate('OpenLP.Ui', 'Middle')
self.New = translate('OpenLP.Ui', 'New')
self.NewService = translate('OpenLP.Ui', 'New Service')
self.NewTheme = translate('OpenLP.Ui', 'New Theme')
self.NextTrack = translate('OpenLP.Ui', 'Next Track')
self.NFdSs = translate('OpenLP.Ui', 'No Folder Selected', 'Singular')
self.NFSs = translate('OpenLP.Ui', 'No File Selected', 'Singular')
self.NFSp = translate('OpenLP.Ui', 'No Files Selected', 'Plural')
self.NISs = translate('OpenLP.Ui', 'No Item Selected', 'Singular')
self.NISp = translate('OpenLP.Ui', 'No Items Selected', 'Plural')
self.OLPV1 = translate('OpenLP.Ui', 'openlp.org 1.x')
self.OLPV2 = translate('OpenLP.Ui', 'OpenLP 2')
self.OLPV2x = translate('OpenLP.Ui', 'OpenLP 2.1')
self.OpenLPStart = translate('OpenLP.Ui', 'OpenLP is already running. Do you wish to continue?')
self.OpenService = translate('OpenLP.Ui', 'Open service.')
self.PlaySlidesInLoop = translate('OpenLP.Ui','Play Slides in Loop')
self.PlaySlidesToEnd = translate('OpenLP.Ui','Play Slides to End')
self.Preview = translate('OpenLP.Ui', 'Preview')
self.PrintService = translate('OpenLP.Ui', 'Print Service')
self.ReplaceBG = translate('OpenLP.Ui', 'Replace Background')
self.ReplaceLiveBG = translate('OpenLP.Ui', 'Replace live background.')
self.ResetBG = translate('OpenLP.Ui', 'Reset Background')
self.ResetLiveBG = translate('OpenLP.Ui', 'Reset live background.')
self.Seconds = translate('OpenLP.Ui', 's', 'The abbreviated unit for seconds')
self.SaveAndPreview = translate('OpenLP.Ui', 'Save && Preview')
self.Search = translate('OpenLP.Ui', 'Search')
self.SearchThemes = translate('OpenLP.Ui', 'Search Themes...', 'Search bar place holder text ')
self.SelectDelete = translate('OpenLP.Ui', 'You must select an item to delete.')
self.SelectEdit = translate('OpenLP.Ui', 'You must select an item to edit.')
self.Settings = translate('OpenLP.Ui', 'Settings')
self.SaveService = translate('OpenLP.Ui', 'Save Service')
self.Service = translate('OpenLP.Ui', 'Service')
self.Split = translate('OpenLP.Ui', 'Optional &Split')
self.SplitToolTip = translate('OpenLP.Ui',
'Split a slide into two only if it does not fit on the screen as one slide.')
self.StartTimeCode = translate('OpenLP.Ui', 'Start %s')
self.StopPlaySlidesInLoop = translate('OpenLP.Ui', 'Stop Play Slides in Loop')
self.StopPlaySlidesToEnd = translate('OpenLP.Ui', 'Stop Play Slides to End')
self.Theme = translate('OpenLP.Ui', 'Theme', 'Singular')
self.Themes = translate('OpenLP.Ui', 'Themes', 'Plural')
self.Tools = translate('OpenLP.Ui', 'Tools')
self.Top = translate('OpenLP.Ui', 'Top')
self.UnsupportedFile = translate('OpenLP.Ui', 'Unsupported File')
self.VersePerSlide = translate('OpenLP.Ui', 'Verse Per Slide')
self.VersePerLine = translate('OpenLP.Ui', 'Verse Per Line')
self.Version = translate('OpenLP.Ui', 'Version')
self.View = translate('OpenLP.Ui', 'View')
self.ViewMode = translate('OpenLP.Ui', 'View Mode')

View File

@ -36,20 +36,17 @@ from openlp.core.lib import translate
class HideMode(object): class HideMode(object):
""" """
This is an enumeration class which specifies the different modes of hiding This is an enumeration class which specifies the different modes of hiding the display.
the display.
``Blank`` ``Blank``
This mode is used to hide all output, specifically by covering the This mode is used to hide all output, specifically by covering the display with a black screen.
display with a black screen.
``Theme`` ``Theme``
This mode is used to hide all output, but covers the display with the This mode is used to hide all output, but covers the display with the current theme background, as opposed to
current theme background, as opposed to black. black.
``Desktop`` ``Desktop``
This mode hides all output by minimising the display, leaving the user's This mode hides all output by minimising the display, leaving the user's desktop showing.
desktop showing.
""" """
Blank = 1 Blank = 1
Theme = 2 Theme = 2
@ -58,8 +55,7 @@ class HideMode(object):
class AlertLocation(object): class AlertLocation(object):
""" """
This is an enumeration class which controls where Alerts are placed on the This is an enumeration class which controls where Alerts are placed on the screen.
screen.
``Top`` ``Top``
Place the text at the top of the screen. Place the text at the top of the screen.
@ -77,8 +73,7 @@ class AlertLocation(object):
class DisplayControllerType(object): class DisplayControllerType(object):
""" """
This is an enumeration class which says where a display controller This is an enumeration class which says where a display controller originated from.
originated from.
""" """
Live = 0 Live = 0
Preview = 1 Preview = 1
@ -91,7 +86,6 @@ from themelayoutform import ThemeLayoutForm
from themeform import ThemeForm from themeform import ThemeForm
from filerenameform import FileRenameForm from filerenameform import FileRenameForm
from starttimeform import StartTimeForm from starttimeform import StartTimeForm
#from screen import ScreenList
from maindisplay import MainDisplay, Display from maindisplay import MainDisplay, Display
from servicenoteform import ServiceNoteForm from servicenoteform import ServiceNoteForm
from serviceitemeditform import ServiceItemEditForm from serviceitemeditform import ServiceItemEditForm

View File

@ -29,8 +29,9 @@
from PyQt4 import QtGui from PyQt4 import QtGui
from openlp.core.lib import build_icon, translate from openlp.core.lib import build_icon, translate, UiStrings
from openlp.core.lib.ui import UiStrings, create_button, create_button_box from openlp.core.lib.ui import create_button, create_button_box
class Ui_AboutDialog(object): class Ui_AboutDialog(object):
def setupUi(self, aboutDialog): def setupUi(self, aboutDialog):

View File

@ -36,8 +36,7 @@ import sys
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import SettingsTab, translate, build_icon, Receiver, Settings from openlp.core.lib import SettingsTab, translate, build_icon, Receiver, Settings, UiStrings
from openlp.core.lib.ui import UiStrings
from openlp.core.utils import get_images_filter, AppLocation, format_time from openlp.core.utils import get_images_filter, AppLocation, format_time
from openlp.core.lib import SlideLimits from openlp.core.lib import SlideLimits

View File

@ -85,8 +85,7 @@ except AttributeError:
WEBKIT_VERSION = u'-' WEBKIT_VERSION = u'-'
from openlp.core.lib import translate, SettingsManager from openlp.core.lib import translate, SettingsManager, UiStrings
from openlp.core.lib.ui import UiStrings
from openlp.core.utils import get_application_version from openlp.core.utils import get_application_version
from exceptiondialog import Ui_ExceptionDialog from exceptiondialog import Ui_ExceptionDialog

View File

@ -29,8 +29,9 @@
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate from openlp.core.lib import translate, UiStrings
from openlp.core.lib.ui import UiStrings, create_button_box from openlp.core.lib.ui import create_button_box
class Ui_FormattingTagDialog(object): class Ui_FormattingTagDialog(object):

View File

@ -30,8 +30,7 @@ import logging
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import Receiver, Settings, SettingsTab, translate, ScreenList from openlp.core.lib import Receiver, Settings, SettingsTab, translate, ScreenList, UiStrings
from openlp.core.lib.ui import UiStrings
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View File

@ -40,8 +40,8 @@ from datetime import datetime
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import Renderer, build_icon, OpenLPDockWidget, PluginManager, Receiver, translate, ImageManager, \ from openlp.core.lib import Renderer, build_icon, OpenLPDockWidget, PluginManager, Receiver, translate, ImageManager, \
PluginStatus, ScreenList PluginStatus, ScreenList, UiStrings
from openlp.core.lib.ui import UiStrings, create_action from openlp.core.lib.ui import create_action
from openlp.core.lib import SlideLimits, Settings from openlp.core.lib import SlideLimits, Settings
from openlp.core.ui import AboutForm, SettingsForm, ServiceManager, ThemeManager, SlideController, PluginForm, \ from openlp.core.ui import AboutForm, SettingsForm, ServiceManager, ThemeManager, SlideController, PluginForm, \
MediaDockManager, ShortcutListForm, FormattingTagForm MediaDockManager, ShortcutListForm, FormattingTagForm

View File

@ -32,8 +32,8 @@ import os
import sys import sys
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import OpenLPToolbar, Receiver, translate, Settings from openlp.core.lib import OpenLPToolbar, Receiver, translate, Settings, UiStrings
from openlp.core.lib.ui import UiStrings, critical_error_message_box from openlp.core.lib.ui import critical_error_message_box
from openlp.core.ui.media import MediaState, MediaInfo, MediaType, \ from openlp.core.ui.media import MediaState, MediaInfo, MediaType, \
get_media_players, set_media_players get_media_players, set_media_players
from openlp.core.ui.media.mediaplayer import MediaPlayer from openlp.core.ui.media.mediaplayer import MediaPlayer

View File

@ -29,8 +29,8 @@
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import SettingsTab, translate, Receiver, Settings from openlp.core.lib import SettingsTab, translate, Receiver, Settings, UiStrings
from openlp.core.lib.ui import UiStrings, create_button from openlp.core.lib.ui import create_button
from openlp.core.ui.media import get_media_players, set_media_players from openlp.core.ui.media import get_media_players, set_media_players
class MediaQCheckBox(QtGui.QCheckBox): class MediaQCheckBox(QtGui.QCheckBox):

View File

@ -29,8 +29,9 @@
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate from openlp.core.lib import translate, UiStrings
from openlp.core.lib.ui import UiStrings, create_button_box from openlp.core.lib.ui import create_button_box
class Ui_PluginViewDialog(object): class Ui_PluginViewDialog(object):
def setupUi(self, pluginViewDialog): def setupUi(self, pluginViewDialog):

View File

@ -29,8 +29,7 @@
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import build_icon, translate, SpellTextEdit from openlp.core.lib import build_icon, translate, SpellTextEdit, UiStrings
from openlp.core.lib.ui import UiStrings
class ZoomSize(object): class ZoomSize(object):
""" """

View File

@ -33,8 +33,7 @@ import os
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from lxml import html from lxml import html
from openlp.core.lib import translate, get_text_file_string, Receiver, Settings from openlp.core.lib import translate, get_text_file_string, Receiver, Settings, UiStrings
from openlp.core.lib.ui import UiStrings
from openlp.core.ui.printservicedialog import Ui_PrintServiceDialog, ZoomSize from openlp.core.ui.printservicedialog import Ui_PrintServiceDialog, ZoomSize
from openlp.core.utils import AppLocation from openlp.core.utils import AppLocation

View File

@ -40,9 +40,9 @@ log = logging.getLogger(__name__)
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import OpenLPToolbar, ServiceItem, Receiver, build_icon, ItemCapabilities, SettingsManager, \ from openlp.core.lib import OpenLPToolbar, ServiceItem, Receiver, build_icon, ItemCapabilities, SettingsManager, \
translate, str_to_bool, check_directory_exists, Settings, PluginStatus translate, str_to_bool, check_directory_exists, Settings, PluginStatus, UiStrings
from openlp.core.lib.theme import ThemeLevel from openlp.core.lib.theme import ThemeLevel
from openlp.core.lib.ui import UiStrings, critical_error_message_box, create_widget_action, find_and_set_in_combo_box from openlp.core.lib.ui import critical_error_message_box, create_widget_action, find_and_set_in_combo_box
from openlp.core.ui import ServiceNoteForm, ServiceItemEditForm, StartTimeForm from openlp.core.ui import ServiceNoteForm, ServiceItemEditForm, StartTimeForm
from openlp.core.ui.printserviceform import PrintServiceForm from openlp.core.ui.printserviceform import PrintServiceForm
from openlp.core.utils import AppLocation, delete_file, split_filename, format_time from openlp.core.utils import AppLocation, delete_file, split_filename, format_time

View File

@ -35,8 +35,8 @@ from collections import deque
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import OpenLPToolbar, Receiver, ItemCapabilities, translate, build_icon, build_html, \ from openlp.core.lib import OpenLPToolbar, Receiver, ItemCapabilities, translate, build_icon, build_html, \
PluginManager, ServiceItem, ImageSource, SlideLimits, ServiceItemAction, Settings, ScreenList PluginManager, ServiceItem, ImageSource, SlideLimits, ServiceItemAction, Settings, ScreenList, UiStrings
from openlp.core.lib.ui import UiStrings, create_action from openlp.core.lib.ui import create_action
from openlp.core.lib import SlideLimits, ServiceItemAction from openlp.core.lib import SlideLimits, ServiceItemAction
from openlp.core.ui import HideMode, MainDisplay, Display, DisplayControllerType from openlp.core.ui import HideMode, MainDisplay, Display, DisplayControllerType
from openlp.core.utils.actions import ActionList, CategoryOrder from openlp.core.utils.actions import ActionList, CategoryOrder

View File

@ -29,8 +29,9 @@
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate from openlp.core.lib import translate, UiStrings
from openlp.core.lib.ui import UiStrings, create_button_box from openlp.core.lib.ui import create_button_box
class Ui_StartTimeDialog(object): class Ui_StartTimeDialog(object):
def setupUi(self, StartTimeDialog): def setupUi(self, StartTimeDialog):

View File

@ -31,8 +31,8 @@ from PyQt4 import QtGui
from starttimedialog import Ui_StartTimeDialog from starttimedialog import Ui_StartTimeDialog
from openlp.core.lib import translate from openlp.core.lib import translate, UiStrings
from openlp.core.lib.ui import UiStrings, critical_error_message_box from openlp.core.lib.ui import critical_error_message_box
class StartTimeForm(QtGui.QDialog, Ui_StartTimeDialog): class StartTimeForm(QtGui.QDialog, Ui_StartTimeDialog):
""" """

View File

@ -32,9 +32,9 @@ import os
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import Receiver, translate from openlp.core.lib import Receiver, translate, UiStrings
from openlp.core.lib.theme import BackgroundType, BackgroundGradientType from openlp.core.lib.theme import BackgroundType, BackgroundGradientType
from openlp.core.lib.ui import UiStrings, critical_error_message_box from openlp.core.lib.ui import critical_error_message_box
from openlp.core.ui import ThemeLayoutForm from openlp.core.ui import ThemeLayoutForm
from openlp.core.utils import get_images_filter from openlp.core.utils import get_images_filter
from themewizard import Ui_ThemeWizard from themewizard import Ui_ThemeWizard

View File

@ -37,9 +37,9 @@ from xml.etree.ElementTree import ElementTree, XML
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import OpenLPToolbar, get_text_file_string, build_icon, Receiver, SettingsManager, translate, \ from openlp.core.lib import OpenLPToolbar, get_text_file_string, build_icon, Receiver, SettingsManager, translate, \
check_item_selected, check_directory_exists, create_thumb, validate_thumb, ImageSource, Settings check_item_selected, check_directory_exists, create_thumb, validate_thumb, ImageSource, Settings, UiStrings
from openlp.core.lib.theme import ThemeXML, BackgroundType, VerticalType, BackgroundGradientType from openlp.core.lib.theme import ThemeXML, BackgroundType, VerticalType, BackgroundGradientType
from openlp.core.lib.ui import UiStrings, critical_error_message_box, create_widget_action from openlp.core.lib.ui import critical_error_message_box, create_widget_action
from openlp.core.theme import Theme from openlp.core.theme import Theme
from openlp.core.ui import FileRenameForm, ThemeForm from openlp.core.ui import FileRenameForm, ThemeForm
from openlp.core.utils import AppLocation, delete_file, locale_compare, get_filesystem_encoding from openlp.core.utils import AppLocation, delete_file, locale_compare, get_filesystem_encoding

View File

@ -29,9 +29,9 @@
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import Receiver, Settings, SettingsTab, translate from openlp.core.lib import Receiver, Settings, SettingsTab, translate, UiStrings
from openlp.core.lib.theme import ThemeLevel from openlp.core.lib.theme import ThemeLevel
from openlp.core.lib.ui import UiStrings, find_and_set_in_combo_box from openlp.core.lib.ui import find_and_set_in_combo_box
class ThemesTab(SettingsTab): class ThemesTab(SettingsTab):

View File

@ -29,9 +29,9 @@
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate, build_icon from openlp.core.lib import translate, build_icon, UiStrings
from openlp.core.lib.theme import HorizontalType, BackgroundType, BackgroundGradientType from openlp.core.lib.theme import HorizontalType, BackgroundType, BackgroundGradientType
from openlp.core.lib.ui import UiStrings, add_welcome_page, create_valign_selection_widgets from openlp.core.lib.ui import add_welcome_page, create_valign_selection_widgets
class Ui_ThemeWizard(object): class Ui_ThemeWizard(object):
def setupUi(self, themeWizard): def setupUi(self, themeWizard):

View File

@ -34,8 +34,8 @@ import os
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import build_icon, Receiver, SettingsManager, translate from openlp.core.lib import build_icon, Receiver, SettingsManager, translate, UiStrings
from openlp.core.lib.ui import UiStrings, add_welcome_page from openlp.core.lib.ui import add_welcome_page
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View File

@ -322,8 +322,7 @@ def add_actions(target, actions):
def get_filesystem_encoding(): def get_filesystem_encoding():
""" """
Returns the name of the encoding used to convert Unicode filenames into Returns the name of the encoding used to convert Unicode filenames into system file names.
system file names.
""" """
encoding = sys.getfilesystemencoding() encoding = sys.getfilesystemencoding()
if encoding is None: if encoding is None:
@ -333,8 +332,7 @@ def get_filesystem_encoding():
def get_images_filter(): def get_images_filter():
""" """
Returns a filter string for a file dialog containing all the supported Returns a filter string for a file dialog containing all the supported image formats.
image formats.
""" """
global IMAGES_FILTER global IMAGES_FILTER
if not IMAGES_FILTER: if not IMAGES_FILTER:
@ -462,6 +460,7 @@ def format_time(text, local_time):
``text`` ``text``
The text to be processed. The text to be processed.
``local_time`` ``local_time``
The time to be used to add to the string. This is a time object The time to be used to add to the string. This is a time object
""" """
@ -478,8 +477,7 @@ def locale_compare(string1, string2):
or 0, depending on whether string1 collates before or after string2 or or 0, depending on whether string1 collates before or after string2 or
is equal to it. Comparison is case insensitive. is equal to it. Comparison is case insensitive.
""" """
# Function locale.strcoll() from standard Python library does not work # Function locale.strcoll() from standard Python library does not work properly on Windows.
# properly on Windows.
return locale.strcoll(string1.lower(), string2.lower()) return locale.strcoll(string1.lower(), string2.lower())

View File

@ -29,9 +29,9 @@
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import SettingsTab, translate, Receiver, Settings from openlp.core.lib import SettingsTab, translate, Receiver, Settings, UiStrings
from openlp.core.ui import AlertLocation from openlp.core.ui import AlertLocation
from openlp.core.lib.ui import UiStrings, create_valign_selection_widgets from openlp.core.lib.ui import create_valign_selection_widgets
class AlertsTab(SettingsTab): class AlertsTab(SettingsTab):
""" """

View File

@ -34,9 +34,9 @@ import os
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import Receiver, translate, Settings from openlp.core.lib import Receiver, translate, Settings, UiStrings
from openlp.core.lib.db import delete_database from openlp.core.lib.db import delete_database
from openlp.core.lib.ui import UiStrings, critical_error_message_box from openlp.core.lib.ui import critical_error_message_box
from openlp.core.ui.wizard import OpenLPWizard, WizardStrings from openlp.core.ui.wizard import OpenLPWizard, WizardStrings
from openlp.core.utils import AppLocation, locale_compare from openlp.core.utils import AppLocation, locale_compare
from openlp.plugins.bibles.lib.manager import BibleFormat from openlp.plugins.bibles.lib.manager import BibleFormat

View File

@ -36,8 +36,8 @@ from tempfile import gettempdir
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import Receiver, SettingsManager, translate, check_directory_exists, Settings from openlp.core.lib import Receiver, SettingsManager, translate, check_directory_exists, Settings, UiStrings
from openlp.core.lib.ui import UiStrings, critical_error_message_box from openlp.core.lib.ui import critical_error_message_box
from openlp.core.ui.wizard import OpenLPWizard, WizardStrings from openlp.core.ui.wizard import OpenLPWizard, WizardStrings
from openlp.core.utils import AppLocation, delete_file, get_filesystem_encoding from openlp.core.utils import AppLocation, delete_file, get_filesystem_encoding
from openlp.plugins.bibles.lib.db import BibleDB, BibleMeta, OldBibleDB, BiblesResourcesDB from openlp.plugins.bibles.lib.db import BibleDB, BibleMeta, OldBibleDB, BiblesResourcesDB

View File

@ -32,8 +32,8 @@ import re
from PyQt4 import QtGui from PyQt4 import QtGui
from openlp.core.lib import Receiver, translate from openlp.core.lib import Receiver, translate, UiStrings
from openlp.core.lib.ui import UiStrings, critical_error_message_box from openlp.core.lib.ui import critical_error_message_box
from editbibledialog import Ui_EditBibleDialog from editbibledialog import Ui_EditBibleDialog
from openlp.plugins.bibles.lib import BibleStrings from openlp.plugins.bibles.lib import BibleStrings
from openlp.plugins.bibles.lib.db import BiblesResourcesDB from openlp.plugins.bibles.lib.db import BiblesResourcesDB

View File

@ -31,8 +31,8 @@ import logging
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import Receiver, SettingsTab, translate, Settings from openlp.core.lib import Receiver, SettingsTab, translate, Settings, UiStrings
from openlp.core.lib.ui import UiStrings, find_and_set_in_combo_box from openlp.core.lib.ui import find_and_set_in_combo_box
from openlp.plugins.bibles.lib import LayoutStyle, DisplayStyle, update_reference_separators, \ from openlp.plugins.bibles.lib import LayoutStyle, DisplayStyle, update_reference_separators, \
get_reference_separator, LanguageSelection get_reference_separator, LanguageSelection

View File

@ -31,10 +31,10 @@ import logging
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import MediaManagerItem, Receiver, ItemCapabilities, \ from openlp.core.lib import MediaManagerItem, Receiver, ItemCapabilities, translate, create_separated_list, \
translate, create_separated_list, ServiceItemContext, Settings ServiceItemContext, Settings, UiStrings
from openlp.core.lib.searchedit import SearchEdit from openlp.core.lib.searchedit import SearchEdit
from openlp.core.lib.ui import UiStrings, set_case_insensitive_completer, create_horizontal_adjusting_combo_box, \ from openlp.core.lib.ui import set_case_insensitive_completer, create_horizontal_adjusting_combo_box, \
critical_error_message_box, find_and_set_in_combo_box, build_icon critical_error_message_box, find_and_set_in_combo_box, build_icon
from openlp.core.utils import locale_compare from openlp.core.utils import locale_compare
from openlp.plugins.bibles.forms import BibleImportForm, EditBibleForm from openlp.plugins.bibles.forms import BibleImportForm, EditBibleForm

View File

@ -29,8 +29,8 @@
from PyQt4 import QtGui from PyQt4 import QtGui
from openlp.core.lib import build_icon, translate from openlp.core.lib import build_icon, translate, UiStrings
from openlp.core.lib.ui import UiStrings, create_button_box, create_button from openlp.core.lib.ui import create_button_box, create_button
class Ui_CustomEditDialog(object): class Ui_CustomEditDialog(object):
def setupUi(self, customEditDialog): def setupUi(self, customEditDialog):

View File

@ -29,8 +29,8 @@
from PyQt4 import QtGui from PyQt4 import QtGui
from openlp.core.lib import translate, SpellTextEdit, build_icon from openlp.core.lib import translate, SpellTextEdit, build_icon, UiStrings
from openlp.core.lib.ui import UiStrings, create_button, create_button_box from openlp.core.lib.ui import create_button, create_button_box
class Ui_CustomSlideEditDialog(object): class Ui_CustomSlideEditDialog(object):
def setupUi(self, customSlideEditDialog): def setupUi(self, customSlideEditDialog):

View File

@ -33,8 +33,7 @@ from PyQt4 import QtCore, QtGui
from sqlalchemy.sql import or_, func, and_ from sqlalchemy.sql import or_, func, and_
from openlp.core.lib import MediaManagerItem, Receiver, ItemCapabilities, check_item_selected, translate, \ from openlp.core.lib import MediaManagerItem, Receiver, ItemCapabilities, check_item_selected, translate, \
ServiceItemContext, Settings, PluginStatus ServiceItemContext, Settings, PluginStatus, UiStrings
from openlp.core.lib.ui import UiStrings
from openlp.plugins.custom.forms import EditCustomForm from openlp.plugins.custom.forms import EditCustomForm
from openlp.plugins.custom.lib import CustomXMLParser, CustomXMLBuilder from openlp.plugins.custom.lib import CustomXMLParser, CustomXMLBuilder
from openlp.plugins.custom.lib.db import CustomSlide from openlp.plugins.custom.lib.db import CustomSlide

View File

@ -29,8 +29,7 @@
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import SettingsTab, translate, Receiver, Settings from openlp.core.lib import SettingsTab, translate, Receiver, Settings, UiStrings
from openlp.core.lib.ui import UiStrings
class ImageTab(SettingsTab): class ImageTab(SettingsTab):
""" """

View File

@ -33,8 +33,9 @@ import os
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import MediaManagerItem, build_icon, ItemCapabilities, SettingsManager, translate, \ from openlp.core.lib import MediaManagerItem, build_icon, ItemCapabilities, SettingsManager, translate, \
check_item_selected, check_directory_exists, Receiver, create_thumb, validate_thumb, ServiceItemContext, Settings check_item_selected, check_directory_exists, Receiver, create_thumb, validate_thumb, ServiceItemContext, Settings, \
from openlp.core.lib.ui import UiStrings, critical_error_message_box UiStrings
from openlp.core.lib.ui import critical_error_message_box
from openlp.core.utils import AppLocation, delete_file, locale_compare, get_images_filter from openlp.core.utils import AppLocation, delete_file, locale_compare, get_images_filter
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View File

@ -33,8 +33,8 @@ import os
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import MediaManagerItem, build_icon, ItemCapabilities, SettingsManager, translate, \ from openlp.core.lib import MediaManagerItem, build_icon, ItemCapabilities, SettingsManager, translate, \
check_item_selected, Receiver, MediaType, ServiceItem, build_html, ServiceItemContext, Settings check_item_selected, Receiver, MediaType, ServiceItem, build_html, ServiceItemContext, Settings, UiStrings
from openlp.core.lib.ui import UiStrings, critical_error_message_box, create_horizontal_adjusting_combo_box from openlp.core.lib.ui import critical_error_message_box, create_horizontal_adjusting_combo_box
from openlp.core.ui import DisplayController, Display, DisplayControllerType from openlp.core.ui import DisplayController, Display, DisplayControllerType
from openlp.core.ui.media import get_media_players, set_media_players from openlp.core.ui.media import get_media_players, set_media_players
from openlp.core.utils import locale_compare from openlp.core.utils import locale_compare

View File

@ -29,8 +29,8 @@
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import Receiver, Settings, SettingsTab, translate from openlp.core.lib import Receiver, Settings, SettingsTab, translate, UiStrings
from openlp.core.lib.ui import UiStrings, create_button from openlp.core.lib.ui import create_button
from openlp.core.ui.media import get_media_players, set_media_players from openlp.core.ui.media import get_media_players, set_media_players
class MediaQCheckBox(QtGui.QCheckBox): class MediaQCheckBox(QtGui.QCheckBox):

View File

@ -33,8 +33,8 @@ import os
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import MediaManagerItem, build_icon, SettingsManager, translate, check_item_selected, Receiver, \ from openlp.core.lib import MediaManagerItem, build_icon, SettingsManager, translate, check_item_selected, Receiver, \
ItemCapabilities, create_thumb, validate_thumb, ServiceItemContext, Settings ItemCapabilities, create_thumb, validate_thumb, ServiceItemContext, Settings, UiStrings
from openlp.core.lib.ui import UiStrings, critical_error_message_box, create_horizontal_adjusting_combo_box from openlp.core.lib.ui import critical_error_message_box, create_horizontal_adjusting_combo_box
from openlp.core.utils import locale_compare from openlp.core.utils import locale_compare
from openlp.plugins.presentations.lib import MessageListener from openlp.plugins.presentations.lib import MessageListener

View File

@ -29,8 +29,7 @@
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import Receiver, Settings, SettingsTab, translate from openlp.core.lib import Receiver, Settings, SettingsTab, translate, UiStrings
from openlp.core.lib.ui import UiStrings
class PresentationTab(SettingsTab): class PresentationTab(SettingsTab):
""" """

View File

@ -29,8 +29,8 @@
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import build_icon, translate from openlp.core.lib import build_icon, translate, UiStrings
from openlp.core.lib.ui import UiStrings, create_button_box, create_button from openlp.core.lib.ui import create_button_box, create_button
from openlp.plugins.songs.lib.ui import SongStrings from openlp.plugins.songs.lib.ui import SongStrings
class Ui_EditSongDialog(object): class Ui_EditSongDialog(object):

View File

@ -34,8 +34,9 @@ import shutil
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import PluginStatus, Receiver, MediaType, translate, create_separated_list, check_directory_exists from openlp.core.lib import PluginStatus, Receiver, MediaType, translate, create_separated_list, \
from openlp.core.lib.ui import UiStrings, set_case_insensitive_completer, critical_error_message_box, \ check_directory_exists, UiStrings
from openlp.core.lib.ui import set_case_insensitive_completer, critical_error_message_box, \
find_and_set_in_combo_box find_and_set_in_combo_box
from openlp.core.utils import AppLocation from openlp.core.utils import AppLocation
from openlp.plugins.songs.forms import EditVerseForm, MediaFilesForm from openlp.plugins.songs.forms import EditVerseForm, MediaFilesForm

View File

@ -34,8 +34,8 @@ import logging
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import build_icon, Receiver, translate, create_separated_list from openlp.core.lib import build_icon, Receiver, translate, create_separated_list, UiStrings
from openlp.core.lib.ui import UiStrings, critical_error_message_box from openlp.core.lib.ui import critical_error_message_box
from openlp.core.ui.wizard import OpenLPWizard, WizardStrings from openlp.core.ui.wizard import OpenLPWizard, WizardStrings
from openlp.plugins.songs.lib import natcmp from openlp.plugins.songs.lib import natcmp
from openlp.plugins.songs.lib.db import Song from openlp.plugins.songs.lib.db import Song

View File

@ -35,8 +35,8 @@ import os
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import Receiver, Settings, SettingsManager, translate from openlp.core.lib import Receiver, Settings, SettingsManager, translate, UiStrings
from openlp.core.lib.ui import UiStrings, critical_error_message_box from openlp.core.lib.ui import critical_error_message_box
from openlp.core.ui.wizard import OpenLPWizard, WizardStrings from openlp.core.ui.wizard import OpenLPWizard, WizardStrings
from openlp.plugins.songs.lib.importer import SongFormat, SongFormatSelect from openlp.plugins.songs.lib.importer import SongFormat, SongFormatSelect

View File

@ -29,8 +29,8 @@
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import build_icon from openlp.core.lib import build_icon, UiStrings
from openlp.core.lib.ui import UiStrings, create_button_box from openlp.core.lib.ui import create_button_box
from openlp.plugins.songs.lib.ui import SongStrings from openlp.plugins.songs.lib.ui import SongStrings
class Ui_SongMaintenanceDialog(object): class Ui_SongMaintenanceDialog(object):

View File

@ -31,8 +31,8 @@ import logging
from PyQt4 import QtGui, QtCore from PyQt4 import QtGui, QtCore
from sqlalchemy.sql import and_ from sqlalchemy.sql import and_
from openlp.core.lib import Receiver, translate from openlp.core.lib import Receiver, translate, UiStrings
from openlp.core.lib.ui import UiStrings, critical_error_message_box from openlp.core.lib.ui import critical_error_message_box
from openlp.plugins.songs.forms import AuthorsForm, TopicsForm, SongBookForm from openlp.plugins.songs.forms import AuthorsForm, TopicsForm, SongBookForm
from openlp.plugins.songs.lib.db import Author, Book, Topic, Song from openlp.plugins.songs.lib.db import Author, Book, Topic, Song
from songmaintenancedialog import Ui_SongMaintenanceDialog from songmaintenancedialog import Ui_SongMaintenanceDialog

View File

@ -32,8 +32,7 @@ The :mod:`importer` modules provides the general song import functionality.
import os import os
import logging import logging
from openlp.core.lib import translate from openlp.core.lib import translate, UiStrings
from openlp.core.lib.ui import UiStrings
from openlp.core.ui.wizard import WizardStrings from openlp.core.ui.wizard import WizardStrings
from opensongimport import OpenSongImport from opensongimport import OpenSongImport
from easyslidesimport import EasySlidesImport from easyslidesimport import EasySlidesImport

View File

@ -37,8 +37,8 @@ from sqlalchemy.sql import or_
from openlp.core.lib import MediaManagerItem, Receiver, ItemCapabilities, \ from openlp.core.lib import MediaManagerItem, Receiver, ItemCapabilities, \
translate, check_item_selected, PluginStatus, create_separated_list, \ translate, check_item_selected, PluginStatus, create_separated_list, \
check_directory_exists, ServiceItemContext, Settings check_directory_exists, ServiceItemContext, Settings, UiStrings
from openlp.core.lib.ui import UiStrings, create_widget_action from openlp.core.lib.ui import create_widget_action
from openlp.core.utils import AppLocation from openlp.core.utils import AppLocation
from openlp.plugins.songs.forms import EditSongForm, SongMaintenanceForm, \ from openlp.plugins.songs.forms import EditSongForm, SongMaintenanceForm, \
SongImportForm, SongExportForm SongImportForm, SongExportForm

View File

@ -34,9 +34,9 @@ import sqlite3
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import Plugin, StringContent, build_icon, translate, Receiver, PluginStatus from openlp.core.lib import Plugin, StringContent, build_icon, translate, Receiver, PluginStatus, UiStrings
from openlp.core.lib.db import Manager from openlp.core.lib.db import Manager
from openlp.core.lib.ui import UiStrings, create_action from openlp.core.lib.ui import create_action
from openlp.core.utils import get_filesystem_encoding from openlp.core.utils import get_filesystem_encoding
from openlp.core.utils.actions import ActionList from openlp.core.utils.actions import ActionList
from openlp.plugins.songs.lib import clean_song, upgrade, SongMediaItem, SongsTab from openlp.plugins.songs.lib import clean_song, upgrade, SongMediaItem, SongsTab