forked from openlp/openlp
Merge master.
This commit is contained in:
commit
603249b2a3
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Edwin Lunando, Joshua Miller, Stevan Pettit, #
|
# Meinert Jordan, Armin Köhler, Edwin Lunando, Joshua Miller, Stevan Pettit, #
|
||||||
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
|
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
@ -141,10 +141,21 @@ class Settings(QtCore.QSettings):
|
|||||||
if defaultValue is None and not super(Settings, self).contains(key):
|
if defaultValue is None and not super(Settings, self).contains(key):
|
||||||
return None
|
return None
|
||||||
setting = super(Settings, self).value(key, defaultValue)
|
setting = super(Settings, self).value(key, defaultValue)
|
||||||
# An empty list saved to the settings results in a None type being
|
# On OS X (and probably on other platforms too) empty value from QSettings
|
||||||
# returned.
|
# is represented as type PyQt4.QtCore.QPyNullVariant. This type has to be
|
||||||
|
# converted to proper 'None' Python type.
|
||||||
|
if isinstance(setting, QtCore.QPyNullVariant) and setting.isNull():
|
||||||
|
setting = None
|
||||||
|
# Handle 'None' type (empty value) properly.
|
||||||
if setting is None:
|
if setting is None:
|
||||||
return []
|
# An empty string saved to the settings results in a None type being
|
||||||
|
# returned. Convert it to empty unicode string.
|
||||||
|
if isinstance(defaultValue, unicode):
|
||||||
|
return u''
|
||||||
|
# An empty list saved to the settings results in a None type being
|
||||||
|
# returned.
|
||||||
|
else:
|
||||||
|
return []
|
||||||
# Convert the setting to the correct type.
|
# Convert the setting to the correct type.
|
||||||
if isinstance(defaultValue, bool):
|
if isinstance(defaultValue, bool):
|
||||||
if isinstance(setting, bool):
|
if isinstance(setting, bool):
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
@ -260,8 +260,8 @@ class Ui_AboutDialog(object):
|
|||||||
self.aboutNotebook.setTabText(self.aboutNotebook.indexOf(self.creditsTab),
|
self.aboutNotebook.setTabText(self.aboutNotebook.indexOf(self.creditsTab),
|
||||||
translate('OpenLP.AboutForm', 'Credits'))
|
translate('OpenLP.AboutForm', 'Credits'))
|
||||||
copyright = translate('OpenLP.AboutForm',
|
copyright = translate('OpenLP.AboutForm',
|
||||||
'Copyright \xa9 2004-2012 %s\n'
|
'Copyright \xa9 2004-2013 %s\n'
|
||||||
'Portions copyright \xa9 2004-2012 %s') % (u'Raoul Snyman',
|
'Portions copyright \xa9 2004-2013 %s') % (u'Raoul Snyman',
|
||||||
u'Tim Bentley, Gerald Britton, Jonathan Corwin, Samuel Findlay, '
|
u'Tim Bentley, Gerald Britton, Jonathan Corwin, Samuel Findlay, '
|
||||||
u'Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, '
|
u'Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, '
|
||||||
u'Armin K\xf6hler, Erik Lundin, Edwin Lunando, Joshua Miller, '
|
u'Armin K\xf6hler, Erik Lundin, Edwin Lunando, Joshua Miller, '
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Eric Ludin, Edwin Lunando, Brian T. Meyer, #
|
# Meinert Jordan, Armin Köhler, Eric Ludin, Edwin Lunando, Brian T. Meyer, #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
4
openlp/core/ui/media/vendor/__init__.py
vendored
4
openlp/core/ui/media/vendor/__init__.py
vendored
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Eric Ludin, Edwin Lunando, Brian T. Meyer, #
|
# Meinert Jordan, Armin Köhler, Eric Ludin, Edwin Lunando, Brian T. Meyer, #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
2
openlp/core/ui/media/vendor/vlc.py
vendored
2
openlp/core/ui/media/vendor/vlc.py
vendored
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Python ctypes bindings for VLC
|
# Python ctypes bindings for VLC
|
||||||
#
|
#
|
||||||
# Copyright (C) 2009-2012 the VideoLAN team
|
# Copyright (C) 2009-2013 the VideoLAN team
|
||||||
# $Id: $
|
# $Id: $
|
||||||
#
|
#
|
||||||
# Authors: Olivier Aubert <olivier.aubert at liris.cnrs.fr>
|
# Authors: Olivier Aubert <olivier.aubert at liris.cnrs.fr>
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
@ -40,7 +40,7 @@ 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
|
translate, str_to_bool, check_directory_exists, Settings, PluginStatus
|
||||||
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 UiStrings, 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
|
||||||
@ -252,6 +252,9 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
icon=u':/media/auto-start_active.png', triggers=self.onAutoStart)
|
icon=u':/media/auto-start_active.png', triggers=self.onAutoStart)
|
||||||
# Add already existing delete action to the menu.
|
# Add already existing delete action to the menu.
|
||||||
self.menu.addAction(self.serviceManagerList.delete)
|
self.menu.addAction(self.serviceManagerList.delete)
|
||||||
|
self.create_custom_action = create_widget_action(self.menu,
|
||||||
|
text=translate('OpenLP.ServiceManager', 'Create New &Custom Slide'),
|
||||||
|
icon=u':/general/general_edit.png', triggers=self.create_custom)
|
||||||
self.menu.addSeparator()
|
self.menu.addSeparator()
|
||||||
self.previewAction = create_widget_action(self.menu, text=translate('OpenLP.ServiceManager', 'Show &Preview'),
|
self.previewAction = create_widget_action(self.menu, text=translate('OpenLP.ServiceManager', 'Show &Preview'),
|
||||||
icon=u':/general/general_preview.png', triggers=self.makePreview)
|
icon=u':/general/general_preview.png', triggers=self.makePreview)
|
||||||
@ -751,6 +754,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
pos = item.data(0, QtCore.Qt.UserRole)
|
pos = item.data(0, QtCore.Qt.UserRole)
|
||||||
serviceItem = self.serviceItems[pos - 1]
|
serviceItem = self.serviceItems[pos - 1]
|
||||||
self.editAction.setVisible(False)
|
self.editAction.setVisible(False)
|
||||||
|
self.create_custom_action.setVisible(False)
|
||||||
self.maintainAction.setVisible(False)
|
self.maintainAction.setVisible(False)
|
||||||
self.notesAction.setVisible(False)
|
self.notesAction.setVisible(False)
|
||||||
self.timeAction.setVisible(False)
|
self.timeAction.setVisible(False)
|
||||||
@ -770,6 +774,11 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
if serviceItem[u'service_item'].will_auto_start:
|
if serviceItem[u'service_item'].will_auto_start:
|
||||||
self.autoStartAction.setText(translate('OpenLP.ServiceManager', '&Auto Start - active'))
|
self.autoStartAction.setText(translate('OpenLP.ServiceManager', '&Auto Start - active'))
|
||||||
self.autoStartAction.setIcon(self.active)
|
self.autoStartAction.setIcon(self.active)
|
||||||
|
if serviceItem[u'service_item'].is_text():
|
||||||
|
for plugin in self.mainwindow.pluginManager.plugins:
|
||||||
|
if plugin.name == u'custom' and plugin.status == PluginStatus.Active:
|
||||||
|
self.create_custom_action.setVisible(True)
|
||||||
|
break
|
||||||
self.themeMenu.menuAction().setVisible(False)
|
self.themeMenu.menuAction().setVisible(False)
|
||||||
# Set up the theme menu.
|
# Set up the theme menu.
|
||||||
if serviceItem[u'service_item'].is_text() and self.mainwindow.renderer.theme_level == ThemeLevel.Song:
|
if serviceItem[u'service_item'].is_text() and self.mainwindow.renderer.theme_level == ThemeLevel.Song:
|
||||||
@ -1306,6 +1315,13 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
Receiver.send_message(u'%s_edit' % self.serviceItems[item][u'service_item'].name.lower(),
|
Receiver.send_message(u'%s_edit' % self.serviceItems[item][u'service_item'].name.lower(),
|
||||||
u'L:%s' % self.serviceItems[item][u'service_item'].edit_id)
|
u'L:%s' % self.serviceItems[item][u'service_item'].edit_id)
|
||||||
|
|
||||||
|
def create_custom(self):
|
||||||
|
"""
|
||||||
|
Saves the current text item as a custom slide
|
||||||
|
"""
|
||||||
|
item = self.findServiceItem()[0]
|
||||||
|
Receiver.send_message(u'custom_create_from_service', self.serviceItems[item][u'service_item'])
|
||||||
|
|
||||||
def findServiceItem(self):
|
def findServiceItem(self):
|
||||||
"""
|
"""
|
||||||
Finds the first selected ServiceItem in the list and returns the
|
Finds the first selected ServiceItem in the list and returns the
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
@ -31,8 +31,7 @@ import logging
|
|||||||
|
|
||||||
from PyQt4 import QtCore
|
from PyQt4 import QtCore
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, StringContent, build_icon, translate, \
|
from openlp.core.lib import Plugin, StringContent, build_icon, translate, Settings
|
||||||
Settings
|
|
||||||
from openlp.core.lib.db import Manager
|
from openlp.core.lib.db import Manager
|
||||||
from openlp.core.lib.ui import create_action, UiStrings
|
from openlp.core.lib.ui import create_action, UiStrings
|
||||||
from openlp.core.lib.theme import VerticalType
|
from openlp.core.lib.theme import VerticalType
|
||||||
@ -118,8 +117,7 @@ class AlertsPlugin(Plugin):
|
|||||||
log.info(u'Alerts Plugin loaded')
|
log.info(u'Alerts Plugin loaded')
|
||||||
|
|
||||||
def __init__(self, plugin_helpers):
|
def __init__(self, plugin_helpers):
|
||||||
Plugin.__init__(self, u'alerts', plugin_helpers,
|
Plugin.__init__(self, u'alerts', plugin_helpers, settings_tab_class=AlertsTab)
|
||||||
settings_tab_class=AlertsTab)
|
|
||||||
self.weight = -3
|
self.weight = -3
|
||||||
self.iconPath = u':/plugins/plugin_alerts.png'
|
self.iconPath = u':/plugins/plugin_alerts.png'
|
||||||
self.icon = build_icon(self.iconPath)
|
self.icon = build_icon(self.iconPath)
|
||||||
@ -138,8 +136,7 @@ class AlertsPlugin(Plugin):
|
|||||||
"""
|
"""
|
||||||
log.info(u'add tools menu')
|
log.info(u'add tools menu')
|
||||||
self.toolsAlertItem = create_action(tools_menu, u'toolsAlertItem',
|
self.toolsAlertItem = create_action(tools_menu, u'toolsAlertItem',
|
||||||
text=translate('AlertsPlugin', '&Alert'),
|
text=translate('AlertsPlugin', '&Alert'), icon=u':/plugins/plugin_alerts.png',
|
||||||
icon=u':/plugins/plugin_alerts.png',
|
|
||||||
statustip=translate('AlertsPlugin', 'Show an alert message.'),
|
statustip=translate('AlertsPlugin', 'Show an alert message.'),
|
||||||
visible=False, shortcuts=[u'F7'], triggers=self.onAlertsTrigger)
|
visible=False, shortcuts=[u'F7'], triggers=self.onAlertsTrigger)
|
||||||
self.serviceManager.mainwindow.toolsMenu.addAction(self.toolsAlertItem)
|
self.serviceManager.mainwindow.toolsMenu.addAction(self.toolsAlertItem)
|
||||||
@ -164,8 +161,7 @@ class AlertsPlugin(Plugin):
|
|||||||
|
|
||||||
def toggleAlertsState(self):
|
def toggleAlertsState(self):
|
||||||
self.alertsActive = not self.alertsActive
|
self.alertsActive = not self.alertsActive
|
||||||
Settings().setValue(self.settingsSection + u'/active',
|
Settings().setValue(self.settingsSection + u'/active', self.alertsActive)
|
||||||
self.alertsActive)
|
|
||||||
|
|
||||||
def onAlertsTrigger(self):
|
def onAlertsTrigger(self):
|
||||||
self.alertForm.loadList()
|
self.alertForm.loadList()
|
||||||
@ -173,8 +169,7 @@ class AlertsPlugin(Plugin):
|
|||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate('AlertsPlugin', '<strong>Alerts Plugin</strong>'
|
about_text = translate('AlertsPlugin', '<strong>Alerts Plugin</strong>'
|
||||||
'<br />The alert plugin controls the displaying of nursery alerts '
|
'<br />The alert plugin controls the displaying of nursery alerts on the display screen.')
|
||||||
'on the display screen.')
|
|
||||||
return about_text
|
return about_text
|
||||||
|
|
||||||
def setPluginTextStrings(self):
|
def setPluginTextStrings(self):
|
||||||
@ -182,13 +177,11 @@ class AlertsPlugin(Plugin):
|
|||||||
Called to define all translatable texts of the plugin
|
Called to define all translatable texts of the plugin
|
||||||
"""
|
"""
|
||||||
## Name PluginList ##
|
## Name PluginList ##
|
||||||
self.textStrings[StringContent.Name] = {
|
self.textStrings[StringContent.Name] = {u'singular': translate('AlertsPlugin', 'Alert', 'name singular'),
|
||||||
u'singular': translate('AlertsPlugin', 'Alert', 'name singular'),
|
|
||||||
u'plural': translate('AlertsPlugin', 'Alerts', 'name plural')
|
u'plural': translate('AlertsPlugin', 'Alerts', 'name plural')
|
||||||
}
|
}
|
||||||
## Name for MediaDockManager, SettingsManager ##
|
## Name for MediaDockManager, SettingsManager ##
|
||||||
self.textStrings[StringContent.VisibleName] = {
|
self.textStrings[StringContent.VisibleName] = {u'title': translate('AlertsPlugin', 'Alerts', 'container title')
|
||||||
u'title': translate('AlertsPlugin', 'Alerts', 'container title')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def getDisplayJavaScript(self):
|
def getDisplayJavaScript(self):
|
||||||
@ -202,8 +195,7 @@ class AlertsPlugin(Plugin):
|
|||||||
Add CSS to the main display.
|
Add CSS to the main display.
|
||||||
"""
|
"""
|
||||||
align = VerticalType.Names[self.settingsTab.location]
|
align = VerticalType.Names[self.settingsTab.location]
|
||||||
return CSS % (align, self.settingsTab.font_face,
|
return CSS % (align, self.settingsTab.font_face, self.settingsTab.font_size, self.settingsTab.font_color,
|
||||||
self.settingsTab.font_size, self.settingsTab.font_color,
|
|
||||||
self.settingsTab.bg_color)
|
self.settingsTab.bg_color)
|
||||||
|
|
||||||
def getDisplayHtml(self):
|
def getDisplayHtml(self):
|
||||||
@ -222,4 +214,4 @@ class AlertsPlugin(Plugin):
|
|||||||
align = VerticalType.Names[self.settingsTab.location]
|
align = VerticalType.Names[self.settingsTab.location]
|
||||||
frame.evaluateJavaScript(u'update_css("%s", "%s", "%s", "%s", "%s")' %
|
frame.evaluateJavaScript(u'update_css("%s", "%s", "%s", "%s", "%s")' %
|
||||||
(align, self.settingsTab.font_face, self.settingsTab.font_size,
|
(align, self.settingsTab.font_face, self.settingsTab.font_size,
|
||||||
self.settingsTab.font_color, self.settingsTab.bg_color))
|
self.settingsTab.font_color, self.settingsTab.bg_color))
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
@ -69,34 +69,24 @@ class Ui_AlertDialog(object):
|
|||||||
self.saveButton.setIcon(build_icon(u':/general/general_save.png'))
|
self.saveButton.setIcon(build_icon(u':/general/general_save.png'))
|
||||||
self.saveButton.setObjectName(u'saveButton')
|
self.saveButton.setObjectName(u'saveButton')
|
||||||
self.manageButtonLayout.addWidget(self.saveButton)
|
self.manageButtonLayout.addWidget(self.saveButton)
|
||||||
self.deleteButton = create_button(alertDialog, u'deleteButton',
|
self.deleteButton = create_button(alertDialog, u'deleteButton', role=u'delete', enabled=False,
|
||||||
role=u'delete', enabled=False,
|
|
||||||
click=alertDialog.onDeleteButtonClicked)
|
click=alertDialog.onDeleteButtonClicked)
|
||||||
self.manageButtonLayout.addWidget(self.deleteButton)
|
self.manageButtonLayout.addWidget(self.deleteButton)
|
||||||
self.manageButtonLayout.addStretch()
|
self.manageButtonLayout.addStretch()
|
||||||
self.alertDialogLayout.addLayout(self.manageButtonLayout, 1, 1)
|
self.alertDialogLayout.addLayout(self.manageButtonLayout, 1, 1)
|
||||||
displayIcon = build_icon(u':/general/general_live.png')
|
displayIcon = build_icon(u':/general/general_live.png')
|
||||||
self.displayButton = create_button(alertDialog, u'displayButton',
|
self.displayButton = create_button(alertDialog, u'displayButton', icon=displayIcon, enabled=False)
|
||||||
icon=displayIcon, enabled=False)
|
self.displayCloseButton = create_button(alertDialog, u'displayCloseButton', icon=displayIcon, enabled=False)
|
||||||
self.displayCloseButton = create_button(alertDialog,
|
self.buttonBox = create_button_box(alertDialog, u'buttonBox', [u'close'],
|
||||||
u'displayCloseButton', icon=displayIcon, enabled=False)
|
[self.displayButton, self.displayCloseButton])
|
||||||
self.buttonBox = create_button_box(alertDialog, u'buttonBox',
|
|
||||||
[u'close'], [self.displayButton, self.displayCloseButton])
|
|
||||||
self.alertDialogLayout.addWidget(self.buttonBox, 2, 0, 1, 2)
|
self.alertDialogLayout.addWidget(self.buttonBox, 2, 0, 1, 2)
|
||||||
self.retranslateUi(alertDialog)
|
self.retranslateUi(alertDialog)
|
||||||
|
|
||||||
def retranslateUi(self, alertDialog):
|
def retranslateUi(self, alertDialog):
|
||||||
alertDialog.setWindowTitle(
|
alertDialog.setWindowTitle(translate('AlertsPlugin.AlertForm', 'Alert Message'))
|
||||||
translate('AlertsPlugin.AlertForm', 'Alert Message'))
|
self.alertEntryLabel.setText(translate('AlertsPlugin.AlertForm', 'Alert &text:'))
|
||||||
self.alertEntryLabel.setText(
|
self.alertParameter.setText(translate('AlertsPlugin.AlertForm', '&Parameter:'))
|
||||||
translate('AlertsPlugin.AlertForm', 'Alert &text:'))
|
self.newButton.setText(translate('AlertsPlugin.AlertForm', '&New'))
|
||||||
self.alertParameter.setText(
|
self.saveButton.setText(translate('AlertsPlugin.AlertForm', '&Save'))
|
||||||
translate('AlertsPlugin.AlertForm', '&Parameter:'))
|
self.displayButton.setText(translate('AlertsPlugin.AlertForm', 'Displ&ay'))
|
||||||
self.newButton.setText(
|
self.displayCloseButton.setText(translate('AlertsPlugin.AlertForm', 'Display && Cl&ose'))
|
||||||
translate('AlertsPlugin.AlertForm', '&New'))
|
|
||||||
self.saveButton.setText(
|
|
||||||
translate('AlertsPlugin.AlertForm', '&Save'))
|
|
||||||
self.displayButton.setText(
|
|
||||||
translate('AlertsPlugin.AlertForm', 'Displ&ay'))
|
|
||||||
self.displayCloseButton.setText(
|
|
||||||
translate('AlertsPlugin.AlertForm', 'Display && Cl&ose'))
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
@ -47,22 +47,14 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
|||||||
self.item_id = None
|
self.item_id = None
|
||||||
QtGui.QDialog.__init__(self, plugin.formParent)
|
QtGui.QDialog.__init__(self, plugin.formParent)
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
QtCore.QObject.connect(self.displayButton,
|
QtCore.QObject.connect(self.displayButton, QtCore.SIGNAL(u'clicked()'), self.onDisplayClicked)
|
||||||
QtCore.SIGNAL(u'clicked()'), self.onDisplayClicked)
|
QtCore.QObject.connect(self.displayCloseButton, QtCore.SIGNAL(u'clicked()'), self.onDisplayCloseClicked)
|
||||||
QtCore.QObject.connect(self.displayCloseButton,
|
QtCore.QObject.connect(self.alertTextEdit, QtCore.SIGNAL(u'textChanged(const QString&)'), self.onTextChanged)
|
||||||
QtCore.SIGNAL(u'clicked()'), self.onDisplayCloseClicked)
|
QtCore.QObject.connect(self.newButton, QtCore.SIGNAL(u'clicked()'), self.onNewClick)
|
||||||
QtCore.QObject.connect(self.alertTextEdit,
|
QtCore.QObject.connect(self.saveButton, QtCore.SIGNAL(u'clicked()'), self.onSaveClick)
|
||||||
QtCore.SIGNAL(u'textChanged(const QString&)'), self.onTextChanged)
|
QtCore.QObject.connect(self.alertListWidget, QtCore.SIGNAL(u'doubleClicked(QModelIndex)'), self.onDoubleClick)
|
||||||
QtCore.QObject.connect(self.newButton,
|
QtCore.QObject.connect(self.alertListWidget, QtCore.SIGNAL(u'clicked(QModelIndex)'), self.onSingleClick)
|
||||||
QtCore.SIGNAL(u'clicked()'), self.onNewClick)
|
QtCore.QObject.connect(self.alertListWidget, QtCore.SIGNAL(u'currentRowChanged(int)'), self.onCurrentRowChanged)
|
||||||
QtCore.QObject.connect(self.saveButton,
|
|
||||||
QtCore.SIGNAL(u'clicked()'), self.onSaveClick)
|
|
||||||
QtCore.QObject.connect(self.alertListWidget,
|
|
||||||
QtCore.SIGNAL(u'doubleClicked(QModelIndex)'), self.onDoubleClick)
|
|
||||||
QtCore.QObject.connect(self.alertListWidget,
|
|
||||||
QtCore.SIGNAL(u'clicked(QModelIndex)'), self.onSingleClick)
|
|
||||||
QtCore.QObject.connect(self.alertListWidget,
|
|
||||||
QtCore.SIGNAL(u'currentRowChanged(int)'), self.onCurrentRowChanged)
|
|
||||||
|
|
||||||
def exec_(self):
|
def exec_(self):
|
||||||
self.displayButton.setEnabled(False)
|
self.displayButton.setEnabled(False)
|
||||||
@ -75,16 +67,14 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
|||||||
Loads the list with alerts.
|
Loads the list with alerts.
|
||||||
"""
|
"""
|
||||||
self.alertListWidget.clear()
|
self.alertListWidget.clear()
|
||||||
alerts = self.manager.get_all_objects(AlertItem,
|
alerts = self.manager.get_all_objects(AlertItem, order_by_ref=AlertItem.text)
|
||||||
order_by_ref=AlertItem.text)
|
|
||||||
for alert in alerts:
|
for alert in alerts:
|
||||||
item_name = QtGui.QListWidgetItem(alert.text)
|
item_name = QtGui.QListWidgetItem(alert.text)
|
||||||
item_name.setData(QtCore.Qt.UserRole, alert.id)
|
item_name.setData(QtCore.Qt.UserRole, alert.id)
|
||||||
self.alertListWidget.addItem(item_name)
|
self.alertListWidget.addItem(item_name)
|
||||||
if alert.text == unicode(self.alertTextEdit.text()):
|
if alert.text == unicode(self.alertTextEdit.text()):
|
||||||
self.item_id = alert.id
|
self.item_id = alert.id
|
||||||
self.alertListWidget.setCurrentRow(
|
self.alertListWidget.setCurrentRow(self.alertListWidget.row(item_name))
|
||||||
self.alertListWidget.row(item_name))
|
|
||||||
|
|
||||||
def onDisplayClicked(self):
|
def onDisplayClicked(self):
|
||||||
self.triggerAlert(self.alertTextEdit.text())
|
self.triggerAlert(self.alertTextEdit.text())
|
||||||
@ -110,9 +100,8 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
|||||||
if not self.alertTextEdit.text():
|
if not self.alertTextEdit.text():
|
||||||
QtGui.QMessageBox.information(self,
|
QtGui.QMessageBox.information(self,
|
||||||
translate('AlertsPlugin.AlertForm', 'New Alert'),
|
translate('AlertsPlugin.AlertForm', 'New Alert'),
|
||||||
translate('AlertsPlugin.AlertForm', 'You haven\'t specified '
|
translate('AlertsPlugin.AlertForm', 'You haven\'t specified any text for your alert. \n'
|
||||||
'any text for your alert. Please type in some text before '
|
'Please type in some text before clicking New.'))
|
||||||
'clicking New.'))
|
|
||||||
else:
|
else:
|
||||||
alert = AlertItem()
|
alert = AlertItem()
|
||||||
alert.text = self.alertTextEdit.text()
|
alert.text = self.alertTextEdit.text()
|
||||||
@ -180,24 +169,20 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
|||||||
if not text:
|
if not text:
|
||||||
return False
|
return False
|
||||||
# We found '<>' in the alert text, but the ParameterEdit field is empty.
|
# We found '<>' in the alert text, but the ParameterEdit field is empty.
|
||||||
if text.find(u'<>') != -1 and not self.parameterEdit.text() and \
|
if text.find(u'<>') != -1 and not self.parameterEdit.text() and QtGui.QMessageBox.question(self,
|
||||||
QtGui.QMessageBox.question(self,
|
translate('AlertsPlugin.AlertForm', 'No Parameter Found'),
|
||||||
translate('AlertsPlugin.AlertForm', 'No Parameter Found'),
|
translate('AlertsPlugin.AlertForm', 'You have not entered a parameter to be replaced.\n'
|
||||||
translate('AlertsPlugin.AlertForm', 'You have not entered a '
|
'Do you want to continue anyway?'),
|
||||||
'parameter to be replaced.\nDo you want to continue anyway?'),
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No | QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.No:
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No |
|
|
||||||
QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.No:
|
|
||||||
self.parameterEdit.setFocus()
|
self.parameterEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
# The ParameterEdit field is not empty, but we have not found '<>'
|
# The ParameterEdit field is not empty, but we have not found '<>'
|
||||||
# in the alert text.
|
# in the alert text.
|
||||||
elif text.find(u'<>') == -1 and self.parameterEdit.text() and \
|
elif text.find(u'<>') == -1 and self.parameterEdit.text() and QtGui.QMessageBox.question(self,
|
||||||
QtGui.QMessageBox.question(self,
|
translate('AlertsPlugin.AlertForm', 'No Placeholder Found'),
|
||||||
translate('AlertsPlugin.AlertForm', 'No Placeholder Found'),
|
translate('AlertsPlugin.AlertForm', 'The alert text does not contain \'<>\'.\n'
|
||||||
translate('AlertsPlugin.AlertForm', 'The alert text does not'
|
'Do you want to continue anyway?'),
|
||||||
' contain \'<>\'.\nDo you want to continue anyway?'),
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No | QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.No:
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No |
|
|
||||||
QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.No:
|
|
||||||
self.parameterEdit.setFocus()
|
self.parameterEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
text = text.replace(u'<>', self.parameterEdit.text())
|
text = text.replace(u'<>', self.parameterEdit.text())
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
@ -46,10 +46,8 @@ class AlertsManager(QtCore.QObject):
|
|||||||
self.screen = None
|
self.screen = None
|
||||||
self.timer_id = 0
|
self.timer_id = 0
|
||||||
self.alertList = []
|
self.alertList = []
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'live_display_active'), self.generateAlert)
|
||||||
QtCore.SIGNAL(u'live_display_active'), self.generateAlert)
|
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'alerts_text'), self.onAlertText)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
|
||||||
QtCore.SIGNAL(u'alerts_text'), self.onAlertText)
|
|
||||||
|
|
||||||
def onAlertText(self, message):
|
def onAlertText(self, message):
|
||||||
"""
|
"""
|
||||||
@ -71,8 +69,7 @@ class AlertsManager(QtCore.QObject):
|
|||||||
self.alertList.append(text)
|
self.alertList.append(text)
|
||||||
if self.timer_id != 0:
|
if self.timer_id != 0:
|
||||||
Receiver.send_message(u'mainwindow_status_text',
|
Receiver.send_message(u'mainwindow_status_text',
|
||||||
translate('AlertsPlugin.AlertsManager',
|
translate('AlertsPlugin.AlertsManager', 'Alert message created and displayed.'))
|
||||||
'Alert message created and displayed.'))
|
|
||||||
return
|
return
|
||||||
Receiver.send_message(u'mainwindow_status_text', u'')
|
Receiver.send_message(u'mainwindow_status_text', u'')
|
||||||
self.generateAlert()
|
self.generateAlert()
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
@ -78,8 +78,7 @@ class AlertsTab(SettingsTab):
|
|||||||
self.timeoutSpinBox.setMaximum(180)
|
self.timeoutSpinBox.setMaximum(180)
|
||||||
self.timeoutSpinBox.setObjectName(u'timeoutSpinBox')
|
self.timeoutSpinBox.setObjectName(u'timeoutSpinBox')
|
||||||
self.fontLayout.addRow(self.timeoutLabel, self.timeoutSpinBox)
|
self.fontLayout.addRow(self.timeoutLabel, self.timeoutSpinBox)
|
||||||
self.verticalLabel, self.verticalComboBox = \
|
self.verticalLabel, self.verticalComboBox = create_valign_selection_widgets(self.fontGroupBox)
|
||||||
create_valign_selection_widgets(self.fontGroupBox)
|
|
||||||
self.verticalLabel.setObjectName(u'verticalLabel')
|
self.verticalLabel.setObjectName(u'verticalLabel')
|
||||||
self.verticalComboBox.setObjectName(u'verticalComboBox')
|
self.verticalComboBox.setObjectName(u'verticalComboBox')
|
||||||
self.fontLayout.addRow(self.verticalLabel, self.verticalComboBox)
|
self.fontLayout.addRow(self.verticalLabel, self.verticalComboBox)
|
||||||
@ -95,54 +94,40 @@ class AlertsTab(SettingsTab):
|
|||||||
self.rightLayout.addWidget(self.previewGroupBox)
|
self.rightLayout.addWidget(self.previewGroupBox)
|
||||||
self.rightLayout.addStretch()
|
self.rightLayout.addStretch()
|
||||||
# Signals and slots
|
# Signals and slots
|
||||||
QtCore.QObject.connect(self.backgroundColorButton,
|
QtCore.QObject.connect(self.backgroundColorButton, QtCore.SIGNAL(u'clicked()'),
|
||||||
QtCore.SIGNAL(u'clicked()'), self.onBackgroundColorButtonClicked)
|
self.onBackgroundColorButtonClicked)
|
||||||
QtCore.QObject.connect(self.fontColorButton,
|
QtCore.QObject.connect(self.fontColorButton, QtCore.SIGNAL(u'clicked()'), self.onFontColorButtonClicked)
|
||||||
QtCore.SIGNAL(u'clicked()'), self.onFontColorButtonClicked)
|
QtCore.QObject.connect(self.fontComboBox, QtCore.SIGNAL(u'activated(int)'), self.onFontComboBoxClicked)
|
||||||
QtCore.QObject.connect(self.fontComboBox,
|
QtCore.QObject.connect(self.timeoutSpinBox, QtCore.SIGNAL(u'valueChanged(int)'), self.onTimeoutSpinBoxChanged)
|
||||||
QtCore.SIGNAL(u'activated(int)'), self.onFontComboBoxClicked)
|
QtCore.QObject.connect(self.fontSizeSpinBox, QtCore.SIGNAL(u'valueChanged(int)'), self.onFontSizeSpinBoxChanged)
|
||||||
QtCore.QObject.connect(self.timeoutSpinBox,
|
|
||||||
QtCore.SIGNAL(u'valueChanged(int)'), self.onTimeoutSpinBoxChanged)
|
|
||||||
QtCore.QObject.connect(self.fontSizeSpinBox,
|
|
||||||
QtCore.SIGNAL(u'valueChanged(int)'), self.onFontSizeSpinBoxChanged)
|
|
||||||
|
|
||||||
def retranslateUi(self):
|
def retranslateUi(self):
|
||||||
self.fontGroupBox.setTitle(
|
self.fontGroupBox.setTitle(translate('AlertsPlugin.AlertsTab', 'Font'))
|
||||||
translate('AlertsPlugin.AlertsTab', 'Font'))
|
self.fontLabel.setText(translate('AlertsPlugin.AlertsTab', 'Font name:'))
|
||||||
self.fontLabel.setText(
|
self.fontColorLabel.setText(translate('AlertsPlugin.AlertsTab', 'Font color:'))
|
||||||
translate('AlertsPlugin.AlertsTab', 'Font name:'))
|
self.backgroundColorLabel.setText(translate('AlertsPlugin.AlertsTab', 'Background color:'))
|
||||||
self.fontColorLabel.setText(
|
self.fontSizeLabel.setText(translate('AlertsPlugin.AlertsTab', 'Font size:'))
|
||||||
translate('AlertsPlugin.AlertsTab', 'Font color:'))
|
|
||||||
self.backgroundColorLabel.setText(
|
|
||||||
translate('AlertsPlugin.AlertsTab', 'Background color:'))
|
|
||||||
self.fontSizeLabel.setText(
|
|
||||||
translate('AlertsPlugin.AlertsTab', 'Font size:'))
|
|
||||||
self.fontSizeSpinBox.setSuffix(UiStrings().FontSizePtUnit)
|
self.fontSizeSpinBox.setSuffix(UiStrings().FontSizePtUnit)
|
||||||
self.timeoutLabel.setText(
|
self.timeoutLabel.setText(translate('AlertsPlugin.AlertsTab', 'Alert timeout:'))
|
||||||
translate('AlertsPlugin.AlertsTab', 'Alert timeout:'))
|
|
||||||
self.timeoutSpinBox.setSuffix(UiStrings().Seconds)
|
self.timeoutSpinBox.setSuffix(UiStrings().Seconds)
|
||||||
self.previewGroupBox.setTitle(UiStrings().Preview)
|
self.previewGroupBox.setTitle(UiStrings().Preview)
|
||||||
self.fontPreview.setText(UiStrings().OLPV2x)
|
self.fontPreview.setText(UiStrings().OLPV2x)
|
||||||
|
|
||||||
def onBackgroundColorButtonClicked(self):
|
def onBackgroundColorButtonClicked(self):
|
||||||
new_color = QtGui.QColorDialog.getColor(
|
new_color = QtGui.QColorDialog.getColor(QtGui.QColor(self.bg_color), self)
|
||||||
QtGui.QColor(self.bg_color), self)
|
|
||||||
if new_color.isValid():
|
if new_color.isValid():
|
||||||
self.bg_color = new_color.name()
|
self.bg_color = new_color.name()
|
||||||
self.backgroundColorButton.setStyleSheet(
|
self.backgroundColorButton.setStyleSheet(u'background-color: %s' % self.bg_color)
|
||||||
u'background-color: %s' % self.bg_color)
|
|
||||||
self.updateDisplay()
|
self.updateDisplay()
|
||||||
|
|
||||||
def onFontComboBoxClicked(self):
|
def onFontComboBoxClicked(self):
|
||||||
self.updateDisplay()
|
self.updateDisplay()
|
||||||
|
|
||||||
def onFontColorButtonClicked(self):
|
def onFontColorButtonClicked(self):
|
||||||
new_color = QtGui.QColorDialog.getColor(
|
new_color = QtGui.QColorDialog.getColor(QtGui.QColor(self.font_color), self)
|
||||||
QtGui.QColor(self.font_color), self)
|
|
||||||
if new_color.isValid():
|
if new_color.isValid():
|
||||||
self.font_color = new_color.name()
|
self.font_color = new_color.name()
|
||||||
self.fontColorButton.setStyleSheet(
|
self.fontColorButton.setStyleSheet(u'background-color: %s' % self.font_color)
|
||||||
u'background-color: %s' % self.font_color)
|
|
||||||
self.updateDisplay()
|
self.updateDisplay()
|
||||||
|
|
||||||
def onTimeoutSpinBoxChanged(self):
|
def onTimeoutSpinBoxChanged(self):
|
||||||
@ -165,10 +150,8 @@ class AlertsTab(SettingsTab):
|
|||||||
settings.endGroup()
|
settings.endGroup()
|
||||||
self.fontSizeSpinBox.setValue(self.font_size)
|
self.fontSizeSpinBox.setValue(self.font_size)
|
||||||
self.timeoutSpinBox.setValue(self.timeout)
|
self.timeoutSpinBox.setValue(self.timeout)
|
||||||
self.fontColorButton.setStyleSheet(
|
self.fontColorButton.setStyleSheet(u'background-color: %s' % self.font_color)
|
||||||
u'background-color: %s' % self.font_color)
|
self.backgroundColorButton.setStyleSheet(u'background-color: %s' % self.bg_color)
|
||||||
self.backgroundColorButton.setStyleSheet(
|
|
||||||
u'background-color: %s' % self.bg_color)
|
|
||||||
self.verticalComboBox.setCurrentIndex(self.location)
|
self.verticalComboBox.setCurrentIndex(self.location)
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setFamily(self.font_face)
|
font.setFamily(self.font_face)
|
||||||
@ -180,8 +163,7 @@ class AlertsTab(SettingsTab):
|
|||||||
settings = Settings()
|
settings = Settings()
|
||||||
settings.beginGroup(self.settingsSection)
|
settings.beginGroup(self.settingsSection)
|
||||||
# Check value has changed as no event handles this field
|
# Check value has changed as no event handles this field
|
||||||
if settings.value(u'location', 1) != \
|
if settings.value(u'location', 1) != self.verticalComboBox.currentIndex():
|
||||||
self.verticalComboBox.currentIndex():
|
|
||||||
self.changed = True
|
self.changed = True
|
||||||
settings.setValue(u'background color', self.bg_color)
|
settings.setValue(u'background color', self.bg_color)
|
||||||
settings.setValue(u'font color', self.font_color)
|
settings.setValue(u'font color', self.font_color)
|
||||||
@ -202,7 +184,6 @@ class AlertsTab(SettingsTab):
|
|||||||
font.setBold(True)
|
font.setBold(True)
|
||||||
font.setPointSize(self.font_size)
|
font.setPointSize(self.font_size)
|
||||||
self.fontPreview.setFont(font)
|
self.fontPreview.setFont(font)
|
||||||
self.fontPreview.setStyleSheet(u'background-color: %s; color: %s' %
|
self.fontPreview.setStyleSheet(u'background-color: %s; color: %s' % (self.bg_color, self.font_color))
|
||||||
(self.bg_color, self.font_color))
|
|
||||||
self.changed = True
|
self.changed = True
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
@ -31,8 +31,7 @@ import logging
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, StringContent, build_icon, translate, \
|
from openlp.core.lib import Plugin, StringContent, build_icon, translate, Settings
|
||||||
Settings
|
|
||||||
from openlp.core.lib.ui import create_action, UiStrings
|
from openlp.core.lib.ui import create_action, UiStrings
|
||||||
from openlp.core.utils.actions import ActionList
|
from openlp.core.utils.actions import ActionList
|
||||||
from openlp.plugins.bibles.lib import BibleManager, BiblesTab, BibleMediaItem
|
from openlp.plugins.bibles.lib import BibleManager, BiblesTab, BibleMediaItem
|
||||||
@ -44,8 +43,7 @@ class BiblePlugin(Plugin):
|
|||||||
log.info(u'Bible Plugin loaded')
|
log.info(u'Bible Plugin loaded')
|
||||||
|
|
||||||
def __init__(self, plugin_helpers):
|
def __init__(self, plugin_helpers):
|
||||||
Plugin.__init__(self, u'bibles', plugin_helpers,
|
Plugin.__init__(self, u'bibles', plugin_helpers, BibleMediaItem, BiblesTab)
|
||||||
BibleMediaItem, BiblesTab)
|
|
||||||
self.weight = -9
|
self.weight = -9
|
||||||
self.iconPath = u':/plugins/plugin_bibles.png'
|
self.iconPath = u':/plugins/plugin_bibles.png'
|
||||||
self.icon = build_icon(self.iconPath)
|
self.icon = build_icon(self.iconPath)
|
||||||
@ -84,17 +82,16 @@ class BiblePlugin(Plugin):
|
|||||||
"""
|
"""
|
||||||
if self.manager.old_bible_databases:
|
if self.manager.old_bible_databases:
|
||||||
if QtGui.QMessageBox.information(self.formParent,
|
if QtGui.QMessageBox.information(self.formParent,
|
||||||
translate('OpenLP', 'Information'), translate('OpenLP',
|
translate('OpenLP', 'Information'),
|
||||||
'Bible format has changed.\nYou have to upgrade your '
|
translate('OpenLP', 'Bible format has changed.\nYou have to upgrade your existing Bibles.\n'
|
||||||
'existing Bibles.\nShould OpenLP upgrade now?'),
|
'Should OpenLP upgrade now?'),
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Yes |
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Yes | QtGui.QMessageBox.No)) == \
|
||||||
QtGui.QMessageBox.No)) == QtGui.QMessageBox.Yes:
|
QtGui.QMessageBox.Yes:
|
||||||
self.onToolsUpgradeItemTriggered()
|
self.onToolsUpgradeItemTriggered()
|
||||||
settings = Settings()
|
settings = Settings()
|
||||||
settings.beginGroup(self.settingsSection)
|
settings.beginGroup(self.settingsSection)
|
||||||
if settings.contains(u'bookname language'):
|
if settings.contains(u'bookname language'):
|
||||||
settings.setValue(u'book name language', settings.value(
|
settings.setValue(u'book name language', settings.value(u'bookname language', 0))
|
||||||
u'bookname language', 0))
|
|
||||||
settings.remove(u'bookname language')
|
settings.remove(u'bookname language')
|
||||||
settings.endGroup()
|
settings.endGroup()
|
||||||
|
|
||||||
@ -122,8 +119,7 @@ class BiblePlugin(Plugin):
|
|||||||
log.debug(u'add tools menu')
|
log.debug(u'add tools menu')
|
||||||
self.toolsUpgradeItem = create_action(tools_menu, u'toolsUpgradeItem',
|
self.toolsUpgradeItem = create_action(tools_menu, u'toolsUpgradeItem',
|
||||||
text=translate('BiblesPlugin', '&Upgrade older Bibles'),
|
text=translate('BiblesPlugin', '&Upgrade older Bibles'),
|
||||||
statustip=translate('BiblesPlugin',
|
statustip=translate('BiblesPlugin', 'Upgrade the Bible databases to the latest format.'),
|
||||||
'Upgrade the Bible databases to the latest format.'),
|
|
||||||
visible=False, triggers=self.onToolsUpgradeItemTriggered)
|
visible=False, triggers=self.onToolsUpgradeItemTriggered)
|
||||||
tools_menu.addAction(self.toolsUpgradeItem)
|
tools_menu.addAction(self.toolsUpgradeItem)
|
||||||
|
|
||||||
@ -132,8 +128,7 @@ class BiblePlugin(Plugin):
|
|||||||
Upgrade older bible databases.
|
Upgrade older bible databases.
|
||||||
"""
|
"""
|
||||||
if not hasattr(self, u'upgrade_wizard'):
|
if not hasattr(self, u'upgrade_wizard'):
|
||||||
self.upgrade_wizard = BibleUpgradeForm(self.formParent,
|
self.upgrade_wizard = BibleUpgradeForm(self.formParent, self.manager, self)
|
||||||
self.manager, self)
|
|
||||||
# If the import was not cancelled then reload.
|
# If the import was not cancelled then reload.
|
||||||
if self.upgrade_wizard.exec_():
|
if self.upgrade_wizard.exec_():
|
||||||
self.mediaItem.reloadBibles()
|
self.mediaItem.reloadBibles()
|
||||||
@ -194,7 +189,6 @@ class BiblePlugin(Plugin):
|
|||||||
u'preview': translate('BiblesPlugin',
|
u'preview': translate('BiblesPlugin',
|
||||||
'Preview the selected Bible.'),
|
'Preview the selected Bible.'),
|
||||||
u'live': translate('BiblesPlugin', 'Send the selected Bible live.'),
|
u'live': translate('BiblesPlugin', 'Send the selected Bible live.'),
|
||||||
u'service': translate('BiblesPlugin',
|
u'service': translate('BiblesPlugin', 'Add the selected Bible to the service.')
|
||||||
'Add the selected Bible to the service.')
|
|
||||||
}
|
}
|
||||||
self.setPluginUiTextStrings(tooltips)
|
self.setPluginUiTextStrings(tooltips)
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
@ -78,16 +78,14 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
"""
|
"""
|
||||||
self.manager = manager
|
self.manager = manager
|
||||||
self.web_bible_list = {}
|
self.web_bible_list = {}
|
||||||
OpenLPWizard.__init__(self, parent, bibleplugin, u'bibleImportWizard',
|
OpenLPWizard.__init__(self, parent, bibleplugin, u'bibleImportWizard', u':/wizards/wizard_importbible.bmp')
|
||||||
u':/wizards/wizard_importbible.bmp')
|
|
||||||
|
|
||||||
def setupUi(self, image):
|
def setupUi(self, image):
|
||||||
"""
|
"""
|
||||||
Set up the UI for the bible wizard.
|
Set up the UI for the bible wizard.
|
||||||
"""
|
"""
|
||||||
OpenLPWizard.setupUi(self, image)
|
OpenLPWizard.setupUi(self, image)
|
||||||
QtCore.QObject.connect(self.formatComboBox,
|
QtCore.QObject.connect(self.formatComboBox,QtCore.SIGNAL(u'currentIndexChanged(int)'),
|
||||||
QtCore.SIGNAL(u'currentIndexChanged(int)'),
|
|
||||||
self.onCurrentIndexChanged)
|
self.onCurrentIndexChanged)
|
||||||
|
|
||||||
def onCurrentIndexChanged(self, index):
|
def onCurrentIndexChanged(self, index):
|
||||||
@ -119,23 +117,17 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
"""
|
"""
|
||||||
Set up the signals used in the bible importer.
|
Set up the signals used in the bible importer.
|
||||||
"""
|
"""
|
||||||
QtCore.QObject.connect(self.webSourceComboBox,
|
QtCore.QObject.connect(self.webSourceComboBox, QtCore.SIGNAL(u'currentIndexChanged(int)'),
|
||||||
QtCore.SIGNAL(u'currentIndexChanged(int)'),
|
|
||||||
self.onWebSourceComboBoxIndexChanged)
|
self.onWebSourceComboBoxIndexChanged)
|
||||||
QtCore.QObject.connect(self.osisBrowseButton,
|
QtCore.QObject.connect(self.osisBrowseButton, QtCore.SIGNAL(u'clicked()'),
|
||||||
QtCore.SIGNAL(u'clicked()'),
|
|
||||||
self.onOsisBrowseButtonClicked)
|
self.onOsisBrowseButtonClicked)
|
||||||
QtCore.QObject.connect(self.csvBooksButton,
|
QtCore.QObject.connect(self.csvBooksButton, QtCore.SIGNAL(u'clicked()'),
|
||||||
QtCore.SIGNAL(u'clicked()'),
|
|
||||||
self.onCsvBooksBrowseButtonClicked)
|
self.onCsvBooksBrowseButtonClicked)
|
||||||
QtCore.QObject.connect(self.csvVersesButton,
|
QtCore.QObject.connect(self.csvVersesButton, QtCore.SIGNAL(u'clicked()'),
|
||||||
QtCore.SIGNAL(u'clicked()'),
|
|
||||||
self.onCsvVersesBrowseButtonClicked)
|
self.onCsvVersesBrowseButtonClicked)
|
||||||
QtCore.QObject.connect(self.openSongBrowseButton,
|
QtCore.QObject.connect(self.openSongBrowseButton, QtCore.SIGNAL(u'clicked()'),
|
||||||
QtCore.SIGNAL(u'clicked()'),
|
|
||||||
self.onOpenSongBrowseButtonClicked)
|
self.onOpenSongBrowseButtonClicked)
|
||||||
QtCore.QObject.connect(self.openlp1BrowseButton,
|
QtCore.QObject.connect(self.openlp1BrowseButton, QtCore.SIGNAL(u'clicked()'),
|
||||||
QtCore.SIGNAL(u'clicked()'),
|
|
||||||
self.onOpenlp1BrowseButtonClicked)
|
self.onOpenlp1BrowseButtonClicked)
|
||||||
|
|
||||||
def addCustomPages(self):
|
def addCustomPages(self):
|
||||||
@ -155,8 +147,7 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
self.formatComboBox.addItems([u'', u'', u'', u'', u''])
|
self.formatComboBox.addItems([u'', u'', u'', u'', u''])
|
||||||
self.formatComboBox.setObjectName(u'FormatComboBox')
|
self.formatComboBox.setObjectName(u'FormatComboBox')
|
||||||
self.formatLayout.addRow(self.formatLabel, self.formatComboBox)
|
self.formatLayout.addRow(self.formatLabel, self.formatComboBox)
|
||||||
self.spacer = QtGui.QSpacerItem(10, 0, QtGui.QSizePolicy.Fixed,
|
self.spacer = QtGui.QSpacerItem(10, 0, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
|
||||||
QtGui.QSizePolicy.Minimum)
|
|
||||||
self.formatLayout.setItem(1, QtGui.QFormLayout.LabelRole, self.spacer)
|
self.formatLayout.setItem(1, QtGui.QFormLayout.LabelRole, self.spacer)
|
||||||
self.selectPageLayout.addLayout(self.formatLayout)
|
self.selectPageLayout.addLayout(self.formatLayout)
|
||||||
self.selectStack = QtGui.QStackedLayout()
|
self.selectStack = QtGui.QStackedLayout()
|
||||||
@ -227,8 +218,7 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
self.openSongBrowseButton.setIcon(self.openIcon)
|
self.openSongBrowseButton.setIcon(self.openIcon)
|
||||||
self.openSongBrowseButton.setObjectName(u'OpenSongBrowseButton')
|
self.openSongBrowseButton.setObjectName(u'OpenSongBrowseButton')
|
||||||
self.openSongFileLayout.addWidget(self.openSongBrowseButton)
|
self.openSongFileLayout.addWidget(self.openSongBrowseButton)
|
||||||
self.openSongLayout.addRow(self.openSongFileLabel,
|
self.openSongLayout.addRow(self.openSongFileLabel, self.openSongFileLayout)
|
||||||
self.openSongFileLayout)
|
|
||||||
self.openSongLayout.setItem(1, QtGui.QFormLayout.LabelRole, self.spacer)
|
self.openSongLayout.setItem(1, QtGui.QFormLayout.LabelRole, self.spacer)
|
||||||
self.selectStack.addWidget(self.openSongWidget)
|
self.selectStack.addWidget(self.openSongWidget)
|
||||||
self.webTabWidget = QtGui.QTabWidget(self.selectPage)
|
self.webTabWidget = QtGui.QTabWidget(self.selectPage)
|
||||||
@ -239,23 +229,18 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
self.webBibleLayout.setObjectName(u'WebBibleLayout')
|
self.webBibleLayout.setObjectName(u'WebBibleLayout')
|
||||||
self.webSourceLabel = QtGui.QLabel(self.webBibleTab)
|
self.webSourceLabel = QtGui.QLabel(self.webBibleTab)
|
||||||
self.webSourceLabel.setObjectName(u'WebSourceLabel')
|
self.webSourceLabel.setObjectName(u'WebSourceLabel')
|
||||||
self.webBibleLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
|
self.webBibleLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.webSourceLabel)
|
||||||
self.webSourceLabel)
|
|
||||||
self.webSourceComboBox = QtGui.QComboBox(self.webBibleTab)
|
self.webSourceComboBox = QtGui.QComboBox(self.webBibleTab)
|
||||||
self.webSourceComboBox.setObjectName(u'WebSourceComboBox')
|
self.webSourceComboBox.setObjectName(u'WebSourceComboBox')
|
||||||
self.webSourceComboBox.addItems([u'', u'', u''])
|
self.webSourceComboBox.addItems([u'', u'', u''])
|
||||||
self.webBibleLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
|
self.webBibleLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.webSourceComboBox)
|
||||||
self.webSourceComboBox)
|
|
||||||
self.webTranslationLabel = QtGui.QLabel(self.webBibleTab)
|
self.webTranslationLabel = QtGui.QLabel(self.webBibleTab)
|
||||||
self.webTranslationLabel.setObjectName(u'webTranslationLabel')
|
self.webTranslationLabel.setObjectName(u'webTranslationLabel')
|
||||||
self.webBibleLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
|
self.webBibleLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.webTranslationLabel)
|
||||||
self.webTranslationLabel)
|
|
||||||
self.webTranslationComboBox = QtGui.QComboBox(self.webBibleTab)
|
self.webTranslationComboBox = QtGui.QComboBox(self.webBibleTab)
|
||||||
self.webTranslationComboBox.setSizeAdjustPolicy(
|
self.webTranslationComboBox.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents)
|
||||||
QtGui.QComboBox.AdjustToContents)
|
|
||||||
self.webTranslationComboBox.setObjectName(u'WebTranslationComboBox')
|
self.webTranslationComboBox.setObjectName(u'WebTranslationComboBox')
|
||||||
self.webBibleLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
|
self.webBibleLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.webTranslationComboBox)
|
||||||
self.webTranslationComboBox)
|
|
||||||
self.webTabWidget.addTab(self.webBibleTab, u'')
|
self.webTabWidget.addTab(self.webBibleTab, u'')
|
||||||
self.webProxyTab = QtGui.QWidget()
|
self.webProxyTab = QtGui.QWidget()
|
||||||
self.webProxyTab.setObjectName(u'WebProxyTab')
|
self.webProxyTab.setObjectName(u'WebProxyTab')
|
||||||
@ -263,28 +248,22 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
self.webProxyLayout.setObjectName(u'WebProxyLayout')
|
self.webProxyLayout.setObjectName(u'WebProxyLayout')
|
||||||
self.webServerLabel = QtGui.QLabel(self.webProxyTab)
|
self.webServerLabel = QtGui.QLabel(self.webProxyTab)
|
||||||
self.webServerLabel.setObjectName(u'WebServerLabel')
|
self.webServerLabel.setObjectName(u'WebServerLabel')
|
||||||
self.webProxyLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
|
self.webProxyLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.webServerLabel)
|
||||||
self.webServerLabel)
|
|
||||||
self.webServerEdit = QtGui.QLineEdit(self.webProxyTab)
|
self.webServerEdit = QtGui.QLineEdit(self.webProxyTab)
|
||||||
self.webServerEdit.setObjectName(u'WebServerEdit')
|
self.webServerEdit.setObjectName(u'WebServerEdit')
|
||||||
self.webProxyLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
|
self.webProxyLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.webServerEdit)
|
||||||
self.webServerEdit)
|
|
||||||
self.webUserLabel = QtGui.QLabel(self.webProxyTab)
|
self.webUserLabel = QtGui.QLabel(self.webProxyTab)
|
||||||
self.webUserLabel.setObjectName(u'WebUserLabel')
|
self.webUserLabel.setObjectName(u'WebUserLabel')
|
||||||
self.webProxyLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
|
self.webProxyLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.webUserLabel)
|
||||||
self.webUserLabel)
|
|
||||||
self.webUserEdit = QtGui.QLineEdit(self.webProxyTab)
|
self.webUserEdit = QtGui.QLineEdit(self.webProxyTab)
|
||||||
self.webUserEdit.setObjectName(u'WebUserEdit')
|
self.webUserEdit.setObjectName(u'WebUserEdit')
|
||||||
self.webProxyLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
|
self.webProxyLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.webUserEdit)
|
||||||
self.webUserEdit)
|
|
||||||
self.webPasswordLabel = QtGui.QLabel(self.webProxyTab)
|
self.webPasswordLabel = QtGui.QLabel(self.webProxyTab)
|
||||||
self.webPasswordLabel.setObjectName(u'WebPasswordLabel')
|
self.webPasswordLabel.setObjectName(u'WebPasswordLabel')
|
||||||
self.webProxyLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
|
self.webProxyLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.webPasswordLabel)
|
||||||
self.webPasswordLabel)
|
|
||||||
self.webPasswordEdit = QtGui.QLineEdit(self.webProxyTab)
|
self.webPasswordEdit = QtGui.QLineEdit(self.webProxyTab)
|
||||||
self.webPasswordEdit.setObjectName(u'WebPasswordEdit')
|
self.webPasswordEdit.setObjectName(u'WebPasswordEdit')
|
||||||
self.webProxyLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
|
self.webProxyLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.webPasswordEdit)
|
||||||
self.webPasswordEdit)
|
|
||||||
self.webTabWidget.addTab(self.webProxyTab, u'')
|
self.webTabWidget.addTab(self.webProxyTab, u'')
|
||||||
self.selectStack.addWidget(self.webTabWidget)
|
self.selectStack.addWidget(self.webTabWidget)
|
||||||
self.openlp1Widget = QtGui.QWidget(self.selectPage)
|
self.openlp1Widget = QtGui.QWidget(self.selectPage)
|
||||||
@ -319,36 +298,30 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
self.licenseDetailsLayout.setObjectName(u'LicenseDetailsLayout')
|
self.licenseDetailsLayout.setObjectName(u'LicenseDetailsLayout')
|
||||||
self.versionNameLabel = QtGui.QLabel(self.licenseDetailsPage)
|
self.versionNameLabel = QtGui.QLabel(self.licenseDetailsPage)
|
||||||
self.versionNameLabel.setObjectName(u'VersionNameLabel')
|
self.versionNameLabel.setObjectName(u'VersionNameLabel')
|
||||||
self.licenseDetailsLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
|
self.licenseDetailsLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.versionNameLabel)
|
||||||
self.versionNameLabel)
|
|
||||||
self.versionNameEdit = QtGui.QLineEdit(self.licenseDetailsPage)
|
self.versionNameEdit = QtGui.QLineEdit(self.licenseDetailsPage)
|
||||||
self.versionNameEdit.setObjectName(u'VersionNameEdit')
|
self.versionNameEdit.setObjectName(u'VersionNameEdit')
|
||||||
self.licenseDetailsLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
|
self.licenseDetailsLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.versionNameEdit)
|
||||||
self.versionNameEdit)
|
|
||||||
self.copyrightLabel = QtGui.QLabel(self.licenseDetailsPage)
|
self.copyrightLabel = QtGui.QLabel(self.licenseDetailsPage)
|
||||||
self.copyrightLabel.setObjectName(u'CopyrightLabel')
|
self.copyrightLabel.setObjectName(u'CopyrightLabel')
|
||||||
self.licenseDetailsLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
|
self.licenseDetailsLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.copyrightLabel)
|
||||||
self.copyrightLabel)
|
|
||||||
self.copyrightEdit = QtGui.QLineEdit(self.licenseDetailsPage)
|
self.copyrightEdit = QtGui.QLineEdit(self.licenseDetailsPage)
|
||||||
self.copyrightEdit.setObjectName(u'CopyrightEdit')
|
self.copyrightEdit.setObjectName(u'CopyrightEdit')
|
||||||
self.licenseDetailsLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
|
self.licenseDetailsLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.copyrightEdit)
|
||||||
self.copyrightEdit)
|
|
||||||
self.permissionsLabel = QtGui.QLabel(self.licenseDetailsPage)
|
self.permissionsLabel = QtGui.QLabel(self.licenseDetailsPage)
|
||||||
self.permissionsLabel.setObjectName(u'PermissionsLabel')
|
self.permissionsLabel.setObjectName(u'PermissionsLabel')
|
||||||
self.licenseDetailsLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
|
self.licenseDetailsLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
|
||||||
self.permissionsLabel)
|
self.permissionsLabel)
|
||||||
self.permissionsEdit = QtGui.QLineEdit(self.licenseDetailsPage)
|
self.permissionsEdit = QtGui.QLineEdit(self.licenseDetailsPage)
|
||||||
self.permissionsEdit.setObjectName(u'PermissionsEdit')
|
self.permissionsEdit.setObjectName(u'PermissionsEdit')
|
||||||
self.licenseDetailsLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
|
self.licenseDetailsLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.permissionsEdit)
|
||||||
self.permissionsEdit)
|
|
||||||
self.addPage(self.licenseDetailsPage)
|
self.addPage(self.licenseDetailsPage)
|
||||||
|
|
||||||
def retranslateUi(self):
|
def retranslateUi(self):
|
||||||
"""
|
"""
|
||||||
Allow for localisation of the bible import wizard.
|
Allow for localisation of the bible import wizard.
|
||||||
"""
|
"""
|
||||||
self.setWindowTitle(
|
self.setWindowTitle(translate('BiblesPlugin.ImportWizardForm', 'Bible Import Wizard'))
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Bible Import Wizard'))
|
|
||||||
self.titleLabel.setText(WizardStrings.HeaderStyle %
|
self.titleLabel.setText(WizardStrings.HeaderStyle %
|
||||||
translate('OpenLP.Ui', 'Welcome to the Bible Import Wizard'))
|
translate('OpenLP.Ui', 'Welcome to the Bible Import Wizard'))
|
||||||
self.informationLabel.setText(
|
self.informationLabel.setText(
|
||||||
@ -365,53 +338,36 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
self.formatComboBox.setItemText(BibleFormat.WebDownload,
|
self.formatComboBox.setItemText(BibleFormat.WebDownload,
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Web Download'))
|
translate('BiblesPlugin.ImportWizardForm', 'Web Download'))
|
||||||
self.formatComboBox.setItemText(BibleFormat.OpenLP1, UiStrings().OLPV1)
|
self.formatComboBox.setItemText(BibleFormat.OpenLP1, UiStrings().OLPV1)
|
||||||
self.openlp1FileLabel.setText(
|
self.openlp1FileLabel.setText(translate('BiblesPlugin.ImportWizardForm', 'Bible file:'))
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Bible file:'))
|
self.osisFileLabel.setText(translate('BiblesPlugin.ImportWizardForm', 'Bible file:'))
|
||||||
self.osisFileLabel.setText(
|
self.csvBooksLabel.setText(translate('BiblesPlugin.ImportWizardForm', 'Books file:'))
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Bible file:'))
|
self.csvVersesLabel.setText(translate('BiblesPlugin.ImportWizardForm', 'Verses file:'))
|
||||||
self.csvBooksLabel.setText(
|
self.openSongFileLabel.setText(translate('BiblesPlugin.ImportWizardForm', 'Bible file:'))
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Books file:'))
|
self.webSourceLabel.setText(translate('BiblesPlugin.ImportWizardForm', 'Location:'))
|
||||||
self.csvVersesLabel.setText(
|
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Verses file:'))
|
|
||||||
self.openSongFileLabel.setText(
|
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Bible file:'))
|
|
||||||
self.webSourceLabel.setText(
|
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Location:'))
|
|
||||||
self.webSourceComboBox.setItemText(WebDownload.Crosswalk,
|
self.webSourceComboBox.setItemText(WebDownload.Crosswalk,
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Crosswalk'))
|
translate('BiblesPlugin.ImportWizardForm', 'Crosswalk'))
|
||||||
self.webSourceComboBox.setItemText(WebDownload.BibleGateway,
|
self.webSourceComboBox.setItemText(WebDownload.BibleGateway,
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'BibleGateway'))
|
translate('BiblesPlugin.ImportWizardForm', 'BibleGateway'))
|
||||||
self.webSourceComboBox.setItemText(WebDownload.Bibleserver,
|
self.webSourceComboBox.setItemText(WebDownload.Bibleserver,
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Bibleserver'))
|
translate('BiblesPlugin.ImportWizardForm', 'Bibleserver'))
|
||||||
self.webTranslationLabel.setText(
|
self.webTranslationLabel.setText(translate('BiblesPlugin.ImportWizardForm', 'Bible:'))
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Bible:'))
|
self.webTabWidget.setTabText(self.webTabWidget.indexOf(self.webBibleTab),
|
||||||
self.webTabWidget.setTabText(
|
|
||||||
self.webTabWidget.indexOf(self.webBibleTab),
|
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Download Options'))
|
translate('BiblesPlugin.ImportWizardForm', 'Download Options'))
|
||||||
self.webServerLabel.setText(
|
self.webServerLabel.setText(translate('BiblesPlugin.ImportWizardForm', 'Server:'))
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Server:'))
|
self.webUserLabel.setText(translate('BiblesPlugin.ImportWizardForm', 'Username:'))
|
||||||
self.webUserLabel.setText(
|
self.webPasswordLabel.setText(translate('BiblesPlugin.ImportWizardForm', 'Password:'))
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Username:'))
|
self.webTabWidget.setTabText(self.webTabWidget.indexOf(self.webProxyTab),
|
||||||
self.webPasswordLabel.setText(
|
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Password:'))
|
|
||||||
self.webTabWidget.setTabText(
|
|
||||||
self.webTabWidget.indexOf(self.webProxyTab),
|
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
'Proxy Server (Optional)'))
|
'Proxy Server (Optional)'))
|
||||||
self.licenseDetailsPage.setTitle(
|
self.licenseDetailsPage.setTitle(
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'License Details'))
|
translate('BiblesPlugin.ImportWizardForm', 'License Details'))
|
||||||
self.licenseDetailsPage.setSubTitle(
|
self.licenseDetailsPage.setSubTitle(translate('BiblesPlugin.ImportWizardForm',
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
|
||||||
'Set up the Bible\'s license details.'))
|
'Set up the Bible\'s license details.'))
|
||||||
self.versionNameLabel.setText(
|
self.versionNameLabel.setText(translate('BiblesPlugin.ImportWizardForm', 'Version name:'))
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Version name:'))
|
self.copyrightLabel.setText(translate('BiblesPlugin.ImportWizardForm', 'Copyright:'))
|
||||||
self.copyrightLabel.setText(
|
self.permissionsLabel.setText(translate('BiblesPlugin.ImportWizardForm', 'Permissions:'))
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Copyright:'))
|
|
||||||
self.permissionsLabel.setText(
|
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Permissions:'))
|
|
||||||
self.progressPage.setTitle(WizardStrings.Importing)
|
self.progressPage.setTitle(WizardStrings.Importing)
|
||||||
self.progressPage.setSubTitle(
|
self.progressPage.setSubTitle(translate('BiblesPlugin.ImportWizardForm',
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
|
||||||
'Please wait while your Bible is imported.'))
|
'Please wait while your Bible is imported.'))
|
||||||
self.progressLabel.setText(WizardStrings.Ready)
|
self.progressLabel.setText(WizardStrings.Ready)
|
||||||
self.progressBar.setFormat(u'%p%')
|
self.progressBar.setFormat(u'%p%')
|
||||||
@ -423,8 +379,7 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
self.csvVersesLabel.minimumSizeHint().width(),
|
self.csvVersesLabel.minimumSizeHint().width(),
|
||||||
self.openSongFileLabel.minimumSizeHint().width(),
|
self.openSongFileLabel.minimumSizeHint().width(),
|
||||||
self.openlp1FileLabel.minimumSizeHint().width())
|
self.openlp1FileLabel.minimumSizeHint().width())
|
||||||
self.spacer.changeSize(labelWidth, 0,
|
self.spacer.changeSize(labelWidth, 0, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
|
||||||
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
|
|
||||||
|
|
||||||
def validateCurrentPage(self):
|
def validateCurrentPage(self):
|
||||||
"""
|
"""
|
||||||
@ -435,41 +390,32 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
elif self.currentPage() == self.selectPage:
|
elif self.currentPage() == self.selectPage:
|
||||||
if self.field(u'source_format') == BibleFormat.OSIS:
|
if self.field(u'source_format') == BibleFormat.OSIS:
|
||||||
if not self.field(u'osis_location'):
|
if not self.field(u'osis_location'):
|
||||||
critical_error_message_box(UiStrings().NFSs,
|
critical_error_message_box(UiStrings().NFSs, WizardStrings.YouSpecifyFile % WizardStrings.OSIS)
|
||||||
WizardStrings.YouSpecifyFile % WizardStrings.OSIS)
|
|
||||||
self.osisFileEdit.setFocus()
|
self.osisFileEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
elif self.field(u'source_format') == BibleFormat.CSV:
|
elif self.field(u'source_format') == BibleFormat.CSV:
|
||||||
if not self.field(u'csv_booksfile'):
|
if not self.field(u'csv_booksfile'):
|
||||||
critical_error_message_box(UiStrings().NFSs,
|
critical_error_message_box(UiStrings().NFSs, translate('BiblesPlugin.ImportWizardForm',
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
'You need to specify a file with books of the Bible to use in the import.'))
|
||||||
'You need to specify a file with books of '
|
|
||||||
'the Bible to use in the import.'))
|
|
||||||
self.csvBooksEdit.setFocus()
|
self.csvBooksEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
elif not self.field(u'csv_versefile'):
|
elif not self.field(u'csv_versefile'):
|
||||||
critical_error_message_box(UiStrings().NFSs,
|
critical_error_message_box(UiStrings().NFSs,
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
'You need to specify a file of Bible '
|
'You need to specify a file of Bible verses to import.'))
|
||||||
'verses to import.'))
|
|
||||||
self.csvVersesEdit.setFocus()
|
self.csvVersesEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
elif self.field(u'source_format') == \
|
elif self.field(u'source_format') == BibleFormat.OpenSong:
|
||||||
BibleFormat.OpenSong:
|
|
||||||
if not self.field(u'opensong_file'):
|
if not self.field(u'opensong_file'):
|
||||||
critical_error_message_box(UiStrings().NFSs,
|
critical_error_message_box(UiStrings().NFSs, WizardStrings.YouSpecifyFile % WizardStrings.OS)
|
||||||
WizardStrings.YouSpecifyFile % WizardStrings.OS)
|
|
||||||
self.openSongFileEdit.setFocus()
|
self.openSongFileEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
elif self.field(u'source_format') == \
|
elif self.field(u'source_format') == BibleFormat.WebDownload:
|
||||||
BibleFormat.WebDownload:
|
self.versionNameEdit.setText(self.webTranslationComboBox.currentText())
|
||||||
self.versionNameEdit.setText(
|
|
||||||
self.webTranslationComboBox.currentText())
|
|
||||||
return True
|
return True
|
||||||
elif self.field(u'source_format') == BibleFormat.OpenLP1:
|
elif self.field(u'source_format') == BibleFormat.OpenLP1:
|
||||||
if not self.field(u'openlp1_location'):
|
if not self.field(u'openlp1_location'):
|
||||||
critical_error_message_box(UiStrings().NFSs,
|
critical_error_message_box(UiStrings().NFSs, WizardStrings.YouSpecifyFile % UiStrings().OLPV1)
|
||||||
WizardStrings.YouSpecifyFile % UiStrings().OLPV1)
|
|
||||||
self.openlp1FileEdit.setFocus()
|
self.openlp1FileEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
@ -479,32 +425,27 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
path = AppLocation.get_section_data_path(u'bibles')
|
path = AppLocation.get_section_data_path(u'bibles')
|
||||||
if not license_version:
|
if not license_version:
|
||||||
critical_error_message_box(UiStrings().EmptyField,
|
critical_error_message_box(UiStrings().EmptyField,
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm', 'You need to specify a version name for your Bible.'))
|
||||||
'You need to specify a version name for your Bible.'))
|
|
||||||
self.versionNameEdit.setFocus()
|
self.versionNameEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
elif not license_copyright:
|
elif not license_copyright:
|
||||||
critical_error_message_box(UiStrings().EmptyField,
|
critical_error_message_box(UiStrings().EmptyField,
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm', 'You need to set a copyright for your Bible. '
|
||||||
'You need to set a copyright for your Bible. '
|
'Bibles in the Public Domain need to be marked as such.'))
|
||||||
'Bibles in the Public Domain need to be marked as such.'))
|
|
||||||
self.copyrightEdit.setFocus()
|
self.copyrightEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
elif self.manager.exists(license_version):
|
elif self.manager.exists(license_version):
|
||||||
critical_error_message_box(
|
critical_error_message_box(translate('BiblesPlugin.ImportWizardForm', 'Bible Exists'),
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Bible Exists'),
|
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
'This Bible already exists. Please import '
|
'This Bible already exists. Please import a different Bible or first delete the existing one.'))
|
||||||
'a different Bible or first delete the existing one.'))
|
|
||||||
self.versionNameEdit.setFocus()
|
self.versionNameEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
elif os.path.exists(os.path.join(path, clean_filename(
|
elif os.path.exists(os.path.join(path, clean_filename(
|
||||||
license_version))):
|
license_version))):
|
||||||
critical_error_message_box(
|
critical_error_message_box(
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Bible Exists'),
|
translate('BiblesPlugin.ImportWizardForm', 'Bible Exists'),
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm', 'This Bible already exists. Please import '
|
||||||
'This Bible already exists. Please import '
|
'a different Bible or first delete the existing one.'))
|
||||||
'a different Bible or first delete the existing one.'))
|
|
||||||
self.versionNameEdit.setFocus()
|
self.versionNameEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
@ -528,40 +469,34 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
"""
|
"""
|
||||||
Show the file open dialog for the OSIS file.
|
Show the file open dialog for the OSIS file.
|
||||||
"""
|
"""
|
||||||
self.getFileName(WizardStrings.OpenTypeFile % WizardStrings.OSIS,
|
self.getFileName(WizardStrings.OpenTypeFile % WizardStrings.OSIS, self.osisFileEdit)
|
||||||
self.osisFileEdit)
|
|
||||||
|
|
||||||
def onCsvBooksBrowseButtonClicked(self):
|
def onCsvBooksBrowseButtonClicked(self):
|
||||||
"""
|
"""
|
||||||
Show the file open dialog for the books CSV file.
|
Show the file open dialog for the books CSV file.
|
||||||
"""
|
"""
|
||||||
self.getFileName(WizardStrings.OpenTypeFile % WizardStrings.CSV,
|
self.getFileName(WizardStrings.OpenTypeFile % WizardStrings.CSV, self.csvBooksEdit, u'%s (*.csv)'
|
||||||
self.csvBooksEdit, u'%s (*.csv)'
|
|
||||||
% translate('BiblesPlugin.ImportWizardForm', 'CSV File'))
|
% translate('BiblesPlugin.ImportWizardForm', 'CSV File'))
|
||||||
|
|
||||||
def onCsvVersesBrowseButtonClicked(self):
|
def onCsvVersesBrowseButtonClicked(self):
|
||||||
"""
|
"""
|
||||||
Show the file open dialog for the verses CSV file.
|
Show the file open dialog for the verses CSV file.
|
||||||
"""
|
"""
|
||||||
self.getFileName(WizardStrings.OpenTypeFile % WizardStrings.CSV,
|
self.getFileName(WizardStrings.OpenTypeFile % WizardStrings.CSV, self.csvVersesEdit, u'%s (*.csv)'
|
||||||
self.csvVersesEdit, u'%s (*.csv)'
|
|
||||||
% translate('BiblesPlugin.ImportWizardForm', 'CSV File'))
|
% translate('BiblesPlugin.ImportWizardForm', 'CSV File'))
|
||||||
|
|
||||||
def onOpenSongBrowseButtonClicked(self):
|
def onOpenSongBrowseButtonClicked(self):
|
||||||
"""
|
"""
|
||||||
Show the file open dialog for the OpenSong file.
|
Show the file open dialog for the OpenSong file.
|
||||||
"""
|
"""
|
||||||
self.getFileName(WizardStrings.OpenTypeFile % WizardStrings.OS,
|
self.getFileName(WizardStrings.OpenTypeFile % WizardStrings.OS, self.openSongFileEdit)
|
||||||
self.openSongFileEdit)
|
|
||||||
|
|
||||||
def onOpenlp1BrowseButtonClicked(self):
|
def onOpenlp1BrowseButtonClicked(self):
|
||||||
"""
|
"""
|
||||||
Show the file open dialog for the openlp.org 1.x file.
|
Show the file open dialog for the openlp.org 1.x file.
|
||||||
"""
|
"""
|
||||||
self.getFileName(WizardStrings.OpenTypeFile % UiStrings().OLPV1,
|
self.getFileName(WizardStrings.OpenTypeFile % UiStrings().OLPV1, self.openlp1FileEdit, u'%s (*.bible)' %
|
||||||
self.openlp1FileEdit, u'%s (*.bible)' %
|
translate('BiblesPlugin.ImportWizardForm', 'openlp.org 1.x Bible Files'))
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
|
||||||
'openlp.org 1.x Bible Files'))
|
|
||||||
|
|
||||||
def registerFields(self):
|
def registerFields(self):
|
||||||
"""
|
"""
|
||||||
@ -573,18 +508,14 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
self.selectPage.registerField(u'csv_versefile', self.csvVersesEdit)
|
self.selectPage.registerField(u'csv_versefile', self.csvVersesEdit)
|
||||||
self.selectPage.registerField(u'opensong_file', self.openSongFileEdit)
|
self.selectPage.registerField(u'opensong_file', self.openSongFileEdit)
|
||||||
self.selectPage.registerField(u'web_location', self.webSourceComboBox)
|
self.selectPage.registerField(u'web_location', self.webSourceComboBox)
|
||||||
self.selectPage.registerField(
|
self.selectPage.registerField(u'web_biblename', self.webTranslationComboBox)
|
||||||
u'web_biblename', self.webTranslationComboBox)
|
|
||||||
self.selectPage.registerField(u'proxy_server', self.webServerEdit)
|
self.selectPage.registerField(u'proxy_server', self.webServerEdit)
|
||||||
self.selectPage.registerField(u'proxy_username', self.webUserEdit)
|
self.selectPage.registerField(u'proxy_username', self.webUserEdit)
|
||||||
self.selectPage.registerField(u'proxy_password', self.webPasswordEdit)
|
self.selectPage.registerField(u'proxy_password', self.webPasswordEdit)
|
||||||
self.selectPage.registerField(u'openlp1_location', self.openlp1FileEdit)
|
self.selectPage.registerField(u'openlp1_location', self.openlp1FileEdit)
|
||||||
self.licenseDetailsPage.registerField(
|
self.licenseDetailsPage.registerField(u'license_version', self.versionNameEdit)
|
||||||
u'license_version', self.versionNameEdit)
|
self.licenseDetailsPage.registerField(u'license_copyright', self.copyrightEdit)
|
||||||
self.licenseDetailsPage.registerField(
|
self.licenseDetailsPage.registerField(u'license_permissions', self.permissionsEdit)
|
||||||
u'license_copyright', self.copyrightEdit)
|
|
||||||
self.licenseDetailsPage.registerField(
|
|
||||||
u'license_permissions', self.permissionsEdit)
|
|
||||||
|
|
||||||
def setDefaults(self):
|
def setDefaults(self):
|
||||||
"""
|
"""
|
||||||
@ -601,8 +532,7 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
self.setField(u'csv_versefile', '')
|
self.setField(u'csv_versefile', '')
|
||||||
self.setField(u'opensong_file', '')
|
self.setField(u'opensong_file', '')
|
||||||
self.setField(u'web_location', WebDownload.Crosswalk)
|
self.setField(u'web_location', WebDownload.Crosswalk)
|
||||||
self.setField(u'web_biblename',
|
self.setField(u'web_biblename', self.webTranslationComboBox.currentIndex())
|
||||||
self.webTranslationComboBox.currentIndex())
|
|
||||||
self.setField(u'proxy_server', settings.value(u'proxy address', u''))
|
self.setField(u'proxy_server', settings.value(u'proxy address', u''))
|
||||||
self.setField(u'proxy_username', settings.value(u'proxy username', u''))
|
self.setField(u'proxy_username', settings.value(u'proxy username', u''))
|
||||||
self.setField(u'proxy_password', settings.value(u'proxy password', u''))
|
self.setField(u'proxy_password', settings.value(u'proxy password', u''))
|
||||||
@ -632,8 +562,7 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
The WebDownload type e.g. bibleserver.
|
The WebDownload type e.g. bibleserver.
|
||||||
"""
|
"""
|
||||||
self.web_bible_list[download_type] = {}
|
self.web_bible_list[download_type] = {}
|
||||||
bibles = BiblesResourcesDB.get_webbibles(
|
bibles = BiblesResourcesDB.get_webbibles(WebDownload.Names[download_type])
|
||||||
WebDownload.Names[download_type])
|
|
||||||
for bible in bibles:
|
for bible in bibles:
|
||||||
version = bible[u'name']
|
version = bible[u'name']
|
||||||
name = bible[u'abbreviation']
|
name = bible[u'abbreviation']
|
||||||
@ -646,9 +575,7 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
OpenLPWizard.preWizard(self)
|
OpenLPWizard.preWizard(self)
|
||||||
bible_type = self.field(u'source_format')
|
bible_type = self.field(u'source_format')
|
||||||
if bible_type == BibleFormat.WebDownload:
|
if bible_type == BibleFormat.WebDownload:
|
||||||
self.progressLabel.setText(translate(
|
self.progressLabel.setText(translate('BiblesPlugin.ImportWizardForm', 'Registering Bible...'))
|
||||||
'BiblesPlugin.ImportWizardForm',
|
|
||||||
'Registering Bible...'))
|
|
||||||
else:
|
else:
|
||||||
self.progressLabel.setText(WizardStrings.StartingImport)
|
self.progressLabel.setText(WizardStrings.StartingImport)
|
||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
@ -707,13 +634,11 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
self.manager.reload_bibles()
|
self.manager.reload_bibles()
|
||||||
if bible_type == BibleFormat.WebDownload:
|
if bible_type == BibleFormat.WebDownload:
|
||||||
self.progressLabel.setText(
|
self.progressLabel.setText(
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Registered '
|
translate('BiblesPlugin.ImportWizardForm', 'Registered Bible. Please note, that verses will be '
|
||||||
'Bible. Please note, that verses will be downloaded on\n'
|
'downloaded on\ndemand and thus an internet connection is required.'))
|
||||||
'demand and thus an internet connection is required.'))
|
|
||||||
else:
|
else:
|
||||||
self.progressLabel.setText(WizardStrings.FinishedImport)
|
self.progressLabel.setText(WizardStrings.FinishedImport)
|
||||||
else:
|
else:
|
||||||
self.progressLabel.setText(translate(
|
self.progressLabel.setText(translate('BiblesPlugin.ImportWizardForm', 'Your Bible import failed.'))
|
||||||
'BiblesPlugin.ImportWizardForm', 'Your Bible import failed.'))
|
|
||||||
del self.manager.db_cache[importer.name]
|
del self.manager.db_cache[importer.name]
|
||||||
delete_database(self.plugin.settingsSection, importer.file)
|
delete_database(self.plugin.settingsSection, importer.file)
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
@ -36,13 +36,11 @@ from tempfile import gettempdir
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import Receiver, SettingsManager, translate, \
|
from openlp.core.lib import Receiver, SettingsManager, translate, check_directory_exists, Settings
|
||||||
check_directory_exists, Settings
|
|
||||||
from openlp.core.lib.ui import UiStrings, critical_error_message_box
|
from openlp.core.lib.ui import UiStrings, 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, \
|
from openlp.plugins.bibles.lib.db import BibleDB, BibleMeta, OldBibleDB, BiblesResourcesDB
|
||||||
BiblesResourcesDB
|
|
||||||
from openlp.plugins.bibles.lib.http import BSExtract, BGExtract, CWExtract
|
from openlp.plugins.bibles.lib.http import BSExtract, BGExtract, CWExtract
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
@ -73,21 +71,18 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
self.suffix = u'.sqlite'
|
self.suffix = u'.sqlite'
|
||||||
self.settingsSection = u'bibles'
|
self.settingsSection = u'bibles'
|
||||||
self.path = AppLocation.get_section_data_path(self.settingsSection)
|
self.path = AppLocation.get_section_data_path(self.settingsSection)
|
||||||
self.temp_dir = os.path.join(
|
self.temp_dir = os.path.join(unicode(gettempdir(), get_filesystem_encoding()), u'openlp')
|
||||||
unicode(gettempdir(), get_filesystem_encoding()), u'openlp')
|
|
||||||
self.files = self.manager.old_bible_databases
|
self.files = self.manager.old_bible_databases
|
||||||
self.success = {}
|
self.success = {}
|
||||||
self.newbibles = {}
|
self.newbibles = {}
|
||||||
OpenLPWizard.__init__(self, parent, bibleplugin, u'bibleUpgradeWizard',
|
OpenLPWizard.__init__(self, parent, bibleplugin, u'bibleUpgradeWizard', u':/wizards/wizard_importbible.bmp')
|
||||||
u':/wizards/wizard_importbible.bmp')
|
|
||||||
|
|
||||||
def setupUi(self, image):
|
def setupUi(self, image):
|
||||||
"""
|
"""
|
||||||
Set up the UI for the bible wizard.
|
Set up the UI for the bible wizard.
|
||||||
"""
|
"""
|
||||||
OpenLPWizard.setupUi(self, image)
|
OpenLPWizard.setupUi(self, image)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'openlp_stop_wizard'), self.stop_import)
|
||||||
QtCore.SIGNAL(u'openlp_stop_wizard'), self.stop_import)
|
|
||||||
|
|
||||||
def stop_import(self):
|
def stop_import(self):
|
||||||
"""
|
"""
|
||||||
@ -120,14 +115,12 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
"""
|
"""
|
||||||
Show the file open dialog for the OSIS file.
|
Show the file open dialog for the OSIS file.
|
||||||
"""
|
"""
|
||||||
filename = QtGui.QFileDialog.getExistingDirectory(self, translate(
|
filename = QtGui.QFileDialog.getExistingDirectory(self,
|
||||||
'BiblesPlugin.UpgradeWizardForm', 'Select a Backup Directory'),
|
translate('BiblesPlugin.UpgradeWizardForm', 'Select a Backup Directory'),
|
||||||
os.path.dirname(SettingsManager.get_last_dir(
|
os.path.dirname(SettingsManager.get_last_dir(self.plugin.settingsSection, 1)))
|
||||||
self.plugin.settingsSection, 1)))
|
|
||||||
if filename:
|
if filename:
|
||||||
self.backupDirectoryEdit.setText(filename)
|
self.backupDirectoryEdit.setText(filename)
|
||||||
SettingsManager.set_last_dir(self.plugin.settingsSection,
|
SettingsManager.set_last_dir(self.plugin.settingsSection, filename, 1)
|
||||||
filename, 1)
|
|
||||||
|
|
||||||
def onNoBackupCheckBoxToggled(self, checked):
|
def onNoBackupCheckBoxToggled(self, checked):
|
||||||
"""
|
"""
|
||||||
@ -144,8 +137,7 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
success = True
|
success = True
|
||||||
for filename in self.files:
|
for filename in self.files:
|
||||||
try:
|
try:
|
||||||
shutil.copy(os.path.join(self.path, filename[0]),
|
shutil.copy(os.path.join(self.path, filename[0]), backup_directory)
|
||||||
backup_directory)
|
|
||||||
except:
|
except:
|
||||||
success = False
|
success = False
|
||||||
return success
|
return success
|
||||||
@ -161,10 +153,8 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
"""
|
"""
|
||||||
Set up the signals used in the bible importer.
|
Set up the signals used in the bible importer.
|
||||||
"""
|
"""
|
||||||
QtCore.QObject.connect(self.backupBrowseButton,
|
QtCore.QObject.connect(self.backupBrowseButton, QtCore.SIGNAL(u'clicked()'), self.onBackupBrowseButtonClicked)
|
||||||
QtCore.SIGNAL(u'clicked()'), self.onBackupBrowseButtonClicked)
|
QtCore.QObject.connect(self.noBackupCheckBox, QtCore.SIGNAL(u'toggled(bool)'), self.onNoBackupCheckBoxToggled)
|
||||||
QtCore.QObject.connect(self.noBackupCheckBox,
|
|
||||||
QtCore.SIGNAL(u'toggled(bool)'), self.onNoBackupCheckBoxToggled)
|
|
||||||
|
|
||||||
def addCustomPages(self):
|
def addCustomPages(self):
|
||||||
"""
|
"""
|
||||||
@ -198,14 +188,12 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
self.backupBrowseButton.setIcon(self.openIcon)
|
self.backupBrowseButton.setIcon(self.openIcon)
|
||||||
self.backupBrowseButton.setObjectName(u'BackupBrowseButton')
|
self.backupBrowseButton.setObjectName(u'BackupBrowseButton')
|
||||||
self.backupDirectoryLayout.addWidget(self.backupBrowseButton)
|
self.backupDirectoryLayout.addWidget(self.backupBrowseButton)
|
||||||
self.formLayout.addRow(self.backupDirectoryLabel,
|
self.formLayout.addRow(self.backupDirectoryLabel, self.backupDirectoryLayout)
|
||||||
self.backupDirectoryLayout)
|
|
||||||
self.backupLayout.addLayout(self.formLayout)
|
self.backupLayout.addLayout(self.formLayout)
|
||||||
self.noBackupCheckBox = QtGui.QCheckBox(self.backupPage)
|
self.noBackupCheckBox = QtGui.QCheckBox(self.backupPage)
|
||||||
self.noBackupCheckBox.setObjectName('NoBackupCheckBox')
|
self.noBackupCheckBox.setObjectName('NoBackupCheckBox')
|
||||||
self.backupLayout.addWidget(self.noBackupCheckBox)
|
self.backupLayout.addWidget(self.noBackupCheckBox)
|
||||||
self.spacer = QtGui.QSpacerItem(10, 0, QtGui.QSizePolicy.Fixed,
|
self.spacer = QtGui.QSpacerItem(10, 0, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
|
||||||
QtGui.QSizePolicy.Minimum)
|
|
||||||
self.backupLayout.addItem(self.spacer)
|
self.backupLayout.addItem(self.spacer)
|
||||||
self.addPage(self.backupPage)
|
self.addPage(self.backupPage)
|
||||||
# Select Page
|
# Select Page
|
||||||
@ -216,8 +204,7 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
self.scrollArea = QtGui.QScrollArea(self.selectPage)
|
self.scrollArea = QtGui.QScrollArea(self.selectPage)
|
||||||
self.scrollArea.setWidgetResizable(True)
|
self.scrollArea.setWidgetResizable(True)
|
||||||
self.scrollArea.setObjectName(u'scrollArea')
|
self.scrollArea.setObjectName(u'scrollArea')
|
||||||
self.scrollArea.setHorizontalScrollBarPolicy(
|
self.scrollArea.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||||
QtCore.Qt.ScrollBarAlwaysOff)
|
|
||||||
self.scrollAreaContents = QtGui.QWidget(self.scrollArea)
|
self.scrollAreaContents = QtGui.QWidget(self.scrollArea)
|
||||||
self.scrollAreaContents.setObjectName(u'scrollAreaContents')
|
self.scrollAreaContents.setObjectName(u'scrollAreaContents')
|
||||||
self.formLayout = QtGui.QVBoxLayout(self.scrollAreaContents)
|
self.formLayout = QtGui.QVBoxLayout(self.scrollAreaContents)
|
||||||
@ -239,8 +226,7 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
self.checkBox[number].setText(bible.get_name())
|
self.checkBox[number].setText(bible.get_name())
|
||||||
self.checkBox[number].setCheckState(QtCore.Qt.Checked)
|
self.checkBox[number].setCheckState(QtCore.Qt.Checked)
|
||||||
self.formLayout.addWidget(self.checkBox[number])
|
self.formLayout.addWidget(self.checkBox[number])
|
||||||
self.spacerItem = QtGui.QSpacerItem(20, 5, QtGui.QSizePolicy.Minimum,
|
self.spacerItem = QtGui.QSpacerItem(20, 5, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
||||||
QtGui.QSizePolicy.Expanding)
|
|
||||||
self.formLayout.addItem(self.spacerItem)
|
self.formLayout.addItem(self.spacerItem)
|
||||||
self.scrollArea.setWidget(self.scrollAreaContents)
|
self.scrollArea.setWidget(self.scrollAreaContents)
|
||||||
|
|
||||||
@ -257,20 +243,14 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
"""
|
"""
|
||||||
Allow for localisation of the bible import wizard.
|
Allow for localisation of the bible import wizard.
|
||||||
"""
|
"""
|
||||||
self.setWindowTitle(translate('BiblesPlugin.UpgradeWizardForm',
|
self.setWindowTitle(translate('BiblesPlugin.UpgradeWizardForm', 'Bible Upgrade Wizard'))
|
||||||
'Bible Upgrade Wizard'))
|
|
||||||
self.titleLabel.setText(WizardStrings.HeaderStyle %
|
self.titleLabel.setText(WizardStrings.HeaderStyle %
|
||||||
translate('OpenLP.Ui', 'Welcome to the Bible Upgrade Wizard'))
|
translate('OpenLP.Ui', 'Welcome to the Bible Upgrade Wizard'))
|
||||||
self.informationLabel.setText(
|
self.informationLabel.setText(translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
translate('BiblesPlugin.UpgradeWizardForm',
|
'This wizard will help you to upgrade your existing Bibles from a prior version of OpenLP 2. '
|
||||||
'This wizard will help you to upgrade your existing Bibles from a '
|
'Click the next button below to start the upgrade process.'))
|
||||||
'prior version of OpenLP 2. Click the next button below to start '
|
self.backupPage.setTitle(translate('BiblesPlugin.UpgradeWizardForm', 'Select Backup Directory'))
|
||||||
'the upgrade process.'))
|
self.backupPage.setSubTitle(translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
self.backupPage.setTitle(
|
|
||||||
translate('BiblesPlugin.UpgradeWizardForm',
|
|
||||||
'Select Backup Directory'))
|
|
||||||
self.backupPage.setSubTitle(
|
|
||||||
translate('BiblesPlugin.UpgradeWizardForm',
|
|
||||||
'Please select a backup directory for your Bibles'))
|
'Please select a backup directory for your Bibles'))
|
||||||
self.backupInfoLabel.setText(translate('BiblesPlugin.UpgradeWizardForm',
|
self.backupInfoLabel.setText(translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
'Previous releases of OpenLP 2.0 are unable to use upgraded Bibles.'
|
'Previous releases of OpenLP 2.0 are unable to use upgraded Bibles.'
|
||||||
@ -281,21 +261,14 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
'http://wiki.openlp.org/faq">Frequently Asked Questions</a>.'))
|
'http://wiki.openlp.org/faq">Frequently Asked Questions</a>.'))
|
||||||
self.selectLabel.setText(translate('BiblesPlugin.UpgradeWizardForm',
|
self.selectLabel.setText(translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
'Please select a backup location for your Bibles.'))
|
'Please select a backup location for your Bibles.'))
|
||||||
self.backupDirectoryLabel.setText(
|
self.backupDirectoryLabel.setText(translate('BiblesPlugin.UpgradeWizardForm', 'Backup Directory:'))
|
||||||
translate('BiblesPlugin.UpgradeWizardForm', 'Backup Directory:'))
|
|
||||||
self.noBackupCheckBox.setText(
|
self.noBackupCheckBox.setText(
|
||||||
translate('BiblesPlugin.UpgradeWizardForm',
|
translate('BiblesPlugin.UpgradeWizardForm', 'There is no need to backup my Bibles'))
|
||||||
'There is no need to backup my Bibles'))
|
self.selectPage.setTitle(translate('BiblesPlugin.UpgradeWizardForm', 'Select Bibles'))
|
||||||
self.selectPage.setTitle(
|
self.selectPage.setSubTitle(translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
translate('BiblesPlugin.UpgradeWizardForm',
|
|
||||||
'Select Bibles'))
|
|
||||||
self.selectPage.setSubTitle(
|
|
||||||
translate('BiblesPlugin.UpgradeWizardForm',
|
|
||||||
'Please select the Bibles to upgrade'))
|
'Please select the Bibles to upgrade'))
|
||||||
self.progressPage.setTitle(translate('BiblesPlugin.UpgradeWizardForm',
|
self.progressPage.setTitle(translate('BiblesPlugin.UpgradeWizardForm', 'Upgrading'))
|
||||||
'Upgrading'))
|
self.progressPage.setSubTitle(translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
self.progressPage.setSubTitle(
|
|
||||||
translate('BiblesPlugin.UpgradeWizardForm',
|
|
||||||
'Please wait while your Bibles are upgraded.'))
|
'Please wait while your Bibles are upgraded.'))
|
||||||
self.progressLabel.setText(WizardStrings.Ready)
|
self.progressLabel.setText(WizardStrings.Ready)
|
||||||
self.progressBar.setFormat(u'%p%')
|
self.progressBar.setFormat(u'%p%')
|
||||||
@ -312,17 +285,14 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
if not backup_path:
|
if not backup_path:
|
||||||
critical_error_message_box(UiStrings().EmptyField,
|
critical_error_message_box(UiStrings().EmptyField,
|
||||||
translate('BiblesPlugin.UpgradeWizardForm',
|
translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
'You need to specify a backup directory for your '
|
'You need to specify a backup directory for your Bibles.'))
|
||||||
'Bibles.'))
|
|
||||||
self.backupDirectoryEdit.setFocus()
|
self.backupDirectoryEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
if not self.backupOldBibles(backup_path):
|
if not self.backupOldBibles(backup_path):
|
||||||
critical_error_message_box(UiStrings().Error,
|
critical_error_message_box(UiStrings().Error,
|
||||||
translate('BiblesPlugin.UpgradeWizardForm',
|
translate('BiblesPlugin.UpgradeWizardForm', 'The backup was not successful.\nTo backup your '
|
||||||
'The backup was not successful.\nTo backup your '
|
'Bibles you need permission to write to the given directory.'))
|
||||||
'Bibles you need permission to write to the given '
|
|
||||||
'directory.'))
|
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
elif self.currentPage() == self.selectPage:
|
elif self.currentPage() == self.selectPage:
|
||||||
@ -332,8 +302,7 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
continue
|
continue
|
||||||
# Move bibles to temp dir.
|
# Move bibles to temp dir.
|
||||||
if not os.path.exists(os.path.join(self.temp_dir, filename[0])):
|
if not os.path.exists(os.path.join(self.temp_dir, filename[0])):
|
||||||
shutil.move(
|
shutil.move(os.path.join(self.path, filename[0]), self.temp_dir)
|
||||||
os.path.join(self.path, filename[0]), self.temp_dir)
|
|
||||||
else:
|
else:
|
||||||
delete_file(os.path.join(self.path, filename[0]))
|
delete_file(os.path.join(self.path, filename[0]))
|
||||||
return True
|
return True
|
||||||
@ -367,8 +336,7 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
Prepare the UI for the upgrade.
|
Prepare the UI for the upgrade.
|
||||||
"""
|
"""
|
||||||
OpenLPWizard.preWizard(self)
|
OpenLPWizard.preWizard(self)
|
||||||
self.progressLabel.setText(
|
self.progressLabel.setText(translate('BiblesPlugin.UpgradeWizardForm', 'Starting upgrade...'))
|
||||||
translate('BiblesPlugin.UpgradeWizardForm', 'Starting upgrade...'))
|
|
||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
|
|
||||||
def performWizard(self):
|
def performWizard(self):
|
||||||
@ -378,9 +346,8 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
self.includeWebBible = False
|
self.includeWebBible = False
|
||||||
proxy_server = None
|
proxy_server = None
|
||||||
if not self.files:
|
if not self.files:
|
||||||
self.progressLabel.setText(
|
self.progressLabel.setText(translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
translate('BiblesPlugin.UpgradeWizardForm', 'There are no '
|
'There are no Bibles that need to be upgraded.'))
|
||||||
'Bibles that need to be upgraded.'))
|
|
||||||
self.progressBar.hide()
|
self.progressBar.hide()
|
||||||
return
|
return
|
||||||
max_bibles = 0
|
max_bibles = 0
|
||||||
@ -405,12 +372,9 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
old_bible = OldBibleDB(self.mediaItem, path=self.temp_dir,
|
old_bible = OldBibleDB(self.mediaItem, path=self.temp_dir,
|
||||||
file=filename[0])
|
file=filename[0])
|
||||||
name = filename[1]
|
name = filename[1]
|
||||||
self.progressLabel.setText(translate(
|
self.progressLabel.setText(translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
'BiblesPlugin.UpgradeWizardForm',
|
'Upgrading Bible %s of %s: "%s"\nUpgrading ...') % (number + 1, max_bibles, name))
|
||||||
'Upgrading Bible %s of %s: "%s"\nUpgrading ...') %
|
self.newbibles[number] = BibleDB(self.mediaItem, path=self.path, name=name, file=filename[0])
|
||||||
(number + 1, max_bibles, name))
|
|
||||||
self.newbibles[number] = BibleDB(self.mediaItem, path=self.path,
|
|
||||||
name=name, file=filename[0])
|
|
||||||
self.newbibles[number].register(self.plugin.upgrade_wizard)
|
self.newbibles[number].register(self.plugin.upgrade_wizard)
|
||||||
metadata = old_bible.get_metadata()
|
metadata = old_bible.get_metadata()
|
||||||
web_bible = False
|
web_bible = False
|
||||||
@ -425,8 +389,7 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
# Copy the metadata
|
# Copy the metadata
|
||||||
meta_data[meta[u'key']] = meta[u'value']
|
meta_data[meta[u'key']] = meta[u'value']
|
||||||
if meta[u'key'] != u'name' and meta[u'key'] != u'dbversion':
|
if meta[u'key'] != u'name' and meta[u'key'] != u'dbversion':
|
||||||
self.newbibles[number].save_meta(meta[u'key'],
|
self.newbibles[number].save_meta(meta[u'key'], meta[u'value'])
|
||||||
meta[u'value'])
|
|
||||||
if meta[u'key'] == u'download_source':
|
if meta[u'key'] == u'download_source':
|
||||||
web_bible = True
|
web_bible = True
|
||||||
self.includeWebBible = True
|
self.includeWebBible = True
|
||||||
@ -440,23 +403,17 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
handler = BSExtract(proxy_server)
|
handler = BSExtract(proxy_server)
|
||||||
books = handler.get_books_from_http(meta_data[u'download_name'])
|
books = handler.get_books_from_http(meta_data[u'download_name'])
|
||||||
if not books:
|
if not books:
|
||||||
log.error(u'Upgrading books from %s - download '\
|
log.error(u'Upgrading books from %s - download name: "%s" failed' % (
|
||||||
u'name: "%s" failed' % (
|
meta_data[u'download_source'], meta_data[u'download_name']))
|
||||||
meta_data[u'download_source'],
|
|
||||||
meta_data[u'download_name']))
|
|
||||||
self.newbibles[number].session.close()
|
self.newbibles[number].session.close()
|
||||||
del self.newbibles[number]
|
del self.newbibles[number]
|
||||||
critical_error_message_box(
|
critical_error_message_box(
|
||||||
|
translate('BiblesPlugin.UpgradeWizardForm', 'Download Error'),
|
||||||
translate('BiblesPlugin.UpgradeWizardForm',
|
translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
'Download Error'),
|
'To upgrade your Web Bibles an Internet connection is required.'))
|
||||||
translate('BiblesPlugin.UpgradeWizardForm',
|
|
||||||
'To upgrade your Web Bibles an Internet connection is '
|
|
||||||
'required.'))
|
|
||||||
self.incrementProgressBar(translate(
|
self.incrementProgressBar(translate(
|
||||||
'BiblesPlugin.UpgradeWizardForm',
|
'BiblesPlugin.UpgradeWizardForm', 'Upgrading Bible %s of %s: "%s"\nFailed') %
|
||||||
'Upgrading Bible %s of %s: "%s"\nFailed') %
|
(number + 1, max_bibles, name), self.progressBar.maximum() - self.progressBar.value())
|
||||||
(number + 1, max_bibles, name),
|
|
||||||
self.progressBar.maximum() - self.progressBar.value())
|
|
||||||
self.success[number] = False
|
self.success[number] = False
|
||||||
continue
|
continue
|
||||||
bible = BiblesResourcesDB.get_webbible(
|
bible = BiblesResourcesDB.get_webbible(
|
||||||
@ -472,10 +429,8 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
log.warn(u'Upgrading from "%s" failed' % filename[0])
|
log.warn(u'Upgrading from "%s" failed' % filename[0])
|
||||||
self.newbibles[number].session.close()
|
self.newbibles[number].session.close()
|
||||||
del self.newbibles[number]
|
del self.newbibles[number]
|
||||||
self.incrementProgressBar(translate(
|
self.incrementProgressBar(translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
'BiblesPlugin.UpgradeWizardForm',
|
'Upgrading Bible %s of %s: "%s"\nFailed') % (number + 1, max_bibles, name),
|
||||||
'Upgrading Bible %s of %s: "%s"\nFailed') %
|
|
||||||
(number + 1, max_bibles, name),
|
|
||||||
self.progressBar.maximum() - self.progressBar.value())
|
self.progressBar.maximum() - self.progressBar.value())
|
||||||
self.success[number] = False
|
self.success[number] = False
|
||||||
continue
|
continue
|
||||||
@ -484,18 +439,13 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
if self.stop_import_flag:
|
if self.stop_import_flag:
|
||||||
self.success[number] = False
|
self.success[number] = False
|
||||||
break
|
break
|
||||||
self.incrementProgressBar(translate(
|
self.incrementProgressBar(translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
'BiblesPlugin.UpgradeWizardForm',
|
'Upgrading Bible %s of %s: "%s"\nUpgrading %s ...') % (number + 1, max_bibles, name, book))
|
||||||
'Upgrading Bible %s of %s: "%s"\n'
|
|
||||||
'Upgrading %s ...') %
|
|
||||||
(number + 1, max_bibles, name, book))
|
|
||||||
book_ref_id = self.newbibles[number].\
|
book_ref_id = self.newbibles[number].\
|
||||||
get_book_ref_id_by_name(book, len(books), language_id)
|
get_book_ref_id_by_name(book, len(books), language_id)
|
||||||
if not book_ref_id:
|
if not book_ref_id:
|
||||||
log.warn(u'Upgrading books from %s - download '\
|
log.warn(u'Upgrading books from %s - download name: "%s" aborted by user' % (
|
||||||
u'name: "%s" aborted by user' % (
|
meta_data[u'download_source'], meta_data[u'download_name']))
|
||||||
meta_data[u'download_source'],
|
|
||||||
meta_data[u'download_name']))
|
|
||||||
self.newbibles[number].session.close()
|
self.newbibles[number].session.close()
|
||||||
del self.newbibles[number]
|
del self.newbibles[number]
|
||||||
self.success[number] = False
|
self.success[number] = False
|
||||||
@ -508,8 +458,7 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
if oldbook:
|
if oldbook:
|
||||||
verses = old_bible.get_verses(oldbook[u'id'])
|
verses = old_bible.get_verses(oldbook[u'id'])
|
||||||
if not verses:
|
if not verses:
|
||||||
log.warn(u'No verses found to import for book '
|
log.warn(u'No verses found to import for book "%s"', book)
|
||||||
u'"%s"', book)
|
|
||||||
continue
|
continue
|
||||||
for verse in verses:
|
for verse in verses:
|
||||||
if self.stop_import_flag:
|
if self.stop_import_flag:
|
||||||
@ -521,18 +470,15 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
self.newbibles[number].session.commit()
|
self.newbibles[number].session.commit()
|
||||||
else:
|
else:
|
||||||
language_id = self.newbibles[number].get_object(BibleMeta,
|
language_id = self.newbibles[number].get_object(BibleMeta, u'language_id')
|
||||||
u'language_id')
|
|
||||||
if not language_id:
|
if not language_id:
|
||||||
language_id = self.newbibles[number].get_language(name)
|
language_id = self.newbibles[number].get_language(name)
|
||||||
if not language_id:
|
if not language_id:
|
||||||
log.warn(u'Upgrading books from "%s" failed' % name)
|
log.warn(u'Upgrading books from "%s" failed' % name)
|
||||||
self.newbibles[number].session.close()
|
self.newbibles[number].session.close()
|
||||||
del self.newbibles[number]
|
del self.newbibles[number]
|
||||||
self.incrementProgressBar(translate(
|
self.incrementProgressBar(translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
'BiblesPlugin.UpgradeWizardForm',
|
'Upgrading Bible %s of %s: "%s"\nFailed') % (number + 1, max_bibles, name),
|
||||||
'Upgrading Bible %s of %s: "%s"\nFailed') %
|
|
||||||
(number + 1, max_bibles, name),
|
|
||||||
self.progressBar.maximum() - self.progressBar.value())
|
self.progressBar.maximum() - self.progressBar.value())
|
||||||
self.success[number] = False
|
self.success[number] = False
|
||||||
continue
|
continue
|
||||||
@ -542,17 +488,12 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
if self.stop_import_flag:
|
if self.stop_import_flag:
|
||||||
self.success[number] = False
|
self.success[number] = False
|
||||||
break
|
break
|
||||||
self.incrementProgressBar(translate(
|
self.incrementProgressBar(translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
'BiblesPlugin.UpgradeWizardForm',
|
'Upgrading Bible %s of %s: "%s"\nUpgrading %s ...') %
|
||||||
'Upgrading Bible %s of %s: "%s"\n'
|
|
||||||
'Upgrading %s ...') %
|
|
||||||
(number + 1, max_bibles, name, book[u'name']))
|
(number + 1, max_bibles, name, book[u'name']))
|
||||||
book_ref_id = self.newbibles[number].\
|
book_ref_id = self.newbibles[number].get_book_ref_id_by_name(book[u'name'], len(books), language_id)
|
||||||
get_book_ref_id_by_name(book[u'name'], len(books),
|
|
||||||
language_id)
|
|
||||||
if not book_ref_id:
|
if not book_ref_id:
|
||||||
log.warn(u'Upgrading books from %s " '\
|
log.warn(u'Upgrading books from %s " failed - aborted by user' % name)
|
||||||
'failed - aborted by user' % name)
|
|
||||||
self.newbibles[number].session.close()
|
self.newbibles[number].session.close()
|
||||||
del self.newbibles[number]
|
del self.newbibles[number]
|
||||||
self.success[number] = False
|
self.success[number] = False
|
||||||
@ -562,8 +503,7 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
book_ref_id, book_details[u'testament_id'])
|
book_ref_id, book_details[u'testament_id'])
|
||||||
verses = old_bible.get_verses(book[u'id'])
|
verses = old_bible.get_verses(book[u'id'])
|
||||||
if not verses:
|
if not verses:
|
||||||
log.warn(u'No verses found to import for book '
|
log.warn(u'No verses found to import for book "%s"', book[u'name'])
|
||||||
u'"%s"', book[u'name'])
|
|
||||||
self.newbibles[number].delete_book(db_book)
|
self.newbibles[number].delete_book(db_book)
|
||||||
continue
|
continue
|
||||||
for verse in verses:
|
for verse in verses:
|
||||||
@ -576,19 +516,14 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
self.newbibles[number].session.commit()
|
self.newbibles[number].session.commit()
|
||||||
if not self.success.get(number, True):
|
if not self.success.get(number, True):
|
||||||
self.incrementProgressBar(translate(
|
self.incrementProgressBar(translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
'BiblesPlugin.UpgradeWizardForm',
|
'Upgrading Bible %s of %s: "%s"\nFailed') % (number + 1, max_bibles, name),
|
||||||
'Upgrading Bible %s of %s: "%s"\nFailed') %
|
|
||||||
(number + 1, max_bibles, name),
|
|
||||||
self.progressBar.maximum() - self.progressBar.value())
|
self.progressBar.maximum() - self.progressBar.value())
|
||||||
else:
|
else:
|
||||||
self.success[number] = True
|
self.success[number] = True
|
||||||
self.newbibles[number].save_meta(u'name', name)
|
self.newbibles[number].save_meta(u'name', name)
|
||||||
self.incrementProgressBar(translate(
|
self.incrementProgressBar(translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
'BiblesPlugin.UpgradeWizardForm',
|
'Upgrading Bible %s of %s: "%s"\nComplete') % (number + 1, max_bibles, name))
|
||||||
'Upgrading Bible %s of %s: "%s"\n'
|
|
||||||
'Complete') %
|
|
||||||
(number + 1, max_bibles, name))
|
|
||||||
if number in self.newbibles:
|
if number in self.newbibles:
|
||||||
self.newbibles[number].session.close()
|
self.newbibles[number].session.close()
|
||||||
# Close the last bible's connection if possible.
|
# Close the last bible's connection if possible.
|
||||||
@ -611,26 +546,19 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
# Copy not upgraded bible back.
|
# Copy not upgraded bible back.
|
||||||
shutil.move(os.path.join(self.temp_dir, filename[0]), self.path)
|
shutil.move(os.path.join(self.temp_dir, filename[0]), self.path)
|
||||||
if failed_import > 0:
|
if failed_import > 0:
|
||||||
failed_import_text = translate('BiblesPlugin.UpgradeWizardForm',
|
failed_import_text = translate('BiblesPlugin.UpgradeWizardForm', ', %s failed') % failed_import
|
||||||
', %s failed') % failed_import
|
|
||||||
else:
|
else:
|
||||||
failed_import_text = u''
|
failed_import_text = u''
|
||||||
if successful_import > 0:
|
if successful_import > 0:
|
||||||
if self.includeWebBible:
|
if self.includeWebBible:
|
||||||
self.progressLabel.setText(
|
self.progressLabel.setText(translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
translate('BiblesPlugin.UpgradeWizardForm', 'Upgrading '
|
'Upgrading Bible(s): %s successful%s\nPlease note that verses from Web Bibles will be downloaded '
|
||||||
'Bible(s): %s successful%s\nPlease note that verses from '
|
'on demand and so an Internet connection is required.') % (successful_import, failed_import_text))
|
||||||
'Web Bibles will be downloaded on demand and so an '
|
|
||||||
'Internet connection is required.') %
|
|
||||||
(successful_import, failed_import_text))
|
|
||||||
else:
|
else:
|
||||||
self.progressLabel.setText(
|
self.progressLabel.setText(translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
translate('BiblesPlugin.UpgradeWizardForm', 'Upgrading '
|
'Upgrading Bible(s): %s successful%s') % (successful_import, failed_import_text))
|
||||||
'Bible(s): %s successful%s') % (successful_import,
|
|
||||||
failed_import_text))
|
|
||||||
else:
|
else:
|
||||||
self.progressLabel.setText(translate(
|
self.progressLabel.setText(translate('BiblesPlugin.UpgradeWizardForm', 'Upgrade failed.'))
|
||||||
'BiblesPlugin.UpgradeWizardForm', 'Upgrade failed.'))
|
|
||||||
# Remove temp directory.
|
# Remove temp directory.
|
||||||
shutil.rmtree(self.temp_dir, True)
|
shutil.rmtree(self.temp_dir, True)
|
||||||
OpenLPWizard.postWizard(self)
|
OpenLPWizard.postWizard(self)
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
@ -56,12 +56,10 @@ class Ui_BookNameDialog(object):
|
|||||||
self.correspondingLayout.addWidget(self.currentBookLabel, 0, 1, 1, 1)
|
self.correspondingLayout.addWidget(self.currentBookLabel, 0, 1, 1, 1)
|
||||||
self.correspondingLabel = QtGui.QLabel(bookNameDialog)
|
self.correspondingLabel = QtGui.QLabel(bookNameDialog)
|
||||||
self.correspondingLabel.setObjectName(u'correspondingLabel')
|
self.correspondingLabel.setObjectName(u'correspondingLabel')
|
||||||
self.correspondingLayout.addWidget(
|
self.correspondingLayout.addWidget(self.correspondingLabel, 1, 0, 1, 1)
|
||||||
self.correspondingLabel, 1, 0, 1, 1)
|
|
||||||
self.correspondingComboBox = QtGui.QComboBox(bookNameDialog)
|
self.correspondingComboBox = QtGui.QComboBox(bookNameDialog)
|
||||||
self.correspondingComboBox.setObjectName(u'correspondingComboBox')
|
self.correspondingComboBox.setObjectName(u'correspondingComboBox')
|
||||||
self.correspondingLayout.addWidget(
|
self.correspondingLayout.addWidget(self.correspondingComboBox, 1, 1, 1, 1)
|
||||||
self.correspondingComboBox, 1, 1, 1, 1)
|
|
||||||
self.bookNameLayout.addLayout(self.correspondingLayout)
|
self.bookNameLayout.addLayout(self.correspondingLayout)
|
||||||
self.optionsGroupBox = QtGui.QGroupBox(bookNameDialog)
|
self.optionsGroupBox = QtGui.QGroupBox(bookNameDialog)
|
||||||
self.optionsGroupBox.setObjectName(u'optionsGroupBox')
|
self.optionsGroupBox.setObjectName(u'optionsGroupBox')
|
||||||
@ -82,27 +80,19 @@ class Ui_BookNameDialog(object):
|
|||||||
self.apocryphaCheckBox.setCheckState(QtCore.Qt.Checked)
|
self.apocryphaCheckBox.setCheckState(QtCore.Qt.Checked)
|
||||||
self.optionsLayout.addWidget(self.apocryphaCheckBox)
|
self.optionsLayout.addWidget(self.apocryphaCheckBox)
|
||||||
self.bookNameLayout.addWidget(self.optionsGroupBox)
|
self.bookNameLayout.addWidget(self.optionsGroupBox)
|
||||||
self.buttonBox = create_button_box(bookNameDialog, u'buttonBox',
|
self.buttonBox = create_button_box(bookNameDialog, u'buttonBox', [u'cancel', u'ok'])
|
||||||
[u'cancel', u'ok'])
|
|
||||||
self.bookNameLayout.addWidget(self.buttonBox)
|
self.bookNameLayout.addWidget(self.buttonBox)
|
||||||
|
|
||||||
self.retranslateUi(bookNameDialog)
|
self.retranslateUi(bookNameDialog)
|
||||||
|
|
||||||
def retranslateUi(self, bookNameDialog):
|
def retranslateUi(self, bookNameDialog):
|
||||||
bookNameDialog.setWindowTitle(translate('BiblesPlugin.BookNameDialog',
|
bookNameDialog.setWindowTitle(translate('BiblesPlugin.BookNameDialog', 'Select Book Name'))
|
||||||
'Select Book Name'))
|
|
||||||
self.infoLabel.setText(translate('BiblesPlugin.BookNameDialog',
|
self.infoLabel.setText(translate('BiblesPlugin.BookNameDialog',
|
||||||
'The following book name cannot be matched up internally. Please '
|
'The following book name cannot be matched up internally. '
|
||||||
'select the corresponding name from the list.'))
|
'Please select the corresponding name from the list.'))
|
||||||
self.currentLabel.setText(translate('BiblesPlugin.BookNameDialog',
|
self.currentLabel.setText(translate('BiblesPlugin.BookNameDialog', 'Current name:'))
|
||||||
'Current name:'))
|
self.correspondingLabel.setText(translate('BiblesPlugin.BookNameDialog', 'Corresponding name:'))
|
||||||
self.correspondingLabel.setText(translate(
|
self.optionsGroupBox.setTitle(translate('BiblesPlugin.BookNameDialog', 'Show Books From'))
|
||||||
'BiblesPlugin.BookNameDialog', 'Corresponding name:'))
|
self.oldTestamentCheckBox.setText(translate('BiblesPlugin.BookNameDialog', 'Old Testament'))
|
||||||
self.optionsGroupBox.setTitle(translate('BiblesPlugin.BookNameDialog',
|
self.newTestamentCheckBox.setText(translate('BiblesPlugin.BookNameDialog', 'New Testament'))
|
||||||
'Show Books From'))
|
self.apocryphaCheckBox.setText(translate('BiblesPlugin.BookNameDialog', 'Apocrypha'))
|
||||||
self.oldTestamentCheckBox.setText(translate(
|
|
||||||
'BiblesPlugin.BookNameDialog', 'Old Testament'))
|
|
||||||
self.newTestamentCheckBox.setText(translate(
|
|
||||||
'BiblesPlugin.BookNameDialog', 'New Testament'))
|
|
||||||
self.apocryphaCheckBox.setText(translate('BiblesPlugin.BookNameDialog',
|
|
||||||
'Apocrypha'))
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
@ -38,8 +38,7 @@ from PyQt4 import QtCore
|
|||||||
|
|
||||||
from openlp.core.lib import translate
|
from openlp.core.lib import translate
|
||||||
from openlp.core.lib.ui import critical_error_message_box
|
from openlp.core.lib.ui import critical_error_message_box
|
||||||
from openlp.plugins.bibles.forms.booknamedialog import \
|
from openlp.plugins.bibles.forms.booknamedialog import Ui_BookNameDialog
|
||||||
Ui_BookNameDialog
|
|
||||||
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
|
||||||
|
|
||||||
@ -66,14 +65,11 @@ class BookNameForm(QDialog, Ui_BookNameDialog):
|
|||||||
"""
|
"""
|
||||||
Set up the signals used in the booknameform.
|
Set up the signals used in the booknameform.
|
||||||
"""
|
"""
|
||||||
QtCore.QObject.connect(self.oldTestamentCheckBox,
|
QtCore.QObject.connect(self.oldTestamentCheckBox, QtCore.SIGNAL(u'stateChanged(int)'),
|
||||||
QtCore.SIGNAL(u'stateChanged(int)'),
|
|
||||||
self.onCheckBoxIndexChanged)
|
self.onCheckBoxIndexChanged)
|
||||||
QtCore.QObject.connect(self.newTestamentCheckBox,
|
QtCore.QObject.connect(self.newTestamentCheckBox, QtCore.SIGNAL(u'stateChanged(int)'),
|
||||||
QtCore.SIGNAL(u'stateChanged(int)'),
|
|
||||||
self.onCheckBoxIndexChanged)
|
self.onCheckBoxIndexChanged)
|
||||||
QtCore.QObject.connect(self.apocryphaCheckBox,
|
QtCore.QObject.connect(self.apocryphaCheckBox, QtCore.SIGNAL(u'stateChanged(int)'),
|
||||||
QtCore.SIGNAL(u'stateChanged(int)'),
|
|
||||||
self.onCheckBoxIndexChanged)
|
self.onCheckBoxIndexChanged)
|
||||||
|
|
||||||
def onCheckBoxIndexChanged(self, index):
|
def onCheckBoxIndexChanged(self, index):
|
||||||
@ -94,18 +90,14 @@ class BookNameForm(QDialog, Ui_BookNameDialog):
|
|||||||
if book.book_reference_id == item[u'id']:
|
if book.book_reference_id == item[u'id']:
|
||||||
addBook = False
|
addBook = False
|
||||||
break
|
break
|
||||||
if self.oldTestamentCheckBox.checkState() == QtCore.Qt.Unchecked \
|
if self.oldTestamentCheckBox.checkState() == QtCore.Qt.Unchecked and item[u'testament_id'] == 1:
|
||||||
and item[u'testament_id'] == 1:
|
|
||||||
addBook = False
|
addBook = False
|
||||||
elif self.newTestamentCheckBox.checkState() == QtCore.Qt.Unchecked \
|
elif self.newTestamentCheckBox.checkState() == QtCore.Qt.Unchecked and item[u'testament_id'] == 2:
|
||||||
and item[u'testament_id'] == 2:
|
|
||||||
addBook = False
|
addBook = False
|
||||||
elif self.apocryphaCheckBox.checkState() == QtCore.Qt.Unchecked \
|
elif self.apocryphaCheckBox.checkState() == QtCore.Qt.Unchecked and item[u'testament_id'] == 3:
|
||||||
and item[u'testament_id'] == 3:
|
|
||||||
addBook = False
|
addBook = False
|
||||||
if addBook:
|
if addBook:
|
||||||
self.correspondingComboBox.addItem(
|
self.correspondingComboBox.addItem(self.book_names[item[u'abbreviation']])
|
||||||
self.book_names[item[u'abbreviation']])
|
|
||||||
|
|
||||||
def exec_(self, name, books, maxbooks):
|
def exec_(self, name, books, maxbooks):
|
||||||
self.books = books
|
self.books = books
|
||||||
@ -122,9 +114,7 @@ class BookNameForm(QDialog, Ui_BookNameDialog):
|
|||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
if self.correspondingComboBox.currentText() == u'':
|
if self.correspondingComboBox.currentText() == u'':
|
||||||
critical_error_message_box(
|
critical_error_message_box(message=translate('BiblesPlugin.BookNameForm', 'You need to select a book.'))
|
||||||
message=translate('BiblesPlugin.BookNameForm',
|
|
||||||
'You need to select a book.'))
|
|
||||||
self.correspondingComboBox.setFocus()
|
self.correspondingComboBox.setFocus()
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
@ -132,8 +122,7 @@ class BookNameForm(QDialog, Ui_BookNameDialog):
|
|||||||
for character in u'\\.^$*+?{}[]()':
|
for character in u'\\.^$*+?{}[]()':
|
||||||
cor_book = cor_book.replace(character, u'\\' + character)
|
cor_book = cor_book.replace(character, u'\\' + character)
|
||||||
books = filter(lambda key:
|
books = filter(lambda key:
|
||||||
re.match(cor_book, unicode(self.book_names[key]), re.UNICODE),
|
re.match(cor_book, unicode(self.book_names[key]), re.UNICODE), self.book_names.keys())
|
||||||
self.book_names.keys())
|
|
||||||
books = filter(None, map(BiblesResourcesDB.get_book, books))
|
books = filter(None, map(BiblesResourcesDB.get_book, books))
|
||||||
if books:
|
if books:
|
||||||
self.book_id = books[0][u'id']
|
self.book_id = books[0][u'id']
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
@ -39,8 +39,7 @@ class Ui_EditBibleDialog(object):
|
|||||||
def setupUi(self, editBibleDialog):
|
def setupUi(self, editBibleDialog):
|
||||||
editBibleDialog.setObjectName(u'editBibleDialog')
|
editBibleDialog.setObjectName(u'editBibleDialog')
|
||||||
editBibleDialog.resize(520, 400)
|
editBibleDialog.resize(520, 400)
|
||||||
editBibleDialog.setWindowIcon(
|
editBibleDialog.setWindowIcon(build_icon(u':/icon/openlp-logo-16x16.png'))
|
||||||
build_icon(u':/icon/openlp-logo-16x16.png'))
|
|
||||||
editBibleDialog.setModal(True)
|
editBibleDialog.setModal(True)
|
||||||
self.dialogLayout = QtGui.QVBoxLayout(editBibleDialog)
|
self.dialogLayout = QtGui.QVBoxLayout(editBibleDialog)
|
||||||
self.dialogLayout.setSpacing(8)
|
self.dialogLayout.setSpacing(8)
|
||||||
@ -55,43 +54,34 @@ class Ui_EditBibleDialog(object):
|
|||||||
self.metaTabLayout.setObjectName(u'metaTabLayout')
|
self.metaTabLayout.setObjectName(u'metaTabLayout')
|
||||||
self.licenseDetailsGroupBox = QtGui.QGroupBox(self.metaTab)
|
self.licenseDetailsGroupBox = QtGui.QGroupBox(self.metaTab)
|
||||||
self.licenseDetailsGroupBox.setObjectName(u'licenseDetailsGroupBox')
|
self.licenseDetailsGroupBox.setObjectName(u'licenseDetailsGroupBox')
|
||||||
self.licenseDetailsLayout = QtGui.QFormLayout(
|
self.licenseDetailsLayout = QtGui.QFormLayout(self.licenseDetailsGroupBox)
|
||||||
self.licenseDetailsGroupBox)
|
|
||||||
self.licenseDetailsLayout.setObjectName(u'licenseDetailsLayout')
|
self.licenseDetailsLayout.setObjectName(u'licenseDetailsLayout')
|
||||||
self.versionNameLabel = QtGui.QLabel(self.licenseDetailsGroupBox)
|
self.versionNameLabel = QtGui.QLabel(self.licenseDetailsGroupBox)
|
||||||
self.versionNameLabel.setObjectName(u'versionNameLabel')
|
self.versionNameLabel.setObjectName(u'versionNameLabel')
|
||||||
self.versionNameEdit = QtGui.QLineEdit(self.licenseDetailsGroupBox)
|
self.versionNameEdit = QtGui.QLineEdit(self.licenseDetailsGroupBox)
|
||||||
self.versionNameEdit.setObjectName(u'versionNameEdit')
|
self.versionNameEdit.setObjectName(u'versionNameEdit')
|
||||||
self.versionNameLabel.setBuddy(self.versionNameEdit)
|
self.versionNameLabel.setBuddy(self.versionNameEdit)
|
||||||
self.licenseDetailsLayout.addRow(self.versionNameLabel,
|
self.licenseDetailsLayout.addRow(self.versionNameLabel, self.versionNameEdit)
|
||||||
self.versionNameEdit)
|
|
||||||
self.copyrightLabel = QtGui.QLabel(self.licenseDetailsGroupBox)
|
self.copyrightLabel = QtGui.QLabel(self.licenseDetailsGroupBox)
|
||||||
self.copyrightLabel.setObjectName(u'copyrightLabel')
|
self.copyrightLabel.setObjectName(u'copyrightLabel')
|
||||||
self.copyrightEdit = QtGui.QLineEdit(self.licenseDetailsGroupBox)
|
self.copyrightEdit = QtGui.QLineEdit(self.licenseDetailsGroupBox)
|
||||||
self.copyrightEdit.setObjectName(u'copyrightEdit')
|
self.copyrightEdit.setObjectName(u'copyrightEdit')
|
||||||
self.copyrightLabel.setBuddy(self.copyrightEdit)
|
self.copyrightLabel.setBuddy(self.copyrightEdit)
|
||||||
self.licenseDetailsLayout.addRow(self.copyrightLabel,
|
self.licenseDetailsLayout.addRow(self.copyrightLabel, self.copyrightEdit)
|
||||||
self.copyrightEdit)
|
|
||||||
self.permissionsLabel = QtGui.QLabel(self.licenseDetailsGroupBox)
|
self.permissionsLabel = QtGui.QLabel(self.licenseDetailsGroupBox)
|
||||||
self.permissionsLabel.setObjectName(u'permissionsLabel')
|
self.permissionsLabel.setObjectName(u'permissionsLabel')
|
||||||
self.permissionsEdit = QtGui.QLineEdit(self.licenseDetailsGroupBox)
|
self.permissionsEdit = QtGui.QLineEdit(self.licenseDetailsGroupBox)
|
||||||
self.permissionsEdit.setObjectName(u'permissionsEdit')
|
self.permissionsEdit.setObjectName(u'permissionsEdit')
|
||||||
self.permissionsLabel.setBuddy(self.permissionsEdit)
|
self.permissionsLabel.setBuddy(self.permissionsEdit)
|
||||||
self.licenseDetailsLayout.addRow(self.permissionsLabel,
|
self.licenseDetailsLayout.addRow(self.permissionsLabel, self.permissionsEdit)
|
||||||
self.permissionsEdit)
|
|
||||||
self.metaTabLayout.addWidget(self.licenseDetailsGroupBox)
|
self.metaTabLayout.addWidget(self.licenseDetailsGroupBox)
|
||||||
self.languageSelectionGroupBox = QtGui.QGroupBox(self.metaTab)
|
self.languageSelectionGroupBox = QtGui.QGroupBox(self.metaTab)
|
||||||
self.languageSelectionGroupBox.setObjectName(
|
self.languageSelectionGroupBox.setObjectName(u'languageSelectionGroupBox')
|
||||||
u'languageSelectionGroupBox')
|
self.languageSelectionLayout = QtGui.QVBoxLayout(self.languageSelectionGroupBox)
|
||||||
self.languageSelectionLayout = QtGui.QVBoxLayout(
|
self.languageSelectionLabel = QtGui.QLabel(self.languageSelectionGroupBox)
|
||||||
self.languageSelectionGroupBox)
|
|
||||||
self.languageSelectionLabel = QtGui.QLabel(
|
|
||||||
self.languageSelectionGroupBox)
|
|
||||||
self.languageSelectionLabel.setObjectName(u'languageSelectionLabel')
|
self.languageSelectionLabel.setObjectName(u'languageSelectionLabel')
|
||||||
self.languageSelectionComboBox = QtGui.QComboBox(
|
self.languageSelectionComboBox = QtGui.QComboBox(self.languageSelectionGroupBox)
|
||||||
self.languageSelectionGroupBox)
|
self.languageSelectionComboBox.setObjectName(u'languageSelectionComboBox')
|
||||||
self.languageSelectionComboBox.setObjectName(
|
|
||||||
u'languageSelectionComboBox')
|
|
||||||
self.languageSelectionComboBox.addItems([u'', u'', u'', u''])
|
self.languageSelectionComboBox.addItems([u'', u'', u'', u''])
|
||||||
self.languageSelectionLayout.addWidget(self.languageSelectionLabel)
|
self.languageSelectionLayout.addWidget(self.languageSelectionLabel)
|
||||||
self.languageSelectionLayout.addWidget(self.languageSelectionComboBox)
|
self.languageSelectionLayout.addWidget(self.languageSelectionComboBox)
|
||||||
@ -110,8 +100,7 @@ class Ui_EditBibleDialog(object):
|
|||||||
self.scrollArea = QtGui.QScrollArea(self.bookNameTab)
|
self.scrollArea = QtGui.QScrollArea(self.bookNameTab)
|
||||||
self.scrollArea.setWidgetResizable(True)
|
self.scrollArea.setWidgetResizable(True)
|
||||||
self.scrollArea.setObjectName(u'scrollArea')
|
self.scrollArea.setObjectName(u'scrollArea')
|
||||||
self.scrollArea.setHorizontalScrollBarPolicy(
|
self.scrollArea.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||||
QtCore.Qt.ScrollBarAlwaysOff)
|
|
||||||
self.bookNameWidget = QtGui.QWidget(self.scrollArea)
|
self.bookNameWidget = QtGui.QWidget(self.scrollArea)
|
||||||
self.bookNameWidget.setObjectName(u'bookNameWidget')
|
self.bookNameWidget.setObjectName(u'bookNameWidget')
|
||||||
self.bookNameWidgetLayout = QtGui.QFormLayout(self.bookNameWidget)
|
self.bookNameWidgetLayout = QtGui.QFormLayout(self.bookNameWidget)
|
||||||
@ -119,14 +108,10 @@ class Ui_EditBibleDialog(object):
|
|||||||
self.bookNameLabel = {}
|
self.bookNameLabel = {}
|
||||||
self.bookNameEdit= {}
|
self.bookNameEdit= {}
|
||||||
for book in BiblesResourcesDB.get_books():
|
for book in BiblesResourcesDB.get_books():
|
||||||
self.bookNameLabel[book[u'abbreviation']] = QtGui.QLabel(
|
self.bookNameLabel[book[u'abbreviation']] = QtGui.QLabel(self.bookNameWidget)
|
||||||
self.bookNameWidget)
|
self.bookNameLabel[book[u'abbreviation']].setObjectName(u'bookNameLabel[%s]' % book[u'abbreviation'])
|
||||||
self.bookNameLabel[book[u'abbreviation']].setObjectName(
|
self.bookNameEdit[book[u'abbreviation']] = QtGui.QLineEdit(self.bookNameWidget)
|
||||||
u'bookNameLabel[%s]' % book[u'abbreviation'])
|
self.bookNameEdit[book[u'abbreviation']].setObjectName(u'bookNameEdit[%s]' % book[u'abbreviation'])
|
||||||
self.bookNameEdit[book[u'abbreviation']] = QtGui.QLineEdit(
|
|
||||||
self.bookNameWidget)
|
|
||||||
self.bookNameEdit[book[u'abbreviation']].setObjectName(
|
|
||||||
u'bookNameEdit[%s]' % book[u'abbreviation'])
|
|
||||||
self.bookNameWidgetLayout.addRow(
|
self.bookNameWidgetLayout.addRow(
|
||||||
self.bookNameLabel[book[u'abbreviation']],
|
self.bookNameLabel[book[u'abbreviation']],
|
||||||
self.bookNameEdit[book[u'abbreviation']])
|
self.bookNameEdit[book[u'abbreviation']])
|
||||||
@ -136,48 +121,33 @@ class Ui_EditBibleDialog(object):
|
|||||||
self.bibleTabWidget.addTab(self.bookNameTab, u'')
|
self.bibleTabWidget.addTab(self.bookNameTab, u'')
|
||||||
# Last few bits
|
# Last few bits
|
||||||
self.dialogLayout.addWidget(self.bibleTabWidget)
|
self.dialogLayout.addWidget(self.bibleTabWidget)
|
||||||
self.buttonBox = create_button_box(editBibleDialog, u'buttonBox',
|
self.buttonBox = create_button_box(editBibleDialog, u'buttonBox', [u'cancel', u'save'])
|
||||||
[u'cancel', u'save'])
|
|
||||||
self.dialogLayout.addWidget(self.buttonBox)
|
self.dialogLayout.addWidget(self.buttonBox)
|
||||||
self.retranslateUi(editBibleDialog)
|
self.retranslateUi(editBibleDialog)
|
||||||
QtCore.QMetaObject.connectSlotsByName(editBibleDialog)
|
QtCore.QMetaObject.connectSlotsByName(editBibleDialog)
|
||||||
|
|
||||||
def retranslateUi(self, editBibleDialog):
|
def retranslateUi(self, editBibleDialog):
|
||||||
self.book_names = BibleStrings().BookNames
|
self.book_names = BibleStrings().BookNames
|
||||||
editBibleDialog.setWindowTitle(
|
editBibleDialog.setWindowTitle(translate('BiblesPlugin.EditBibleForm', 'Bible Editor'))
|
||||||
translate('BiblesPlugin.EditBibleForm', 'Bible Editor'))
|
|
||||||
# Meta tab
|
# Meta tab
|
||||||
self.bibleTabWidget.setTabText(
|
self.bibleTabWidget.setTabText( self.bibleTabWidget.indexOf(self.metaTab),
|
||||||
self.bibleTabWidget.indexOf(self.metaTab),
|
|
||||||
translate('SongsPlugin.EditBibleForm', 'Meta Data'))
|
translate('SongsPlugin.EditBibleForm', 'Meta Data'))
|
||||||
self.licenseDetailsGroupBox.setTitle(
|
self.licenseDetailsGroupBox.setTitle(translate('BiblesPlugin.EditBibleForm', 'License Details'))
|
||||||
translate('BiblesPlugin.EditBibleForm', 'License Details'))
|
self.versionNameLabel.setText(translate('BiblesPlugin.EditBibleForm', 'Version name:'))
|
||||||
self.versionNameLabel.setText(
|
self.copyrightLabel.setText(translate('BiblesPlugin.EditBibleForm', 'Copyright:'))
|
||||||
translate('BiblesPlugin.EditBibleForm', 'Version name:'))
|
self.permissionsLabel.setText(translate('BiblesPlugin.EditBibleForm', 'Permissions:'))
|
||||||
self.copyrightLabel.setText(
|
self.languageSelectionGroupBox.setTitle(translate('BiblesPlugin.EditBibleForm', 'Default Bible Language'))
|
||||||
translate('BiblesPlugin.EditBibleForm', 'Copyright:'))
|
self.languageSelectionLabel.setText(translate('BiblesPlugin.EditBibleForm',
|
||||||
self.permissionsLabel.setText(
|
'Book name language in search field, search results and on display:'))
|
||||||
translate('BiblesPlugin.EditBibleForm', 'Permissions:'))
|
self.languageSelectionComboBox.setItemText(0, translate('BiblesPlugin.EditBibleForm', 'Global Settings'))
|
||||||
self.languageSelectionGroupBox.setTitle(translate(
|
|
||||||
'BiblesPlugin.EditBibleForm', 'Default Bible Language'))
|
|
||||||
self.languageSelectionLabel.setText(
|
|
||||||
translate('BiblesPlugin.EditBibleForm',
|
|
||||||
'Book name language in search field, search results and on '
|
|
||||||
'display:'))
|
|
||||||
self.languageSelectionComboBox.setItemText(0,
|
|
||||||
translate('BiblesPlugin.EditBibleForm', 'Global Settings'))
|
|
||||||
self.languageSelectionComboBox.setItemText(LanguageSelection.Bible + 1,
|
self.languageSelectionComboBox.setItemText(LanguageSelection.Bible + 1,
|
||||||
translate('BiblesPlugin.EditBibleForm', 'Bible Language'))
|
translate('BiblesPlugin.EditBibleForm', 'Bible Language'))
|
||||||
self.languageSelectionComboBox.setItemText(
|
self.languageSelectionComboBox.setItemText(LanguageSelection.Application + 1,
|
||||||
LanguageSelection.Application + 1,
|
|
||||||
translate('BiblesPlugin.EditBibleForm', 'Application Language'))
|
translate('BiblesPlugin.EditBibleForm', 'Application Language'))
|
||||||
self.languageSelectionComboBox.setItemText(
|
self.languageSelectionComboBox.setItemText(LanguageSelection.English + 1,
|
||||||
LanguageSelection.English + 1,
|
|
||||||
translate('BiblesPlugin.EditBibleForm', 'English'))
|
translate('BiblesPlugin.EditBibleForm', 'English'))
|
||||||
# Book name tab
|
# Book name tab
|
||||||
self.bibleTabWidget.setTabText(
|
self.bibleTabWidget.setTabText(self.bibleTabWidget.indexOf(self.bookNameTab),
|
||||||
self.bibleTabWidget.indexOf(self.bookNameTab),
|
|
||||||
translate('SongsPlugin.EditBibleForm', 'Custom Book Names'))
|
translate('SongsPlugin.EditBibleForm', 'Custom Book Names'))
|
||||||
for book in BiblesResourcesDB.get_books():
|
for book in BiblesResourcesDB.get_books():
|
||||||
self.bookNameLabel[book[u'abbreviation']].setText(
|
self.bookNameLabel[book[u'abbreviation']].setText(u'%s:' % unicode(self.book_names[book[u'abbreviation']]))
|
||||||
u'%s:' % unicode(self.book_names[book[u'abbreviation']]))
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
@ -65,44 +65,32 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog):
|
|||||||
"""
|
"""
|
||||||
log.debug(u'Load Bible')
|
log.debug(u'Load Bible')
|
||||||
self.bible = bible
|
self.bible = bible
|
||||||
self.versionNameEdit.setText(
|
self.versionNameEdit.setText(self.manager.get_meta_data(self.bible, u'name').value)
|
||||||
self.manager.get_meta_data(self.bible, u'name').value)
|
self.copyrightEdit.setText(self.manager.get_meta_data(self.bible, u'copyright').value)
|
||||||
self.copyrightEdit.setText(
|
self.permissionsEdit.setText(self.manager.get_meta_data(self.bible, u'permissions').value)
|
||||||
self.manager.get_meta_data(self.bible, u'copyright').value)
|
book_name_language = self.manager.get_meta_data(self.bible, u'book_name_language')
|
||||||
self.permissionsEdit.setText(
|
|
||||||
self.manager.get_meta_data(self.bible, u'permissions').value)
|
|
||||||
book_name_language = self.manager.get_meta_data(self.bible,
|
|
||||||
u'book_name_language')
|
|
||||||
if book_name_language and book_name_language.value != u'None':
|
if book_name_language and book_name_language.value != u'None':
|
||||||
self.languageSelectionComboBox.setCurrentIndex(
|
self.languageSelectionComboBox.setCurrentIndex(int(book_name_language.value) + 1)
|
||||||
int(book_name_language.value) + 1)
|
|
||||||
self.books = {}
|
self.books = {}
|
||||||
self.webbible = self.manager.get_meta_data(self.bible,
|
self.webbible = self.manager.get_meta_data(self.bible, u'download_source')
|
||||||
u'download_source')
|
|
||||||
if self.webbible:
|
if self.webbible:
|
||||||
self.bookNameNotice.setText(translate('BiblesPlugin.EditBibleForm',
|
self.bookNameNotice.setText(translate('BiblesPlugin.EditBibleForm',
|
||||||
'This is a Web Download Bible.\nIt is not possible to '
|
'This is a Web Download Bible.\nIt is not possible to customize the Book Names.'))
|
||||||
'customize the Book Names.'))
|
|
||||||
self.scrollArea.hide()
|
self.scrollArea.hide()
|
||||||
else:
|
else:
|
||||||
self.bookNameNotice.setText(translate('BiblesPlugin.EditBibleForm',
|
self.bookNameNotice.setText(translate('BiblesPlugin.EditBibleForm',
|
||||||
'To use the customized book names, "Bible language" must be '
|
'To use the customized book names, "Bible language" must be selected on the Meta Data tab or, '
|
||||||
'selected on the Meta Data tab or, if "Global settings" is '
|
'if "Global settings" is selected, on the Bible page in Configure OpenLP.'))
|
||||||
'selected, on the Bible page in Configure OpenLP.'))
|
|
||||||
for book in BiblesResourcesDB.get_books():
|
for book in BiblesResourcesDB.get_books():
|
||||||
self.books[book[u'abbreviation']] = self.manager.get_book_by_id(
|
self.books[book[u'abbreviation']] = self.manager.get_book_by_id(self.bible, book[u'id'])
|
||||||
self.bible, book[u'id'])
|
|
||||||
if self.books[book[u'abbreviation']] and not self.webbible:
|
if self.books[book[u'abbreviation']] and not self.webbible:
|
||||||
self.bookNameEdit[book[u'abbreviation']].setText(
|
self.bookNameEdit[book[u'abbreviation']].setText(self.books[book[u'abbreviation']].name)
|
||||||
self.books[book[u'abbreviation']].name)
|
|
||||||
else:
|
else:
|
||||||
# It is nessecary to remove the Widget otherwise there still
|
# It is necessary to remove the Widget otherwise there still
|
||||||
# exists the vertical spacing in QFormLayout
|
# exists the vertical spacing in QFormLayout
|
||||||
self.bookNameWidgetLayout.removeWidget(
|
self.bookNameWidgetLayout.removeWidget(self.bookNameLabel[book[u'abbreviation']])
|
||||||
self.bookNameLabel[book[u'abbreviation']])
|
|
||||||
self.bookNameLabel[book[u'abbreviation']].hide()
|
self.bookNameLabel[book[u'abbreviation']].hide()
|
||||||
self.bookNameWidgetLayout.removeWidget(
|
self.bookNameWidgetLayout.removeWidget(self.bookNameEdit[book[u'abbreviation']])
|
||||||
self.bookNameEdit[book[u'abbreviation']])
|
|
||||||
self.bookNameEdit[book[u'abbreviation']].hide()
|
self.bookNameEdit[book[u'abbreviation']].hide()
|
||||||
|
|
||||||
def reject(self):
|
def reject(self):
|
||||||
@ -136,8 +124,7 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog):
|
|||||||
return
|
return
|
||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
Receiver.send_message(u'cursor_busy')
|
Receiver.send_message(u'cursor_busy')
|
||||||
self.manager.save_meta_data(self.bible, version, copyright, permissions,
|
self.manager.save_meta_data(self.bible, version, copyright, permissions, book_name_language)
|
||||||
book_name_language)
|
|
||||||
if not self.webbible:
|
if not self.webbible:
|
||||||
for abbr, book in self.books.iteritems():
|
for abbr, book in self.books.iteritems():
|
||||||
if book:
|
if book:
|
||||||
@ -155,24 +142,19 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog):
|
|||||||
if not name:
|
if not name:
|
||||||
self.versionNameEdit.setFocus()
|
self.versionNameEdit.setFocus()
|
||||||
critical_error_message_box(UiStrings().EmptyField,
|
critical_error_message_box(UiStrings().EmptyField,
|
||||||
translate('BiblesPlugin.BibleEditForm',
|
translate('BiblesPlugin.BibleEditForm', 'You need to specify a version name for your Bible.'))
|
||||||
'You need to specify a version name for your Bible.'))
|
|
||||||
return False
|
return False
|
||||||
elif not copyright:
|
elif not copyright:
|
||||||
self.copyrightEdit.setFocus()
|
self.copyrightEdit.setFocus()
|
||||||
critical_error_message_box(UiStrings().EmptyField,
|
critical_error_message_box(UiStrings().EmptyField,
|
||||||
translate('BiblesPlugin.BibleEditForm',
|
translate('BiblesPlugin.BibleEditForm',
|
||||||
'You need to set a copyright for your Bible. '
|
'You need to set a copyright for your Bible. Bibles in the Public Domain need to be marked as such.'))
|
||||||
'Bibles in the Public Domain need to be marked as such.'))
|
|
||||||
return False
|
return False
|
||||||
elif self.manager.exists(name) and \
|
elif self.manager.exists(name) and self.manager.get_meta_data(self.bible, u'name').value != \
|
||||||
self.manager.get_meta_data(self.bible, u'name').value != \
|
|
||||||
name:
|
name:
|
||||||
self.versionNameEdit.setFocus()
|
self.versionNameEdit.setFocus()
|
||||||
critical_error_message_box(
|
critical_error_message_box(translate('BiblesPlugin.BibleEditForm', 'Bible Exists'),
|
||||||
translate('BiblesPlugin.BibleEditForm', 'Bible Exists'),
|
translate('BiblesPlugin.BibleEditForm', 'This Bible already exists. Please import '
|
||||||
translate('BiblesPlugin.BibleEditForm',
|
|
||||||
'This Bible already exists. Please import '
|
|
||||||
'a different Bible or first delete the existing one.'))
|
'a different Bible or first delete the existing one.'))
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
@ -185,17 +167,15 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog):
|
|||||||
if not new_book_name:
|
if not new_book_name:
|
||||||
self.bookNameEdit[abbreviation].setFocus()
|
self.bookNameEdit[abbreviation].setFocus()
|
||||||
critical_error_message_box(UiStrings().EmptyField,
|
critical_error_message_box(UiStrings().EmptyField,
|
||||||
translate('BiblesPlugin.BibleEditForm',
|
translate('BiblesPlugin.BibleEditForm', 'You need to specify a book name for "%s".') %
|
||||||
'You need to specify a book name for "%s".') %
|
self.book_names[abbreviation])
|
||||||
self.book_names[abbreviation])
|
|
||||||
return False
|
return False
|
||||||
elif not book_regex.match(new_book_name):
|
elif not book_regex.match(new_book_name):
|
||||||
self.bookNameEdit[abbreviation].setFocus()
|
self.bookNameEdit[abbreviation].setFocus()
|
||||||
critical_error_message_box(UiStrings().EmptyField,
|
critical_error_message_box(UiStrings().EmptyField,
|
||||||
translate('BiblesPlugin.BibleEditForm',
|
translate('BiblesPlugin.BibleEditForm',
|
||||||
'The book name "%s" is not correct.\nNumbers can only be used '
|
'The book name "%s" is not correct.\nNumbers can only be used at the beginning and must\nbe '
|
||||||
'at the beginning and must\nbe followed by one or more '
|
'followed by one or more non-numeric characters.') % new_book_name)
|
||||||
'non-numeric characters.') % new_book_name)
|
|
||||||
return False
|
return False
|
||||||
for abbr, book in self.books.iteritems():
|
for abbr, book in self.books.iteritems():
|
||||||
if book:
|
if book:
|
||||||
@ -204,10 +184,8 @@ class EditBibleForm(QtGui.QDialog, Ui_EditBibleDialog):
|
|||||||
if self.bookNameEdit[abbr].text() == new_book_name:
|
if self.bookNameEdit[abbr].text() == new_book_name:
|
||||||
self.bookNameEdit[abbreviation].setFocus()
|
self.bookNameEdit[abbreviation].setFocus()
|
||||||
critical_error_message_box(
|
critical_error_message_box(
|
||||||
translate('BiblesPlugin.BibleEditForm',
|
translate('BiblesPlugin.BibleEditForm', 'Duplicate Book Name'),
|
||||||
'Duplicate Book Name'),
|
translate('BiblesPlugin.BibleEditForm', 'The Book Name "%s" has been entered more than once.')
|
||||||
translate('BiblesPlugin.BibleEditForm',
|
% new_book_name)
|
||||||
'The Book Name "%s" has been entered more than once.')
|
|
||||||
% new_book_name)
|
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2012 Raoul Snyman #
|
# Copyright (c) 2008-2013 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||||
@ -54,28 +54,23 @@ class Ui_LanguageDialog(object):
|
|||||||
self.languageLabel.setObjectName(u'languageLabel')
|
self.languageLabel.setObjectName(u'languageLabel')
|
||||||
self.languageHBoxLayout.addWidget(self.languageLabel)
|
self.languageHBoxLayout.addWidget(self.languageLabel)
|
||||||
self.languageComboBox = QtGui.QComboBox(languageDialog)
|
self.languageComboBox = QtGui.QComboBox(languageDialog)
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding,
|
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
|
||||||
QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(
|
sizePolicy.setHeightForWidth(self.languageComboBox.sizePolicy().hasHeightForWidth())
|
||||||
self.languageComboBox.sizePolicy().hasHeightForWidth())
|
|
||||||
self.languageComboBox.setSizePolicy(sizePolicy)
|
self.languageComboBox.setSizePolicy(sizePolicy)
|
||||||
self.languageComboBox.setObjectName(u'languageComboBox')
|
self.languageComboBox.setObjectName(u'languageComboBox')
|
||||||
self.languageHBoxLayout.addWidget(self.languageComboBox)
|
self.languageHBoxLayout.addWidget(self.languageComboBox)
|
||||||
self.languageLayout.addLayout(self.languageHBoxLayout)
|
self.languageLayout.addLayout(self.languageHBoxLayout)
|
||||||
self.buttonBox = create_button_box(languageDialog, u'buttonBox',
|
self.buttonBox = create_button_box(languageDialog, u'buttonBox', [u'cancel', u'ok'])
|
||||||
[u'cancel', u'ok'])
|
|
||||||
self.languageLayout.addWidget(self.buttonBox)
|
self.languageLayout.addWidget(self.buttonBox)
|
||||||
|
|
||||||
self.retranslateUi(languageDialog)
|
self.retranslateUi(languageDialog)
|
||||||
|
|
||||||
def retranslateUi(self, languageDialog):
|
def retranslateUi(self, languageDialog):
|
||||||
languageDialog.setWindowTitle(
|
languageDialog.setWindowTitle(translate('BiblesPlugin.LanguageDialog', 'Select Language'))
|
||||||
translate('BiblesPlugin.LanguageDialog', 'Select Language'))
|
|
||||||
self.bibleLabel.setText(translate('BiblesPlugin.LanguageDialog', ''))
|
self.bibleLabel.setText(translate('BiblesPlugin.LanguageDialog', ''))
|
||||||
self.infoLabel.setText(translate('BiblesPlugin.LanguageDialog',
|
self.infoLabel.setText(translate('BiblesPlugin.LanguageDialog',
|
||||||
'OpenLP is unable to determine the language of this translation '
|
'OpenLP is unable to determine the language of this translation of the Bible. Please select the language '
|
||||||
'of the Bible. Please select the language from the list below.'))
|
'from the list below.'))
|
||||||
self.languageLabel.setText(translate('BiblesPlugin.LanguageDialog',
|
self.languageLabel.setText(translate('BiblesPlugin.LanguageDialog', 'Language:'))
|
||||||
'Language:'))
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user