forked from openlp/openlp
r1349
This commit is contained in:
commit
5f32b3217e
14
LICENSE
14
LICENSE
|
@ -1,12 +1,12 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
|
@ -56,7 +56,7 @@ patent must be licensed for everyone's free use or not licensed at all.
|
|||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
|
@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
|
|||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
|
@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
|||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
18
openlp.pyw
18
openlp.pyw
|
@ -7,9 +7,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -24,7 +24,6 @@
|
|||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
###############################################################################
|
||||
|
||||
import os
|
||||
import sys
|
||||
import logging
|
||||
|
@ -179,14 +178,8 @@ class OpenLP(QtGui.QApplication):
|
|||
self.splash.show()
|
||||
# make sure Qt really display the splash screen
|
||||
self.processEvents()
|
||||
screens = ScreenList()
|
||||
# Decide how many screens we have and their size
|
||||
for screen in xrange(0, self.desktop().numScreens()):
|
||||
size = self.desktop().screenGeometry(screen)
|
||||
screens.add_screen({u'number': screen,
|
||||
u'size': size,
|
||||
u'primary': (self.desktop().primaryScreen() == screen)})
|
||||
log.info(u'Screen %d found with resolution %s', screen, size)
|
||||
screens = ScreenList(self.desktop())
|
||||
# start the main app window
|
||||
self.appClipboard = self.clipboard()
|
||||
self.mainWindow = MainWindow(screens, app_version, self.appClipboard)
|
||||
|
@ -273,6 +266,9 @@ def main():
|
|||
qInitResources()
|
||||
# Now create and actually run the application.
|
||||
app = OpenLP(qt_args)
|
||||
if sys.platform == 'darwin':
|
||||
OpenLP.addLibraryPath(QtGui.QApplication.applicationDirPath()
|
||||
+ "/qt4_plugins")
|
||||
#i18n Set Language
|
||||
language = LanguageManager.get_language()
|
||||
appTranslator = LanguageManager.get_translator(language)
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -25,4 +25,4 @@
|
|||
###############################################################################
|
||||
"""
|
||||
The :mod:`openlp` module contains all the project produced OpenLP functionality
|
||||
"""
|
||||
"""
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -28,4 +28,4 @@ The :mod:`core` module provides all core application functions
|
|||
|
||||
All the core functions of the OpenLP application including the GUI, settings,
|
||||
logging and a plugin framework are contained within the openlp.core module.
|
||||
"""
|
||||
"""
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -106,8 +106,8 @@ def translate(context, text, comment=None,
|
|||
|
||||
def get_text_file_string(text_file):
|
||||
"""
|
||||
Open a file and return its content as unicode string. If the supplied file
|
||||
name is not a file then the function returns False. If there is an error
|
||||
Open a file and return its content as unicode string. If the supplied file
|
||||
name is not a file then the function returns False. If there is an error
|
||||
loading the file or the content can't be decoded then the function will
|
||||
return None.
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -65,7 +65,7 @@ def delete_database(plugin_name, db_file_name=None):
|
|||
The name of the plugin to remove the database for
|
||||
|
||||
``db_file_name``
|
||||
The database file name. Defaults to None resulting in the
|
||||
The database file name. Defaults to None resulting in the
|
||||
plugin_name being used.
|
||||
"""
|
||||
db_file_path = None
|
||||
|
@ -91,6 +91,7 @@ class BaseModel(object):
|
|||
instance.__setattr__(key, kwargs[key])
|
||||
return instance
|
||||
|
||||
|
||||
class Manager(object):
|
||||
"""
|
||||
Provide generic object persistence management
|
||||
|
@ -107,7 +108,7 @@ class Manager(object):
|
|||
The init_schema function for this database
|
||||
|
||||
``db_file_name``
|
||||
The file name to use for this database. Defaults to None resulting
|
||||
The file name to use for this database. Defaults to None resulting
|
||||
in the plugin_name being used.
|
||||
"""
|
||||
settings = QtCore.QSettings()
|
||||
|
@ -211,11 +212,11 @@ class Manager(object):
|
|||
The type of objects to return
|
||||
|
||||
``filter_clause``
|
||||
The filter governing selection of objects to return. Defaults to
|
||||
The filter governing selection of objects to return. Defaults to
|
||||
None.
|
||||
|
||||
``order_by_ref``
|
||||
Any parameters to order the returned objects by. Defaults to None.
|
||||
Any parameters to order the returned objects by. Defaults to None.
|
||||
"""
|
||||
query = self.session.query(object_class)
|
||||
if filter_clause is not None:
|
||||
|
@ -232,7 +233,7 @@ class Manager(object):
|
|||
The type of objects to return.
|
||||
|
||||
``filter_clause``
|
||||
The filter governing selection of objects to return. Defaults to
|
||||
The filter governing selection of objects to return. Defaults to
|
||||
None.
|
||||
"""
|
||||
query = self.session.query(object_class)
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -220,8 +220,6 @@ class MediaManagerItem(QtGui.QWidget):
|
|||
if self.hasDeleteIcon:
|
||||
toolbar_actions.append([StringContent.Delete,
|
||||
u':/general/general_delete.png', self.onDeleteClick])
|
||||
## Separator Line ##
|
||||
self.addToolbarSeparator()
|
||||
## Preview ##
|
||||
toolbar_actions.append([StringContent.Preview,
|
||||
u':/general/general_preview.png', self.onPreviewClick])
|
||||
|
@ -232,6 +230,8 @@ class MediaManagerItem(QtGui.QWidget):
|
|||
toolbar_actions.append([StringContent.Service,
|
||||
u':/general/general_add.png', self.onAddClick])
|
||||
for action in toolbar_actions:
|
||||
if action[0] == StringContent.Preview:
|
||||
self.addToolbarSeparator()
|
||||
self.addToolbarButton(
|
||||
self.plugin.getString(action[0])[u'title'],
|
||||
self.plugin.getString(action[0])[u'tooltip'],
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -221,4 +221,4 @@ class PluginManager(object):
|
|||
for plugin in self.plugins:
|
||||
if plugin.isActive():
|
||||
plugin.finalise()
|
||||
log.info(u'Finalisation Complete for %s ' % plugin.name)
|
||||
log.info(u'Finalisation Complete for %s ' % plugin.name)
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -144,4 +144,4 @@ class Renderer(object):
|
|||
html_text = html_text[:len(html_text)-4]
|
||||
formatted.append(html_text)
|
||||
log.debug(u'format_slide - End')
|
||||
return formatted
|
||||
return formatted
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -34,6 +34,15 @@ from openlp.core.ui import MainDisplay
|
|||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
VERSE = u'The Lord said to {r}Noah{/r}: \n' \
|
||||
'There\'s gonna be a {su}floody{/su}, {sb}floody{/sb}\n' \
|
||||
'The Lord said to {g}Noah{/g}:\n' \
|
||||
'There\'s gonna be a {st}floody{/st}, {it}floody{/it}\n' \
|
||||
'Get those children out of the muddy, muddy \n' \
|
||||
'{r}C{/r}{b}h{/b}{bl}i{/bl}{y}l{/y}{g}d{/g}{pk}' \
|
||||
'r{/pk}{o}e{/o}{pp}n{/pp} of the Lord\n'
|
||||
FOOTER = [u'Arky Arky (Unknown)', u'Public Domain', u'CCLI 123456']
|
||||
|
||||
class RenderManager(object):
|
||||
"""
|
||||
Class to pull all Renderer interactions into one place. The plugins will
|
||||
|
@ -202,28 +211,17 @@ class RenderManager(object):
|
|||
self.force_page = force_page
|
||||
# set the default image size for previews
|
||||
self.calculate_default(self.screens.preview[u'size'])
|
||||
verse = u'The Lord said to {r}Noah{/r}: \n' \
|
||||
'There\'s gonna be a {su}floody{/su}, {sb}floody{/sb}\n' \
|
||||
'The Lord said to {g}Noah{/g}:\n' \
|
||||
'There\'s gonna be a {st}floody{/st}, {it}floody{/it}\n' \
|
||||
'Get those children out of the muddy, muddy \n' \
|
||||
'{r}C{/r}{b}h{/b}{bl}i{/bl}{y}l{/y}{g}d{/g}{pk}' \
|
||||
'r{/pk}{o}e{/o}{pp}n{/pp} of the Lord\n'
|
||||
# make big page for theme edit dialog to get line count
|
||||
if self.force_page:
|
||||
verse = verse + verse + verse
|
||||
else:
|
||||
self.image_manager.del_image(theme_data.theme_name)
|
||||
footer = []
|
||||
footer.append(u'Arky Arky (Unknown)')
|
||||
footer.append(u'Public Domain')
|
||||
footer.append(u'CCLI 123456')
|
||||
# build a service item to generate preview
|
||||
serviceItem = ServiceItem()
|
||||
serviceItem.theme = theme_data
|
||||
serviceItem.add_from_text(u'', verse, footer)
|
||||
if self.force_page:
|
||||
# make big page for theme edit dialog to get line count
|
||||
serviceItem.add_from_text(u'', VERSE + VERSE + VERSE, FOOTER)
|
||||
else:
|
||||
self.image_manager.del_image(theme_data.theme_name)
|
||||
serviceItem.add_from_text(u'', VERSE, FOOTER)
|
||||
serviceItem.render_manager = self
|
||||
serviceItem.raw_footer = footer
|
||||
serviceItem.raw_footer = FOOTER
|
||||
serviceItem.render(True)
|
||||
if not self.force_page:
|
||||
self.display.buildHtml(serviceItem)
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -162,9 +162,7 @@ class ServiceItem(object):
|
|||
line_break = True
|
||||
if self.is_capable(ItemCapabilities.NoLineBreaks):
|
||||
line_break = False
|
||||
theme = None
|
||||
if self.theme:
|
||||
theme = self.theme
|
||||
theme = self.theme if self.theme else None
|
||||
self.main, self.footer = \
|
||||
self.render_manager.set_override_theme(theme, useOverride)
|
||||
self.themedata = self.render_manager.renderer._theme
|
||||
|
@ -187,11 +185,7 @@ class ServiceItem(object):
|
|||
self.title = clean_tags(self.title)
|
||||
self.foot_text = None
|
||||
if self.raw_footer:
|
||||
for foot in self.raw_footer:
|
||||
if not self.foot_text:
|
||||
self.foot_text = foot
|
||||
else:
|
||||
self.foot_text = u'%s<br>%s' % (self.foot_text, foot)
|
||||
self.foot_text = u'<br>'.join(self.raw_footer)
|
||||
|
||||
def add_from_image(self, path, title):
|
||||
"""
|
||||
|
@ -204,8 +198,7 @@ class ServiceItem(object):
|
|||
A title for the slide in the service item.
|
||||
"""
|
||||
self.service_item_type = ServiceItemType.Image
|
||||
self._raw_frames.append(
|
||||
{u'title': title, u'path': path})
|
||||
self._raw_frames.append({u'title': title, u'path': path})
|
||||
self.render_manager.image_manager.add_image(title, path)
|
||||
self._new_item()
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -64,7 +64,7 @@ class SettingsManager(object):
|
|||
Read the last directory used for plugin.
|
||||
|
||||
``section``
|
||||
The section of code calling the method. This is used in the
|
||||
The section of code calling the method. This is used in the
|
||||
settings key.
|
||||
|
||||
``num``
|
||||
|
@ -84,7 +84,7 @@ class SettingsManager(object):
|
|||
Save the last directory used for plugin.
|
||||
|
||||
``section``
|
||||
The section of code calling the method. This is used in the
|
||||
The section of code calling the method. This is used in the
|
||||
settings key.
|
||||
|
||||
``directory``
|
||||
|
@ -160,11 +160,11 @@ class SettingsManager(object):
|
|||
Get a list of files from the data files path.
|
||||
|
||||
``section``
|
||||
Defaults to *None*. The section of code getting the files - used
|
||||
Defaults to *None*. The section of code getting the files - used
|
||||
to load from a section's data subdirectory.
|
||||
|
||||
``extension``
|
||||
Defaults to *None*. The extension to search for.
|
||||
Defaults to *None*. The extension to search for.
|
||||
"""
|
||||
path = AppLocation.get_data_path()
|
||||
if section:
|
||||
|
@ -178,4 +178,4 @@ class SettingsManager(object):
|
|||
if extension == os.path.splitext(filename)[1]]
|
||||
else:
|
||||
# no filtering required
|
||||
return files
|
||||
return files
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -91,6 +91,7 @@ class ThemeLevel(object):
|
|||
Service = 2
|
||||
Song = 3
|
||||
|
||||
|
||||
class BackgroundType(object):
|
||||
"""
|
||||
Type enumeration for backgrounds.
|
||||
|
@ -123,6 +124,7 @@ class BackgroundType(object):
|
|||
elif type_string == u'image':
|
||||
return BackgroundType.Image
|
||||
|
||||
|
||||
class BackgroundGradientType(object):
|
||||
"""
|
||||
Type enumeration for background gradients.
|
||||
|
@ -200,6 +202,7 @@ INTEGER_LIST = [u'size', u'line_adjustment', u'x', u'height', u'y',
|
|||
u'width', u'shadow_size', u'outline_size', u'horizontal_align',
|
||||
u'vertical_align', u'wrap_style']
|
||||
|
||||
|
||||
class ThemeXML(object):
|
||||
"""
|
||||
A class to encapsulate the Theme XML.
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -130,7 +130,7 @@ def create_accept_reject_button_box(parent, okay=False):
|
|||
methods to handle the default ``accepted()`` and ``rejected()`` signals.
|
||||
|
||||
``parent``
|
||||
The parent object. This should be a ``QWidget`` descendant.
|
||||
The parent object. This should be a ``QWidget`` descendant.
|
||||
|
||||
``okay``
|
||||
If true creates an okay/cancel combination instead of save/cancel.
|
||||
|
@ -185,15 +185,15 @@ def media_item_combo_box(parent, name):
|
|||
|
||||
def create_delete_push_button(parent, icon=None):
|
||||
"""
|
||||
Creates a standard push button with a delete label and optional icon. The
|
||||
Creates a standard push button with a delete label and optional icon. The
|
||||
button is connected to the parent's ``onDeleteButtonClicked()`` method to
|
||||
handle the ``clicked()`` signal.
|
||||
|
||||
``parent``
|
||||
The parent object. This should be a ``QWidget`` descendant.
|
||||
The parent object. This should be a ``QWidget`` descendant.
|
||||
|
||||
``icon``
|
||||
An icon to display on the button. This can be either a ``QIcon``, a
|
||||
An icon to display on the button. This can be either a ``QIcon``, a
|
||||
resource path or a file name.
|
||||
"""
|
||||
delete_button = QtGui.QPushButton(parent)
|
||||
|
@ -210,12 +210,12 @@ def create_delete_push_button(parent, icon=None):
|
|||
def create_up_down_push_button_set(parent):
|
||||
"""
|
||||
Creates a standard set of two push buttons, one for up and the other for
|
||||
down, for use with lists. The buttons use arrow icons and no text and are
|
||||
down, for use with lists. The buttons use arrow icons and no text and are
|
||||
connected to the parent's ``onUpButtonClicked()`` and
|
||||
``onDownButtonClicked()`` to handle their respective ``clicked()`` signals.
|
||||
|
||||
``parent``
|
||||
The parent object. This should be a ``QWidget`` descendant.
|
||||
The parent object. This should be a ``QWidget`` descendant.
|
||||
"""
|
||||
up_button = QtGui.QPushButton(parent)
|
||||
up_button.setIcon(build_icon(u':/services/service_up.png'))
|
||||
|
@ -295,7 +295,7 @@ def create_valign_combo(form, parent, layout):
|
|||
The UI screen that the label and combo will appear on.
|
||||
|
||||
``parent``
|
||||
The parent object. This should be a ``QWidget`` descendant.
|
||||
The parent object. This should be a ``QWidget`` descendant.
|
||||
|
||||
``layout``
|
||||
A layout object to add the label and combo widgets to.
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -24,4 +24,4 @@
|
|||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
###############################################################################
|
||||
|
||||
from openlp.core.theme.theme import Theme
|
||||
from openlp.core.theme.theme import Theme
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -92,7 +92,7 @@ class Theme(object):
|
|||
* ``solid`` - color
|
||||
|
||||
``BackgroundParameter2``
|
||||
Extra information about the background. The contents of this attribute
|
||||
Extra information about the background. The contents of this attribute
|
||||
depend on the BackgroundType:
|
||||
|
||||
* ``image`` - border color
|
||||
|
@ -100,7 +100,7 @@ class Theme(object):
|
|||
* ``solid`` - N/A
|
||||
|
||||
``BackgroundParameter3``
|
||||
Extra information about the background. The contents of this attribute
|
||||
Extra information about the background. The contents of this attribute
|
||||
depend on the BackgroundType:
|
||||
|
||||
* ``image`` - N/A
|
||||
|
@ -142,7 +142,7 @@ class Theme(object):
|
|||
Color for the outline (or None if Outline is 0)
|
||||
|
||||
``HorizontalAlign``
|
||||
The horizontal alignment to apply to text. Valid alignments are:
|
||||
The horizontal alignment to apply to text. Valid alignments are:
|
||||
|
||||
* ``0`` - left align
|
||||
* ``1`` - right align
|
||||
|
@ -156,7 +156,7 @@ class Theme(object):
|
|||
* ``2`` - centre align
|
||||
|
||||
``WrapStyle``
|
||||
The wrap style to apply to the text. Valid styles are:
|
||||
The wrap style to apply to the text. Valid styles are:
|
||||
|
||||
* ``0`` - normal
|
||||
* ``1`` - lyrics
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -63,10 +63,10 @@ from splashscreen import SplashScreen
|
|||
from generaltab import GeneralTab
|
||||
from themestab import ThemesTab
|
||||
from advancedtab import AdvancedTab
|
||||
from displaytagtab import DisplayTagTab
|
||||
from aboutform import AboutForm
|
||||
from pluginform import PluginForm
|
||||
from settingsform import SettingsForm
|
||||
from displaytagform import DisplayTagForm
|
||||
from shortcutlistform import ShortcutListForm
|
||||
from mediadockmanager import MediaDockManager
|
||||
from servicemanager import ServiceManager
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -106,38 +106,36 @@ class Ui_AboutDialog(object):
|
|||
))
|
||||
self.aboutNotebook.setTabText(
|
||||
self.aboutNotebook.indexOf(self.aboutTab), UiStrings.About)
|
||||
self.creditsTextEdit.setPlainText(translate('OpenLP.AboutForm',
|
||||
lead = u'Raoul "superfly" Snyman'
|
||||
developers = [u'Tim "TRB143" Bentley', u'Jonathan "gushie" Corwin',
|
||||
u'Michael "cocooncrash" Gorven', u'Scott "sguerrieri" Guerrieri',
|
||||
u'Raoul "superfly" Snyman', u'Martin "mijiti" Thompson',
|
||||
u'Jon "Meths" Tibble<']
|
||||
contributors = [u'Meinert "m2j" Jordan', u'Andreas "googol" Preikschat',
|
||||
u'Christian "crichter" Richter', u'Philip "Phill" Ridout',
|
||||
u'Maikel Stuivenberg', u'Carsten "catini" Tingaard',
|
||||
u'Frode "frodus" Woldsund']
|
||||
testers = [u'Philip "Phill" Ridout', u'Wesley "wrst" Stout (lead)']
|
||||
packagers = [u'Thomas "tabthorpe" Abthorpe (FreeBSD)',
|
||||
u'Tim "TRB143" Bentley (Fedora)',
|
||||
u'Michael "cocooncrash" Gorven (Ubuntu)',
|
||||
u'Matthias "matthub" Hub (Mac OS X)',
|
||||
u'Raoul "superfly" Snyman (Windows, Ubuntu)']
|
||||
self.creditsTextEdit.setPlainText(unicode(translate('OpenLP.AboutForm',
|
||||
'Project Lead\n'
|
||||
' Raoul "superfly" Snyman\n'
|
||||
' %s\n'
|
||||
'\n'
|
||||
'Developers\n'
|
||||
' Tim "TRB143" Bentley\n'
|
||||
' Jonathan "gushie" Corwin\n'
|
||||
' Michael "cocooncrash" Gorven\n'
|
||||
' Scott "sguerrieri" Guerrieri\n'
|
||||
' Raoul "superfly" Snyman\n'
|
||||
' Martin "mijiti" Thompson\n'
|
||||
' Jon "Meths" Tibble\n'
|
||||
' %s\n'
|
||||
'\n'
|
||||
'Contributors\n'
|
||||
' Meinert "m2j" Jordan\n'
|
||||
' Andreas "googol" Preikschat\n'
|
||||
' Christian "crichter" Richter\n'
|
||||
' Philip "Phill" Ridout\n'
|
||||
' Maikel Stuivenberg\n'
|
||||
' Carsten "catini" Tingaard\n'
|
||||
' Frode "frodus" Woldsund\n'
|
||||
' %s\n'
|
||||
'\n'
|
||||
'Testers\n'
|
||||
' Philip "Phill" Ridout\n'
|
||||
' Wesley "wrst" Stout (lead)\n'
|
||||
' %s\n'
|
||||
'\n'
|
||||
'Packagers\n'
|
||||
' Thomas "tabthorpe" Abthorpe (FreeBSD)\n'
|
||||
' Tim "TRB143" Bentley (Fedora)\n'
|
||||
' Michael "cocooncrash" Gorven (Ubuntu)\n'
|
||||
' Matthias "matthub" Hub (Mac OS X)\n'
|
||||
' Raoul "superfly" Snyman (Windows, Ubuntu)\n'
|
||||
' %s\n'
|
||||
'\n'
|
||||
'Built With\n'
|
||||
' Python: http://www.python.org/\n'
|
||||
|
@ -155,31 +153,30 @@ class Ui_AboutDialog(object):
|
|||
' God our Father, for sending His Son to die\n'
|
||||
' on the cross, setting us free from sin. We\n'
|
||||
' bring this software to you for free because\n'
|
||||
' He has set us free.'
|
||||
))
|
||||
' He has set us free.')) % (lead, u'\n '.join(developers),
|
||||
u'\n '.join(contributors), u'\n '.join(testers),
|
||||
u'\n '.join(packagers)))
|
||||
self.aboutNotebook.setTabText(
|
||||
self.aboutNotebook.indexOf(self.creditsTab),
|
||||
translate('OpenLP.AboutForm', 'Credits'))
|
||||
self.licenseTextEdit.setPlainText(translate('OpenLP.AboutForm',
|
||||
copyright = translate('OpenLP.AboutForm',
|
||||
'Copyright \xa9 2004-2011 Raoul Snyman\n'
|
||||
'Portions copyright \xa9 2004-2011 '
|
||||
'Tim Bentley, Jonathan Corwin, Michael Gorven, Scott Guerrieri,\n'
|
||||
'Meinert Jordan, Andreas Preikschat, Christian Richter, Philip\n'
|
||||
'Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, Carstenn'
|
||||
'Tinggaard, Frode Woldsund\n'
|
||||
'\n'
|
||||
'Tinggaard, Frode Woldsund')
|
||||
licence = translate('OpenLP.AboutForm',
|
||||
'This program is free software; you can redistribute it and/or '
|
||||
'modify it under the terms of the GNU General Public License as '
|
||||
'published by the Free Software Foundation; version 2 of the '
|
||||
'License.\n'
|
||||
'\n'
|
||||
'License.')
|
||||
disclaimer = translate('OpenLP.AboutForm',
|
||||
'This program is distributed in the hope that it will be useful, '
|
||||
'but WITHOUT ANY WARRANTY; without even the implied warranty of '
|
||||
'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See below '
|
||||
'for more details.\n'
|
||||
'\n'
|
||||
'\n'
|
||||
'GNU GENERAL PUBLIC LICENSE\n'
|
||||
'for more details.')
|
||||
gpltext = ('GNU GENERAL PUBLIC LICENSE\n'
|
||||
'Version 2, June 1991\n'
|
||||
'\n'
|
||||
'Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 '
|
||||
|
@ -549,7 +546,9 @@ class Ui_AboutDialog(object):
|
|||
'subroutine library, you may consider it more useful to permit '
|
||||
'linking proprietary applications with the library. If this is '
|
||||
'what you want to do, use the GNU Lesser General Public License '
|
||||
'instead of this License.'))
|
||||
'instead of this License.')
|
||||
self.licenseTextEdit.setPlainText(u'%s\n\n%s\n\n%s\n\n\n%s' %
|
||||
(copyright, licence, disclaimer, gpltext))
|
||||
self.aboutNotebook.setTabText(
|
||||
self.aboutNotebook.indexOf(self.licenseTab),
|
||||
translate('OpenLP.AboutForm', 'License'))
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -61,4 +61,4 @@ class AboutForm(QtGui.QDialog, Ui_AboutDialog):
|
|||
import webbrowser
|
||||
url = u'http://www.openlp.org/en/documentation/introduction/' \
|
||||
+ u'contributing.html'
|
||||
webbrowser.open_new(url)
|
||||
webbrowser.open_new(url)
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -28,8 +28,9 @@ The :mod:`advancedtab` provides an advanced settings facility.
|
|||
"""
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import SettingsTab, translate
|
||||
from openlp.core.lib import SettingsTab, translate, build_icon
|
||||
from openlp.core.lib.ui import UiStrings
|
||||
from openlp.core.utils import get_images_filter
|
||||
|
||||
class AdvancedTab(SettingsTab):
|
||||
"""
|
||||
|
@ -41,6 +42,8 @@ class AdvancedTab(SettingsTab):
|
|||
Initialise the settings tab
|
||||
"""
|
||||
SettingsTab.__init__(self, u'Advanced')
|
||||
self.default_image = u':/graphics/openlp-splash-screen.png'
|
||||
self.default_color = u'#ffffff'
|
||||
|
||||
def setupUi(self):
|
||||
"""
|
||||
|
@ -81,33 +84,38 @@ class AdvancedTab(SettingsTab):
|
|||
self.hideMouseCheckBox.setObjectName(u'hideMouseCheckBox')
|
||||
self.hideMouseLayout.addWidget(self.hideMouseCheckBox)
|
||||
self.leftLayout.addWidget(self.hideMouseGroupBox)
|
||||
# self.sharedDirGroupBox = QtGui.QGroupBox(self.leftColumn)
|
||||
# self.sharedDirGroupBox.setObjectName(u'sharedDirGroupBox')
|
||||
# self.sharedDirLayout = QtGui.QFormLayout(self.sharedDirGroupBox)
|
||||
# self.sharedCheckBox = QtGui.QCheckBox(self.sharedDirGroupBox)
|
||||
# self.sharedCheckBox.setObjectName(u'sharedCheckBox')
|
||||
# self.sharedDirLayout.addRow(self.sharedCheckBox)
|
||||
# self.sharedLabel = QtGui.QLabel(self.sharedDirGroupBox)
|
||||
# self.sharedLabel.setObjectName(u'sharedLabel')
|
||||
# self.sharedSubLayout = QtGui.QHBoxLayout()
|
||||
# self.sharedSubLayout.setObjectName(u'sharedSubLayout')
|
||||
# self.sharedLineEdit = QtGui.QLineEdit(self.sharedDirGroupBox)
|
||||
# self.sharedLineEdit.setObjectName(u'sharedLineEdit')
|
||||
# self.sharedSubLayout.addWidget(self.sharedLineEdit)
|
||||
# self.sharedPushButton = QtGui.QPushButton(self.sharedDirGroupBox)
|
||||
# self.sharedPushButton.setObjectName(u'sharedPushButton')
|
||||
# self.sharedSubLayout.addWidget(self.sharedPushButton)
|
||||
# self.sharedDirLayout.addRow(self.sharedLabel, self.sharedSubLayout)
|
||||
# self.leftLayout.addWidget(self.sharedDirGroupBox)
|
||||
self.leftLayout.addStretch()
|
||||
# self.databaseGroupBox = QtGui.QGroupBox(self.rightColumn)
|
||||
# self.databaseGroupBox.setObjectName(u'databaseGroupBox')
|
||||
# self.databaseGroupBox.setEnabled(False)
|
||||
# self.databaseLayout = QtGui.QVBoxLayout(self.databaseGroupBox)
|
||||
# self.rightLayout.addWidget(self.databaseGroupBox)
|
||||
self.defaultImageGroupBox = QtGui.QGroupBox(self.rightColumn)
|
||||
self.defaultImageGroupBox.setObjectName(u'defaultImageGroupBox')
|
||||
self.defaultImageLayout = QtGui.QFormLayout(self.defaultImageGroupBox)
|
||||
self.defaultImageLayout.setObjectName(u'defaultImageLayout')
|
||||
self.defaultColorLabel = QtGui.QLabel(self.defaultImageGroupBox)
|
||||
self.defaultColorLabel.setObjectName(u'defaultColorLabel')
|
||||
self.defaultColorButton = QtGui.QPushButton(self.defaultImageGroupBox)
|
||||
self.defaultColorButton.setObjectName(u'defaultColorButton')
|
||||
self.defaultImageLayout.addRow(self.defaultColorLabel,
|
||||
self.defaultColorButton)
|
||||
self.defaultFileLabel = QtGui.QLabel(self.defaultImageGroupBox)
|
||||
self.defaultFileLabel.setObjectName(u'defaultFileLabel')
|
||||
self.defaultFileEdit = QtGui.QLineEdit(self.defaultImageGroupBox)
|
||||
self.defaultFileEdit.setObjectName(u'defaultFileEdit')
|
||||
self.defaultBrowseButton = QtGui.QToolButton(self.defaultImageGroupBox)
|
||||
self.defaultBrowseButton.setObjectName(u'defaultBrowseButton')
|
||||
self.defaultBrowseButton.setIcon(
|
||||
build_icon(u':/general/general_open.png'))
|
||||
self.defaultFileLayout = QtGui.QHBoxLayout()
|
||||
self.defaultFileLayout.setObjectName(u'defaultFileLayout')
|
||||
self.defaultFileLayout.addWidget(self.defaultFileEdit)
|
||||
self.defaultFileLayout.addWidget(self.defaultBrowseButton)
|
||||
self.defaultImageLayout.addRow(self.defaultFileLabel,
|
||||
self.defaultFileLayout)
|
||||
self.rightLayout.addWidget(self.defaultImageGroupBox)
|
||||
self.rightLayout.addStretch()
|
||||
# QtCore.QObject.connect(self.sharedCheckBox,
|
||||
# QtCore.SIGNAL(u'stateChanged(int)'), self.onSharedCheckBoxChanged)
|
||||
|
||||
QtCore.QObject.connect(self.defaultColorButton,
|
||||
QtCore.SIGNAL(u'pressed()'), self.onDefaultColorButtonPressed)
|
||||
QtCore.QObject.connect(self.defaultBrowseButton,
|
||||
QtCore.SIGNAL(u'pressed()'), self.onDefaultBrowseButtonPressed)
|
||||
|
||||
def retranslateUi(self):
|
||||
"""
|
||||
|
@ -129,14 +137,13 @@ class AdvancedTab(SettingsTab):
|
|||
self.hideMouseGroupBox.setTitle(translate('OpenLP.AdvancedTab',
|
||||
'Mouse Cursor'))
|
||||
self.hideMouseCheckBox.setText(translate('OpenLP.AdvancedTab',
|
||||
'Hide the mouse cursor when moved over the display window'))
|
||||
# self.sharedDirGroupBox.setTitle(
|
||||
# translate('AdvancedTab', 'Central Data Store'))
|
||||
# self.sharedCheckBox.setText(
|
||||
# translate('AdvancedTab', 'Enable a shared data location'))
|
||||
# self.sharedLabel.setText(translate('AdvancedTab', 'Store location:'))
|
||||
# self.sharedPushButton.setText(UiStrings.Browse)
|
||||
# self.databaseGroupBox.setTitle(translate('AdvancedTab', 'Databases'))
|
||||
'Hide mouse cursor when over display window'))
|
||||
self.defaultImageGroupBox.setTitle(translate('OpenLP.AdvancedTab',
|
||||
'Default Image'))
|
||||
self.defaultColorLabel.setText(translate('OpenLP.AdvancedTab',
|
||||
'Background color:'))
|
||||
self.defaultFileLabel.setText(translate('OpenLP.AdvancedTab',
|
||||
'Image file:'))
|
||||
|
||||
def load(self):
|
||||
"""
|
||||
|
@ -165,7 +172,14 @@ class AdvancedTab(SettingsTab):
|
|||
QtCore.QVariant(True)).toBool())
|
||||
self.hideMouseCheckBox.setChecked(
|
||||
settings.value(u'hide mouse', QtCore.QVariant(False)).toBool())
|
||||
self.default_color = settings.value(u'default color',
|
||||
QtCore.QVariant(u'#ffffff')).toString()
|
||||
self.defaultFileEdit.setText(settings.value(u'default image',
|
||||
QtCore.QVariant(u':/graphics/openlp-splash-screen.png'))\
|
||||
.toString())
|
||||
settings.endGroup()
|
||||
self.defaultColorButton.setStyleSheet(
|
||||
u'background-color: %s' % self.default_color)
|
||||
|
||||
def save(self):
|
||||
"""
|
||||
|
@ -185,12 +199,24 @@ class AdvancedTab(SettingsTab):
|
|||
QtCore.QVariant(self.enableAutoCloseCheckBox.isChecked()))
|
||||
settings.setValue(u'hide mouse',
|
||||
QtCore.QVariant(self.hideMouseCheckBox.isChecked()))
|
||||
settings.setValue(u'default color', self.default_color)
|
||||
settings.setValue(u'default image', self.defaultFileEdit.text())
|
||||
settings.endGroup()
|
||||
|
||||
# def onSharedCheckBoxChanged(self, checked):
|
||||
# """
|
||||
# Enables the widgets to allow a shared data location
|
||||
# """
|
||||
# self.sharedLabel.setEnabled(checked)
|
||||
# self.sharedTextEdit.setEnabled(checked)
|
||||
# self.sharedPushButton.setEnabled(checked)
|
||||
def onDefaultColorButtonPressed(self):
|
||||
new_color = QtGui.QColorDialog.getColor(
|
||||
QtGui.QColor(self.default_color), self)
|
||||
if new_color.isValid():
|
||||
self.default_color = new_color.name()
|
||||
self.defaultColorButton.setStyleSheet(
|
||||
u'background-color: %s' % self.default_color)
|
||||
|
||||
def onDefaultBrowseButtonPressed(self):
|
||||
file_filters = u'%s;;%s (*.*) (*)' % (get_images_filter(),
|
||||
UiStrings.AllFiles)
|
||||
filename = QtGui.QFileDialog.getOpenFileName(self,
|
||||
translate('OpenLP.AdvancedTab', 'Open File'), '',
|
||||
file_filters)
|
||||
if filename:
|
||||
self.defaultFileEdit.setText(filename)
|
||||
self.defaultFileEdit.setFocus()
|
||||
|
|
|
@ -0,0 +1,154 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||
|
||||
###############################################################################
|
||||
# OpenLP - Open Source Lyrics Projection #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
# Software Foundation; version 2 of the License. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||
# more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License along #
|
||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
###############################################################################
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib.ui import UiStrings, create_accept_reject_button_box
|
||||
|
||||
class Ui_DisplayTagDialog(object):
|
||||
|
||||
def setupUi(self, displayTagDialog):
|
||||
displayTagDialog.setObjectName(u'displayTagDialog')
|
||||
displayTagDialog.resize(725, 548)
|
||||
self.widget = QtGui.QWidget(displayTagDialog)
|
||||
self.widget.setGeometry(QtCore.QRect(10, 10, 701, 521))
|
||||
self.widget.setObjectName(u'widget')
|
||||
self.listdataGridLayout = QtGui.QGridLayout(self.widget)
|
||||
self.listdataGridLayout.setMargin(0)
|
||||
self.listdataGridLayout.setObjectName(u'listdataGridLayout')
|
||||
self.tagTableWidget = QtGui.QTableWidget(self.widget)
|
||||
self.tagTableWidget.setHorizontalScrollBarPolicy(
|
||||
QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.tagTableWidget.setEditTriggers(
|
||||
QtGui.QAbstractItemView.NoEditTriggers)
|
||||
self.tagTableWidget.setAlternatingRowColors(True)
|
||||
self.tagTableWidget.setSelectionMode(
|
||||
QtGui.QAbstractItemView.SingleSelection)
|
||||
self.tagTableWidget.setSelectionBehavior(
|
||||
QtGui.QAbstractItemView.SelectRows)
|
||||
self.tagTableWidget.setCornerButtonEnabled(False)
|
||||
self.tagTableWidget.setObjectName(u'tagTableWidget')
|
||||
self.tagTableWidget.setColumnCount(4)
|
||||
self.tagTableWidget.setRowCount(0)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tagTableWidget.setHorizontalHeaderItem(0, item)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tagTableWidget.setHorizontalHeaderItem(1, item)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tagTableWidget.setHorizontalHeaderItem(2, item)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tagTableWidget.setHorizontalHeaderItem(3, item)
|
||||
self.listdataGridLayout.addWidget(self.tagTableWidget, 0, 0, 1, 1)
|
||||
self.horizontalLayout = QtGui.QHBoxLayout()
|
||||
self.horizontalLayout.setObjectName(u'horizontalLayout')
|
||||
spacerItem = QtGui.QSpacerItem(40, 20,
|
||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.horizontalLayout.addItem(spacerItem)
|
||||
self.defaultPushButton = QtGui.QPushButton(self.widget)
|
||||
self.defaultPushButton.setObjectName(u'defaultPushButton')
|
||||
self.horizontalLayout.addWidget(self.defaultPushButton)
|
||||
self.deletePushButton = QtGui.QPushButton(self.widget)
|
||||
self.deletePushButton.setObjectName(u'deletePushButton')
|
||||
self.horizontalLayout.addWidget(self.deletePushButton)
|
||||
self.listdataGridLayout.addLayout(self.horizontalLayout, 1, 0, 1, 1)
|
||||
self.editGroupBox = QtGui.QGroupBox(self.widget)
|
||||
self.editGroupBox.setObjectName(u'editGroupBox')
|
||||
self.dataGridLayout = QtGui.QGridLayout(self.editGroupBox)
|
||||
self.dataGridLayout.setObjectName(u'dataGridLayout')
|
||||
self.descriptionLabel = QtGui.QLabel(self.editGroupBox)
|
||||
self.descriptionLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.descriptionLabel.setObjectName(u'descriptionLabel')
|
||||
self.dataGridLayout.addWidget(self.descriptionLabel, 0, 0, 1, 1)
|
||||
self.descriptionLineEdit = QtGui.QLineEdit(self.editGroupBox)
|
||||
self.descriptionLineEdit.setObjectName(u'descriptionLineEdit')
|
||||
self.dataGridLayout.addWidget(self.descriptionLineEdit, 0, 1, 2, 1)
|
||||
self.newPushButton = QtGui.QPushButton(self.editGroupBox)
|
||||
self.newPushButton.setObjectName(u'newPushButton')
|
||||
self.dataGridLayout.addWidget(self.newPushButton, 0, 2, 2, 1)
|
||||
self.tagLabel = QtGui.QLabel(self.editGroupBox)
|
||||
self.tagLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.tagLabel.setObjectName(u'tagLabel')
|
||||
self.dataGridLayout.addWidget(self.tagLabel, 2, 0, 1, 1)
|
||||
self.tagLineEdit = QtGui.QLineEdit(self.editGroupBox)
|
||||
self.tagLineEdit.setMaximumSize(QtCore.QSize(50, 16777215))
|
||||
self.tagLineEdit.setMaxLength(5)
|
||||
self.tagLineEdit.setObjectName(u'tagLineEdit')
|
||||
self.dataGridLayout.addWidget(self.tagLineEdit, 2, 1, 1, 1)
|
||||
self.startTagLabel = QtGui.QLabel(self.editGroupBox)
|
||||
self.startTagLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.startTagLabel.setObjectName(u'startTagLabel')
|
||||
self.dataGridLayout.addWidget(self.startTagLabel, 3, 0, 1, 1)
|
||||
self.startTagLineEdit = QtGui.QLineEdit(self.editGroupBox)
|
||||
self.startTagLineEdit.setObjectName(u'startTagLineEdit')
|
||||
self.dataGridLayout.addWidget(self.startTagLineEdit, 3, 1, 1, 1)
|
||||
self.endTagLabel = QtGui.QLabel(self.editGroupBox)
|
||||
self.endTagLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.endTagLabel.setObjectName(u'endTagLabel')
|
||||
self.dataGridLayout.addWidget(self.endTagLabel, 4, 0, 1, 1)
|
||||
self.endTagLineEdit = QtGui.QLineEdit(self.editGroupBox)
|
||||
self.endTagLineEdit.setObjectName(u'endTagLineEdit')
|
||||
self.dataGridLayout.addWidget(self.endTagLineEdit, 4, 1, 1, 1)
|
||||
self.updatePushButton = QtGui.QPushButton(self.editGroupBox)
|
||||
self.updatePushButton.setObjectName(u'updatePushButton')
|
||||
self.dataGridLayout.addWidget(self.updatePushButton, 4, 2, 1, 1)
|
||||
self.listdataGridLayout.addWidget(self.editGroupBox, 2, 0, 1, 1)
|
||||
self.buttonBox = create_accept_reject_button_box(displayTagDialog)
|
||||
self.listdataGridLayout.addWidget(self.buttonBox, 3, 0, 1, 1)
|
||||
|
||||
self.retranslateUi(displayTagDialog)
|
||||
QtCore.QMetaObject.connectSlotsByName(displayTagDialog)
|
||||
|
||||
def retranslateUi(self, displayTagDialog):
|
||||
displayTagDialog.setWindowTitle(translate('OpenLP.displayTagDialog',
|
||||
'Configure Display Tags'))
|
||||
self.editGroupBox.setTitle(
|
||||
translate('OpenLP.DisplayTagDialog', 'Edit Selection'))
|
||||
self.updatePushButton.setText(
|
||||
translate('OpenLP.DisplayTagDialog', 'Update'))
|
||||
self.descriptionLabel.setText(
|
||||
translate('OpenLP.DisplayTagDialog', 'Description'))
|
||||
self.tagLabel.setText(translate('OpenLP.DisplayTagDialog', 'Tag'))
|
||||
self.startTagLabel.setText(
|
||||
translate('OpenLP.DisplayTagDialog', 'Start tag'))
|
||||
self.endTagLabel.setText(
|
||||
translate('OpenLP.DisplayTagDialog', 'End tag'))
|
||||
self.deletePushButton.setText(UiStrings.Delete)
|
||||
self.defaultPushButton.setText(
|
||||
translate('OpenLP.DisplayTagDialog', 'Default'))
|
||||
self.newPushButton.setText(UiStrings.New)
|
||||
self.tagTableWidget.horizontalHeaderItem(0).setText(
|
||||
translate('OpenLP.DisplayTagDialog', 'Description'))
|
||||
self.tagTableWidget.horizontalHeaderItem(1).setText(
|
||||
translate('OpenLP.DisplayTagDialog', 'Tag id'))
|
||||
self.tagTableWidget.horizontalHeaderItem(2).setText(
|
||||
translate('OpenLP.DisplayTagDialog', 'Start Html'))
|
||||
self.tagTableWidget.horizontalHeaderItem(3).setText(
|
||||
translate('OpenLP.DisplayTagDialog', 'End Html'))
|
||||
self.tagTableWidget.setColumnWidth(0, 120)
|
||||
self.tagTableWidget.setColumnWidth(1, 40)
|
||||
self.tagTableWidget.setColumnWidth(2, 240)
|
||||
self.tagTableWidget.setColumnWidth(3, 240)
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -33,154 +33,21 @@ import cPickle
|
|||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import SettingsTab, translate, DisplayTags
|
||||
from openlp.core.lib.ui import UiStrings, critical_error_message_box
|
||||
from openlp.core.lib import translate, DisplayTags
|
||||
from openlp.core.lib.ui import critical_error_message_box
|
||||
from openlp.core.ui.displaytagdialog import Ui_DisplayTagDialog
|
||||
|
||||
class DisplayTagTab(SettingsTab):
|
||||
class DisplayTagForm(QtGui.QDialog, Ui_DisplayTagDialog):
|
||||
"""
|
||||
The :class:`DisplayTagTab` manages the settings tab .
|
||||
"""
|
||||
def __init__(self):
|
||||
def __init__(self, parent):
|
||||
"""
|
||||
Initialise the settings tab
|
||||
Constructor
|
||||
"""
|
||||
SettingsTab.__init__(self, u'Display Tags')
|
||||
|
||||
def resizeEvent(self, event=None):
|
||||
pass
|
||||
|
||||
def preLoad(self):
|
||||
"""
|
||||
Initialise values before the Load takes place
|
||||
"""
|
||||
# Create initial copy from master
|
||||
DisplayTags.reset_html_tags()
|
||||
user_expands = QtCore.QSettings().value(u'displayTags/html_tags',
|
||||
QtCore.QVariant(u'')).toString()
|
||||
# cPickle only accepts str not unicode strings
|
||||
user_expands_string = str(unicode(user_expands).encode(u'utf8'))
|
||||
if user_expands_string:
|
||||
user_tags = cPickle.loads(user_expands_string)
|
||||
# If we have some user ones added them as well
|
||||
for t in user_tags:
|
||||
DisplayTags.add_html_tag(t)
|
||||
self.selected = -1
|
||||
|
||||
def setupUi(self):
|
||||
"""
|
||||
Configure the UI elements for the tab.
|
||||
"""
|
||||
self.setObjectName(u'DisplayTagTab')
|
||||
self.tabTitleVisible = \
|
||||
translate(u'OpenLP.DisplayTagTab', 'Display Tags')
|
||||
self.displayTagEdit = QtGui.QWidget(self)
|
||||
self.editGroupBox = QtGui.QGroupBox(self.displayTagEdit)
|
||||
self.editGroupBox.setGeometry(QtCore.QRect(10, 220, 650, 181))
|
||||
self.editGroupBox.setObjectName(u'editGroupBox')
|
||||
self.updatePushButton = QtGui.QPushButton(self.editGroupBox)
|
||||
self.updatePushButton.setGeometry(QtCore.QRect(550, 140, 71, 26))
|
||||
self.updatePushButton.setObjectName(u'updatePushButton')
|
||||
self.layoutWidget = QtGui.QWidget(self.editGroupBox)
|
||||
self.layoutWidget.setGeometry(QtCore.QRect(5, 20, 571, 114))
|
||||
self.layoutWidget.setObjectName(u'layoutWidget')
|
||||
self.formLayout = QtGui.QFormLayout(self.layoutWidget)
|
||||
self.formLayout.setObjectName(u'formLayout')
|
||||
self.descriptionLabel = QtGui.QLabel(self.layoutWidget)
|
||||
self.descriptionLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.descriptionLabel.setObjectName(u'descriptionLabel')
|
||||
self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
|
||||
self.descriptionLabel)
|
||||
self.descriptionLineEdit = QtGui.QLineEdit(self.layoutWidget)
|
||||
self.descriptionLineEdit.setObjectName(u'descriptionLineEdit')
|
||||
self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
|
||||
self.descriptionLineEdit)
|
||||
self.tagLabel = QtGui.QLabel(self.layoutWidget)
|
||||
self.tagLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.tagLabel.setObjectName(u'tagLabel')
|
||||
self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.tagLabel)
|
||||
self.tagLineEdit = QtGui.QLineEdit(self.layoutWidget)
|
||||
self.tagLineEdit.setMaximumSize(QtCore.QSize(50, 16777215))
|
||||
self.tagLineEdit.setMaxLength(5)
|
||||
self.tagLineEdit.setObjectName(u'tagLineEdit')
|
||||
self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
|
||||
self.tagLineEdit)
|
||||
self.startTagLabel = QtGui.QLabel(self.layoutWidget)
|
||||
self.startTagLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.startTagLabel.setObjectName(u'startTagLabel')
|
||||
self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
|
||||
self.startTagLabel)
|
||||
self.startTagLineEdit = QtGui.QLineEdit(self.layoutWidget)
|
||||
self.startTagLineEdit.setObjectName(u'startTagLineEdit')
|
||||
self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
|
||||
self.startTagLineEdit)
|
||||
self.endTagLabel = QtGui.QLabel(self.layoutWidget)
|
||||
self.endTagLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.endTagLabel.setObjectName(u'endTagLabel')
|
||||
self.formLayout.setWidget(3, QtGui.QFormLayout.LabelRole,
|
||||
self.endTagLabel)
|
||||
self.endTagLineEdit = QtGui.QLineEdit(self.layoutWidget)
|
||||
self.endTagLineEdit.setObjectName(u'endTagLineEdit')
|
||||
self.formLayout.setWidget(3, QtGui.QFormLayout.FieldRole,
|
||||
self.endTagLineEdit)
|
||||
self.defaultPushButton = QtGui.QPushButton(self.displayTagEdit)
|
||||
self.defaultPushButton.setGeometry(QtCore.QRect(430, 188, 71, 26))
|
||||
self.defaultPushButton.setObjectName(u'updatePushButton')
|
||||
self.deletePushButton = QtGui.QPushButton(self.displayTagEdit)
|
||||
self.deletePushButton.setGeometry(QtCore.QRect(510, 188, 71, 26))
|
||||
self.deletePushButton.setObjectName(u'deletePushButton')
|
||||
self.newPushButton = QtGui.QPushButton(self.displayTagEdit)
|
||||
self.newPushButton.setGeometry(QtCore.QRect(600, 188, 71, 26))
|
||||
self.newPushButton.setObjectName(u'newPushButton')
|
||||
self.tagTableWidget = QtGui.QTableWidget(self.displayTagEdit)
|
||||
self.tagTableWidget.setGeometry(QtCore.QRect(10, 10, 650, 171))
|
||||
self.tagTableWidget.setHorizontalScrollBarPolicy(
|
||||
QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.tagTableWidget.setEditTriggers(
|
||||
QtGui.QAbstractItemView.NoEditTriggers)
|
||||
self.tagTableWidget.setAlternatingRowColors(True)
|
||||
self.tagTableWidget.setSelectionMode(
|
||||
QtGui.QAbstractItemView.SingleSelection)
|
||||
self.tagTableWidget.setSelectionBehavior(
|
||||
QtGui.QAbstractItemView.SelectRows)
|
||||
self.tagTableWidget.setCornerButtonEnabled(False)
|
||||
self.tagTableWidget.setObjectName(u'tagTableWidget')
|
||||
self.tagTableWidget.setColumnCount(4)
|
||||
self.tagTableWidget.setRowCount(0)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tagTableWidget.setHorizontalHeaderItem(0, item)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tagTableWidget.setHorizontalHeaderItem(1, item)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tagTableWidget.setHorizontalHeaderItem(2, item)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tagTableWidget.setHorizontalHeaderItem(3, item)
|
||||
self.editGroupBox.setTitle(
|
||||
translate('OpenLP.DisplayTagTab', 'Edit Selection'))
|
||||
self.updatePushButton.setText(
|
||||
translate('OpenLP.DisplayTagTab', 'Update'))
|
||||
self.descriptionLabel.setText(
|
||||
translate('OpenLP.DisplayTagTab', 'Description'))
|
||||
self.tagLabel.setText(translate('OpenLP.DisplayTagTab', 'Tag'))
|
||||
self.startTagLabel.setText(
|
||||
translate('OpenLP.DisplayTagTab', 'Start tag'))
|
||||
self.endTagLabel.setText(translate('OpenLP.DisplayTagTab', 'End tag'))
|
||||
self.deletePushButton.setText(UiStrings.Delete)
|
||||
self.defaultPushButton.setText(
|
||||
translate('OpenLP.DisplayTagTab', 'Default'))
|
||||
self.newPushButton.setText(UiStrings.New)
|
||||
self.tagTableWidget.horizontalHeaderItem(0)\
|
||||
.setText(translate('OpenLP.DisplayTagTab', 'Description'))
|
||||
self.tagTableWidget.horizontalHeaderItem(1)\
|
||||
.setText(translate('OpenLP.DisplayTagTab', 'Tag id'))
|
||||
self.tagTableWidget.horizontalHeaderItem(2)\
|
||||
.setText(translate('OpenLP.DisplayTagTab', 'Start Html'))
|
||||
self.tagTableWidget.horizontalHeaderItem(3)\
|
||||
.setText(translate('OpenLP.DisplayTagTab', 'End Html'))
|
||||
QtCore.QMetaObject.connectSlotsByName(self.displayTagEdit)
|
||||
self.tagTableWidget.setColumnWidth(0, 120)
|
||||
self.tagTableWidget.setColumnWidth(1, 40)
|
||||
self.tagTableWidget.setColumnWidth(2, 240)
|
||||
self.tagTableWidget.setColumnWidth(3, 200)
|
||||
QtGui.QDialog.__init__(self, parent)
|
||||
self.setupUi(self)
|
||||
self.preLoad()
|
||||
QtCore.QObject.connect(self.tagTableWidget,
|
||||
QtCore.SIGNAL(u'clicked(QModelIndex)'), self.onRowSelected)
|
||||
QtCore.QObject.connect(self.defaultPushButton,
|
||||
|
@ -192,35 +59,35 @@ class DisplayTagTab(SettingsTab):
|
|||
QtCore.QObject.connect(self.deletePushButton,
|
||||
QtCore.SIGNAL(u'pressed()'), self.onDeletePushed)
|
||||
|
||||
def load(self):
|
||||
def exec_(self):
|
||||
"""
|
||||
Load Display and set field state.
|
||||
"""
|
||||
self.newPushButton.setEnabled(True)
|
||||
self.updatePushButton.setEnabled(False)
|
||||
self.deletePushButton.setEnabled(False)
|
||||
for linenumber, html in enumerate(DisplayTags.get_html_tags()):
|
||||
self.tagTableWidget.setRowCount(
|
||||
self.tagTableWidget.rowCount() + 1)
|
||||
self.tagTableWidget.setItem(linenumber, 0,
|
||||
QtGui.QTableWidgetItem(html[u'desc']))
|
||||
self.tagTableWidget.setItem(linenumber, 1,
|
||||
QtGui.QTableWidgetItem(self._strip(html[u'start tag'])))
|
||||
self.tagTableWidget.setItem(linenumber, 2,
|
||||
QtGui.QTableWidgetItem(html[u'start html']))
|
||||
self.tagTableWidget.setItem(linenumber, 3,
|
||||
QtGui.QTableWidgetItem(html[u'end html']))
|
||||
self.tagTableWidget.resizeRowsToContents()
|
||||
self.descriptionLineEdit.setText(u'')
|
||||
self.tagLineEdit.setText(u'')
|
||||
self.startTagLineEdit.setText(u'')
|
||||
self.endTagLineEdit.setText(u'')
|
||||
self.descriptionLineEdit.setEnabled(False)
|
||||
self.tagLineEdit.setEnabled(False)
|
||||
self.startTagLineEdit.setEnabled(False)
|
||||
self.endTagLineEdit.setEnabled(False)
|
||||
# Create initial copy from master
|
||||
self.preLoad()
|
||||
self._resetTable()
|
||||
self.selected = -1
|
||||
return QtGui.QDialog.exec_(self)
|
||||
|
||||
def save(self):
|
||||
def preLoad(self):
|
||||
"""
|
||||
Load the Tags from store so can be used in the system or used to
|
||||
update the display. If Cancel was selected this is needed to reset the
|
||||
dsiplay to the correct version.
|
||||
"""
|
||||
# Initial Load of the Tags
|
||||
DisplayTags.reset_html_tags()
|
||||
user_expands = QtCore.QSettings().value(u'displayTags/html_tags',
|
||||
QtCore.QVariant(u'')).toString()
|
||||
# cPickle only accepts str not unicode strings
|
||||
user_expands_string = str(unicode(user_expands).encode(u'utf8'))
|
||||
if user_expands_string:
|
||||
user_tags = cPickle.loads(user_expands_string)
|
||||
# If we have some user ones added them as well
|
||||
for t in user_tags:
|
||||
DisplayTags.add_html_tag(t)
|
||||
|
||||
def accept(self):
|
||||
"""
|
||||
Save Custom tags in a pickle .
|
||||
"""
|
||||
|
@ -235,13 +102,14 @@ class DisplayTagTab(SettingsTab):
|
|||
else:
|
||||
QtCore.QSettings().setValue(u'displayTags/html_tags',
|
||||
QtCore.QVariant(u''))
|
||||
return QtGui.QDialog.accept(self)
|
||||
|
||||
def cancel(self):
|
||||
def reject(self):
|
||||
"""
|
||||
Reset Custom tags from Settings.
|
||||
"""
|
||||
self.preLoad()
|
||||
self._resetTable()
|
||||
return QtGui.QDialog.reject(self)
|
||||
|
||||
def onRowSelected(self):
|
||||
"""
|
||||
|
@ -288,6 +156,7 @@ class DisplayTagTab(SettingsTab):
|
|||
self._resetTable()
|
||||
# Highlight new row
|
||||
self.tagTableWidget.selectRow(self.tagTableWidget.rowCount() - 1)
|
||||
self.onRowSelected()
|
||||
|
||||
def onDefaultPushed(self):
|
||||
"""
|
||||
|
@ -335,7 +204,29 @@ class DisplayTagTab(SettingsTab):
|
|||
"""
|
||||
self.tagTableWidget.clearContents()
|
||||
self.tagTableWidget.setRowCount(0)
|
||||
self.load()
|
||||
self.newPushButton.setEnabled(True)
|
||||
self.updatePushButton.setEnabled(False)
|
||||
self.deletePushButton.setEnabled(False)
|
||||
for linenumber, html in enumerate(DisplayTags.get_html_tags()):
|
||||
self.tagTableWidget.setRowCount(
|
||||
self.tagTableWidget.rowCount() + 1)
|
||||
self.tagTableWidget.setItem(linenumber, 0,
|
||||
QtGui.QTableWidgetItem(html[u'desc']))
|
||||
self.tagTableWidget.setItem(linenumber, 1,
|
||||
QtGui.QTableWidgetItem(self._strip(html[u'start tag'])))
|
||||
self.tagTableWidget.setItem(linenumber, 2,
|
||||
QtGui.QTableWidgetItem(html[u'start html']))
|
||||
self.tagTableWidget.setItem(linenumber, 3,
|
||||
QtGui.QTableWidgetItem(html[u'end html']))
|
||||
self.tagTableWidget.resizeRowsToContents()
|
||||
self.descriptionLineEdit.setText(u'')
|
||||
self.tagLineEdit.setText(u'')
|
||||
self.startTagLineEdit.setText(u'')
|
||||
self.endTagLineEdit.setText(u'')
|
||||
self.descriptionLineEdit.setEnabled(False)
|
||||
self.tagLineEdit.setEnabled(False)
|
||||
self.startTagLineEdit.setEnabled(False)
|
||||
self.endTagLineEdit.setEnabled(False)
|
||||
|
||||
def _strip(self, tag):
|
||||
"""
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -45,7 +45,7 @@ class ValidEdit(QtGui.QLineEdit):
|
|||
|
||||
def validText(self):
|
||||
"""
|
||||
Only return Integers. Space is 0
|
||||
Only return Integers. Space is 0
|
||||
"""
|
||||
if self.text().isEmpty():
|
||||
return QtCore.QString(u'0')
|
||||
|
@ -234,6 +234,9 @@ class GeneralTab(SettingsTab):
|
|||
QtCore.QObject.connect(self.customXValueEdit,
|
||||
QtCore.SIGNAL(u'textEdited(const QString&)'),
|
||||
self.onDisplayPositionChanged)
|
||||
# Reload the tab, as the screen resolution/count may have changed.
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'config_screen_changed'), self.load)
|
||||
|
||||
def retranslateUi(self):
|
||||
"""
|
||||
|
@ -300,13 +303,9 @@ class GeneralTab(SettingsTab):
|
|||
"""
|
||||
settings = QtCore.QSettings()
|
||||
settings.beginGroup(self.settingsSection)
|
||||
for screen in self.screens.screen_list:
|
||||
screen_name = u'%s %d' % (translate('OpenLP.GeneralTab', 'Screen'),
|
||||
screen[u'number'] + 1)
|
||||
if screen[u'primary']:
|
||||
screen_name = u'%s (%s)' % (screen_name,
|
||||
translate('OpenLP.GeneralTab', 'primary'))
|
||||
self.monitorComboBox.addItem(screen_name)
|
||||
self.monitorComboBox.clear()
|
||||
for screen in self.screens.get_screen_list():
|
||||
self.monitorComboBox.addItem(screen)
|
||||
self.numberEdit.setText(unicode(settings.value(
|
||||
u'ccli number', QtCore.QVariant(u'')).toString()))
|
||||
self.usernameEdit.setText(unicode(settings.value(
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -132,14 +132,22 @@ class MainDisplay(DisplayWidget):
|
|||
painter_image.begin(self.black)
|
||||
painter_image.fillRect(self.black.rect(), QtCore.Qt.black)
|
||||
# Build the initial frame.
|
||||
image_file = QtCore.QSettings().value(u'advanced/default image',
|
||||
QtCore.QVariant(u':/graphics/openlp-splash-screen.png'))\
|
||||
.toString()
|
||||
background_color = QtGui.QColor(QtCore.QSettings().value(
|
||||
u'advanced/default color',
|
||||
QtCore.QVariant(u'#ffffff')).toString())
|
||||
if not background_color.isValid():
|
||||
background_color = QtCore.Qt.white
|
||||
splash_image = QtGui.QImage(image_file)
|
||||
initialFrame = QtGui.QImage(
|
||||
self.screens.current[u'size'].width(),
|
||||
self.screens.current[u'size'].height(),
|
||||
QtGui.QImage.Format_ARGB32_Premultiplied)
|
||||
splash_image = QtGui.QImage(u':/graphics/openlp-splash-screen.png')
|
||||
painter_image = QtGui.QPainter()
|
||||
painter_image.begin(initialFrame)
|
||||
painter_image.fillRect(initialFrame.rect(), QtCore.Qt.white)
|
||||
painter_image.fillRect(initialFrame.rect(), background_color)
|
||||
painter_image.drawImage(
|
||||
(self.screens.current[u'size'].width() -
|
||||
splash_image.width()) / 2,
|
||||
|
@ -150,6 +158,7 @@ class MainDisplay(DisplayWidget):
|
|||
self.webView.setHtml(build_html(serviceItem, self.screen,
|
||||
self.alertTab, self.isLive, None))
|
||||
self.initialFrame = True
|
||||
self.__hideMouse()
|
||||
# To display or not to display?
|
||||
if not self.screen[u'primary']:
|
||||
self.show()
|
||||
|
@ -426,15 +435,7 @@ class MainDisplay(DisplayWidget):
|
|||
# if was hidden keep it hidden
|
||||
if self.hideMode and self.isLive:
|
||||
self.hideDisplay(self.hideMode)
|
||||
# Hide mouse cursor when moved over display if enabled in settings
|
||||
settings = QtCore.QSettings()
|
||||
if settings.value(u'advanced/hide mouse',
|
||||
QtCore.QVariant(False)).toBool():
|
||||
self.setCursor(QtCore.Qt.BlankCursor)
|
||||
self.frame.evaluateJavaScript('document.body.style.cursor = "none"')
|
||||
else:
|
||||
self.setCursor(QtCore.Qt.ArrowCursor)
|
||||
self.frame.evaluateJavaScript('document.body.style.cursor = "auto"')
|
||||
self.__hideMouse()
|
||||
|
||||
def footer(self, text):
|
||||
"""
|
||||
|
@ -484,6 +485,16 @@ class MainDisplay(DisplayWidget):
|
|||
# Trigger actions when display is active again
|
||||
Receiver.send_message(u'maindisplay_active')
|
||||
|
||||
def __hideMouse(self):
|
||||
# Hide mouse cursor when moved over display if enabled in settings
|
||||
if QtCore.QSettings().value(u'advanced/hide mouse',
|
||||
QtCore.QVariant(False)).toBool():
|
||||
self.setCursor(QtCore.Qt.BlankCursor)
|
||||
self.frame.evaluateJavaScript('document.body.style.cursor = "none"')
|
||||
else:
|
||||
self.setCursor(QtCore.Qt.ArrowCursor)
|
||||
self.frame.evaluateJavaScript('document.body.style.cursor = "auto"')
|
||||
|
||||
|
||||
class AudioPlayer(QtCore.QObject):
|
||||
"""
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -34,7 +34,7 @@ from openlp.core.lib.ui import UiStrings, base_action, checkable_action, \
|
|||
icon_action
|
||||
from openlp.core.ui import AboutForm, SettingsForm, ServiceManager, \
|
||||
ThemeManager, SlideController, PluginForm, MediaDockManager, \
|
||||
ShortcutListForm
|
||||
ShortcutListForm, DisplayTagForm
|
||||
from openlp.core.utils import AppLocation, add_actions, LanguageManager, \
|
||||
ActionList
|
||||
|
||||
|
@ -242,6 +242,8 @@ class Ui_MainWindow(object):
|
|||
self.SettingsShortcutsItem = icon_action(mainWindow,
|
||||
u'SettingsShortcutsItem',
|
||||
u':/system/system_configure_shortcuts.png')
|
||||
self.DisplayTagItem = icon_action(mainWindow,
|
||||
u'DisplayTagItem', u':/system/tag_editor.png')
|
||||
self.SettingsConfigureItem = icon_action(mainWindow,
|
||||
u'SettingsConfigureItem', u':/system/system_settings.png')
|
||||
mainWindow.actionList.add_action(self.SettingsShortcutsItem,
|
||||
|
@ -277,7 +279,8 @@ class Ui_MainWindow(object):
|
|||
add_actions(self.SettingsLanguageMenu, self.LanguageGroup.actions())
|
||||
add_actions(self.SettingsMenu, (self.settingsPluginListItem,
|
||||
self.SettingsLanguageMenu.menuAction(), None,
|
||||
self.SettingsShortcutsItem, self.SettingsConfigureItem))
|
||||
self.DisplayTagItem, self.SettingsShortcutsItem,
|
||||
self.SettingsConfigureItem))
|
||||
add_actions(self.ToolsMenu, (self.ToolsAddToolItem, None))
|
||||
add_actions(self.ToolsMenu, (self.ToolsOpenDataFolder, None))
|
||||
add_actions(self.HelpMenu, (self.HelpDocumentationItem,
|
||||
|
@ -361,6 +364,8 @@ class Ui_MainWindow(object):
|
|||
translate('OpenLP.MainWindow', '&Language'))
|
||||
self.SettingsShortcutsItem.setText(
|
||||
translate('OpenLP.MainWindow', 'Configure &Shortcuts...'))
|
||||
self.DisplayTagItem.setText(
|
||||
translate('OpenLP.MainWindow', '&Configure Display Tags'))
|
||||
self.SettingsConfigureItem.setText(
|
||||
translate('OpenLP.MainWindow', '&Configure OpenLP...'))
|
||||
self.ViewMediaManagerItem.setText(
|
||||
|
@ -476,6 +481,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||
self.settingsmanager = SettingsManager(screens)
|
||||
self.aboutForm = AboutForm(self, applicationVersion)
|
||||
self.settingsForm = SettingsForm(self.screens, self, self)
|
||||
self.displayTagForm = DisplayTagForm(self)
|
||||
self.shortcutForm = ShortcutListForm(self)
|
||||
self.recentFiles = QtCore.QStringList()
|
||||
# Set up the path with plugins
|
||||
|
@ -523,6 +529,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||
QtCore.SIGNAL(u'triggered()'), self.onToolsOpenDataFolderClicked)
|
||||
QtCore.QObject.connect(self.settingsPluginListItem,
|
||||
QtCore.SIGNAL(u'triggered()'), self.onPluginItemClicked)
|
||||
QtCore.QObject.connect(self.DisplayTagItem,
|
||||
QtCore.SIGNAL(u'triggered()'), self.onDisplayTagItemClicked)
|
||||
QtCore.QObject.connect(self.SettingsConfigureItem,
|
||||
QtCore.SIGNAL(u'triggered()'), self.onSettingsConfigureItemClicked)
|
||||
QtCore.QObject.connect(self.SettingsShortcutsItem,
|
||||
|
@ -716,6 +724,12 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||
path = AppLocation.get_data_path()
|
||||
QtGui.QDesktopServices.openUrl(QtCore.QUrl("file:///" + path))
|
||||
|
||||
def onDisplayTagItemClicked(self):
|
||||
"""
|
||||
Show the Settings dialog
|
||||
"""
|
||||
self.displayTagForm.exec_()
|
||||
|
||||
def onSettingsConfigureItemClicked(self):
|
||||
"""
|
||||
Show the Settings dialog
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -85,4 +85,4 @@ class MediaDockManager(object):
|
|||
if self.media_dock.widget(dock_index).settingsSection == \
|
||||
media_item.plugin.name.lower():
|
||||
self.media_dock.widget(dock_index).hide()
|
||||
self.media_dock.removeItem(dock_index)
|
||||
self.media_dock.removeItem(dock_index)
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -29,7 +29,7 @@ from PyQt4 import QtCore, QtGui
|
|||
from openlp.core.lib import build_icon, translate, SpellTextEdit
|
||||
from openlp.core.lib.ui import UiStrings
|
||||
|
||||
class ZoomSize():
|
||||
class ZoomSize(object):
|
||||
"""
|
||||
Type enumeration for Combo Box sizes
|
||||
"""
|
||||
|
@ -45,6 +45,7 @@ class ZoomSize():
|
|||
translate('OpenLP.PrintServiceDialog', 'Fit Width'),
|
||||
u'100%', u'75%', u'50%', u'25%']
|
||||
|
||||
|
||||
class Ui_PrintServiceDialog(object):
|
||||
def setupUi(self, printServiceDialog):
|
||||
printServiceDialog.setObjectName(u'printServiceDialog')
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -174,7 +174,7 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog):
|
|||
self.previewWidget.zoomIn(0.25)
|
||||
settings = QtCore.QSettings()
|
||||
settings.beginGroup(u'advanced')
|
||||
settings.setValue(u'display size',QtCore.QVariant(display))
|
||||
settings.setValue(u'display size', QtCore.QVariant(display))
|
||||
settings.endGroup()
|
||||
|
||||
def copyText(self):
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -25,11 +25,15 @@
|
|||
###############################################################################
|
||||
"""
|
||||
The :mod:`screen` module provides management functionality for a machines'
|
||||
displays
|
||||
displays.
|
||||
"""
|
||||
import logging
|
||||
import copy
|
||||
|
||||
from PyQt4 import QtCore
|
||||
|
||||
from openlp.core.lib import Receiver, translate
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
class ScreenList(object):
|
||||
|
@ -38,7 +42,14 @@ class ScreenList(object):
|
|||
"""
|
||||
log.info(u'Screen loaded')
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self, desktop):
|
||||
"""
|
||||
Initialise the screen list.
|
||||
|
||||
``desktop``
|
||||
A ``QDesktopWidget`` object.
|
||||
"""
|
||||
self.desktop = desktop
|
||||
self.preview = None
|
||||
self.current = None
|
||||
self.override = None
|
||||
|
@ -48,19 +59,120 @@ class ScreenList(object):
|
|||
self.current_display = 0
|
||||
# save config display number
|
||||
self.monitor_number = 0
|
||||
self.screen_count_changed()
|
||||
QtCore.QObject.connect(desktop,
|
||||
QtCore.SIGNAL(u'resized(int)'), self.screen_resolution_changed)
|
||||
QtCore.QObject.connect(desktop,
|
||||
QtCore.SIGNAL(u'screenCountChanged(int)'),
|
||||
self.screen_count_changed)
|
||||
|
||||
def screen_resolution_changed(self, number):
|
||||
"""
|
||||
Called when the resolution of a screen has changed.
|
||||
|
||||
``number``
|
||||
The number of the screen, which size has changed.
|
||||
"""
|
||||
log.info(u'screenResolutionChanged %d' % number)
|
||||
for screen in self.screen_list:
|
||||
if number == screen[u'number']:
|
||||
newScreen = {
|
||||
u'number': number,
|
||||
u'size': self.desktop.screenGeometry(number),
|
||||
u'primary': self.desktop.primaryScreen() == number
|
||||
}
|
||||
self.remove_screen(number)
|
||||
self.add_screen(newScreen)
|
||||
# The screen's default size is used, that is why we have to
|
||||
# update the override screen.
|
||||
if screen == self.override:
|
||||
self.override = copy.deepcopy(newScreen)
|
||||
self.set_override_display()
|
||||
Receiver.send_message(u'config_screen_changed')
|
||||
break
|
||||
|
||||
def screen_count_changed(self, changed_screen=-1):
|
||||
"""
|
||||
Called when a screen has been added or removed.
|
||||
|
||||
``changed_screen``
|
||||
The screen's number which has been (un)plugged.
|
||||
"""
|
||||
# Remove unplugged screens.
|
||||
for screen in copy.deepcopy(self.screen_list):
|
||||
if screen[u'number'] == self.desktop.numScreens():
|
||||
self.remove_screen(screen[u'number'])
|
||||
# Add new screens.
|
||||
for number in xrange(0, self.desktop.numScreens()):
|
||||
if not self.screen_exists(number):
|
||||
self.add_screen({
|
||||
u'number': number,
|
||||
u'size': self.desktop.screenGeometry(number),
|
||||
u'primary': (self.desktop.primaryScreen() == number)
|
||||
})
|
||||
# We do not want to send this message, when the method is called the
|
||||
# first time.
|
||||
if changed_screen != -1:
|
||||
# Reload setting tabs to apply possible changes.
|
||||
Receiver.send_message(u'config_screen_changed')
|
||||
|
||||
def get_screen_list(self):
|
||||
"""
|
||||
Returns a list with the screens. This should only be used to display
|
||||
available screens to the user::
|
||||
|
||||
[u'Screen 1 (primary)', u'Screen 2']
|
||||
"""
|
||||
screen_list= []
|
||||
for screen in self.screen_list:
|
||||
screen_name = u'%s %d' % (translate('OpenLP.ScreenList', 'Screen'),
|
||||
screen[u'number'] + 1)
|
||||
if screen[u'primary']:
|
||||
screen_name = u'%s (%s)' % (screen_name,
|
||||
translate('OpenLP.ScreenList', 'primary'))
|
||||
screen_list.append(screen_name)
|
||||
return screen_list
|
||||
|
||||
def add_screen(self, screen):
|
||||
"""
|
||||
Add a screen to the list of known screens
|
||||
Add a screen to the list of known screens.
|
||||
|
||||
``screen``
|
||||
A dict with the screen properties::
|
||||
|
||||
{
|
||||
u'primary': True,
|
||||
u'number': 0,
|
||||
u'size': PyQt4.QtCore.QRect(0, 0, 1024, 768)
|
||||
}
|
||||
"""
|
||||
log.info(u'Screen %d found with resolution %s',
|
||||
screen[u'number'], screen[u'size'])
|
||||
if screen[u'primary']:
|
||||
self.current = screen
|
||||
self.screen_list.append(screen)
|
||||
self.display_count += 1
|
||||
|
||||
def remove_screen(self, number):
|
||||
"""
|
||||
Remove a screen from the list of known screens.
|
||||
|
||||
``number``
|
||||
The screen number (int).
|
||||
"""
|
||||
log.info(u'remove_screen %d' % number)
|
||||
for screen in self.screen_list:
|
||||
if screen[u'number'] == number:
|
||||
self.screen_list.remove(screen)
|
||||
self.display_count -= 1
|
||||
break
|
||||
|
||||
def screen_exists(self, number):
|
||||
"""
|
||||
Confirms a screen is known
|
||||
Confirms a screen is known.
|
||||
|
||||
``number``
|
||||
The screen number (int).
|
||||
"""
|
||||
for screen in self.screen_list:
|
||||
if screen[u'number'] == number:
|
||||
|
@ -69,7 +181,10 @@ class ScreenList(object):
|
|||
|
||||
def set_current_display(self, number):
|
||||
"""
|
||||
Set up the current screen dimensions
|
||||
Set up the current screen dimensions.
|
||||
|
||||
``number``
|
||||
The screen number (int).
|
||||
"""
|
||||
log.debug(u'set_current_display %s', number)
|
||||
if number + 1 > self.display_count:
|
||||
|
@ -86,8 +201,8 @@ class ScreenList(object):
|
|||
|
||||
def set_override_display(self):
|
||||
"""
|
||||
replace the current size with the override values
|
||||
user wants to have their own screen attributes
|
||||
Replace the current size with the override values, as the user wants to
|
||||
have their own screen attributes.
|
||||
"""
|
||||
log.debug(u'set_override_display')
|
||||
self.current = copy.deepcopy(self.override)
|
||||
|
@ -95,8 +210,8 @@ class ScreenList(object):
|
|||
|
||||
def reset_current_display(self):
|
||||
"""
|
||||
replace the current values with the correct values
|
||||
user wants to use the correct screen attributes
|
||||
Replace the current values with the correct values, as the user wants to
|
||||
use the correct screen attributes.
|
||||
"""
|
||||
log.debug(u'reset_current_display')
|
||||
self.set_current_display(self.current_display)
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -53,4 +53,4 @@ class ServiceNoteForm(QtGui.QDialog):
|
|||
|
||||
def retranslateUi(self):
|
||||
self.setWindowTitle(
|
||||
translate('OpenLP.ServiceNoteForm', 'Service Item Notes'))
|
||||
translate('OpenLP.ServiceNoteForm', 'Service Item Notes'))
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -31,7 +31,7 @@ import logging
|
|||
from PyQt4 import QtGui
|
||||
|
||||
from openlp.core.lib import Receiver
|
||||
from openlp.core.ui import AdvancedTab, GeneralTab, ThemesTab, DisplayTagTab
|
||||
from openlp.core.ui import AdvancedTab, GeneralTab, ThemesTab
|
||||
from settingsdialog import Ui_SettingsDialog
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
@ -47,17 +47,14 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
|||
QtGui.QDialog.__init__(self, parent)
|
||||
self.setupUi(self)
|
||||
# General tab
|
||||
self.generalTab = GeneralTab(screens)
|
||||
self.addTab(u'General', self.generalTab)
|
||||
generalTab = GeneralTab(screens)
|
||||
self.addTab(u'General', generalTab)
|
||||
# Themes tab
|
||||
self.themesTab = ThemesTab(mainWindow)
|
||||
self.addTab(u'Themes', self.themesTab)
|
||||
themesTab = ThemesTab(mainWindow)
|
||||
self.addTab(u'Themes', themesTab)
|
||||
# Advanced tab
|
||||
self.advancedTab = AdvancedTab()
|
||||
self.addTab(u'Advanced', self.advancedTab)
|
||||
# Edit Display Tags tab
|
||||
self.displayTagTab = DisplayTagTab()
|
||||
self.addTab(u'Display Tags', self.displayTagTab)
|
||||
advancedTab = AdvancedTab()
|
||||
self.addTab(u'Advanced', advancedTab)
|
||||
|
||||
def addTab(self, name, tab):
|
||||
"""
|
||||
|
@ -71,9 +68,9 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
|||
Add a tab to the form at a specific location
|
||||
"""
|
||||
log.debug(u'Inserting %s tab' % tab.tabTitle)
|
||||
# 15 : There are 4 tables currently and locations starts at -10
|
||||
# 14 : There are 3 tables currently and locations starts at -10
|
||||
self.settingsTabWidget.insertTab(
|
||||
location + 15, tab, tab.tabTitleVisible)
|
||||
location + 14, tab, tab.tabTitleVisible)
|
||||
|
||||
def removeTab(self, tab):
|
||||
"""
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -78,7 +78,7 @@ class Ui_ShortcutListDialog(object):
|
|||
translate('OpenLP.ShortcutListDialog', 'Customize Shortcuts'))
|
||||
self.treeWidget.setHeaderLabels([
|
||||
translate('OpenLP.ShortcutListDialog', 'Action'),
|
||||
translate('OpenLP.ShortcutListDialog', 'Shortcut'),
|
||||
translate('OpenLP.ShortcutListDialog', 'Shortcut'),
|
||||
translate('OpenLP.ShortcutListDialog', 'Alternate')])
|
||||
self.defaultButton.setText(
|
||||
translate('OpenLP.ShortcutListDialog', 'Default: %s'))
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -266,7 +266,7 @@ class ThemeManager(QtGui.QWidget):
|
|||
oldThemeName = unicode(item.data(QtCore.Qt.UserRole).toString())
|
||||
self.fileRenameForm.fileNameEdit.setText(oldThemeName)
|
||||
if self.fileRenameForm.exec_():
|
||||
newThemeName = unicode(self.fileRenameForm.fileNameEdit.text())
|
||||
newThemeName = unicode(self.fileRenameForm.fileNameEdit.text())
|
||||
if self.checkIfThemeExists(newThemeName):
|
||||
oldThemeData = self.getThemeData(oldThemeName)
|
||||
self.cloneThemeData(oldThemeData, newThemeName)
|
||||
|
@ -284,7 +284,7 @@ class ThemeManager(QtGui.QWidget):
|
|||
oldThemeName = unicode(item.data(QtCore.Qt.UserRole).toString())
|
||||
self.fileRenameForm.fileNameEdit.setText(oldThemeName)
|
||||
if self.fileRenameForm.exec_(True):
|
||||
newThemeName = unicode(self.fileRenameForm.fileNameEdit.text())
|
||||
newThemeName = unicode(self.fileRenameForm.fileNameEdit.text())
|
||||
if self.checkIfThemeExists(newThemeName):
|
||||
themeData = self.getThemeData(oldThemeName)
|
||||
self.cloneThemeData(themeData, newThemeName)
|
||||
|
@ -399,7 +399,7 @@ class ThemeManager(QtGui.QWidget):
|
|||
def onImportTheme(self):
|
||||
"""
|
||||
Opens a file dialog to select the theme file(s) to import before
|
||||
attempting to extract OpenLP themes from those files. This process
|
||||
attempting to extract OpenLP themes from those files. This process
|
||||
will load both OpenLP version 1 and version 2 themes.
|
||||
"""
|
||||
files = QtGui.QFileDialog.getOpenFileNames(self,
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -47,6 +47,7 @@ class WizardStrings(object):
|
|||
CSV = u'CSV'
|
||||
EW = u'EasyWorship'
|
||||
ES = u'EasiSlides'
|
||||
FP = u'Foilpresenter'
|
||||
OL = u'OpenLyrics'
|
||||
OS = u'OpenSong'
|
||||
OSIS = u'OSIS'
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -242,7 +242,7 @@ def add_actions(target, actions):
|
|||
The menu or toolbar to add actions to.
|
||||
|
||||
``actions``
|
||||
The actions to be added. An action consisting of the keyword 'None'
|
||||
The actions to be added. An action consisting of the keyword 'None'
|
||||
will result in a separator being inserted into the target.
|
||||
"""
|
||||
for action in actions:
|
||||
|
@ -318,7 +318,7 @@ def get_web_page(url, header=None, update_openlp=False):
|
|||
Tells OpenLP to update itself if the page is successfully downloaded.
|
||||
Defaults to False.
|
||||
"""
|
||||
# TODO: Add proxy usage. Get proxy info from OpenLP settings, add to a
|
||||
# TODO: Add proxy usage. Get proxy info from OpenLP settings, add to a
|
||||
# proxy_handler, build into an opener and install the opener into urllib2.
|
||||
# http://docs.python.org/library/urllib2.html
|
||||
if not url:
|
||||
|
@ -387,7 +387,7 @@ def get_uno_command():
|
|||
if UNO_CONNECTION_TYPE == u'pipe':
|
||||
CONNECTION = u'"-accept=pipe,name=openlp_pipe;urp;"'
|
||||
else:
|
||||
CONNECTION = u'"-accept=socket,host=localhost,port=2002;urp;"'
|
||||
CONNECTION = u'"-accept=socket,host=localhost,port=2002;urp;"'
|
||||
return u'%s %s %s' % (COMMAND, OPTIONS, CONNECTION)
|
||||
|
||||
def get_uno_instance(resolver):
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -25,4 +25,4 @@
|
|||
###############################################################################
|
||||
"""
|
||||
The :mod:`plugins` module provides all the project produced plugins
|
||||
"""
|
||||
"""
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -26,4 +26,4 @@
|
|||
"""
|
||||
The :mod:`alerts` module provides the Alerts plugin for producing impromptu
|
||||
on-screen announcements during a service.
|
||||
"""
|
||||
"""
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -24,4 +24,4 @@
|
|||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
###############################################################################
|
||||
|
||||
from alertform import AlertForm
|
||||
from alertform import AlertForm
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -163,7 +163,7 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
|||
# We found '<>' in the alert text, but the ParameterEdit field is empty.
|
||||
if text.find(u'<>') != -1 and not self.parameterEdit.text() and \
|
||||
QtGui.QMessageBox.question(self,
|
||||
translate('AlertPlugin.AlertForm', 'No Parameter found'),
|
||||
translate('AlertPlugin.AlertForm', 'No Parameter Found'),
|
||||
translate('AlertPlugin.AlertForm', 'You have not entered a '
|
||||
'parameter to be replaced.\nDo you want to continue anyway?'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No |
|
||||
|
@ -174,9 +174,9 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
|||
# in the alert text.
|
||||
elif text.find(u'<>') == -1 and self.parameterEdit.text() and \
|
||||
QtGui.QMessageBox.question(self,
|
||||
translate('AlertPlugin.AlertForm', 'No Placeholder found'),
|
||||
translate('AlertPlugin.AlertForm', 'No Placeholder Found'),
|
||||
translate('AlertPlugin.AlertForm', 'The alert text does not'
|
||||
' contain \'<>\'.\nDo want to continue anyway?'),
|
||||
' contain \'<>\'.\nDo you want to continue anyway?'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No |
|
||||
QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.No:
|
||||
self.parameterEdit.setFocus()
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -25,4 +25,4 @@
|
|||
###############################################################################
|
||||
|
||||
from alertsmanager import AlertsManager
|
||||
from alertstab import AlertsTab
|
||||
from alertstab import AlertsTab
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -55,4 +55,4 @@ def init_schema(url):
|
|||
mapper(AlertItem, alerts_table)
|
||||
|
||||
metadata.create_all(checkfirst=True)
|
||||
return session
|
||||
return session
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -26,4 +26,4 @@
|
|||
"""
|
||||
The :mod:`bibles` module provides the Bible plugin to enable OpenLP to display
|
||||
scripture.
|
||||
"""
|
||||
"""
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -53,4 +53,4 @@ from the .ui files later if necessary.
|
|||
|
||||
from bibleimportform import BibleImportForm
|
||||
|
||||
__all__ = ['BibleImportForm']
|
||||
__all__ = ['BibleImportForm']
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -753,4 +753,5 @@ class BibleImportForm(OpenLPWizard):
|
|||
else:
|
||||
self.progressLabel.setText(translate(
|
||||
'BiblesPlugin.ImportWizardForm', 'Your Bible import failed.'))
|
||||
del self.manager.db_cache[importer.name]
|
||||
delete_database(self.plugin.settingsSection, importer.file)
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -100,37 +100,37 @@ def parse_reference(reference):
|
|||
this::
|
||||
|
||||
(book, chapter, from_verse, to_verse)
|
||||
|
||||
|
||||
For example::
|
||||
|
||||
|
||||
[(u'John', 3, 16, 18), (u'John', 4, 1, 1)]
|
||||
|
||||
**Reference string details:**
|
||||
|
||||
Each reference starts with the book name and a chapter number. These are
|
||||
both mandatory.
|
||||
|
||||
|
||||
* ``John 3`` refers to Gospel of John chapter 3
|
||||
|
||||
A reference range can be given after a range separator.
|
||||
|
||||
|
||||
* ``John 3-5`` refers to John chapters 3 to 5
|
||||
|
||||
Single verses can be addressed after a verse separator.
|
||||
|
||||
|
||||
* ``John 3:16`` refers to John chapter 3 verse 16
|
||||
* ``John 3:16-4:3`` refers to John chapter 3 verse 16 to chapter 4 verse 3
|
||||
|
||||
After a verse reference all further single values are treat as verse in
|
||||
the last selected chapter.
|
||||
|
||||
|
||||
* ``John 3:16-18`` refers to John chapter 3 verses 16 to 18
|
||||
|
||||
After a list separator it is possible to refer to additional verses. They
|
||||
are build analog to the first ones. This way it is possible to define each
|
||||
number of verse references. It is not possible to refer to verses in
|
||||
additional books.
|
||||
|
||||
|
||||
* ``John 3:16,18`` refers to John chapter 3 verses 16 and 18
|
||||
* ``John 3:16-18,20`` refers to John chapter 3 verses 16 to 18 and 20
|
||||
* ``John 3:16-18,4:1`` refers to John chapter 3 verses 16 to 18 and
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -94,8 +94,6 @@ class CSVBible(BibleDB):
|
|||
self.testamentsfile = None
|
||||
self.booksfile = kwargs[u'booksfile']
|
||||
self.versesfile = kwargs[u'versefile']
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'openlp_stop_wizard'), self.stop_import)
|
||||
|
||||
def setup_testaments(self):
|
||||
"""
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -33,7 +33,7 @@ from sqlalchemy import Column, ForeignKey, or_, Table, types
|
|||
from sqlalchemy.orm import class_mapper, mapper, relation
|
||||
from sqlalchemy.orm.exc import UnmappedClassError
|
||||
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib import Receiver, translate
|
||||
from openlp.core.lib.db import BaseModel, init_db, Manager
|
||||
from openlp.core.lib.ui import critical_error_message_box
|
||||
|
||||
|
@ -162,6 +162,8 @@ class BibleDB(QtCore.QObject, Manager):
|
|||
if u'file' in kwargs:
|
||||
self.get_name()
|
||||
self.wizard = None
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'openlp_stop_wizard'), self.stop_import)
|
||||
|
||||
def stop_import(self):
|
||||
"""
|
||||
|
@ -320,7 +322,7 @@ class BibleDB(QtCore.QObject, Manager):
|
|||
def get_books(self):
|
||||
"""
|
||||
A wrapper so both local and web bibles have a get_books() method that
|
||||
manager can call. Used in the media manager advanced search tab.
|
||||
manager can call. Used in the media manager advanced search tab.
|
||||
"""
|
||||
return self.get_all_objects(Book, order_by_ref=Book.id)
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -35,7 +35,7 @@ import socket
|
|||
import urllib
|
||||
from HTMLParser import HTMLParseError
|
||||
|
||||
from BeautifulSoup import BeautifulSoup, NavigableString
|
||||
from BeautifulSoup import BeautifulSoup, NavigableString, Tag
|
||||
|
||||
from openlp.core.lib import Receiver, translate
|
||||
from openlp.core.lib.ui import critical_error_message_box
|
||||
|
@ -221,24 +221,42 @@ class BGExtract(object):
|
|||
crossrefs = soup.findAll(u'sup', u'xref')
|
||||
if crossrefs:
|
||||
[crossref.extract() for crossref in crossrefs]
|
||||
headings = soup.findAll(u'h5')
|
||||
if headings:
|
||||
[heading.extract() for heading in headings]
|
||||
cleanup = [(re.compile('\s+'), lambda match: ' ')]
|
||||
verses = BeautifulSoup(str(soup), markupMassage=cleanup)
|
||||
content = verses.find(u'div', u'result-text-style-normal')
|
||||
if not content:
|
||||
content = verses.find(u'div', u'result-text-style-rtl-serif')
|
||||
if not content:
|
||||
verse_list = {}
|
||||
for verse in verses(u'sup', u'versenum'):
|
||||
raw_verse_num = verse.next
|
||||
clean_verse_num = 0
|
||||
# Not all verses exist in all translations and may or may not be
|
||||
# represented by a verse number. If they are not fine, if they are
|
||||
# it will probably be in a format that breaks int(). We will then
|
||||
# have no idea what garbage may be sucked in to the verse text so
|
||||
# if we do not get a clean int() then ignore the verse completely.
|
||||
try:
|
||||
clean_verse_num = int(str(raw_verse_num))
|
||||
except ValueError:
|
||||
log.exception(u'Illegal verse number in %s %s %s:%s',
|
||||
version, bookname, chapter, unicode(raw_verse_num))
|
||||
if clean_verse_num:
|
||||
verse_text = raw_verse_num.next
|
||||
part = raw_verse_num.next.next
|
||||
while not (isinstance(part, Tag) and part.attrMap and
|
||||
part.attrMap[u'class'] == u'versenum'):
|
||||
# While we are still in the same verse grab all the text.
|
||||
if isinstance(part, NavigableString):
|
||||
verse_text = verse_text + part
|
||||
if isinstance(part.next, Tag) and part.next.name == u'div':
|
||||
# Run out of verses so stop.
|
||||
break
|
||||
part = part.next
|
||||
verse_list[clean_verse_num] = unicode(verse_text)
|
||||
if not verse_list:
|
||||
log.debug(u'No content found in the BibleGateway response.')
|
||||
send_error_message(u'parse')
|
||||
return None
|
||||
verse_count = len(verses.findAll(u'sup', u'versenum'))
|
||||
found_count = 0
|
||||
verse_list = {}
|
||||
while found_count < verse_count:
|
||||
content = content.findNext(u'sup', u'versenum')
|
||||
raw_verse_num = content.next
|
||||
raw_verse_text = raw_verse_num.next
|
||||
verse_list[int(str(raw_verse_num))] = unicode(raw_verse_text)
|
||||
found_count += 1
|
||||
return SearchResults(bookname, chapter, verse_list)
|
||||
|
||||
|
||||
|
@ -372,7 +390,7 @@ class HTTPBible(BibleDB):
|
|||
BibleDB.__init__(self, parent, **kwargs)
|
||||
self.download_source = kwargs[u'download_source']
|
||||
self.download_name = kwargs[u'download_name']
|
||||
# TODO: Clean up proxy stuff. We probably want one global proxy per
|
||||
# TODO: Clean up proxy stuff. We probably want one global proxy per
|
||||
# connection type (HTTP and HTTPS) at most.
|
||||
self.proxy_server = None
|
||||
self.proxy_username = None
|
||||
|
@ -446,8 +464,8 @@ class HTTPBible(BibleDB):
|
|||
search_results = self.get_chapter(book, reference[1])
|
||||
if search_results and search_results.has_verselist():
|
||||
## We have found a book of the bible lets check to see
|
||||
## if it was there. By reusing the returned book name
|
||||
## we get a correct book. For example it is possible
|
||||
## if it was there. By reusing the returned book name
|
||||
## we get a correct book. For example it is possible
|
||||
## to request ac and get Acts back.
|
||||
bookname = search_results.book
|
||||
Receiver.send_message(u'openlp_process_events')
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -40,22 +40,12 @@ from osis import OSISBible
|
|||
# Imports that might fail.
|
||||
try:
|
||||
from openlp1 import OpenLP1Bible
|
||||
has_openlp1 = True
|
||||
HAS_OPENLP1 = True
|
||||
except ImportError:
|
||||
has_openlp1 = False
|
||||
HAS_OPENLP1 = False
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
class BibleMode(object):
|
||||
"""
|
||||
This is basically an enumeration class which specifies the mode of a Bible.
|
||||
Mode refers to whether or not a Bible in OpenLP is a full Bible or needs to
|
||||
be downloaded from the Internet on an as-needed basis.
|
||||
"""
|
||||
Full = 1
|
||||
Partial = 2
|
||||
|
||||
|
||||
class BibleFormat(object):
|
||||
"""
|
||||
This is a special enumeration class that holds the various types of Bibles,
|
||||
|
@ -275,7 +265,7 @@ class BibleManager(object):
|
|||
'Scripture Reference Error'),
|
||||
u'message': translate('BiblesPlugin.BibleManager',
|
||||
'Your scripture reference is either not supported by OpenLP '
|
||||
'or is invalid. Please make sure your reference conforms to '
|
||||
'or is invalid. Please make sure your reference conforms to '
|
||||
'one of the following patterns:\n\n'
|
||||
'Book Chapter\n'
|
||||
'Book Chapter-Chapter\n'
|
||||
|
@ -367,6 +357,6 @@ class BibleManager(object):
|
|||
for bible in self.db_cache:
|
||||
self.db_cache[bible].finalise()
|
||||
|
||||
BibleFormat.set_availability(BibleFormat.OpenLP1, has_openlp1)
|
||||
BibleFormat.set_availability(BibleFormat.OpenLP1, HAS_OPENLP1)
|
||||
|
||||
__all__ = [u'BibleFormat']
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -482,7 +482,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||
self.listView.clear()
|
||||
if self.listView.count() != 0:
|
||||
self.__checkSecondBible(bible, second_bible)
|
||||
else:
|
||||
elif self.search_results:
|
||||
self.displayResults(bible, second_bible)
|
||||
Receiver.send_message(u'cursor_normal')
|
||||
self.advancedSearchButton.setEnabled(True)
|
||||
|
@ -698,11 +698,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||
service_item.add_capability(ItemCapabilities.AllowsPreview)
|
||||
service_item.add_capability(ItemCapabilities.AllowsLoop)
|
||||
# Service Item: Title
|
||||
for title in raw_title:
|
||||
if not service_item.title:
|
||||
service_item.title = title
|
||||
else:
|
||||
service_item.title += u', ' + title
|
||||
service_item.title = u', '.join(raw_title)
|
||||
# Service Item: Theme
|
||||
if len(self.settings.bible_theme) == 0:
|
||||
service_item.theme = None
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -46,8 +46,6 @@ class OpenLP1Bible(BibleDB):
|
|||
log.debug(self.__class__.__name__)
|
||||
BibleDB.__init__(self, parent, **kwargs)
|
||||
self.filename = kwargs[u'filename']
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'openlp_stop_wizard'), self.stop_import)
|
||||
|
||||
def do_import(self):
|
||||
"""
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -46,8 +46,6 @@ class OpenSongBible(BibleDB):
|
|||
log.debug(self.__class__.__name__)
|
||||
BibleDB.__init__(self, parent, **kwargs)
|
||||
self.filename = kwargs['filename']
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'openlp_stop_wizard'), self.stop_import)
|
||||
|
||||
def do_import(self):
|
||||
"""
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -41,15 +41,11 @@ log = logging.getLogger(__name__)
|
|||
|
||||
class OSISBible(BibleDB):
|
||||
"""
|
||||
OSIS Bible format importer class.
|
||||
`OSIS <http://www.bibletechnologies.net/>`_ Bible format importer class.
|
||||
"""
|
||||
log.info(u'BibleOSISImpl loaded')
|
||||
|
||||
def __init__(self, parent, **kwargs):
|
||||
"""
|
||||
Constructor to create and set up an instance of the OpenSongBible
|
||||
class. This class is used to import Bibles from OpenSong's XML format.
|
||||
"""
|
||||
log.debug(self.__class__.__name__)
|
||||
BibleDB.__init__(self, parent, **kwargs)
|
||||
self.filename = kwargs[u'filename']
|
||||
|
@ -86,8 +82,6 @@ class OSISBible(BibleDB):
|
|||
finally:
|
||||
if fbibles:
|
||||
fbibles.close()
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'openlp_stop_wizard'), self.stop_import)
|
||||
|
||||
def do_import(self):
|
||||
"""
|
||||
|
@ -126,7 +120,7 @@ class OSISBible(BibleDB):
|
|||
verse_text = match.group(4)
|
||||
if not db_book or db_book.name != self.books[book][0]:
|
||||
log.debug(u'New book: "%s"', self.books[book][0])
|
||||
if book == u'Matt':
|
||||
if book == u'Matt' or book == u'Jdt':
|
||||
testament += 1
|
||||
db_book = self.create_book(
|
||||
unicode(self.books[book][0]),
|
||||
|
|
|
@ -64,3 +64,13 @@ Jas,James,Jas
|
|||
3John,3 John,3John
|
||||
Jude,Jude,Jude
|
||||
Rev,Revelation,Rev
|
||||
Jdt,Judith,Jdt
|
||||
Wis,Wisdom,Wis
|
||||
Tob,Tobit,Tob
|
||||
Sir,Sirach,Sir
|
||||
Bar,Baruch,Bar
|
||||
1Macc,1 Maccabees,1Macc
|
||||
2Macc,2 Maccabees,2Macc
|
||||
AddDan,Rest of Daniel,AddDan
|
||||
AddEsth,Rest of Esther,AddEsth
|
||||
PrMan,Prayer of Manasses,PrMan
|
||||
|
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -27,4 +27,4 @@
|
|||
The :mod:`custom` module provides the Custom plugin which allows custom,
|
||||
themed, text based items to be displayed without having to misuse another item
|
||||
type.
|
||||
"""
|
||||
"""
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -25,4 +25,4 @@
|
|||
###############################################################################
|
||||
|
||||
from editcustomform import EditCustomForm
|
||||
from editcustomslideform import EditCustomSlideForm
|
||||
from editcustomslideform import EditCustomSlideForm
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Armin Köhler, Andreas Preikschat, #
|
||||
# Christian Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon #
|
||||
# Tibble, Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
|
@ -26,4 +26,4 @@
|
|||
|
||||
from customxmlhandler import CustomXMLBuilder, CustomXMLParser
|
||||
from mediaitem import CustomMediaItem
|
||||
from customtab import CustomTab
|
||||
from customtab import CustomTab
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue