This commit is contained in:
Andreas Preikschat 2011-05-28 16:44:42 +02:00
commit 1f6636783d
222 changed files with 15297 additions and 13992 deletions

View File

@ -8,12 +8,7 @@ page on the web site::
http://openlp.org/en/download.html http://openlp.org/en/download.html
If you're looking for how to contribute to OpenLP, then please look at the If you're looking for how to contribute to OpenLP, then please look at the
contribution page on the web site:: OpenLP wiki::
http://openlp.org/en/documentation/introduction/contributing.html
If you've looked at that page, and are wanting to help develop, test or
translate OpenLP, have a look at the OpenLP wiki::
http://wiki.openlp.org/ http://wiki.openlp.org/

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Millar, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -6,10 +6,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -35,55 +36,6 @@ from PyQt4 import QtCore, QtGui
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
base_html_expands = []
# Hex Color tags from http://www.w3schools.com/html/html_colornames.asp
base_html_expands.append({u'desc': u'Red', u'start tag': u'{r}',
u'start html': u'<span style="-webkit-text-fill-color:red">',
u'end tag': u'{/r}', u'end html': u'</span>', u'protected': True})
base_html_expands.append({u'desc': u'Black', u'start tag': u'{b}',
u'start html': u'<span style="-webkit-text-fill-color:black">',
u'end tag': u'{/b}', u'end html': u'</span>', u'protected': True})
base_html_expands.append({u'desc': u'Blue', u'start tag': u'{bl}',
u'start html': u'<span style="-webkit-text-fill-color:blue">',
u'end tag': u'{/bl}', u'end html': u'</span>', u'protected': True})
base_html_expands.append({u'desc': u'Yellow', u'start tag': u'{y}',
u'start html': u'<span style="-webkit-text-fill-color:yellow">',
u'end tag': u'{/y}', u'end html': u'</span>', u'protected': True})
base_html_expands.append({u'desc': u'Green', u'start tag': u'{g}',
u'start html': u'<span style="-webkit-text-fill-color:green">',
u'end tag': u'{/g}', u'end html': u'</span>', u'protected': True})
base_html_expands.append({u'desc': u'Pink', u'start tag': u'{pk}',
u'start html': u'<span style="-webkit-text-fill-color:#FFC0CB">',
u'end tag': u'{/pk}', u'end html': u'</span>', u'protected': True})
base_html_expands.append({u'desc': u'Orange', u'start tag': u'{o}',
u'start html': u'<span style="-webkit-text-fill-color:#FFA500">',
u'end tag': u'{/o}', u'end html': u'</span>', u'protected': True})
base_html_expands.append({u'desc': u'Purple', u'start tag': u'{pp}',
u'start html': u'<span style="-webkit-text-fill-color:#800080">',
u'end tag': u'{/pp}', u'end html': u'</span>', u'protected': True})
base_html_expands.append({u'desc': u'White', u'start tag': u'{w}',
u'start html': u'<span style="-webkit-text-fill-color:white">',
u'end tag': u'{/w}', u'end html': u'</span>', u'protected': True})
base_html_expands.append({u'desc': u'Superscript', u'start tag': u'{su}',
u'start html': u'<sup>', u'end tag': u'{/su}', u'end html': u'</sup>',
u'protected': True})
base_html_expands.append({u'desc': u'Subscript', u'start tag': u'{sb}',
u'start html': u'<sub>', u'end tag': u'{/sb}', u'end html': u'</sub>',
u'protected': True})
base_html_expands.append({u'desc': u'Paragraph', u'start tag': u'{p}',
u'start html': u'<p>', u'end tag': u'{/p}', u'end html': u'</p>',
u'protected': True})
base_html_expands.append({u'desc': u'Bold', u'start tag': u'{st}',
u'start html': u'<strong>', u'end tag': u'{/st}', u'end html': u'</strong>',
u'protected': True})
base_html_expands.append({u'desc': u'Italics', u'start tag': u'{it}',
u'start html': u'<em>', u'end tag': u'{/it}', u'end html': u'</em>',
u'protected': True})
base_html_expands.append({u'desc': u'Underline', u'start tag': u'{u}',
u'start html': u'<span style="text-decoration: underline;">',
u'end tag': u'{/u}', u'end html': u'</span>', u'protected': True})
def translate(context, text, comment=None, def translate(context, text, comment=None,
encoding=QtCore.QCoreApplication.CodecForTr, n=-1, encoding=QtCore.QCoreApplication.CodecForTr, n=-1,
translate=QtCore.QCoreApplication.translate): translate=QtCore.QCoreApplication.translate):
@ -244,6 +196,7 @@ def clean_tags(text):
Remove Tags from text for display Remove Tags from text for display
""" """
text = text.replace(u'<br>', u'\n') text = text.replace(u'<br>', u'\n')
text = text.replace(u'{br}', u'\n')
text = text.replace(u'&nbsp;', u' ') text = text.replace(u'&nbsp;', u' ')
for tag in DisplayTags.get_html_tags(): for tag in DisplayTags.get_html_tags():
text = text.replace(tag[u'start tag'], u'') text = text.replace(tag[u'start tag'], u'')

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -31,7 +32,7 @@ import os
from PyQt4 import QtCore from PyQt4 import QtCore
from sqlalchemy import create_engine, MetaData from sqlalchemy import create_engine, MetaData
from sqlalchemy.exceptions import InvalidRequestError from sqlalchemy.exc import InvalidRequestError
from sqlalchemy.orm import scoped_session, sessionmaker from sqlalchemy.orm import scoped_session, sessionmaker
from openlp.core.utils import AppLocation, delete_file from openlp.core.utils import AppLocation, delete_file

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -27,7 +28,7 @@
Provide Html Tag management and Display Tag access class Provide Html Tag management and Display Tag access class
""" """
from openlp.core.lib import base_html_expands from openlp.core.lib import translate
class DisplayTags(object): class DisplayTags(object):
""" """
@ -49,15 +50,77 @@ class DisplayTags(object):
Resets the html_expands list. Resets the html_expands list.
""" """
DisplayTags.html_expands = [] DisplayTags.html_expands = []
for html in base_html_expands: base_tags = []
DisplayTags.html_expands.append(html) # Append the base tags.
# Hex Color tags from http://www.w3schools.com/html/html_colornames.asp
base_tags.append({u'desc': translate('OpenLP.DisplayTags', 'Red'),
u'start tag': u'{r}',
u'start html': u'<span style="-webkit-text-fill-color:red">',
u'end tag': u'{/r}', u'end html': u'</span>', u'protected': True})
base_tags.append({u'desc': translate('OpenLP.DisplayTags', 'Black'),
u'start tag': u'{b}',
u'start html': u'<span style="-webkit-text-fill-color:black">',
u'end tag': u'{/b}', u'end html': u'</span>', u'protected': True})
base_tags.append({u'desc': translate('OpenLP.DisplayTags', 'Blue'),
u'start tag': u'{bl}',
u'start html': u'<span style="-webkit-text-fill-color:blue">',
u'end tag': u'{/bl}', u'end html': u'</span>', u'protected': True})
base_tags.append({u'desc': translate('OpenLP.DisplayTags', 'Yellow'),
u'start tag': u'{y}',
u'start html': u'<span style="-webkit-text-fill-color:yellow">',
u'end tag': u'{/y}', u'end html': u'</span>', u'protected': True})
base_tags.append({u'desc': translate('OpenLP.DisplayTags', 'Green'),
u'start tag': u'{g}',
u'start html': u'<span style="-webkit-text-fill-color:green">',
u'end tag': u'{/g}', u'end html': u'</span>', u'protected': True})
base_tags.append({u'desc': translate('OpenLP.DisplayTags', 'Pink'),
u'start tag': u'{pk}',
u'start html': u'<span style="-webkit-text-fill-color:#FFC0CB">',
u'end tag': u'{/pk}', u'end html': u'</span>', u'protected': True})
base_tags.append({u'desc': translate('OpenLP.DisplayTags', 'Orange'),
u'start tag': u'{o}',
u'start html': u'<span style="-webkit-text-fill-color:#FFA500">',
u'end tag': u'{/o}', u'end html': u'</span>', u'protected': True})
base_tags.append({u'desc': translate('OpenLP.DisplayTags', 'Purple'),
u'start tag': u'{pp}',
u'start html': u'<span style="-webkit-text-fill-color:#800080">',
u'end tag': u'{/pp}', u'end html': u'</span>', u'protected': True})
base_tags.append({u'desc': translate('OpenLP.DisplayTags', 'White'),
u'start tag': u'{w}',
u'start html': u'<span style="-webkit-text-fill-color:white">',
u'end tag': u'{/w}', u'end html': u'</span>', u'protected': True})
base_tags.append({
u'desc': translate('OpenLP.DisplayTags', 'Superscript'),
u'start tag': u'{su}', u'start html': u'<sup>',
u'end tag': u'{/su}', u'end html': u'</sup>', u'protected': True})
base_tags.append({u'desc': translate('OpenLP.DisplayTags', 'Subscript'),
u'start tag': u'{sb}', u'start html': u'<sub>',
u'end tag': u'{/sb}', u'end html': u'</sub>', u'protected': True})
base_tags.append({u'desc': translate('OpenLP.DisplayTags', 'Paragraph'),
u'start tag': u'{p}', u'start html': u'<p>', u'end tag': u'{/p}',
u'end html': u'</p>', u'protected': True})
base_tags.append({u'desc': translate('OpenLP.DisplayTags', 'Bold'),
u'start tag': u'{st}', u'start html': u'<strong>',
u'end tag': u'{/st}', u'end html': u'</strong>',
u'protected': True})
base_tags.append({u'desc': translate('OpenLP.DisplayTags', 'Italics'),
u'start tag': u'{it}', u'start html': u'<em>', u'end tag': u'{/it}',
u'end html': u'</em>', u'protected': True})
base_tags.append({u'desc': translate('OpenLP.DisplayTags', 'Underline'),
u'start tag': u'{u}',
u'start html': u'<span style="text-decoration: underline;">',
u'end tag': u'{/u}', u'end html': u'</span>', u'protected': True})
base_tags.append({u'desc': translate('OpenLP.DisplayTags', 'Break'),
u'start tag': u'{br}', u'start html': u'<br>', u'end tag': u'',
u'end html': u'', u'protected': True})
DisplayTags.add_html_tags(base_tags)
@staticmethod @staticmethod
def add_html_tag(tag): def add_html_tags(tags):
""" """
Add a new tag to the list Add a list of tags to the list
""" """
DisplayTags.html_expands.append(tag) DisplayTags.html_expands.extend(tags)
@staticmethod @staticmethod
def remove_html_tag(tag_id): def remove_html_tag(tag_id):

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -111,14 +112,11 @@ class MediaManagerItem(QtGui.QWidget):
self.requiredIcons() self.requiredIcons()
self.setupUi() self.setupUi()
self.retranslateUi() self.retranslateUi()
self.autoSelectItem = None self.auto_select_id = -1
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'%s_service_load' % self.parent.name.lower()), QtCore.SIGNAL(u'%s_service_load' % self.parent.name.lower()),
self.serviceLoad) self.serviceLoad)
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'%s_set_autoselect_item' % self.parent.name.lower()),
self.setAutoSelectItem)
def requiredIcons(self): def requiredIcons(self):
""" """
This method is called to define the icons for the plugin. This method is called to define the icons for the plugin.
@ -430,6 +428,13 @@ class MediaManagerItem(QtGui.QWidget):
raise NotImplementedError(u'MediaManagerItem.onDeleteClick needs to ' raise NotImplementedError(u'MediaManagerItem.onDeleteClick needs to '
u'be defined by the plugin') u'be defined by the plugin')
def onFocus(self):
"""
Run when a tab in the media manager gains focus. This gives the media
item a chance to focus any elements it wants to.
"""
pass
def generateSlideData(self, serviceItem, item=None, xmlVersion=False): def generateSlideData(self, serviceItem, item=None, xmlVersion=False):
raise NotImplementedError(u'MediaManagerItem.generateSlideData needs ' raise NotImplementedError(u'MediaManagerItem.generateSlideData needs '
u'to be defined by the plugin') u'to be defined by the plugin')
@ -471,9 +476,6 @@ class MediaManagerItem(QtGui.QWidget):
if keepFocus: if keepFocus:
self.listView.setFocus() self.listView.setFocus()
def setAutoSelectItem(self, itemToSelect=None):
self.autoSelectItem = itemToSelect
def onLiveClick(self): def onLiveClick(self):
""" """
Send an item live by building a service item then adding that service Send an item live by building a service item then adding that service
@ -609,6 +611,16 @@ class MediaManagerItem(QtGui.QWidget):
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0] item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
return item_id return item_id
def save_auto_select_id(self):
"""
Sorts out, what item to select after loading a list.
"""
# The item to select has not been set.
if self.auto_select_id == -1:
item = self.listView.currentItem()
if item:
self.auto_select_id = item.data(QtCore.Qt.UserRole).toInt()[0]
def search(self, string): def search(self, string):
""" """
Performs a plugin specific search for items containing ``string`` Performs a plugin specific search for items containing ``string``

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -116,7 +117,7 @@ class SearchEdit(QtGui.QLineEdit):
Set a new current search type. Set a new current search type.
``identifier`` ``identifier``
The search type identifier (int). The search type identifier (int).
""" """
menu = self.menuButton.menu() menu = self.menuButton.menu()
for action in menu.actions(): for action in menu.actions():

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -28,6 +29,7 @@ The :mod:`serviceitem` provides the service item functionality including the
type and capability of an item. type and capability of an item.
""" """
import cgi
import datetime import datetime
import logging import logging
import os import os
@ -174,17 +176,19 @@ class ServiceItem(object):
formatted = self.renderer \ formatted = self.renderer \
.format_slide(slide[u'raw_slide'], line_break, self) .format_slide(slide[u'raw_slide'], line_break, self)
for page in formatted: for page in formatted:
page = page.replace(u'<br>', u'{br}')
html = expand_tags(cgi.escape(page.rstrip()))
self._display_frames.append({ self._display_frames.append({
u'title': clean_tags(page), u'title': clean_tags(page),
u'text': clean_tags(page.rstrip()), u'text': clean_tags(page.rstrip()),
u'html': expand_tags(page.rstrip()), u'html': html.replace(u'&amp;nbsp;', u'&nbsp;'),
u'verseTag': slide[u'verseTag'] u'verseTag': slide[u'verseTag']
}) })
elif self.service_item_type == ServiceItemType.Image or \ elif self.service_item_type == ServiceItemType.Image or \
self.service_item_type == ServiceItemType.Command: self.service_item_type == ServiceItemType.Command:
pass pass
else: else:
log.error(u'Invalid value renderer :%s' % self.service_item_type) log.error(u'Invalid value renderer: %s' % self.service_item_type)
self.title = clean_tags(self.title) self.title = clean_tags(self.title)
# The footer should never be None, but to be compatible with a few # The footer should never be None, but to be compatible with a few
# nightly builds between 1.9.4 and 1.9.5, we have to correct this to # nightly builds between 1.9.4 and 1.9.5, we have to correct this to

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -95,7 +96,7 @@ class Ui_AboutDialog(object):
'OpenLP is free church presentation software, or lyrics ' 'OpenLP is free church presentation software, or lyrics '
'projection software, used to display slides of songs, Bible ' 'projection software, used to display slides of songs, Bible '
'verses, videos, images, and even presentations (if ' 'verses, videos, images, and even presentations (if '
'OpenOffice.org, PowerPoint or PowerPoint Viewer is installed) ' 'Impress, PowerPoint or PowerPoint Viewer is installed) '
'for church worship using a computer and a data projector.\n' 'for church worship using a computer and a data projector.\n'
'\n' '\n'
'Find out more about OpenLP: http://openlp.org/\n' 'Find out more about OpenLP: http://openlp.org/\n'
@ -111,9 +112,11 @@ class Ui_AboutDialog(object):
u'Michael "cocooncrash" Gorven', u'Michael "cocooncrash" Gorven',
u'Andreas "googol" Preikschat', u'Raoul "superfly" Snyman', u'Andreas "googol" Preikschat', u'Raoul "superfly" Snyman',
u'Martin "mijiti" Thompson', u'Jon "Meths" Tibble'] u'Martin "mijiti" Thompson', u'Jon "Meths" Tibble']
contributors = [u'Scott "sguerrieri" Guerrieri', contributors = [u'Gerald "jerryb" Britton',
u'Scott "sguerrieri" Guerrieri',
u'Matthias "matthub" Hub', u'Meinert "m2j" Jordan', u'Matthias "matthub" Hub', u'Meinert "m2j" Jordan',
u'Armin "orangeshirt" K\xf6hler', u'Mattias "mahfiaz" P\xf5ldaru', u'Armin "orangeshirt" K\xf6hler', u'Joshua "milleja46" Miller',
u'Stevan "StevanP" Pettit', u'Mattias "mahfiaz" P\xf5ldaru',
u'Christian "crichter" Richter', u'Philip "Phill" Ridout', u'Christian "crichter" Richter', u'Philip "Phill" Ridout',
u'Jeffrey "whydoubt" Smith', u'Maikel Stuivenberg', u'Jeffrey "whydoubt" Smith', u'Maikel Stuivenberg',
u'Frode "frodus" Woldsund'] u'Frode "frodus" Woldsund']
@ -137,7 +140,8 @@ class Ui_AboutDialog(object):
u'ja': [u'Kunio "Kunio" Nakamaru'], u'ja': [u'Kunio "Kunio" Nakamaru'],
u'nb': [u'Atle "pendlaren" Weibell', u'Frode "frodus" Woldsund'], u'nb': [u'Atle "pendlaren" Weibell', u'Frode "frodus" Woldsund'],
u'nl': [u'Arjen "typovar" van Voorst'], u'nl': [u'Arjen "typovar" van Voorst'],
u'pt_BR': [u'Rafael "rafaellerm" Lerm', u'Gustavo Bim'], u'pt_BR': [u'Rafael "rafaellerm" Lerm', u'Gustavo Bim',
u'Simon "samscudder" Scudder'],
u'ru': [u'Sergey "ratz" Ratz'] u'ru': [u'Sergey "ratz" Ratz']
} }
documentors = [u'Wesley "wrst" Stout', documentors = [u'Wesley "wrst" Stout',
@ -221,13 +225,14 @@ class Ui_AboutDialog(object):
self.aboutNotebook.setTabText( self.aboutNotebook.setTabText(
self.aboutNotebook.indexOf(self.creditsTab), self.aboutNotebook.indexOf(self.creditsTab),
translate('OpenLP.AboutForm', 'Credits')) translate('OpenLP.AboutForm', 'Credits'))
copyright = translate('OpenLP.AboutForm', copyright = unicode(translate('OpenLP.AboutForm',
'Copyright \xa9 2004-2011 Raoul Snyman\n' 'Copyright \xa9 2004-2011 %s\n'
'Portions copyright \xa9 2004-2011 ' 'Portions copyright \xa9 2004-2011 %s')) % (u'Raoul Snyman',
'Tim Bentley, Jonathan Corwin, Michael Gorven, Scott Guerrieri,\n' u'Tim Bentley, Jonathan Corwin, Michael Gorven, Gerald Britton, '
'Meinert Jordan, Andreas Preikschat, Christian Richter, Philip\n' u'Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin K\xf6hler, '
'Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, Carsten\n' u'Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias '
'Tinggaard, Frode Woldsund') u'P\xf5ldaru, Christian Richter, Philip Ridout, Jeffrey Smith, '
u'Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund')
licence = translate('OpenLP.AboutForm', licence = translate('OpenLP.AboutForm',
'This program is free software; you can redistribute it and/or ' 'This program is free software; you can redistribute it and/or '
'modify it under the terms of the GNU General Public License as ' 'modify it under the terms of the GNU General Public License as '
@ -615,4 +620,4 @@ class Ui_AboutDialog(object):
self.aboutNotebook.indexOf(self.licenseTab), self.aboutNotebook.indexOf(self.licenseTab),
translate('OpenLP.AboutForm', 'License')) translate('OpenLP.AboutForm', 'License'))
self.contributeButton.setText(translate('OpenLP.AboutForm', self.contributeButton.setText(translate('OpenLP.AboutForm',
'Contribute')) 'Contribute'))

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -68,9 +69,6 @@ class Ui_DisplayTagDialog(object):
spacerItem = QtGui.QSpacerItem(40, 20, spacerItem = QtGui.QSpacerItem(40, 20,
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem) 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 = QtGui.QPushButton(self.widget)
self.deletePushButton.setObjectName(u'deletePushButton') self.deletePushButton.setObjectName(u'deletePushButton')
self.horizontalLayout.addWidget(self.deletePushButton) self.horizontalLayout.addWidget(self.deletePushButton)
@ -140,8 +138,6 @@ class Ui_DisplayTagDialog(object):
self.endTagLabel.setText( self.endTagLabel.setText(
translate('OpenLP.DisplayTagDialog', 'End tag')) translate('OpenLP.DisplayTagDialog', 'End tag'))
self.deletePushButton.setText(UiStrings().Delete) self.deletePushButton.setText(UiStrings().Delete)
self.defaultPushButton.setText(
translate('OpenLP.DisplayTagDialog', 'Default'))
self.newPushButton.setText(UiStrings().New) self.newPushButton.setText(UiStrings().New)
self.tagTableWidget.horizontalHeaderItem(0).setText( self.tagTableWidget.horizontalHeaderItem(0).setText(
translate('OpenLP.DisplayTagDialog', 'Description')) translate('OpenLP.DisplayTagDialog', 'Description'))

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -50,8 +51,6 @@ class DisplayTagForm(QtGui.QDialog, Ui_DisplayTagDialog):
self._loadDisplayTags() self._loadDisplayTags()
QtCore.QObject.connect(self.tagTableWidget, QtCore.QObject.connect(self.tagTableWidget,
QtCore.SIGNAL(u'clicked(QModelIndex)'), self.onRowSelected) QtCore.SIGNAL(u'clicked(QModelIndex)'), self.onRowSelected)
QtCore.QObject.connect(self.defaultPushButton,
QtCore.SIGNAL(u'pressed()'), self.onDefaultPushed)
QtCore.QObject.connect(self.newPushButton, QtCore.QObject.connect(self.newPushButton,
QtCore.SIGNAL(u'pressed()'), self.onNewPushed) QtCore.SIGNAL(u'pressed()'), self.onNewPushed)
QtCore.QObject.connect(self.savePushButton, QtCore.QObject.connect(self.savePushButton,
@ -86,8 +85,7 @@ class DisplayTagForm(QtGui.QDialog, Ui_DisplayTagDialog):
if user_expands_string: if user_expands_string:
user_tags = cPickle.loads(user_expands_string) user_tags = cPickle.loads(user_expands_string)
# If we have some user ones added them as well # If we have some user ones added them as well
for t in user_tags: DisplayTags.add_html_tags(user_tags)
DisplayTags.add_html_tag(t)
def onRowSelected(self): def onRowSelected(self):
""" """
@ -127,22 +125,20 @@ class DisplayTagForm(QtGui.QDialog, Ui_DisplayTagDialog):
'Tag "n" already defined.')) 'Tag "n" already defined.'))
return return
# Add new tag to list # Add new tag to list
tag = {u'desc': u'New Item', u'start tag': u'{n}', tag = {
u'start html': u'<Html_here>', u'end tag': u'{/n}', u'desc': translate('OpenLP.DisplayTagTab', 'New Tag'),
u'end html': u'</and here>', u'protected': False} u'start tag': u'{n}',
DisplayTags.add_html_tag(tag) u'start html': translate('OpenLP.DisplayTagTab', '<Html_here>'),
u'end tag': u'{/n}',
u'end html': translate('OpenLP.DisplayTagTab', '</and here>'),
u'protected': False
}
DisplayTags.add_html_tags([tag])
self._resetTable() self._resetTable()
# Highlight new row # Highlight new row
self.tagTableWidget.selectRow(self.tagTableWidget.rowCount() - 1) self.tagTableWidget.selectRow(self.tagTableWidget.rowCount() - 1)
self.onRowSelected() self.onRowSelected()
def onDefaultPushed(self):
"""
Remove all Custom Tags and reset to base set only.
"""
DisplayTags.reset_html_tags()
self._resetTable()
def onDeletePushed(self): def onDeletePushed(self):
""" """
Delete selected custom tag. Delete selected custom tag.

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -201,8 +202,7 @@ class Ui_FirstTimeWizard(object):
'Welcome to the First Time Wizard')) 'Welcome to the First Time Wizard'))
self.informationLabel.setText(translate('OpenLP.FirstTimeWizard', self.informationLabel.setText(translate('OpenLP.FirstTimeWizard',
'This wizard will help you to configure OpenLP for initial use.' 'This wizard will help you to configure OpenLP for initial use.'
' Click the next button below to start the process of selection ' ' Click the next button below to start.'))
'your initial options. '))
self.pluginPage.setTitle(translate('OpenLP.FirstTimeWizard', self.pluginPage.setTitle(translate('OpenLP.FirstTimeWizard',
'Activate required Plugins')) 'Activate required Plugins'))
self.pluginPage.setSubTitle(translate('OpenLP.FirstTimeWizard', self.pluginPage.setSubTitle(translate('OpenLP.FirstTimeWizard',

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -96,6 +97,9 @@ class GeneralTab(SettingsTab):
self.autoPreviewCheckBox = QtGui.QCheckBox(self.settingsGroupBox) self.autoPreviewCheckBox = QtGui.QCheckBox(self.settingsGroupBox)
self.autoPreviewCheckBox.setObjectName(u'autoPreviewCheckBox') self.autoPreviewCheckBox.setObjectName(u'autoPreviewCheckBox')
self.settingsLayout.addRow(self.autoPreviewCheckBox) self.settingsLayout.addRow(self.autoPreviewCheckBox)
self.enableLoopCheckBox = QtGui.QCheckBox(self.settingsGroupBox)
self.enableLoopCheckBox.setObjectName(u'enableLoopCheckBox')
self.settingsLayout.addRow(self.enableLoopCheckBox)
# Moved here from image tab # Moved here from image tab
self.timeoutLabel = QtGui.QLabel(self.settingsGroupBox) self.timeoutLabel = QtGui.QLabel(self.settingsGroupBox)
self.timeoutLabel.setObjectName(u'timeoutLabel') self.timeoutLabel.setObjectName(u'timeoutLabel')
@ -218,8 +222,10 @@ class GeneralTab(SettingsTab):
'Unblank display when adding new live item')) 'Unblank display when adding new live item'))
self.autoPreviewCheckBox.setText(translate('OpenLP.GeneralTab', self.autoPreviewCheckBox.setText(translate('OpenLP.GeneralTab',
'Automatically preview next item in service')) 'Automatically preview next item in service'))
self.enableLoopCheckBox.setText(translate('OpenLP.GeneralTab',
'Enable slide wrap-around'))
self.timeoutLabel.setText(translate('OpenLP.GeneralTab', self.timeoutLabel.setText(translate('OpenLP.GeneralTab',
'Slide loop delay:')) 'Timed slide interval:'))
self.timeoutSpinBox.setSuffix(translate('OpenLP.GeneralTab', ' sec')) self.timeoutSpinBox.setSuffix(translate('OpenLP.GeneralTab', ' sec'))
self.ccliGroupBox.setTitle( self.ccliGroupBox.setTitle(
translate('OpenLP.GeneralTab', 'CCLI Details')) translate('OpenLP.GeneralTab', 'CCLI Details'))
@ -270,6 +276,8 @@ class GeneralTab(SettingsTab):
QtCore.QVariant(True)).toBool()) QtCore.QVariant(True)).toBool())
self.autoPreviewCheckBox.setChecked(settings.value(u'auto preview', self.autoPreviewCheckBox.setChecked(settings.value(u'auto preview',
QtCore.QVariant(False)).toBool()) QtCore.QVariant(False)).toBool())
self.enableLoopCheckBox.setChecked(settings.value(u'enable slide loop',
QtCore.QVariant(True)).toBool())
self.timeoutSpinBox.setValue(settings.value(u'loop delay', self.timeoutSpinBox.setValue(settings.value(u'loop delay',
QtCore.QVariant(5)).toInt()[0]) QtCore.QVariant(5)).toInt()[0])
self.overrideCheckBox.setChecked(settings.value(u'override position', self.overrideCheckBox.setChecked(settings.value(u'override position',
@ -313,6 +321,8 @@ class GeneralTab(SettingsTab):
QtCore.QVariant(self.autoUnblankCheckBox.isChecked())) QtCore.QVariant(self.autoUnblankCheckBox.isChecked()))
settings.setValue(u'auto preview', settings.setValue(u'auto preview',
QtCore.QVariant(self.autoPreviewCheckBox.isChecked())) QtCore.QVariant(self.autoPreviewCheckBox.isChecked()))
settings.setValue(u'enable slide loop',
QtCore.QVariant(self.enableLoopCheckBox.isChecked()))
settings.setValue(u'loop delay', settings.setValue(u'loop delay',
QtCore.QVariant(self.timeoutSpinBox.value())) QtCore.QVariant(self.timeoutSpinBox.value()))
settings.setValue(u'ccli number', settings.setValue(u'ccli number',

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -72,14 +73,14 @@ class Ui_MainWindow(object):
mainWindow.setWindowIcon(build_icon(u':/icon/openlp-logo-64x64.png')) mainWindow.setWindowIcon(build_icon(u':/icon/openlp-logo-64x64.png'))
mainWindow.setDockNestingEnabled(True) mainWindow.setDockNestingEnabled(True)
# Set up the main container, which contains all the other form widgets. # Set up the main container, which contains all the other form widgets.
self.MainContent = QtGui.QWidget(mainWindow) self.mainContent = QtGui.QWidget(mainWindow)
self.MainContent.setObjectName(u'MainContent') self.mainContent.setObjectName(u'mainContent')
self.mainContentLayout = QtGui.QHBoxLayout(self.MainContent) self.mainContentLayout = QtGui.QHBoxLayout(self.mainContent)
self.mainContentLayout.setSpacing(0) self.mainContentLayout.setSpacing(0)
self.mainContentLayout.setMargin(0) self.mainContentLayout.setMargin(0)
self.mainContentLayout.setObjectName(u'mainContentLayout') self.mainContentLayout.setObjectName(u'mainContentLayout')
mainWindow.setCentralWidget(self.MainContent) mainWindow.setCentralWidget(self.mainContent)
self.controlSplitter = QtGui.QSplitter(self.MainContent) self.controlSplitter = QtGui.QSplitter(self.mainContent)
self.controlSplitter.setOrientation(QtCore.Qt.Horizontal) self.controlSplitter.setOrientation(QtCore.Qt.Horizontal)
self.controlSplitter.setObjectName(u'controlSplitter') self.controlSplitter.setObjectName(u'controlSplitter')
self.mainContentLayout.addWidget(self.controlSplitter) self.mainContentLayout.addWidget(self.controlSplitter)
@ -93,31 +94,31 @@ class Ui_MainWindow(object):
QtCore.QVariant(True)).toBool() QtCore.QVariant(True)).toBool()
self.liveController.panel.setVisible(liveVisible) self.liveController.panel.setVisible(liveVisible)
# Create menu # Create menu
self.MenuBar = QtGui.QMenuBar(mainWindow) self.menuBar = QtGui.QMenuBar(mainWindow)
self.MenuBar.setObjectName(u'MenuBar') self.menuBar.setObjectName(u'menuBar')
self.FileMenu = QtGui.QMenu(self.MenuBar) self.fileMenu = QtGui.QMenu(self.menuBar)
self.FileMenu.setObjectName(u'FileMenu') self.fileMenu.setObjectName(u'fileMenu')
self.FileImportMenu = QtGui.QMenu(self.FileMenu) self.fileImportMenu = QtGui.QMenu(self.fileMenu)
self.FileImportMenu.setObjectName(u'FileImportMenu') self.fileImportMenu.setObjectName(u'fileImportMenu')
self.FileExportMenu = QtGui.QMenu(self.FileMenu) self.fileExportMenu = QtGui.QMenu(self.fileMenu)
self.FileExportMenu.setObjectName(u'FileExportMenu') self.fileExportMenu.setObjectName(u'fileExportMenu')
# View Menu # View Menu
self.viewMenu = QtGui.QMenu(self.MenuBar) self.viewMenu = QtGui.QMenu(self.menuBar)
self.viewMenu.setObjectName(u'viewMenu') self.viewMenu.setObjectName(u'viewMenu')
self.ViewModeMenu = QtGui.QMenu(self.viewMenu) self.viewModeMenu = QtGui.QMenu(self.viewMenu)
self.ViewModeMenu.setObjectName(u'ViewModeMenu') self.viewModeMenu.setObjectName(u'viewModeMenu')
# Tools Menu # Tools Menu
self.ToolsMenu = QtGui.QMenu(self.MenuBar) self.toolsMenu = QtGui.QMenu(self.menuBar)
self.ToolsMenu.setObjectName(u'ToolsMenu') self.toolsMenu.setObjectName(u'toolsMenu')
# Settings Menu # Settings Menu
self.SettingsMenu = QtGui.QMenu(self.MenuBar) self.settingsMenu = QtGui.QMenu(self.menuBar)
self.SettingsMenu.setObjectName(u'SettingsMenu') self.settingsMenu.setObjectName(u'settingsMenu')
self.SettingsLanguageMenu = QtGui.QMenu(self.SettingsMenu) self.settingsLanguageMenu = QtGui.QMenu(self.settingsMenu)
self.SettingsLanguageMenu.setObjectName(u'SettingsLanguageMenu') self.settingsLanguageMenu.setObjectName(u'settingsLanguageMenu')
# Help Menu # Help Menu
self.HelpMenu = QtGui.QMenu(self.MenuBar) self.helpMenu = QtGui.QMenu(self.menuBar)
self.HelpMenu.setObjectName(u'HelpMenu') self.helpMenu.setObjectName(u'helpMenu')
mainWindow.setMenuBar(self.MenuBar) mainWindow.setMenuBar(self.menuBar)
self.statusBar = QtGui.QStatusBar(mainWindow) self.statusBar = QtGui.QStatusBar(mainWindow)
self.statusBar.setObjectName(u'statusBar') self.statusBar.setObjectName(u'statusBar')
mainWindow.setStatusBar(self.statusBar) mainWindow.setStatusBar(self.statusBar)
@ -134,17 +135,17 @@ class Ui_MainWindow(object):
u'mediaManagerDock', u':/system/system_mediamanager.png') u'mediaManagerDock', u':/system/system_mediamanager.png')
self.mediaManagerDock.setStyleSheet(MEDIA_MANAGER_STYLE) self.mediaManagerDock.setStyleSheet(MEDIA_MANAGER_STYLE)
# Create the media toolbox # Create the media toolbox
self.MediaToolBox = QtGui.QToolBox(self.mediaManagerDock) self.mediaToolBox = QtGui.QToolBox(self.mediaManagerDock)
self.MediaToolBox.setObjectName(u'MediaToolBox') self.mediaToolBox.setObjectName(u'mediaToolBox')
self.mediaManagerDock.setWidget(self.MediaToolBox) self.mediaManagerDock.setWidget(self.mediaToolBox)
mainWindow.addDockWidget(QtCore.Qt.LeftDockWidgetArea, mainWindow.addDockWidget(QtCore.Qt.LeftDockWidgetArea,
self.mediaManagerDock) self.mediaManagerDock)
# Create the service manager # Create the service manager
self.serviceManagerDock = OpenLPDockWidget(mainWindow, self.serviceManagerDock = OpenLPDockWidget(mainWindow,
u'serviceManagerDock', u':/system/system_servicemanager.png') u'serviceManagerDock', u':/system/system_servicemanager.png')
self.ServiceManagerContents = ServiceManager(mainWindow, self.serviceManagerContents = ServiceManager(mainWindow,
self.serviceManagerDock) self.serviceManagerDock)
self.serviceManagerDock.setWidget(self.ServiceManagerContents) self.serviceManagerDock.setWidget(self.serviceManagerContents)
mainWindow.addDockWidget(QtCore.Qt.RightDockWidgetArea, mainWindow.addDockWidget(QtCore.Qt.RightDockWidgetArea,
self.serviceManagerDock) self.serviceManagerDock)
# Create the theme manager # Create the theme manager
@ -159,75 +160,75 @@ class Ui_MainWindow(object):
# Create the menu items # Create the menu items
action_list = ActionList.get_instance() action_list = ActionList.get_instance()
action_list.add_category(UiStrings().File, CategoryOrder.standardMenu) action_list.add_category(UiStrings().File, CategoryOrder.standardMenu)
self.FileNewItem = shortcut_action(mainWindow, u'FileNewItem', self.fileNewItem = shortcut_action(mainWindow, u'fileNewItem',
[QtGui.QKeySequence(u'Ctrl+N')], [QtGui.QKeySequence(u'Ctrl+N')],
self.ServiceManagerContents.onNewServiceClicked, self.serviceManagerContents.onNewServiceClicked,
u':/general/general_new.png', category=UiStrings().File) u':/general/general_new.png', category=UiStrings().File)
self.FileOpenItem = shortcut_action(mainWindow, u'FileOpenItem', self.fileOpenItem = shortcut_action(mainWindow, u'fileOpenItem',
[QtGui.QKeySequence(u'Ctrl+O')], [QtGui.QKeySequence(u'Ctrl+O')],
self.ServiceManagerContents.onLoadServiceClicked, self.serviceManagerContents.onLoadServiceClicked,
u':/general/general_open.png', category=UiStrings().File) u':/general/general_open.png', category=UiStrings().File)
self.FileSaveItem = shortcut_action(mainWindow, u'FileSaveItem', self.fileSaveItem = shortcut_action(mainWindow, u'fileSaveItem',
[QtGui.QKeySequence(u'Ctrl+S')], [QtGui.QKeySequence(u'Ctrl+S')],
self.ServiceManagerContents.saveFile, self.serviceManagerContents.saveFile,
u':/general/general_save.png', category=UiStrings().File) u':/general/general_save.png', category=UiStrings().File)
self.FileSaveAsItem = shortcut_action(mainWindow, u'FileSaveAsItem', self.fileSaveAsItem = shortcut_action(mainWindow, u'fileSaveAsItem',
[QtGui.QKeySequence(u'Ctrl+Shift+S')], [QtGui.QKeySequence(u'Ctrl+Shift+S')],
self.ServiceManagerContents.saveFileAs, category=UiStrings().File) self.serviceManagerContents.saveFileAs, category=UiStrings().File)
self.printServiceOrderItem = shortcut_action(mainWindow, self.printServiceOrderItem = shortcut_action(mainWindow,
u'printServiceItem', [QtGui.QKeySequence(u'Ctrl+P')], u'printServiceItem', [QtGui.QKeySequence(u'Ctrl+P')],
self.ServiceManagerContents.printServiceOrder, self.serviceManagerContents.printServiceOrder,
category=UiStrings().File) category=UiStrings().File)
self.FileExitItem = shortcut_action(mainWindow, u'FileExitItem', self.fileExitItem = shortcut_action(mainWindow, u'FileExitItem',
[QtGui.QKeySequence(u'Alt+F4')], mainWindow.close, [QtGui.QKeySequence(u'Alt+F4')], mainWindow.close,
u':/system/system_exit.png', category=UiStrings().File) u':/system/system_exit.png', category=UiStrings().File)
action_list.add_category(UiStrings().Import, CategoryOrder.standardMenu) action_list.add_category(UiStrings().Import, CategoryOrder.standardMenu)
self.ImportThemeItem = base_action( self.importThemeItem = base_action(
mainWindow, u'ImportThemeItem', UiStrings().Import) mainWindow, u'importThemeItem', UiStrings().Import)
self.ImportLanguageItem = base_action( self.importLanguageItem = base_action(
mainWindow, u'ImportLanguageItem')#, UiStrings().Import) mainWindow, u'importLanguageItem')#, UiStrings().Import)
action_list.add_category(UiStrings().Export, CategoryOrder.standardMenu) action_list.add_category(UiStrings().Export, CategoryOrder.standardMenu)
self.ExportThemeItem = base_action( self.exportThemeItem = base_action(
mainWindow, u'ExportThemeItem', UiStrings().Export) mainWindow, u'exportThemeItem', UiStrings().Export)
self.ExportLanguageItem = base_action( self.exportLanguageItem = base_action(
mainWindow, u'ExportLanguageItem')#, UiStrings().Export) mainWindow, u'exportLanguageItem')#, UiStrings().Export)
action_list.add_category(UiStrings().View, CategoryOrder.standardMenu) action_list.add_category(UiStrings().View, CategoryOrder.standardMenu)
self.ViewMediaManagerItem = shortcut_action(mainWindow, self.viewMediaManagerItem = shortcut_action(mainWindow,
u'ViewMediaManagerItem', [QtGui.QKeySequence(u'F8')], u'viewMediaManagerItem', [QtGui.QKeySequence(u'F8')],
self.toggleMediaManager, u':/system/system_mediamanager.png', self.toggleMediaManager, u':/system/system_mediamanager.png',
self.mediaManagerDock.isVisible(), UiStrings().View) self.mediaManagerDock.isVisible(), UiStrings().View)
self.ViewThemeManagerItem = shortcut_action(mainWindow, self.viewThemeManagerItem = shortcut_action(mainWindow,
u'ViewThemeManagerItem', [QtGui.QKeySequence(u'F10')], u'viewThemeManagerItem', [QtGui.QKeySequence(u'F10')],
self.toggleThemeManager, u':/system/system_thememanager.png', self.toggleThemeManager, u':/system/system_thememanager.png',
self.themeManagerDock.isVisible(), UiStrings().View) self.themeManagerDock.isVisible(), UiStrings().View)
self.ViewServiceManagerItem = shortcut_action(mainWindow, self.viewServiceManagerItem = shortcut_action(mainWindow,
u'ViewServiceManagerItem', [QtGui.QKeySequence(u'F9')], u'viewServiceManagerItem', [QtGui.QKeySequence(u'F9')],
self.toggleServiceManager, u':/system/system_servicemanager.png', self.toggleServiceManager, u':/system/system_servicemanager.png',
self.serviceManagerDock.isVisible(), UiStrings().View) self.serviceManagerDock.isVisible(), UiStrings().View)
self.ViewPreviewPanel = shortcut_action(mainWindow, self.viewPreviewPanel = shortcut_action(mainWindow,
u'ViewPreviewPanel', [QtGui.QKeySequence(u'F11')], u'viewPreviewPanel', [QtGui.QKeySequence(u'F11')],
self.setPreviewPanelVisibility, checked=previewVisible, self.setPreviewPanelVisibility, checked=previewVisible,
category=UiStrings().View) category=UiStrings().View)
self.ViewLivePanel = shortcut_action(mainWindow, u'ViewLivePanel', self.viewLivePanel = shortcut_action(mainWindow, u'viewLivePanel',
[QtGui.QKeySequence(u'F12')], self.setLivePanelVisibility, [QtGui.QKeySequence(u'F12')], self.setLivePanelVisibility,
checked=liveVisible, category=UiStrings().View) checked=liveVisible, category=UiStrings().View)
action_list.add_category(UiStrings().ViewMode, CategoryOrder.standardMenu) action_list.add_category(UiStrings().ViewMode, CategoryOrder.standardMenu)
self.ModeDefaultItem = checkable_action( self.modeDefaultItem = checkable_action(
mainWindow, u'ModeDefaultItem', category=UiStrings().ViewMode) mainWindow, u'modeDefaultItem', category=UiStrings().ViewMode)
self.ModeSetupItem = checkable_action( self.modeSetupItem = checkable_action(
mainWindow, u'ModeLiveItem', category=UiStrings().ViewMode) mainWindow, u'modeLiveItem', category=UiStrings().ViewMode)
self.ModeLiveItem = checkable_action( self.modeLiveItem = checkable_action(
mainWindow, u'ModeLiveItem', True, UiStrings().ViewMode) mainWindow, u'modeLiveItem', True, UiStrings().ViewMode)
self.ModeGroup = QtGui.QActionGroup(mainWindow) self.modeGroup = QtGui.QActionGroup(mainWindow)
self.ModeGroup.addAction(self.ModeDefaultItem) self.modeGroup.addAction(self.modeDefaultItem)
self.ModeGroup.addAction(self.ModeSetupItem) self.modeGroup.addAction(self.modeSetupItem)
self.ModeGroup.addAction(self.ModeLiveItem) self.modeGroup.addAction(self.modeLiveItem)
self.ModeDefaultItem.setChecked(True) self.modeDefaultItem.setChecked(True)
action_list.add_category(UiStrings().Tools, CategoryOrder.standardMenu) action_list.add_category(UiStrings().Tools, CategoryOrder.standardMenu)
self.ToolsAddToolItem = icon_action(mainWindow, u'ToolsAddToolItem', self.toolsAddToolItem = icon_action(mainWindow, u'toolsAddToolItem',
u':/tools/tools_add.png', category=UiStrings().Tools) u':/tools/tools_add.png', category=UiStrings().Tools)
self.ToolsOpenDataFolder = icon_action(mainWindow, self.toolsOpenDataFolder = icon_action(mainWindow,
u'ToolsOpenDataFolder', u':/general/general_open.png', u'toolsOpenDataFolder', u':/general/general_open.png',
category=UiStrings().Tools) category=UiStrings().Tools)
self.updateThemeImages = base_action(mainWindow, self.updateThemeImages = base_action(mainWindow,
u'updateThemeImages', category=UiStrings().Tools) u'updateThemeImages', category=UiStrings().Tools)
@ -237,82 +238,84 @@ class Ui_MainWindow(object):
self.onPluginItemClicked, u':/system/settings_plugin_list.png', self.onPluginItemClicked, u':/system/settings_plugin_list.png',
category=UiStrings().Settings) category=UiStrings().Settings)
# i18n Language Items # i18n Language Items
self.AutoLanguageItem = checkable_action(mainWindow, self.autoLanguageItem = checkable_action(mainWindow,
u'AutoLanguageItem', LanguageManager.auto_language) u'autoLanguageItem', LanguageManager.auto_language)
self.LanguageGroup = QtGui.QActionGroup(mainWindow) self.languageGroup = QtGui.QActionGroup(mainWindow)
self.LanguageGroup.setExclusive(True) self.languageGroup.setExclusive(True)
self.LanguageGroup.setObjectName(u'LanguageGroup') self.languageGroup.setObjectName(u'languageGroup')
add_actions(self.LanguageGroup, [self.AutoLanguageItem]) add_actions(self.languageGroup, [self.autoLanguageItem])
qmList = LanguageManager.get_qm_list() qmList = LanguageManager.get_qm_list()
savedLanguage = LanguageManager.get_language() savedLanguage = LanguageManager.get_language()
for key in sorted(qmList.keys()): for key in sorted(qmList.keys()):
languageItem = checkable_action( languageItem = checkable_action(
mainWindow, key, qmList[key] == savedLanguage) mainWindow, key, qmList[key] == savedLanguage)
add_actions(self.LanguageGroup, [languageItem]) add_actions(self.languageGroup, [languageItem])
self.SettingsShortcutsItem = icon_action(mainWindow, self.settingsShortcutsItem = icon_action(mainWindow,
u'SettingsShortcutsItem', u'settingsShortcutsItem',
u':/system/system_configure_shortcuts.png', u':/system/system_configure_shortcuts.png',
category=UiStrings().Settings) category=UiStrings().Settings)
self.DisplayTagItem = icon_action(mainWindow, self.displayTagItem = icon_action(mainWindow,
u'DisplayTagItem', u':/system/tag_editor.png', u'displayTagItem', u':/system/tag_editor.png',
category=UiStrings().Settings) category=UiStrings().Settings)
self.SettingsConfigureItem = icon_action(mainWindow, self.settingsConfigureItem = icon_action(mainWindow,
u'SettingsConfigureItem', u':/system/system_settings.png', u'settingsConfigureItem', u':/system/system_settings.png',
category=UiStrings().Settings) category=UiStrings().Settings)
action_list.add_category(UiStrings().Help, CategoryOrder.standardMenu) action_list.add_category(UiStrings().Help, CategoryOrder.standardMenu)
self.HelpDocumentationItem = icon_action(mainWindow, self.helpDocumentationItem = icon_action(mainWindow,
u'HelpDocumentationItem', u':/system/system_help_contents.png', u'helpDocumentationItem', u':/system/system_help_contents.png',
category=None)#UiStrings().Help) category=None)#UiStrings().Help)
self.HelpDocumentationItem.setEnabled(False) self.helpDocumentationItem.setEnabled(False)
self.HelpAboutItem = shortcut_action(mainWindow, u'HelpAboutItem', self.helpAboutItem = shortcut_action(mainWindow, u'helpAboutItem',
[QtGui.QKeySequence(u'Ctrl+F1')], self.onHelpAboutItemClicked, [QtGui.QKeySequence(u'Ctrl+F1')], self.onHelpAboutItemClicked,
u':/system/system_about.png', category=UiStrings().Help) u':/system/system_about.png', category=UiStrings().Help)
self.HelpOnlineHelpItem = base_action( self.helpOnlineHelpItem = shortcut_action(
mainWindow, u'HelpOnlineHelpItem', category=UiStrings().Help) mainWindow, u'helpOnlineHelpItem', [QtGui.QKeySequence(u'F1')],
self.onHelpOnlineHelpClicked, u':/system/system_online_help.png',
category=UiStrings().Help)
self.helpWebSiteItem = base_action( self.helpWebSiteItem = base_action(
mainWindow, u'helpWebSiteItem', category=UiStrings().Help) mainWindow, u'helpWebSiteItem', category=UiStrings().Help)
add_actions(self.FileImportMenu, add_actions(self.fileImportMenu,
(self.ImportThemeItem, self.ImportLanguageItem)) (self.importThemeItem, self.importLanguageItem))
add_actions(self.FileExportMenu, add_actions(self.fileExportMenu,
(self.ExportThemeItem, self.ExportLanguageItem)) (self.exportThemeItem, self.exportLanguageItem))
self.FileMenuActions = (self.FileNewItem, self.FileOpenItem, self.fileMenuActions = (self.fileNewItem, self.fileOpenItem,
self.FileSaveItem, self.FileSaveAsItem, None, self.fileSaveItem, self.fileSaveAsItem, None,
self.printServiceOrderItem, None, self.FileImportMenu.menuAction(), self.printServiceOrderItem, None, self.fileImportMenu.menuAction(),
self.FileExportMenu.menuAction(), self.FileExitItem) self.fileExportMenu.menuAction(), self.fileExitItem)
add_actions(self.ViewModeMenu, (self.ModeDefaultItem, add_actions(self.viewModeMenu, (self.modeDefaultItem,
self.ModeSetupItem, self.ModeLiveItem)) self.modeSetupItem, self.modeLiveItem))
add_actions(self.viewMenu, (self.ViewModeMenu.menuAction(), add_actions(self.viewMenu, (self.viewModeMenu.menuAction(),
None, self.ViewMediaManagerItem, self.ViewServiceManagerItem, None, self.viewMediaManagerItem, self.viewServiceManagerItem,
self.ViewThemeManagerItem, None, self.ViewPreviewPanel, self.viewThemeManagerItem, None, self.viewPreviewPanel,
self.ViewLivePanel)) self.viewLivePanel))
# i18n add Language Actions # i18n add Language Actions
add_actions(self.SettingsLanguageMenu, (self.AutoLanguageItem, None)) add_actions(self.settingsLanguageMenu, (self.autoLanguageItem, None))
add_actions(self.SettingsLanguageMenu, self.LanguageGroup.actions()) add_actions(self.settingsLanguageMenu, self.languageGroup.actions())
add_actions(self.SettingsMenu, (self.settingsPluginListItem, add_actions(self.settingsMenu, (self.settingsPluginListItem,
self.SettingsLanguageMenu.menuAction(), None, self.settingsLanguageMenu.menuAction(), None,
self.DisplayTagItem, self.SettingsShortcutsItem, self.displayTagItem, self.settingsShortcutsItem,
self.SettingsConfigureItem)) self.settingsConfigureItem))
add_actions(self.ToolsMenu, (self.ToolsAddToolItem, None)) add_actions(self.toolsMenu, (self.toolsAddToolItem, None))
add_actions(self.ToolsMenu, (self.ToolsOpenDataFolder, None)) add_actions(self.toolsMenu, (self.toolsOpenDataFolder, None))
add_actions(self.ToolsMenu, [self.updateThemeImages]) add_actions(self.toolsMenu, [self.updateThemeImages])
add_actions(self.HelpMenu, (self.HelpDocumentationItem, add_actions(self.helpMenu, (self.helpDocumentationItem,
self.HelpOnlineHelpItem, None, self.helpWebSiteItem, self.helpOnlineHelpItem, None, self.helpWebSiteItem,
self.HelpAboutItem)) self.helpAboutItem))
add_actions(self.MenuBar, (self.FileMenu.menuAction(), add_actions(self.menuBar, (self.fileMenu.menuAction(),
self.viewMenu.menuAction(), self.ToolsMenu.menuAction(), self.viewMenu.menuAction(), self.toolsMenu.menuAction(),
self.SettingsMenu.menuAction(), self.HelpMenu.menuAction())) self.settingsMenu.menuAction(), self.helpMenu.menuAction()))
# Initialise the translation # Initialise the translation
self.retranslateUi(mainWindow) self.retranslateUi(mainWindow)
self.MediaToolBox.setCurrentIndex(0) self.mediaToolBox.setCurrentIndex(0)
# Connect up some signals and slots # Connect up some signals and slots
QtCore.QObject.connect(self.FileMenu, QtCore.QObject.connect(self.fileMenu,
QtCore.SIGNAL(u'aboutToShow()'), self.updateFileMenu) QtCore.SIGNAL(u'aboutToShow()'), self.updateFileMenu)
QtCore.QMetaObject.connectSlotsByName(mainWindow) QtCore.QMetaObject.connectSlotsByName(mainWindow)
# Hide the entry, as it does not have any functionality yet. # Hide the entry, as it does not have any functionality yet.
self.ToolsAddToolItem.setVisible(False) self.toolsAddToolItem.setVisible(False)
self.ImportLanguageItem.setVisible(False) self.importLanguageItem.setVisible(False)
self.ExportLanguageItem.setVisible(False) self.exportLanguageItem.setVisible(False)
self.HelpDocumentationItem.setVisible(False) self.helpDocumentationItem.setVisible(False)
def retranslateUi(self, mainWindow): def retranslateUi(self, mainWindow):
""" """
@ -320,136 +323,133 @@ class Ui_MainWindow(object):
""" """
mainWindow.mainTitle = UiStrings().OLPV2 mainWindow.mainTitle = UiStrings().OLPV2
mainWindow.setWindowTitle(mainWindow.mainTitle) mainWindow.setWindowTitle(mainWindow.mainTitle)
self.FileMenu.setTitle(translate('OpenLP.MainWindow', '&File')) self.fileMenu.setTitle(translate('OpenLP.MainWindow', '&File'))
self.FileImportMenu.setTitle(translate('OpenLP.MainWindow', '&Import')) self.fileImportMenu.setTitle(translate('OpenLP.MainWindow', '&Import'))
self.FileExportMenu.setTitle(translate('OpenLP.MainWindow', '&Export')) self.fileExportMenu.setTitle(translate('OpenLP.MainWindow', '&Export'))
self.viewMenu.setTitle(translate('OpenLP.MainWindow', '&View')) self.viewMenu.setTitle(translate('OpenLP.MainWindow', '&View'))
self.ViewModeMenu.setTitle(translate('OpenLP.MainWindow', 'M&ode')) self.viewModeMenu.setTitle(translate('OpenLP.MainWindow', 'M&ode'))
self.ToolsMenu.setTitle(translate('OpenLP.MainWindow', '&Tools')) self.toolsMenu.setTitle(translate('OpenLP.MainWindow', '&Tools'))
self.SettingsMenu.setTitle(translate('OpenLP.MainWindow', '&Settings')) self.settingsMenu.setTitle(translate('OpenLP.MainWindow', '&Settings'))
self.SettingsLanguageMenu.setTitle(translate('OpenLP.MainWindow', self.settingsLanguageMenu.setTitle(translate('OpenLP.MainWindow',
'&Language')) '&Language'))
self.HelpMenu.setTitle(translate('OpenLP.MainWindow', '&Help')) self.helpMenu.setTitle(translate('OpenLP.MainWindow', '&Help'))
self.mediaManagerDock.setWindowTitle( self.mediaManagerDock.setWindowTitle(
translate('OpenLP.MainWindow', 'Media Manager')) translate('OpenLP.MainWindow', 'Media Manager'))
self.serviceManagerDock.setWindowTitle( self.serviceManagerDock.setWindowTitle(
translate('OpenLP.MainWindow', 'Service Manager')) translate('OpenLP.MainWindow', 'Service Manager'))
self.themeManagerDock.setWindowTitle( self.themeManagerDock.setWindowTitle(
translate('OpenLP.MainWindow', 'Theme Manager')) translate('OpenLP.MainWindow', 'Theme Manager'))
self.FileNewItem.setText(translate('OpenLP.MainWindow', '&New')) self.fileNewItem.setText(translate('OpenLP.MainWindow', '&New'))
self.FileNewItem.setToolTip(UiStrings().NewService) self.fileNewItem.setToolTip(UiStrings().NewService)
self.FileNewItem.setStatusTip(UiStrings().CreateService) self.fileNewItem.setStatusTip(UiStrings().CreateService)
self.FileOpenItem.setText(translate('OpenLP.MainWindow', '&Open')) self.fileOpenItem.setText(translate('OpenLP.MainWindow', '&Open'))
self.FileOpenItem.setToolTip(UiStrings().OpenService) self.fileOpenItem.setToolTip(UiStrings().OpenService)
self.FileOpenItem.setStatusTip( self.fileOpenItem.setStatusTip(
translate('OpenLP.MainWindow', 'Open an existing service.')) translate('OpenLP.MainWindow', 'Open an existing service.'))
self.FileSaveItem.setText(translate('OpenLP.MainWindow', '&Save')) self.fileSaveItem.setText(translate('OpenLP.MainWindow', '&Save'))
self.FileSaveItem.setToolTip(UiStrings().SaveService) self.fileSaveItem.setToolTip(UiStrings().SaveService)
self.FileSaveItem.setStatusTip( self.fileSaveItem.setStatusTip(
translate('OpenLP.MainWindow', 'Save the current service to disk.')) translate('OpenLP.MainWindow', 'Save the current service to disk.'))
self.FileSaveAsItem.setText( self.fileSaveAsItem.setText(
translate('OpenLP.MainWindow', 'Save &As...')) translate('OpenLP.MainWindow', 'Save &As...'))
self.FileSaveAsItem.setToolTip( self.fileSaveAsItem.setToolTip(
translate('OpenLP.MainWindow', 'Save Service As')) translate('OpenLP.MainWindow', 'Save Service As'))
self.FileSaveAsItem.setStatusTip(translate('OpenLP.MainWindow', self.fileSaveAsItem.setStatusTip(translate('OpenLP.MainWindow',
'Save the current service under a new name.')) 'Save the current service under a new name.'))
self.printServiceOrderItem.setText(UiStrings().PrintServiceOrder) self.printServiceOrderItem.setText(UiStrings().PrintServiceOrder)
self.printServiceOrderItem.setStatusTip(translate('OpenLP.MainWindow', self.printServiceOrderItem.setStatusTip(translate('OpenLP.MainWindow',
'Print the current Service Order.')) 'Print the current Service Order.'))
self.FileExitItem.setText( self.fileExitItem.setText(
translate('OpenLP.MainWindow', 'E&xit')) translate('OpenLP.MainWindow', 'E&xit'))
self.FileExitItem.setStatusTip( self.fileExitItem.setStatusTip(
translate('OpenLP.MainWindow', 'Quit OpenLP')) translate('OpenLP.MainWindow', 'Quit OpenLP'))
self.ImportThemeItem.setText( self.importThemeItem.setText(
translate('OpenLP.MainWindow', '&Theme')) translate('OpenLP.MainWindow', '&Theme'))
self.ImportLanguageItem.setText( self.importLanguageItem.setText(
translate('OpenLP.MainWindow', '&Language')) translate('OpenLP.MainWindow', '&Language'))
self.ExportThemeItem.setText( self.exportThemeItem.setText(
translate('OpenLP.MainWindow', '&Theme')) translate('OpenLP.MainWindow', '&Theme'))
self.ExportLanguageItem.setText( self.exportLanguageItem.setText(
translate('OpenLP.MainWindow', '&Language')) translate('OpenLP.MainWindow', '&Language'))
self.SettingsShortcutsItem.setText( self.settingsShortcutsItem.setText(
translate('OpenLP.MainWindow', 'Configure &Shortcuts...')) translate('OpenLP.MainWindow', 'Configure &Shortcuts...'))
self.DisplayTagItem.setText( self.displayTagItem.setText(
translate('OpenLP.MainWindow', '&Configure Display Tags')) translate('OpenLP.MainWindow', '&Configure Display Tags'))
self.SettingsConfigureItem.setText( self.settingsConfigureItem.setText(
translate('OpenLP.MainWindow', '&Configure OpenLP...')) translate('OpenLP.MainWindow', '&Configure OpenLP...'))
self.ViewMediaManagerItem.setText( self.viewMediaManagerItem.setText(
translate('OpenLP.MainWindow', '&Media Manager')) translate('OpenLP.MainWindow', '&Media Manager'))
self.ViewMediaManagerItem.setToolTip( self.viewMediaManagerItem.setToolTip(
translate('OpenLP.MainWindow', 'Toggle Media Manager')) translate('OpenLP.MainWindow', 'Toggle Media Manager'))
self.ViewMediaManagerItem.setStatusTip(translate('OpenLP.MainWindow', self.viewMediaManagerItem.setStatusTip(translate('OpenLP.MainWindow',
'Toggle the visibility of the media manager.')) 'Toggle the visibility of the media manager.'))
self.ViewThemeManagerItem.setText( self.viewThemeManagerItem.setText(
translate('OpenLP.MainWindow', '&Theme Manager')) translate('OpenLP.MainWindow', '&Theme Manager'))
self.ViewThemeManagerItem.setToolTip( self.viewThemeManagerItem.setToolTip(
translate('OpenLP.MainWindow', 'Toggle Theme Manager')) translate('OpenLP.MainWindow', 'Toggle Theme Manager'))
self.ViewThemeManagerItem.setStatusTip(translate('OpenLP.MainWindow', self.viewThemeManagerItem.setStatusTip(translate('OpenLP.MainWindow',
'Toggle the visibility of the theme manager.')) 'Toggle the visibility of the theme manager.'))
self.ViewServiceManagerItem.setText( self.viewServiceManagerItem.setText(
translate('OpenLP.MainWindow', '&Service Manager')) translate('OpenLP.MainWindow', '&Service Manager'))
self.ViewServiceManagerItem.setToolTip( self.viewServiceManagerItem.setToolTip(
translate('OpenLP.MainWindow', 'Toggle Service Manager')) translate('OpenLP.MainWindow', 'Toggle Service Manager'))
self.ViewServiceManagerItem.setStatusTip(translate('OpenLP.MainWindow', self.viewServiceManagerItem.setStatusTip(translate('OpenLP.MainWindow',
'Toggle the visibility of the service manager.')) 'Toggle the visibility of the service manager.'))
self.ViewPreviewPanel.setText( self.viewPreviewPanel.setText(
translate('OpenLP.MainWindow', '&Preview Panel')) translate('OpenLP.MainWindow', '&Preview Panel'))
self.ViewPreviewPanel.setToolTip( self.viewPreviewPanel.setToolTip(
translate('OpenLP.MainWindow', 'Toggle Preview Panel')) translate('OpenLP.MainWindow', 'Toggle Preview Panel'))
self.ViewPreviewPanel.setStatusTip(translate('OpenLP.MainWindow', self.viewPreviewPanel.setStatusTip(translate('OpenLP.MainWindow',
'Toggle the visibility of the preview panel.')) 'Toggle the visibility of the preview panel.'))
self.ViewLivePanel.setText( self.viewLivePanel.setText(
translate('OpenLP.MainWindow', '&Live Panel')) translate('OpenLP.MainWindow', '&Live Panel'))
self.ViewLivePanel.setToolTip( self.viewLivePanel.setToolTip(
translate('OpenLP.MainWindow', 'Toggle Live Panel')) translate('OpenLP.MainWindow', 'Toggle Live Panel'))
self.ViewLivePanel.setStatusTip(translate('OpenLP.MainWindow', self.viewLivePanel.setStatusTip(translate('OpenLP.MainWindow',
'Toggle the visibility of the live panel.')) 'Toggle the visibility of the live panel.'))
self.settingsPluginListItem.setText(translate('OpenLP.MainWindow', self.settingsPluginListItem.setText(translate('OpenLP.MainWindow',
'&Plugin List')) '&Plugin List'))
self.settingsPluginListItem.setStatusTip( self.settingsPluginListItem.setStatusTip(
translate('OpenLP.MainWindow', 'List the Plugins')) translate('OpenLP.MainWindow', 'List the Plugins'))
self.HelpDocumentationItem.setText( self.helpDocumentationItem.setText(
translate('OpenLP.MainWindow', '&User Guide')) translate('OpenLP.MainWindow', '&User Guide'))
self.HelpAboutItem.setText(translate('OpenLP.MainWindow', '&About')) self.helpAboutItem.setText(translate('OpenLP.MainWindow', '&About'))
self.HelpAboutItem.setStatusTip( self.helpAboutItem.setStatusTip(
translate('OpenLP.MainWindow', 'More information about OpenLP')) translate('OpenLP.MainWindow', 'More information about OpenLP'))
self.HelpOnlineHelpItem.setText( self.helpOnlineHelpItem.setText(
translate('OpenLP.MainWindow', '&Online Help')) translate('OpenLP.MainWindow', '&Online Help'))
# Uncomment after 1.9.5 beta string freeze
#self.HelpOnlineHelpItem.setShortcut(
# translate('OpenLP.MainWindow', 'F1'))
self.helpWebSiteItem.setText( self.helpWebSiteItem.setText(
translate('OpenLP.MainWindow', '&Web Site')) translate('OpenLP.MainWindow', '&Web Site'))
for item in self.LanguageGroup.actions(): for item in self.languageGroup.actions():
item.setText(item.objectName()) item.setText(item.objectName())
item.setStatusTip(unicode(translate('OpenLP.MainWindow', item.setStatusTip(unicode(translate('OpenLP.MainWindow',
'Set the interface language to %s')) % item.objectName()) 'Set the interface language to %s')) % item.objectName())
self.AutoLanguageItem.setText( self.autoLanguageItem.setText(
translate('OpenLP.MainWindow', '&Autodetect')) translate('OpenLP.MainWindow', '&Autodetect'))
self.AutoLanguageItem.setStatusTip(translate('OpenLP.MainWindow', self.autoLanguageItem.setStatusTip(translate('OpenLP.MainWindow',
'Use the system language, if available.')) 'Use the system language, if available.'))
self.ToolsAddToolItem.setText( self.toolsAddToolItem.setText(
translate('OpenLP.MainWindow', 'Add &Tool...')) translate('OpenLP.MainWindow', 'Add &Tool...'))
self.ToolsAddToolItem.setStatusTip(translate('OpenLP.MainWindow', self.toolsAddToolItem.setStatusTip(translate('OpenLP.MainWindow',
'Add an application to the list of tools.')) 'Add an application to the list of tools.'))
self.ToolsOpenDataFolder.setText( self.toolsOpenDataFolder.setText(
translate('OpenLP.MainWindow', 'Open &Data Folder...')) translate('OpenLP.MainWindow', 'Open &Data Folder...'))
self.ToolsOpenDataFolder.setStatusTip(translate('OpenLP.MainWindow', self.toolsOpenDataFolder.setStatusTip(translate('OpenLP.MainWindow',
'Open the folder where songs, bibles and other data resides.')) 'Open the folder where songs, bibles and other data resides.'))
self.updateThemeImages.setText( self.updateThemeImages.setText(
translate('OpenLP.MainWindow', 'Update Theme Images')) translate('OpenLP.MainWindow', 'Update Theme Images'))
self.updateThemeImages.setStatusTip( self.updateThemeImages.setStatusTip(
translate('OpenLP.MainWindow', 'Update the preview images for all ' translate('OpenLP.MainWindow', 'Update the preview images for all '
'themes.')) 'themes.'))
self.ModeDefaultItem.setText( self.modeDefaultItem.setText(
translate('OpenLP.MainWindow', '&Default')) translate('OpenLP.MainWindow', '&Default'))
self.ModeDefaultItem.setStatusTip(translate('OpenLP.MainWindow', self.modeDefaultItem.setStatusTip(translate('OpenLP.MainWindow',
'Set the view mode back to the default.')) 'Set the view mode back to the default.'))
self.ModeSetupItem.setText(translate('OpenLP.MainWindow', '&Setup')) self.modeSetupItem.setText(translate('OpenLP.MainWindow', '&Setup'))
self.ModeSetupItem.setStatusTip( self.modeSetupItem.setStatusTip(
translate('OpenLP.MainWindow', 'Set the view mode to Setup.')) translate('OpenLP.MainWindow', 'Set the view mode to Setup.'))
self.ModeLiveItem.setText(translate('OpenLP.MainWindow', '&Live')) self.modeLiveItem.setText(translate('OpenLP.MainWindow', '&Live'))
self.ModeLiveItem.setStatusTip( self.modeLiveItem.setStatusTip(
translate('OpenLP.MainWindow', 'Set the view mode to Live.')) translate('OpenLP.MainWindow', 'Set the view mode to Live.'))
@ -492,42 +492,40 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
self.updateFileMenu() self.updateFileMenu()
self.pluginForm = PluginForm(self) self.pluginForm = PluginForm(self)
# Set up signals and slots # Set up signals and slots
QtCore.QObject.connect(self.ImportThemeItem, QtCore.QObject.connect(self.importThemeItem,
QtCore.SIGNAL(u'triggered()'), QtCore.SIGNAL(u'triggered()'),
self.themeManagerContents.onImportTheme) self.themeManagerContents.onImportTheme)
QtCore.QObject.connect(self.ExportThemeItem, QtCore.QObject.connect(self.exportThemeItem,
QtCore.SIGNAL(u'triggered()'), QtCore.SIGNAL(u'triggered()'),
self.themeManagerContents.onExportTheme) self.themeManagerContents.onExportTheme)
QtCore.QObject.connect(self.mediaManagerDock, QtCore.QObject.connect(self.mediaManagerDock,
QtCore.SIGNAL(u'visibilityChanged(bool)'), QtCore.SIGNAL(u'visibilityChanged(bool)'),
self.ViewMediaManagerItem.setChecked) self.viewMediaManagerItem.setChecked)
QtCore.QObject.connect(self.serviceManagerDock, QtCore.QObject.connect(self.serviceManagerDock,
QtCore.SIGNAL(u'visibilityChanged(bool)'), QtCore.SIGNAL(u'visibilityChanged(bool)'),
self.ViewServiceManagerItem.setChecked) self.viewServiceManagerItem.setChecked)
QtCore.QObject.connect(self.themeManagerDock, QtCore.QObject.connect(self.themeManagerDock,
QtCore.SIGNAL(u'visibilityChanged(bool)'), QtCore.SIGNAL(u'visibilityChanged(bool)'),
self.ViewThemeManagerItem.setChecked) self.viewThemeManagerItem.setChecked)
QtCore.QObject.connect(self.helpWebSiteItem, QtCore.QObject.connect(self.helpWebSiteItem,
QtCore.SIGNAL(u'triggered()'), self.onHelpWebSiteClicked) QtCore.SIGNAL(u'triggered()'), self.onHelpWebSiteClicked)
QtCore.QObject.connect(self.HelpOnlineHelpItem, QtCore.QObject.connect(self.toolsOpenDataFolder,
QtCore.SIGNAL(u'triggered()'), self.onHelpOnLineHelpClicked)
QtCore.QObject.connect(self.ToolsOpenDataFolder,
QtCore.SIGNAL(u'triggered()'), self.onToolsOpenDataFolderClicked) QtCore.SIGNAL(u'triggered()'), self.onToolsOpenDataFolderClicked)
QtCore.QObject.connect(self.updateThemeImages, QtCore.QObject.connect(self.updateThemeImages,
QtCore.SIGNAL(u'triggered()'), self.onUpdateThemeImages) QtCore.SIGNAL(u'triggered()'), self.onUpdateThemeImages)
QtCore.QObject.connect(self.DisplayTagItem, QtCore.QObject.connect(self.displayTagItem,
QtCore.SIGNAL(u'triggered()'), self.onDisplayTagItemClicked) QtCore.SIGNAL(u'triggered()'), self.onDisplayTagItemClicked)
QtCore.QObject.connect(self.SettingsConfigureItem, QtCore.QObject.connect(self.settingsConfigureItem,
QtCore.SIGNAL(u'triggered()'), self.onSettingsConfigureItemClicked) QtCore.SIGNAL(u'triggered()'), self.onSettingsConfigureItemClicked)
QtCore.QObject.connect(self.SettingsShortcutsItem, QtCore.QObject.connect(self.settingsShortcutsItem,
QtCore.SIGNAL(u'triggered()'), self.onSettingsShortcutsItemClicked) QtCore.SIGNAL(u'triggered()'), self.onSettingsShortcutsItemClicked)
# i18n set signals for languages # i18n set signals for languages
self.LanguageGroup.triggered.connect(LanguageManager.set_language) self.languageGroup.triggered.connect(LanguageManager.set_language)
QtCore.QObject.connect(self.ModeDefaultItem, QtCore.QObject.connect(self.modeDefaultItem,
QtCore.SIGNAL(u'triggered()'), self.onModeDefaultItemClicked) QtCore.SIGNAL(u'triggered()'), self.onModeDefaultItemClicked)
QtCore.QObject.connect(self.ModeSetupItem, QtCore.QObject.connect(self.modeSetupItem,
QtCore.SIGNAL(u'triggered()'), self.onModeSetupItemClicked) QtCore.SIGNAL(u'triggered()'), self.onModeSetupItemClicked)
QtCore.QObject.connect(self.ModeLiveItem, QtCore.QObject.connect(self.modeLiveItem,
QtCore.SIGNAL(u'triggered()'), self.onModeLiveItemClicked) QtCore.SIGNAL(u'triggered()'), self.onModeLiveItemClicked)
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'theme_update_global'), self.defaultThemeChanged) QtCore.SIGNAL(u'theme_update_global'), self.defaultThemeChanged)
@ -539,6 +537,9 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
QtCore.SIGNAL(u'config_screen_changed'), self.screenChanged) QtCore.SIGNAL(u'config_screen_changed'), self.screenChanged)
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'maindisplay_status_text'), self.showStatusMessage) QtCore.SIGNAL(u'maindisplay_status_text'), self.showStatusMessage)
# Media Manager
QtCore.QObject.connect(self.mediaToolBox,
QtCore.SIGNAL(u'currentChanged(int)'), self.onMediaToolBoxChanged)
Receiver.send_message(u'cursor_busy') Receiver.send_message(u'cursor_busy')
# Simple message boxes # Simple message boxes
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.QObject.connect(Receiver.get_receiver(),
@ -553,13 +554,13 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
# ThemeManager needs to call Renderer # ThemeManager needs to call Renderer
self.renderer = Renderer(self.image_manager, self.themeManagerContents) self.renderer = Renderer(self.image_manager, self.themeManagerContents)
# Define the media Dock Manager # Define the media Dock Manager
self.mediaDockManager = MediaDockManager(self.MediaToolBox) self.mediaDockManager = MediaDockManager(self.mediaToolBox)
log.info(u'Load Plugins') log.info(u'Load Plugins')
# make the controllers available to the plugins # make the controllers available to the plugins
self.pluginHelpers[u'preview'] = self.previewController self.pluginHelpers[u'preview'] = self.previewController
self.pluginHelpers[u'live'] = self.liveController self.pluginHelpers[u'live'] = self.liveController
self.pluginHelpers[u'renderer'] = self.renderer self.pluginHelpers[u'renderer'] = self.renderer
self.pluginHelpers[u'service'] = self.ServiceManagerContents self.pluginHelpers[u'service'] = self.serviceManagerContents
self.pluginHelpers[u'settings form'] = self.settingsForm self.pluginHelpers[u'settings form'] = self.settingsForm
self.pluginHelpers[u'toolbox'] = self.mediaDockManager self.pluginHelpers[u'toolbox'] = self.mediaDockManager
self.pluginHelpers[u'pluginmanager'] = self.pluginManager self.pluginHelpers[u'pluginmanager'] = self.pluginManager
@ -575,11 +576,11 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
self.pluginManager.hook_media_manager(self.mediaDockManager) self.pluginManager.hook_media_manager(self.mediaDockManager)
# Call the hook method to pull in import menus. # Call the hook method to pull in import menus.
log.info(u'hook menus') log.info(u'hook menus')
self.pluginManager.hook_import_menu(self.FileImportMenu) self.pluginManager.hook_import_menu(self.fileImportMenu)
# Call the hook method to pull in export menus. # Call the hook method to pull in export menus.
self.pluginManager.hook_export_menu(self.FileExportMenu) self.pluginManager.hook_export_menu(self.fileExportMenu)
# Call the hook method to pull in tools menus. # Call the hook method to pull in tools menus.
self.pluginManager.hook_tools_menu(self.ToolsMenu) self.pluginManager.hook_tools_menu(self.toolsMenu)
# Call the initialise method to setup plugins. # Call the initialise method to setup plugins.
log.info(u'initialise plugins') log.info(u'initialise plugins')
self.pluginManager.initialise_plugins() self.pluginManager.initialise_plugins()
@ -592,7 +593,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
savedPlugin = QtCore.QSettings().value( savedPlugin = QtCore.QSettings().value(
u'advanced/current media plugin', QtCore.QVariant()).toInt()[0] u'advanced/current media plugin', QtCore.QVariant()).toInt()[0]
if savedPlugin != -1: if savedPlugin != -1:
self.MediaToolBox.setCurrentIndex(savedPlugin) self.mediaToolBox.setCurrentIndex(savedPlugin)
self.settingsForm.postSetUp() self.settingsForm.postSetUp()
# Once all components are initialised load the Themes # Once all components are initialised load the Themes
log.info(u'Load Themes') log.info(u'Load Themes')
@ -600,9 +601,14 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
Receiver.send_message(u'cursor_normal') Receiver.send_message(u'cursor_normal')
def setAutoLanguage(self, value): def setAutoLanguage(self, value):
self.LanguageGroup.setDisabled(value) self.languageGroup.setDisabled(value)
LanguageManager.auto_language = value LanguageManager.auto_language = value
LanguageManager.set_language(self.LanguageGroup.checkedAction()) LanguageManager.set_language(self.languageGroup.checkedAction())
def onMediaToolBoxChanged(self, index):
widget = self.mediaToolBox.widget(index)
if widget:
widget.onFocus()
def versionNotice(self, version): def versionNotice(self, version):
""" """
@ -629,21 +635,21 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
args = [] args = []
for a in self.arguments: for a in self.arguments:
args.extend([a]) args.extend([a])
self.ServiceManagerContents.loadFile(unicode(args[0])) self.serviceManagerContents.loadFile(unicode(args[0]))
elif QtCore.QSettings().value( elif QtCore.QSettings().value(
self.generalSettingsSection + u'/auto open', self.generalSettingsSection + u'/auto open',
QtCore.QVariant(False)).toBool(): QtCore.QVariant(False)).toBool():
self.ServiceManagerContents.loadLastFile() self.serviceManagerContents.loadLastFile()
view_mode = QtCore.QSettings().value(u'%s/view mode' % \ view_mode = QtCore.QSettings().value(u'%s/view mode' % \
self.generalSettingsSection, u'default') self.generalSettingsSection, u'default')
if view_mode == u'default': if view_mode == u'default':
self.ModeDefaultItem.setChecked(True) self.modeDefaultItem.setChecked(True)
elif view_mode == u'setup': elif view_mode == u'setup':
self.setViewMode(True, True, False, True, False) self.setViewMode(True, True, False, True, False)
self.ModeSetupItem.setChecked(True) self.modeSetupItem.setChecked(True)
elif view_mode == u'live': elif view_mode == u'live':
self.setViewMode(False, True, False, False, True) self.setViewMode(False, True, False, False, True)
self.ModeLiveItem.setChecked(True) self.modeLiveItem.setChecked(True)
def firstTime(self): def firstTime(self):
# Import themes if first time # Import themes if first time
@ -696,7 +702,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
import webbrowser import webbrowser
webbrowser.open_new(u'http://openlp.org/') webbrowser.open_new(u'http://openlp.org/')
def onHelpOnLineHelpClicked(self): def onHelpOnlineHelpClicked(self):
""" """
Load the online OpenLP manual Load the online OpenLP manual
""" """
@ -807,10 +813,10 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
""" """
Hook to close the main window and display windows on exit Hook to close the main window and display windows on exit
""" """
if self.ServiceManagerContents.isModified(): if self.serviceManagerContents.isModified():
ret = self.ServiceManagerContents.saveModifiedService() ret = self.serviceManagerContents.saveModifiedService()
if ret == QtGui.QMessageBox.Save: if ret == QtGui.QMessageBox.Save:
if self.ServiceManagerContents.saveFile(): if self.serviceManagerContents.saveFile():
self.cleanUp() self.cleanUp()
event.accept() event.accept()
else: else:
@ -845,11 +851,11 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
Runs all the cleanup code before OpenLP shuts down Runs all the cleanup code before OpenLP shuts down
""" """
# Clean temporary files used by services # Clean temporary files used by services
self.ServiceManagerContents.cleanUp() self.serviceManagerContents.cleanUp()
if QtCore.QSettings().value(u'advanced/save current plugin', if QtCore.QSettings().value(u'advanced/save current plugin',
QtCore.QVariant(False)).toBool(): QtCore.QVariant(False)).toBool():
QtCore.QSettings().setValue(u'advanced/current media plugin', QtCore.QSettings().setValue(u'advanced/current media plugin',
QtCore.QVariant(self.MediaToolBox.currentIndex())) QtCore.QVariant(self.mediaToolBox.currentIndex()))
# Call the cleanup method to shutdown plugins. # Call the cleanup method to shutdown plugins.
log.info(u'cleanup plugins') log.info(u'cleanup plugins')
self.pluginManager.finalise_plugins() self.pluginManager.finalise_plugins()
@ -927,7 +933,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
self.previewController.panel.setVisible(visible) self.previewController.panel.setVisible(visible)
QtCore.QSettings().setValue(u'user interface/preview panel', QtCore.QSettings().setValue(u'user interface/preview panel',
QtCore.QVariant(visible)) QtCore.QVariant(visible))
self.ViewPreviewPanel.setChecked(visible) self.viewPreviewPanel.setChecked(visible)
def setLivePanelVisibility(self, visible): def setLivePanelVisibility(self, visible):
""" """
@ -942,7 +948,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
self.liveController.panel.setVisible(visible) self.liveController.panel.setVisible(visible)
QtCore.QSettings().setValue(u'user interface/live panel', QtCore.QSettings().setValue(u'user interface/live panel',
QtCore.QVariant(visible)) QtCore.QVariant(visible))
self.ViewLivePanel.setChecked(visible) self.viewLivePanel.setChecked(visible)
def loadSettings(self): def loadSettings(self):
""" """
@ -987,13 +993,13 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
""" """
recentFileCount = QtCore.QSettings().value( recentFileCount = QtCore.QSettings().value(
u'advanced/recent file count', QtCore.QVariant(4)).toInt()[0] u'advanced/recent file count', QtCore.QVariant(4)).toInt()[0]
self.FileMenu.clear() self.fileMenu.clear()
add_actions(self.FileMenu, self.FileMenuActions[:-1]) add_actions(self.fileMenu, self.fileMenuActions[:-1])
existingRecentFiles = [recentFile for recentFile in self.recentFiles existingRecentFiles = [recentFile for recentFile in self.recentFiles
if QtCore.QFile.exists(recentFile)] if QtCore.QFile.exists(recentFile)]
recentFilesToDisplay = existingRecentFiles[0:recentFileCount] recentFilesToDisplay = existingRecentFiles[0:recentFileCount]
if recentFilesToDisplay: if recentFilesToDisplay:
self.FileMenu.addSeparator() self.fileMenu.addSeparator()
for fileId, filename in enumerate(recentFilesToDisplay): for fileId, filename in enumerate(recentFilesToDisplay):
log.debug('Recent file name: %s', filename) log.debug('Recent file name: %s', filename)
action = base_action(self, u'') action = base_action(self, u'')
@ -1001,10 +1007,10 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
(fileId + 1, QtCore.QFileInfo(filename).fileName())) (fileId + 1, QtCore.QFileInfo(filename).fileName()))
action.setData(QtCore.QVariant(filename)) action.setData(QtCore.QVariant(filename))
self.connect(action, QtCore.SIGNAL(u'triggered()'), self.connect(action, QtCore.SIGNAL(u'triggered()'),
self.ServiceManagerContents.onRecentServiceClicked) self.serviceManagerContents.onRecentServiceClicked)
self.FileMenu.addAction(action) self.fileMenu.addAction(action)
self.FileMenu.addSeparator() self.fileMenu.addSeparator()
self.FileMenu.addAction(self.FileMenuActions[-1]) self.fileMenu.addAction(self.fileMenuActions[-1])
def addRecentFile(self, filename): def addRecentFile(self, filename):
""" """

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -85,4 +86,4 @@ class Ui_PluginViewDialog(object):
self.statusComboBox.setItemText(0, self.statusComboBox.setItemText(0,
translate('OpenLP.PluginForm', 'Active')) translate('OpenLP.PluginForm', 'Active'))
self.statusComboBox.setItemText(1, self.statusComboBox.setItemText(1,
translate('OpenLP.PluginForm', 'Inactive')) translate('OpenLP.PluginForm', 'Inactive'))

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -675,8 +676,18 @@ class ServiceManager(QtGui.QWidget):
.is_capable(ItemCapabilities.AllowsVariableStartTime): .is_capable(ItemCapabilities.AllowsVariableStartTime):
self.timeAction.setVisible(True) self.timeAction.setVisible(True)
self.themeMenu.menuAction().setVisible(False) self.themeMenu.menuAction().setVisible(False)
if serviceItem[u'service_item'].is_text(): # Set up the theme menu.
if serviceItem[u'service_item'].is_text() and \
self.mainwindow.renderer.theme_level == ThemeLevel.Song:
self.themeMenu.menuAction().setVisible(True) self.themeMenu.menuAction().setVisible(True)
# The service item does not have a theme, check the "Default".
if serviceItem[u'service_item'].theme is None:
themeAction = self.themeMenu.defaultAction()
else:
themeAction = self.themeMenu.findChild(
QtGui.QAction, serviceItem[u'service_item'].theme)
if themeAction is not None:
themeAction.setChecked(True)
action = self.menu.exec_(self.serviceManagerList.mapToGlobal(point)) action = self.menu.exec_(self.serviceManagerList.mapToGlobal(point))
def onServiceItemNoteForm(self): def onServiceItemNoteForm(self):
@ -1108,6 +1119,7 @@ class ServiceManager(QtGui.QWidget):
""" """
Send the current item to the Preview slide controller Send the current item to the Preview slide controller
""" """
Receiver.send_message(u'cursor_busy')
item, child = self.findServiceItem() item, child = self.findServiceItem()
if self.serviceItems[item][u'service_item'].is_valid: if self.serviceItems[item][u'service_item'].is_valid:
self.mainwindow.previewController.addServiceManagerItem( self.mainwindow.previewController.addServiceManagerItem(
@ -1117,6 +1129,7 @@ class ServiceManager(QtGui.QWidget):
translate('OpenLP.ServiceManager', 'Missing Display Handler'), translate('OpenLP.ServiceManager', 'Missing Display Handler'),
translate('OpenLP.ServiceManager', 'Your item cannot be ' translate('OpenLP.ServiceManager', 'Your item cannot be '
'displayed as there is no handler to display it')) 'displayed as there is no handler to display it'))
Receiver.send_message(u'cursor_normal')
def getServiceItem(self): def getServiceItem(self):
""" """
@ -1149,6 +1162,7 @@ class ServiceManager(QtGui.QWidget):
return return
if row != -1: if row != -1:
child = row child = row
Receiver.send_message(u'cursor_busy')
if self.serviceItems[item][u'service_item'].is_valid: if self.serviceItems[item][u'service_item'].is_valid:
self.mainwindow.liveController.addServiceManagerItem( self.mainwindow.liveController.addServiceManagerItem(
self.serviceItems[item][u'service_item'], child) self.serviceItems[item][u'service_item'], child)
@ -1168,6 +1182,7 @@ class ServiceManager(QtGui.QWidget):
translate('OpenLP.ServiceManager', 'Your item cannot be ' translate('OpenLP.ServiceManager', 'Your item cannot be '
'displayed as the plugin required to display it is missing ' 'displayed as the plugin required to display it is missing '
'or inactive')) 'or inactive'))
Receiver.send_message(u'cursor_normal')
def remoteEdit(self): def remoteEdit(self):
""" """
@ -1275,16 +1290,33 @@ class ServiceManager(QtGui.QWidget):
self.themeComboBox.clear() self.themeComboBox.clear()
self.themeMenu.clear() self.themeMenu.clear()
self.themeComboBox.addItem(u'') self.themeComboBox.addItem(u'')
themeGroup = QtGui.QActionGroup(self.themeMenu)
themeGroup.setExclusive(True)
themeGroup.setObjectName(u'themeGroup')
# Create a "Default" theme, which allows the user to reset the item's
# theme to the service theme or global theme.
defaultTheme = context_menu_action(self.themeMenu, None,
UiStrings().Default, self.onThemeChangeAction)
defaultTheme.setCheckable(True)
self.themeMenu.setDefaultAction(defaultTheme)
themeGroup.addAction(defaultTheme)
context_menu_separator(self.themeMenu)
for theme in theme_list: for theme in theme_list:
self.themeComboBox.addItem(theme) self.themeComboBox.addItem(theme)
context_menu_action(self.themeMenu, None, theme, themeAction = context_menu_action(self.themeMenu, None, theme,
self.onThemeChangeAction) self.onThemeChangeAction)
themeAction.setObjectName(theme)
themeAction.setCheckable(True)
themeGroup.addAction(themeAction)
find_and_set_in_combo_box(self.themeComboBox, self.service_theme) find_and_set_in_combo_box(self.themeComboBox, self.service_theme)
self.mainwindow.renderer.set_service_theme(self.service_theme) self.mainwindow.renderer.set_service_theme(self.service_theme)
self.regenerateServiceItems() self.regenerateServiceItems()
def onThemeChangeAction(self): def onThemeChangeAction(self):
theme = unicode(self.sender().text()) theme = unicode(self.sender().objectName())
# No object name means that the "Default" theme is supposed to be used.
if not theme:
theme = None
item = self.findServiceItem()[0] item = self.findServiceItem()[0]
self.serviceItems[item][u'service_item'].theme = theme self.serviceItems[item][u'service_item'].theme = theme
self.regenerateServiceItems() self.regenerateServiceItems()

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -54,7 +55,7 @@ class Ui_ShortcutListDialog(object):
self.shortcutListLayout.setObjectName(u'shortcutListLayout') self.shortcutListLayout.setObjectName(u'shortcutListLayout')
self.descriptionLabel = QtGui.QLabel(shortcutListDialog) self.descriptionLabel = QtGui.QLabel(shortcutListDialog)
self.descriptionLabel.setObjectName(u'descriptionLabel') self.descriptionLabel.setObjectName(u'descriptionLabel')
self.descriptionLabel.setWordWrap(True) self.descriptionLabel.setWordWrap(True)
self.shortcutListLayout.addWidget(self.descriptionLabel) self.shortcutListLayout.addWidget(self.descriptionLabel)
self.treeWidget = QtGui.QTreeWidget(shortcutListDialog) self.treeWidget = QtGui.QTreeWidget(shortcutListDialog)
self.treeWidget.setObjectName(u'treeWidget') self.treeWidget.setObjectName(u'treeWidget')

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -199,7 +200,7 @@ class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog):
if not self.primaryPushButton.text(): if not self.primaryPushButton.text():
# When we do not have a primary shortcut, the just entered alternate # When we do not have a primary shortcut, the just entered alternate
# shortcut will automatically become the primary shortcut. That is # shortcut will automatically become the primary shortcut. That is
# why we have to adjust the primary button's text. # why we have to adjust the primary button's text.
self.primaryPushButton.setText(self.alternatePushButton.text()) self.primaryPushButton.setText(self.alternatePushButton.text())
self.alternatePushButton.setText(u'') self.alternatePushButton.setText(u'')
self.refreshShortcutList() self.refreshShortcutList()

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -139,14 +140,14 @@ class SlideController(QtGui.QWidget):
self.previousItem = self.toolbar.addToolbarButton( self.previousItem = self.toolbar.addToolbarButton(
translate('OpenLP.SlideController', 'Previous Slide'), translate('OpenLP.SlideController', 'Previous Slide'),
u':/slides/slide_previous.png', u':/slides/slide_previous.png',
translate('OpenLP.SlideController', 'Move to previous'), translate('OpenLP.SlideController', 'Move to previous.'),
self.onSlideSelectedPrevious, self.onSlideSelectedPrevious,
shortcuts=[QtCore.Qt.Key_Up, QtCore.Qt.Key_PageUp], shortcuts=[QtCore.Qt.Key_Up, QtCore.Qt.Key_PageUp],
context=QtCore.Qt.WidgetWithChildrenShortcut) context=QtCore.Qt.WidgetWithChildrenShortcut)
self.nextItem = self.toolbar.addToolbarButton( self.nextItem = self.toolbar.addToolbarButton(
translate('OpenLP.SlideController', 'Next Slide'), translate('OpenLP.SlideController', 'Next Slide'),
u':/slides/slide_next.png', u':/slides/slide_next.png',
translate('OpenLP.SlideController', 'Move to next'), translate('OpenLP.SlideController', 'Move to next.'),
self.onSlideSelectedNext, self.onSlideSelectedNext,
shortcuts=[QtCore.Qt.Key_Down, QtCore.Qt.Key_PageDown], shortcuts=[QtCore.Qt.Key_Down, QtCore.Qt.Key_PageDown],
context=QtCore.Qt.WidgetWithChildrenShortcut) context=QtCore.Qt.WidgetWithChildrenShortcut)
@ -182,15 +183,17 @@ class SlideController(QtGui.QWidget):
startLoop = self.toolbar.addToolbarButton( startLoop = self.toolbar.addToolbarButton(
# Does not need translating - control string. # Does not need translating - control string.
u'Start Loop', u':/media/media_time.png', u'Start Loop', u':/media/media_time.png',
translate('OpenLP.SlideController', 'Start continuous loop'), translate('OpenLP.SlideController', 'Enable timed slides.'),
self.onStartLoop) self.onStartLoop)
startLoop.setObjectName(u'startLoop')
action_list = ActionList.get_instance() action_list = ActionList.get_instance()
action_list.add_action(startLoop, UiStrings().LiveToolbar) action_list.add_action(startLoop, UiStrings().LiveToolbar)
stopLoop = self.toolbar.addToolbarButton( stopLoop = self.toolbar.addToolbarButton(
# Does not need translating - control string. # Does not need translating - control string.
u'Stop Loop', u':/media/media_stop.png', u'Stop Loop', u':/media/media_stop.png',
translate('OpenLP.SlideController', 'Stop continuous loop'), translate('OpenLP.SlideController', 'Stop timed slides.'),
self.onStopLoop) self.onStopLoop)
stopLoop.setObjectName(u'stopLoop')
action_list.add_action(stopLoop, UiStrings().LiveToolbar) action_list.add_action(stopLoop, UiStrings().LiveToolbar)
self.toogleLoop = shortcut_action(self, u'toogleLoop', self.toogleLoop = shortcut_action(self, u'toogleLoop',
[QtGui.QKeySequence(u'L')], self.onToggleLoop, [QtGui.QKeySequence(u'L')], self.onToggleLoop,
@ -203,39 +206,39 @@ class SlideController(QtGui.QWidget):
self.toolbar.addToolbarWidget(u'Image SpinBox', self.delaySpinBox) self.toolbar.addToolbarWidget(u'Image SpinBox', self.delaySpinBox)
self.delaySpinBox.setSuffix(UiStrings().Seconds) self.delaySpinBox.setSuffix(UiStrings().Seconds)
self.delaySpinBox.setToolTip(translate('OpenLP.SlideController', self.delaySpinBox.setToolTip(translate('OpenLP.SlideController',
'Delay between slides in seconds')) 'Delay between slides in seconds.'))
else: else:
self.toolbar.addToolbarButton( self.toolbar.addToolbarButton(
# Does not need translating - control string. # Does not need translating - control string.
u'Go Live', u':/general/general_live.png', u'Go Live', u':/general/general_live.png',
translate('OpenLP.SlideController', 'Move to live'), translate('OpenLP.SlideController', 'Move to live.'),
self.onGoLive) self.onGoLive)
self.toolbar.addToolbarButton( self.toolbar.addToolbarButton(
# Does not need translating - control string. # Does not need translating - control string.
u'Add to Service', u':/general/general_add.png', u'Add to Service', u':/general/general_add.png',
translate('OpenLP.SlideController', 'Add to Service'), translate('OpenLP.SlideController', 'Add to Service.'),
self.onPreviewAddToService) self.onPreviewAddToService)
self.toolbar.addToolbarSeparator(u'Close Separator') self.toolbar.addToolbarSeparator(u'Close Separator')
self.toolbar.addToolbarButton( self.toolbar.addToolbarButton(
# Does not need translating - control string. # Does not need translating - control string.
u'Edit Song', u':/general/general_edit.png', u'Edit Song', u':/general/general_edit.png',
translate('OpenLP.SlideController', translate('OpenLP.SlideController',
'Edit and reload song preview'), 'Edit and reload song preview.'),
self.onEditSong) self.onEditSong)
self.controllerLayout.addWidget(self.toolbar) self.controllerLayout.addWidget(self.toolbar)
# Build a Media ToolBar # Build a Media ToolBar
self.mediabar = OpenLPToolbar(self) self.mediabar = OpenLPToolbar(self)
self.mediabar.addToolbarButton( self.mediabar.addToolbarButton(
u'Media Start', u':/slides/media_playback_start.png', u'Media Start', u':/slides/media_playback_start.png',
translate('OpenLP.SlideController', 'Start playing media'), translate('OpenLP.SlideController', 'Start playing media.'),
self.onMediaPlay) self.onMediaPlay)
self.mediabar.addToolbarButton( self.mediabar.addToolbarButton(
u'Media Pause', u':/slides/media_playback_pause.png', u'Media Pause', u':/slides/media_playback_pause.png',
translate('OpenLP.SlideController', 'Start playing media'), translate('OpenLP.SlideController', 'Start playing media.'),
self.onMediaPause) self.onMediaPause)
self.mediabar.addToolbarButton( self.mediabar.addToolbarButton(
u'Media Stop', u':/slides/media_playback_stop.png', u'Media Stop', u':/slides/media_playback_stop.png',
translate('OpenLP.SlideController', 'Start playing media'), translate('OpenLP.SlideController', 'Start playing media.'),
self.onMediaStop) self.onMediaStop)
if self.isLive: if self.isLive:
# Build the Song Toolbar # Build the Song Toolbar
@ -345,13 +348,6 @@ class SlideController(QtGui.QWidget):
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'slidecontroller_%s_previous' % self.typePrefix), QtCore.SIGNAL(u'slidecontroller_%s_previous' % self.typePrefix),
self.onSlideSelectedPrevious) self.onSlideSelectedPrevious)
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'slidecontroller_%s_next_noloop' % self.typePrefix),
self.onSlideSelectedNextNoloop)
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'slidecontroller_%s_previous_noloop' %
self.typePrefix),
self.onSlideSelectedPreviousNoloop)
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'slidecontroller_%s_last' % self.typePrefix), QtCore.SIGNAL(u'slidecontroller_%s_last' % self.typePrefix),
self.onSlideSelectedLast) self.onSlideSelectedLast)
@ -845,6 +841,11 @@ class SlideController(QtGui.QWidget):
Receiver.send_message(u'%s_unblank' Receiver.send_message(u'%s_unblank'
% self.serviceItem.name.lower(), % self.serviceItem.name.lower(),
[self.serviceItem, self.isLive]) [self.serviceItem, self.isLive])
else:
if hide_mode:
Receiver.send_message(u'maindisplay_hide', hide_mode)
else:
Receiver.send_message(u'maindisplay_show')
def hidePlugin(self, hide): def hidePlugin(self, hide):
""" """
@ -863,6 +864,11 @@ class SlideController(QtGui.QWidget):
Receiver.send_message(u'%s_unblank' Receiver.send_message(u'%s_unblank'
% self.serviceItem.name.lower(), % self.serviceItem.name.lower(),
[self.serviceItem, self.isLive]) [self.serviceItem, self.isLive])
else:
if hide:
Receiver.send_message(u'maindisplay_hide', HideMode.Screen)
else:
Receiver.send_message(u'maindisplay_show')
def onSlideSelected(self, start=False): def onSlideSelected(self, start=False):
""" """
@ -937,10 +943,7 @@ class SlideController(QtGui.QWidget):
rect.y(), rect.width(), rect.height()) rect.y(), rect.width(), rect.height())
self.slidePreview.setPixmap(winimg) self.slidePreview.setPixmap(winimg)
def onSlideSelectedNextNoloop(self): def onSlideSelectedNext(self):
self.onSlideSelectedNext(False)
def onSlideSelectedNext(self, loop=True):
""" """
Go to the next slide. Go to the next slide.
""" """
@ -953,18 +956,15 @@ class SlideController(QtGui.QWidget):
else: else:
row = self.previewListWidget.currentRow() + 1 row = self.previewListWidget.currentRow() + 1
if row == self.previewListWidget.rowCount(): if row == self.previewListWidget.rowCount():
if loop: if QtCore.QSettings().value(self.parent.generalSettingsSection +
u'/enable slide loop', QtCore.QVariant(True)).toBool():
row = 0 row = 0
else: else:
Receiver.send_message('servicemanager_next_item') row = self.previewListWidget.rowCount() - 1
return
self.__checkUpdateSelectedSlide(row) self.__checkUpdateSelectedSlide(row)
self.slideSelected() self.slideSelected()
def onSlideSelectedPreviousNoloop(self): def onSlideSelectedPrevious(self):
self.onSlideSelectedPrevious(False)
def onSlideSelectedPrevious(self, loop=True):
""" """
Go to the previous slide. Go to the previous slide.
""" """
@ -977,7 +977,8 @@ class SlideController(QtGui.QWidget):
else: else:
row = self.previewListWidget.currentRow() - 1 row = self.previewListWidget.currentRow() - 1
if row == -1: if row == -1:
if loop: if QtCore.QSettings().value(self.parent.generalSettingsSection +
u'/enable slide loop', QtCore.QVariant(True)).toBool():
row = self.previewListWidget.rowCount() - 1 row = self.previewListWidget.rowCount() - 1
else: else:
row = 0 row = 0
@ -1053,7 +1054,8 @@ class SlideController(QtGui.QWidget):
""" """
From the preview display request the Item to be added to service From the preview display request the Item to be added to service
""" """
self.parent.ServiceManagerContents.addServiceItem(self.serviceItem) if self.serviceItem:
self.parent.serviceManagerContents.addServiceItem(self.serviceItem)
def onGoLiveClick(self): def onGoLiveClick(self):
""" """

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -118,4 +119,4 @@ class Ui_StartTimeDialog(object):
self.secondLabel.setText(translate('OpenLP.StartTimeForm', 'Seconds:')) self.secondLabel.setText(translate('OpenLP.StartTimeForm', 'Seconds:'))
self.startLabel.setText(translate('OpenLP.StartTimeForm', 'Start')) self.startLabel.setText(translate('OpenLP.StartTimeForm', 'Start'))
self.finishLabel.setText(translate('OpenLP.StartTimeForm', 'Finish')) self.finishLabel.setText(translate('OpenLP.StartTimeForm', 'Finish'))
self.lengthLabel.setText(translate('OpenLP.StartTimeForm', 'Length')) self.lengthLabel.setText(translate('OpenLP.StartTimeForm', 'Length'))

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -28,6 +29,7 @@ import os
import zipfile import zipfile
import shutil import shutil
import logging import logging
import locale
from xml.etree.ElementTree import ElementTree, XML from xml.etree.ElementTree import ElementTree, XML
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
@ -55,8 +57,6 @@ class ThemeManager(QtGui.QWidget):
self.settingsSection = u'themes' self.settingsSection = u'themes'
self.themeForm = ThemeForm(self) self.themeForm = ThemeForm(self)
self.fileRenameForm = FileRenameForm(self) self.fileRenameForm = FileRenameForm(self)
self.serviceComboBox = \
self.mainwindow.ServiceManagerContents.themeComboBox
# start with the layout # start with the layout
self.layout = QtGui.QVBoxLayout(self) self.layout = QtGui.QVBoxLayout(self)
self.layout.setSpacing(0) self.layout.setSpacing(0)
@ -461,7 +461,10 @@ class ThemeManager(QtGui.QWidget):
QtCore.QVariant(theme.theme_name)) QtCore.QVariant(theme.theme_name))
self.configUpdated() self.configUpdated()
files = SettingsManager.get_files(self.settingsSection, u'.png') files = SettingsManager.get_files(self.settingsSection, u'.png')
files.sort() # Sort the themes by its name considering language specific characters.
# lower() is needed for windows!
files.sort(key=lambda filename: unicode(filename).lower(),
cmp=locale.strcoll)
# now process the file list of png files # now process the file list of png files
for name in files: for name in files:
# check to see file is in theme root directory # check to see file is in theme root directory

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -144,10 +145,8 @@ class ThemesTab(SettingsTab):
def save(self): def save(self):
settings = QtCore.QSettings() settings = QtCore.QSettings()
settings.beginGroup(self.settingsSection) settings.beginGroup(self.settingsSection)
settings.setValue(u'theme level', settings.setValue(u'theme level', QtCore.QVariant(self.theme_level))
QtCore.QVariant(self.theme_level)) settings.setValue(u'global theme', QtCore.QVariant(self.global_theme))
settings.setValue(u'global theme',
QtCore.QVariant(self.global_theme))
settings.endGroup() settings.endGroup()
self.mainwindow.renderer.set_global_theme( self.mainwindow.renderer.set_global_theme(
self.global_theme, self.theme_level) self.global_theme, self.theme_level)
@ -185,8 +184,7 @@ class ThemesTab(SettingsTab):
self.settingsSection + u'/global theme', self.settingsSection + u'/global theme',
QtCore.QVariant(u'')).toString()) QtCore.QVariant(u'')).toString())
self.DefaultComboBox.clear() self.DefaultComboBox.clear()
for theme in theme_list: self.DefaultComboBox.addItems(theme_list)
self.DefaultComboBox.addItem(theme)
find_and_set_in_combo_box(self.DefaultComboBox, self.global_theme) find_and_set_in_combo_box(self.DefaultComboBox, self.global_theme)
self.mainwindow.renderer.set_global_theme( self.mainwindow.renderer.set_global_theme(
self.global_theme, self.theme_level) self.global_theme, self.theme_level)

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -537,4 +538,4 @@ class Ui_ThemeWizard(object):
labelWidth = max(self.backgroundLabel.minimumSizeHint().width(), labelWidth = max(self.backgroundLabel.minimumSizeHint().width(),
self.horizontalLabel.minimumSizeHint().width()) self.horizontalLabel.minimumSizeHint().width())
self.spacer.changeSize(labelWidth, 0, self.spacer.changeSize(labelWidth, 0,
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -202,7 +203,8 @@ class ActionList(object):
Add an action to the list of actions. Add an action to the list of actions.
``action`` ``action``
The action to add (QAction). The action to add (QAction). **Note**, the action must not have an
empty ``objectName``.
``category`` ``category``
The category this action belongs to. The category can be a QString The category this action belongs to. The category can be a QString

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -122,7 +123,7 @@ class LanguageManager(object):
language = u'en' language = u'en'
if action: if action:
action_name = unicode(action.objectName()) action_name = unicode(action.objectName())
if action_name == u'AutoLanguageItem': if action_name == u'autoLanguageItem':
LanguageManager.auto_language = True LanguageManager.auto_language = True
else: else:
LanguageManager.auto_language = False LanguageManager.auto_language = False

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -67,7 +68,7 @@ class AlertsPlugin(Plugin):
self.toolsAlertItem.setStatusTip( self.toolsAlertItem.setStatusTip(
translate('AlertsPlugin', 'Show an alert message.')) translate('AlertsPlugin', 'Show an alert message.'))
self.toolsAlertItem.setShortcut(u'F7') self.toolsAlertItem.setShortcut(u'F7')
self.serviceManager.mainwindow.ToolsMenu.addAction(self.toolsAlertItem) self.serviceManager.mainwindow.toolsMenu.addAction(self.toolsAlertItem)
QtCore.QObject.connect(self.toolsAlertItem, QtCore.QObject.connect(self.toolsAlertItem,
QtCore.SIGNAL(u'triggered()'), self.onAlertsTrigger) QtCore.SIGNAL(u'triggered()'), self.onAlertsTrigger)
self.toolsAlertItem.setVisible(False) self.toolsAlertItem.setVisible(False)

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -93,7 +94,7 @@ class BiblePlugin(Plugin):
def about(self): def about(self):
about_text = translate('BiblesPlugin', '<strong>Bible Plugin</strong>' about_text = translate('BiblesPlugin', '<strong>Bible Plugin</strong>'
'<br />The Bible plugin provides the ability to display bible ' '<br />The Bible plugin provides the ability to display Bible '
'verses from different sources during the service.') 'verses from different sources during the service.')
return about_text return about_text

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -30,6 +31,7 @@ import csv
import logging import logging
import os import os
import os.path import os.path
import locale
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
@ -531,7 +533,7 @@ class BibleImportForm(OpenLPWizard):
""" """
self.webTranslationComboBox.clear() self.webTranslationComboBox.clear()
bibles = self.web_bible_list[index].keys() bibles = self.web_bible_list[index].keys()
bibles.sort() bibles.sort(cmp=locale.strcoll)
self.webTranslationComboBox.addItems(bibles) self.webTranslationComboBox.addItems(bibles)
def onOsisBrowseButtonClicked(self): def onOsisBrowseButtonClicked(self):
@ -694,7 +696,7 @@ class BibleImportForm(OpenLPWizard):
if bible_type == BibleFormat.WebDownload: if bible_type == BibleFormat.WebDownload:
self.progressLabel.setText(translate( self.progressLabel.setText(translate(
'BiblesPlugin.ImportWizardForm', 'BiblesPlugin.ImportWizardForm',
'Starting Registering bible...')) 'Registering Bible...'))
else: else:
self.progressLabel.setText(WizardStrings.StartingImport) self.progressLabel.setText(WizardStrings.StartingImport)
Receiver.send_message(u'openlp_process_events') Receiver.send_message(u'openlp_process_events')
@ -757,7 +759,7 @@ class BibleImportForm(OpenLPWizard):
if bible_type == BibleFormat.WebDownload: if bible_type == BibleFormat.WebDownload:
self.progressLabel.setText( self.progressLabel.setText(
translate('BiblesPlugin.ImportWizardForm', 'Registered ' translate('BiblesPlugin.ImportWizardForm', 'Registered '
'bible. Please note, that verses will be downloaded on\n' 'Bible. Please note, that verses will be downloaded on\n'
'demand and thus an internet connection is required.')) 'demand and thus an internet connection is required.'))
else: else:
self.progressLabel.setText(WizardStrings.FinishedImport) self.progressLabel.setText(WizardStrings.FinishedImport)
@ -765,4 +767,4 @@ class BibleImportForm(OpenLPWizard):
self.progressLabel.setText(translate( self.progressLabel.setText(translate(
'BiblesPlugin.ImportWizardForm', 'Your Bible import failed.')) 'BiblesPlugin.ImportWizardForm', 'Your Bible import failed.'))
del self.manager.db_cache[importer.name] del self.manager.db_cache[importer.name]
delete_database(self.plugin.settingsSection, importer.file) delete_database(self.plugin.settingsSection, importer.file)

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -207,4 +208,4 @@ class BiblesTab(SettingsTab):
self.bibleThemeComboBox.addItem(u'') self.bibleThemeComboBox.addItem(u'')
for theme in theme_list: for theme in theme_list:
self.bibleThemeComboBox.addItem(theme) self.bibleThemeComboBox.addItem(theme)
find_and_set_in_combo_box(self.bibleThemeComboBox, self.bible_theme) find_and_set_in_combo_box(self.bibleThemeComboBox, self.bible_theme)

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -25,6 +26,7 @@
############################################################################### ###############################################################################
import logging import logging
import locale
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
@ -271,6 +273,12 @@ class BibleMediaItem(MediaManagerItem):
QtCore.SIGNAL(u'currentChanged(int)'), QtCore.SIGNAL(u'currentChanged(int)'),
self.onSearchTabBarCurrentChanged) self.onSearchTabBarCurrentChanged)
def onFocus(self):
if self.quickTab.isVisible():
self.quickSearchEdit.setFocus()
else:
self.advancedBookComboBox.setFocus()
def configUpdated(self): def configUpdated(self):
log.debug(u'configUpdated') log.debug(u'configUpdated')
if QtCore.QSettings().value(self.settingsSection + u'/second bibles', if QtCore.QSettings().value(self.settingsSection + u'/second bibles',
@ -358,7 +366,7 @@ class BibleMediaItem(MediaManagerItem):
self.advancedSecondComboBox.addItem(u'') self.advancedSecondComboBox.addItem(u'')
# Get all bibles and sort the list. # Get all bibles and sort the list.
bibles = self.parent.manager.get_bibles().keys() bibles = self.parent.manager.get_bibles().keys()
bibles.sort() bibles.sort(cmp=locale.strcoll)
# Load the bibles into the combo boxes. # Load the bibles into the combo boxes.
for bible in bibles: for bible in bibles:
if bible: if bible:
@ -442,7 +450,7 @@ class BibleMediaItem(MediaManagerItem):
if bible: if bible:
book_data = bibles[bible].get_books() book_data = bibles[bible].get_books()
books = [book.name + u' ' for book in book_data] books = [book.name + u' ' for book in book_data]
books.sort() books.sort(cmp=locale.strcoll)
add_widget_completer(books, self.quickSearchEdit) add_widget_completer(books, self.quickSearchEdit)
def onImportClick(self): def onImportClick(self):
@ -461,6 +469,7 @@ class BibleMediaItem(MediaManagerItem):
else: else:
self.quickTab.setVisible(False) self.quickTab.setVisible(False)
self.advancedTab.setVisible(True) self.advancedTab.setVisible(True)
self.advancedBookComboBox.setFocus()
def onLockButtonToggled(self, checked): def onLockButtonToggled(self, checked):
if checked: if checked:
@ -766,6 +775,7 @@ class BibleMediaItem(MediaManagerItem):
# We have to be 'Continuous'. # We have to be 'Continuous'.
else: else:
bible_text = u'%s %s&nbsp;%s\n' % (bible_text, verse_text, text) bible_text = u'%s %s&nbsp;%s\n' % (bible_text, verse_text, text)
bible_text = bible_text.strip(u' ')
if not old_item: if not old_item:
start_item = bitem start_item = bitem
elif self.checkTitle(bitem, old_item): elif self.checkTitle(bitem, old_item):

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -26,8 +27,6 @@
import logging import logging
from forms import EditCustomForm
from openlp.core.lib import Plugin, StringContent, build_icon, translate from openlp.core.lib import Plugin, StringContent, build_icon, translate
from openlp.core.lib.db import Manager from openlp.core.lib.db import Manager
from openlp.plugins.custom.lib import CustomMediaItem, CustomTab from openlp.plugins.custom.lib import CustomMediaItem, CustomTab
@ -51,7 +50,6 @@ class CustomPlugin(Plugin):
CustomMediaItem, CustomTab) CustomMediaItem, CustomTab)
self.weight = -5 self.weight = -5
self.manager = Manager(u'custom', init_schema) self.manager = Manager(u'custom', init_schema)
self.edit_custom_form = EditCustomForm(self)
self.icon_path = u':/plugins/plugin_custom.png' self.icon_path = u':/plugins/plugin_custom.png'
self.icon = build_icon(self.icon_path) self.icon = build_icon(self.icon_path)

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -124,4 +125,4 @@ class Ui_CustomEditDialog(object):
translate('CustomPlugin.EditCustomForm', 'The&me:')) translate('CustomPlugin.EditCustomForm', 'The&me:'))
self.creditLabel.setText( self.creditLabel.setText(
translate('CustomPlugin.EditCustomForm', '&Credits:')) translate('CustomPlugin.EditCustomForm', '&Credits:'))
self.previewButton.setText(UiStrings().SaveAndPreview) self.previewButton.setText(UiStrings().SaveAndPreview)

View File

@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman # # Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael # # Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, # # Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # # Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # # Põldaru, Christian Richter, Philip Ridout, Jeffrey Smith, Maikel #
# Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # 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 # # under the terms of the GNU General Public License as published by the Free #
@ -42,13 +43,13 @@ class EditCustomForm(QtGui.QDialog, Ui_CustomEditDialog):
Class documentation goes here. Class documentation goes here.
""" """
log.info(u'Custom Editor loaded') log.info(u'Custom Editor loaded')
def __init__(self, parent): def __init__(self, parent, manager):
""" """
Constructor Constructor
""" """
QtGui.QDialog.__init__(self) QtGui.QDialog.__init__(self)
self.parent = parent self.parent = parent
self.manager = self.parent.manager self.manager = manager
self.setupUi(self) self.setupUi(self)
# Create other objects and forms. # Create other objects and forms.
self.editSlideForm = EditCustomSlideForm(self) self.editSlideForm = EditCustomSlideForm(self)
@ -114,8 +115,6 @@ class EditCustomForm(QtGui.QDialog, Ui_CustomEditDialog):
def accept(self): def accept(self):
log.debug(u'accept') log.debug(u'accept')
if self.saveCustom(): if self.saveCustom():
Receiver.send_message(u'custom_set_autoselect_item',
self.customSlide.title)
Receiver.send_message(u'custom_load_list') Receiver.send_message(u'custom_load_list')
QtGui.QDialog.accept(self) QtGui.QDialog.accept(self)
@ -137,7 +136,9 @@ class EditCustomForm(QtGui.QDialog, Ui_CustomEditDialog):
self.customSlide.text = unicode(sxml.extract_xml(), u'utf-8') self.customSlide.text = unicode(sxml.extract_xml(), u'utf-8')
self.customSlide.credits = unicode(self.creditEdit.text()) self.customSlide.credits = unicode(self.creditEdit.text())
self.customSlide.theme_name = unicode(self.themeComboBox.currentText()) self.customSlide.theme_name = unicode(self.themeComboBox.currentText())
return self.manager.save_object(self.customSlide) success = self.manager.save_object(self.customSlide)
self.parent.auto_select_id = self.customSlide.id
return success
def onUpButtonClicked(self): def onUpButtonClicked(self):
selectedRow = self.slideListView.currentRow() selectedRow = self.slideListView.currentRow()
@ -266,4 +267,4 @@ class EditCustomForm(QtGui.QDialog, Ui_CustomEditDialog):
message=translate('CustomPlugin.EditCustomForm', message=translate('CustomPlugin.EditCustomForm',
'You need to add at least one slide')) 'You need to add at least one slide'))
return False return False
return True return True

Some files were not shown because too many files have changed in this diff Show More