diff --git a/README.txt b/README.txt
index 0b26d74fc..b937e1d5f 100644
--- a/README.txt
+++ b/README.txt
@@ -8,12 +8,7 @@ page on the web site::
http://openlp.org/en/download.html
If you're looking for how to contribute to OpenLP, then please look at the
-contribution page on the web site::
-
- 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::
+OpenLP wiki::
http://wiki.openlp.org/
diff --git a/copyright.txt b/copyright.txt
index 0ef481f2b..10697a462 100644
--- a/copyright.txt
+++ b/copyright.txt
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Millar, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/documentation/manual.txt b/documentation/manual.txt
new file mode 100644
index 000000000..55a3f7d98
--- /dev/null
+++ b/documentation/manual.txt
@@ -0,0 +1,7 @@
+OpenLP Manual
+=============
+
+If you're reading this file, you're probably looking for the OpenLP manual. The
+manual is hosted online at http://manual.openlp.org/. If you want to help with
+the manual, contact the OpenLP team via IRC in the #openlp.org channel on the
+Freenode network.
diff --git a/openlp.pyw b/openlp.pyw
index 76d334bae..f796fa45f 100755
--- a/openlp.pyw
+++ b/openlp.pyw
@@ -6,10 +6,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
@@ -85,10 +86,13 @@ class OpenLP(QtGui.QApplication):
QtGui.QApplication.exec_()
self.sharedMemory.detach()
- def run(self):
+ def run(self, args):
"""
Run the OpenLP application.
"""
+ # On Windows, the args passed into the constructor are
+ # ignored. Not very handy, so set the ones we want to use.
+ self.args = args
# provide a listener for widgets to reqest a screen update.
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'openlp_process_events'), self.processEvents)
@@ -115,7 +119,7 @@ class OpenLP(QtGui.QApplication):
# make sure Qt really display the splash screen
self.processEvents()
# start the main app window
- self.mainWindow = MainWindow(self.clipboard(), self.arguments())
+ self.mainWindow = MainWindow(self.clipboard(), self.args)
self.mainWindow.show()
if show_splash:
# now kill the splashscreen
@@ -250,7 +254,7 @@ def main():
log.debug(u'Could not find default_translator.')
if not options.no_error_form:
sys.excepthook = app.hookException
- sys.exit(app.run())
+ sys.exit(app.run(qt_args))
if __name__ == u'__main__':
"""
diff --git a/openlp/__init__.py b/openlp/__init__.py
index ac3dac24c..d48d3f28a 100644
--- a/openlp/__init__.py
+++ b/openlp/__init__.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/__init__.py b/openlp/core/__init__.py
index 1cef928bc..a6c804a99 100644
--- a/openlp/core/__init__.py
+++ b/openlp/core/__init__.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py
index 27a34d54d..2d3e55355 100644
--- a/openlp/core/lib/__init__.py
+++ b/openlp/core/lib/__init__.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# 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__)
-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'',
- u'end tag': u'{/r}', u'end html': u'', u'protected': True})
-base_html_expands.append({u'desc': u'Black', u'start tag': u'{b}',
- u'start html': u'',
- u'end tag': u'{/b}', u'end html': u'', u'protected': True})
-base_html_expands.append({u'desc': u'Blue', u'start tag': u'{bl}',
- u'start html': u'',
- u'end tag': u'{/bl}', u'end html': u'', u'protected': True})
-base_html_expands.append({u'desc': u'Yellow', u'start tag': u'{y}',
- u'start html': u'',
- u'end tag': u'{/y}', u'end html': u'', u'protected': True})
-base_html_expands.append({u'desc': u'Green', u'start tag': u'{g}',
- u'start html': u'',
- u'end tag': u'{/g}', u'end html': u'', u'protected': True})
-base_html_expands.append({u'desc': u'Pink', u'start tag': u'{pk}',
- u'start html': u'',
- u'end tag': u'{/pk}', u'end html': u'', u'protected': True})
-base_html_expands.append({u'desc': u'Orange', u'start tag': u'{o}',
- u'start html': u'',
- u'end tag': u'{/o}', u'end html': u'', u'protected': True})
-base_html_expands.append({u'desc': u'Purple', u'start tag': u'{pp}',
- u'start html': u'',
- u'end tag': u'{/pp}', u'end html': u'', u'protected': True})
-base_html_expands.append({u'desc': u'White', u'start tag': u'{w}',
- u'start html': u'',
- u'end tag': u'{/w}', u'end html': u'', u'protected': True})
-base_html_expands.append({u'desc': u'Superscript', u'start tag': u'{su}',
- u'start html': u'', u'end tag': u'{/su}', u'end html': u'',
- u'protected': True})
-base_html_expands.append({u'desc': u'Subscript', u'start tag': u'{sb}',
- u'start html': u'', u'end tag': u'{/sb}', u'end html': u'',
- u'protected': True})
-base_html_expands.append({u'desc': u'Paragraph', u'start tag': u'{p}',
- u'start html': u'
' % \
(build_lyrics_format_css(self.theme_data, self.page_width,
self.page_height), build_lyrics_outline_css(self.theme_data))
@@ -335,7 +336,7 @@ class Renderer(object):
styled_text += styled_line
html = self.page_shell + styled_text + HTML_END
self.web.setHtml(html)
- # Text too long so go to next page
+ # Text too long so go to next page.
if self.web_frame.contentsSize().height() > self.page_height:
if force_page and line_count > 0:
Receiver.send_message(u'theme_line_count', line_count)
@@ -366,7 +367,7 @@ class Renderer(object):
"""
log.debug(u'_paginate_slide_words - Start')
- line_end = u''
+ line_end = u' '
if line_break:
line_end = u'
'
formatted = []
@@ -374,10 +375,11 @@ class Renderer(object):
previous_raw = u''
lines = text.split(u'\n')
for line in lines:
+ line = line.strip()
styled_line = expand_tags(line)
html = self.page_shell + previous_html + styled_line + HTML_END
self.web.setHtml(html)
- # Text too long so go to next page
+ # Text too long so go to next page.
if self.web_frame.contentsSize().height() > self.page_height:
# Check if there was a verse before the current one and append
# it, when it fits on the page.
@@ -401,24 +403,56 @@ class Renderer(object):
previous_html = styled_line + line_end
previous_raw = line + line_end
continue
- words = self._words_split(line)
- for word in words:
- styled_word = expand_tags(word)
- html = self.page_shell + previous_html + styled_word + \
- HTML_END
+ # Figure out how many words of the line will fit on screen by
+ # using the algorithm known as "binary chop".
+ raw_words = self._words_split(line)
+ html_words = [expand_tags(word) for word in raw_words]
+ smallest_index = 0
+ highest_index = len(html_words) - 1
+ index = int(highest_index / 2)
+ while True:
+ html = self.page_shell + previous_html + \
+ u''.join(html_words[:index + 1]).strip() + HTML_END
self.web.setHtml(html)
- # Text too long so go to next page
if self.web_frame.contentsSize().height() > \
self.page_height:
- while previous_raw.endswith(u'
'):
- previous_raw = previous_raw[:-4]
- formatted.append(previous_raw)
+ # We know that it does not fit, so change/calculate the
+ # new index and highest_index accordingly.
+ highest_index = index
+ index = int(index - (index - smallest_index) / 2)
+ else:
+ smallest_index = index
+ index = int(index + (highest_index - index) / 2)
+ # We found the number of words which will fit.
+ if smallest_index == index or highest_index == index:
+ index = smallest_index
+ formatted.append(previous_raw.rstrip(u'
') +
+ u''.join(raw_words[:index + 1]))
previous_html = u''
previous_raw = u''
- previous_html += styled_word
- previous_raw += word
- previous_html += line_end
- previous_raw += line_end
+ else:
+ continue
+ # Check if the rest of the line fits on the slide. If it
+ # does we do not have to do the much more intensive "word by
+ # word" checking.
+ html = self.page_shell + \
+ u''.join(html_words[index + 1:]).strip() + HTML_END
+ self.web.setHtml(html)
+ if self.web_frame.contentsSize().height() <= \
+ self.page_height:
+ previous_html = \
+ u''.join(html_words[index + 1:]).strip() + line_end
+ previous_raw = \
+ u''.join(raw_words[index + 1:]).strip() + line_end
+ break
+ else:
+ # The other words do not fit, thus reset the indexes,
+ # create a new list and continue with "word by word".
+ raw_words = raw_words[index + 1:]
+ html_words = html_words[index + 1:]
+ smallest_index = 0
+ highest_index = len(html_words) - 1
+ index = int(highest_index / 2)
else:
previous_html += styled_line + line_end
previous_raw += line + line_end
diff --git a/openlp/core/lib/searchedit.py b/openlp/core/lib/searchedit.py
index fc007227e..8c18ab09b 100644
--- a/openlp/core/lib/searchedit.py
+++ b/openlp/core/lib/searchedit.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# 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.
``identifier``
- The search type identifier (int).
+ The search type identifier (int).
"""
menu = self.menuButton.menu()
for action in menu.actions():
diff --git a/openlp/core/lib/serviceitem.py b/openlp/core/lib/serviceitem.py
index 95702f229..cf682abc6 100644
--- a/openlp/core/lib/serviceitem.py
+++ b/openlp/core/lib/serviceitem.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# 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.
"""
+import cgi
import datetime
import logging
import os
@@ -174,17 +176,19 @@ class ServiceItem(object):
formatted = self.renderer \
.format_slide(slide[u'raw_slide'], line_break, self)
for page in formatted:
+ page = page.replace(u'
', u'{br}')
+ html = expand_tags(cgi.escape(page.rstrip()))
self._display_frames.append({
u'title': clean_tags(page),
u'text': clean_tags(page.rstrip()),
- u'html': expand_tags(page.rstrip()),
+ u'html': html.replace(u' ', u' '),
u'verseTag': slide[u'verseTag']
})
elif self.service_item_type == ServiceItemType.Image or \
self.service_item_type == ServiceItemType.Command:
pass
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)
# 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
diff --git a/openlp/core/lib/settingsmanager.py b/openlp/core/lib/settingsmanager.py
index 472c66e23..7eff1c00a 100644
--- a/openlp/core/lib/settingsmanager.py
+++ b/openlp/core/lib/settingsmanager.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/lib/settingstab.py b/openlp/core/lib/settingstab.py
index 53fd37ed9..c5fd86697 100644
--- a/openlp/core/lib/settingstab.py
+++ b/openlp/core/lib/settingstab.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/lib/spelltextedit.py b/openlp/core/lib/spelltextedit.py
index a99539775..84cb30af6 100644
--- a/openlp/core/lib/spelltextedit.py
+++ b/openlp/core/lib/spelltextedit.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/lib/theme.py b/openlp/core/lib/theme.py
index 7f2204c67..b9e588f15 100644
--- a/openlp/core/lib/theme.py
+++ b/openlp/core/lib/theme.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
@@ -207,6 +208,8 @@ class ThemeXML(object):
"""
A class to encapsulate the Theme XML.
"""
+ FIRST_CAMEL_REGEX = re.compile(u'(.)([A-Z][a-z]+)')
+ SECOND_CAMEL_REGEX = re.compile(u'([a-z0-9])([A-Z])')
def __init__(self):
"""
Initialise the theme object.
@@ -581,8 +584,8 @@ class ThemeXML(object):
"""
Change Camel Case string to python string
"""
- sub_name = re.sub(u'(.)([A-Z][a-z]+)', r'\1_\2', name)
- return re.sub(u'([a-z0-9])([A-Z])', r'\1_\2', sub_name).lower()
+ sub_name = ThemeXML.FIRST_CAMEL_REGEX.sub(r'\1_\2', name)
+ return ThemeXML.SECOND_CAMEL_REGEX.sub(r'\1_\2', sub_name).lower()
def _build_xml_from_attrs(self):
"""
diff --git a/openlp/core/lib/toolbar.py b/openlp/core/lib/toolbar.py
index d2b37df51..9f9ab5197 100644
--- a/openlp/core/lib/toolbar.py
+++ b/openlp/core/lib/toolbar.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/lib/ui.py b/openlp/core/lib/ui.py
index 311c579ca..5055bb619 100644
--- a/openlp/core/lib/ui.py
+++ b/openlp/core/lib/ui.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/theme/__init__.py b/openlp/core/theme/__init__.py
index bd5ba899d..1b0999c6c 100644
--- a/openlp/core/theme/__init__.py
+++ b/openlp/core/theme/__init__.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/theme/theme.py b/openlp/core/theme/theme.py
index 78e9cb7e7..9a0bee2c2 100644
--- a/openlp/core/theme/theme.py
+++ b/openlp/core/theme/theme.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/__init__.py b/openlp/core/ui/__init__.py
index fced32a0d..1555c134c 100644
--- a/openlp/core/ui/__init__.py
+++ b/openlp/core/ui/__init__.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/aboutdialog.py b/openlp/core/ui/aboutdialog.py
index d4ea463ea..7855d2c2a 100644
--- a/openlp/core/ui/aboutdialog.py
+++ b/openlp/core/ui/aboutdialog.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# 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 '
'projection software, used to display slides of songs, Bible '
'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'
'\n'
'Find out more about OpenLP: http://openlp.org/\n'
@@ -111,9 +112,11 @@ class Ui_AboutDialog(object):
u'Michael "cocooncrash" Gorven',
u'Andreas "googol" Preikschat', u'Raoul "superfly" Snyman',
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'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'Jeffrey "whydoubt" Smith', u'Maikel Stuivenberg',
u'Frode "frodus" Woldsund']
@@ -137,7 +140,8 @@ class Ui_AboutDialog(object):
u'ja': [u'Kunio "Kunio" Nakamaru'],
u'nb': [u'Atle "pendlaren" Weibell', u'Frode "frodus" Woldsund'],
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']
}
documentors = [u'Wesley "wrst" Stout',
@@ -221,13 +225,14 @@ class Ui_AboutDialog(object):
self.aboutNotebook.setTabText(
self.aboutNotebook.indexOf(self.creditsTab),
translate('OpenLP.AboutForm', 'Credits'))
- copyright = translate('OpenLP.AboutForm',
- 'Copyright \xa9 2004-2011 Raoul Snyman\n'
- 'Portions copyright \xa9 2004-2011 '
- 'Tim Bentley, Jonathan Corwin, Michael Gorven, Scott Guerrieri,\n'
- 'Meinert Jordan, Andreas Preikschat, Christian Richter, Philip\n'
- 'Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, Carsten\n'
- 'Tinggaard, Frode Woldsund')
+ copyright = unicode(translate('OpenLP.AboutForm',
+ 'Copyright \xa9 2004-2011 %s\n'
+ 'Portions copyright \xa9 2004-2011 %s')) % (u'Raoul Snyman',
+ u'Tim Bentley, Jonathan Corwin, Michael Gorven, Gerald Britton, '
+ u'Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin K\xf6hler, '
+ u'Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias '
+ u'P\xf5ldaru, Christian Richter, Philip Ridout, Jeffrey Smith, '
+ u'Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund')
licence = translate('OpenLP.AboutForm',
'This program is free software; you can redistribute it and/or '
'modify it under the terms of the GNU General Public License as '
@@ -615,4 +620,4 @@ class Ui_AboutDialog(object):
self.aboutNotebook.indexOf(self.licenseTab),
translate('OpenLP.AboutForm', 'License'))
self.contributeButton.setText(translate('OpenLP.AboutForm',
- 'Contribute'))
\ No newline at end of file
+ 'Contribute'))
diff --git a/openlp/core/ui/aboutform.py b/openlp/core/ui/aboutform.py
index 4112cfd8f..f3e809ebc 100644
--- a/openlp/core/ui/aboutform.py
+++ b/openlp/core/ui/aboutform.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/advancedtab.py b/openlp/core/ui/advancedtab.py
index b6dd1cb27..bad1ea822 100644
--- a/openlp/core/ui/advancedtab.py
+++ b/openlp/core/ui/advancedtab.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/displaytagdialog.py b/openlp/core/ui/displaytagdialog.py
index 9bf6cb4d1..a7701d8f3 100644
--- a/openlp/core/ui/displaytagdialog.py
+++ b/openlp/core/ui/displaytagdialog.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# 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,
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem)
- self.defaultPushButton = QtGui.QPushButton(self.widget)
- self.defaultPushButton.setObjectName(u'defaultPushButton')
- self.horizontalLayout.addWidget(self.defaultPushButton)
self.deletePushButton = QtGui.QPushButton(self.widget)
self.deletePushButton.setObjectName(u'deletePushButton')
self.horizontalLayout.addWidget(self.deletePushButton)
@@ -140,8 +138,6 @@ class Ui_DisplayTagDialog(object):
self.endTagLabel.setText(
translate('OpenLP.DisplayTagDialog', 'End tag'))
self.deletePushButton.setText(UiStrings().Delete)
- self.defaultPushButton.setText(
- translate('OpenLP.DisplayTagDialog', 'Default'))
self.newPushButton.setText(UiStrings().New)
self.tagTableWidget.horizontalHeaderItem(0).setText(
translate('OpenLP.DisplayTagDialog', 'Description'))
diff --git a/openlp/core/ui/displaytagform.py b/openlp/core/ui/displaytagform.py
index c439fc116..6aaddf2b8 100644
--- a/openlp/core/ui/displaytagform.py
+++ b/openlp/core/ui/displaytagform.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# 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()
QtCore.QObject.connect(self.tagTableWidget,
QtCore.SIGNAL(u'clicked(QModelIndex)'), self.onRowSelected)
- QtCore.QObject.connect(self.defaultPushButton,
- QtCore.SIGNAL(u'pressed()'), self.onDefaultPushed)
QtCore.QObject.connect(self.newPushButton,
QtCore.SIGNAL(u'pressed()'), self.onNewPushed)
QtCore.QObject.connect(self.savePushButton,
@@ -86,8 +85,7 @@ class DisplayTagForm(QtGui.QDialog, Ui_DisplayTagDialog):
if user_expands_string:
user_tags = cPickle.loads(user_expands_string)
# If we have some user ones added them as well
- for t in user_tags:
- DisplayTags.add_html_tag(t)
+ DisplayTags.add_html_tags(user_tags)
def onRowSelected(self):
"""
@@ -127,22 +125,20 @@ class DisplayTagForm(QtGui.QDialog, Ui_DisplayTagDialog):
'Tag "n" already defined.'))
return
# Add new tag to list
- tag = {u'desc': u'New Item', u'start tag': u'{n}',
- u'start html': u'
', u'end tag': u'{/n}',
- u'end html': u'', u'protected': False}
- DisplayTags.add_html_tag(tag)
+ tag = {
+ u'desc': translate('OpenLP.DisplayTagTab', 'New Tag'),
+ u'start tag': u'{n}',
+ u'start html': translate('OpenLP.DisplayTagTab', ''),
+ u'end tag': u'{/n}',
+ u'end html': translate('OpenLP.DisplayTagTab', ''),
+ u'protected': False
+ }
+ DisplayTags.add_html_tags([tag])
self._resetTable()
# Highlight new row
self.tagTableWidget.selectRow(self.tagTableWidget.rowCount() - 1)
self.onRowSelected()
- def onDefaultPushed(self):
- """
- Remove all Custom Tags and reset to base set only.
- """
- DisplayTags.reset_html_tags()
- self._resetTable()
-
def onDeletePushed(self):
"""
Delete selected custom tag.
diff --git a/openlp/core/ui/exceptiondialog.py b/openlp/core/ui/exceptiondialog.py
index 4aa01f776..58669b96c 100644
--- a/openlp/core/ui/exceptiondialog.py
+++ b/openlp/core/ui/exceptiondialog.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/exceptionform.py b/openlp/core/ui/exceptionform.py
index 279122937..69f3c14af 100644
--- a/openlp/core/ui/exceptionform.py
+++ b/openlp/core/ui/exceptionform.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/filerenamedialog.py b/openlp/core/ui/filerenamedialog.py
index ec0f0e2dd..cca7bcd16 100644
--- a/openlp/core/ui/filerenamedialog.py
+++ b/openlp/core/ui/filerenamedialog.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/filerenameform.py b/openlp/core/ui/filerenameform.py
index 049b68336..d1516a18c 100644
--- a/openlp/core/ui/filerenameform.py
+++ b/openlp/core/ui/filerenameform.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/firsttimeform.py b/openlp/core/ui/firsttimeform.py
index dade26cf9..3b006bf5e 100644
--- a/openlp/core/ui/firsttimeform.py
+++ b/openlp/core/ui/firsttimeform.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/firsttimelanguagedialog.py b/openlp/core/ui/firsttimelanguagedialog.py
index bdc03048a..8a891780d 100644
--- a/openlp/core/ui/firsttimelanguagedialog.py
+++ b/openlp/core/ui/firsttimelanguagedialog.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/firsttimelanguageform.py b/openlp/core/ui/firsttimelanguageform.py
index f6ffafb8f..3661ba51b 100644
--- a/openlp/core/ui/firsttimelanguageform.py
+++ b/openlp/core/ui/firsttimelanguageform.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/firsttimewizard.py b/openlp/core/ui/firsttimewizard.py
index 4c7ae6880..6852d533a 100644
--- a/openlp/core/ui/firsttimewizard.py
+++ b/openlp/core/ui/firsttimewizard.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# 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'))
self.informationLabel.setText(translate('OpenLP.FirstTimeWizard',
'This wizard will help you to configure OpenLP for initial use.'
- ' Click the next button below to start the process of selection '
- 'your initial options. '))
+ ' Click the next button below to start.'))
self.pluginPage.setTitle(translate('OpenLP.FirstTimeWizard',
'Activate required Plugins'))
self.pluginPage.setSubTitle(translate('OpenLP.FirstTimeWizard',
diff --git a/openlp/core/ui/generaltab.py b/openlp/core/ui/generaltab.py
index 75cb8fa98..2a9bd221e 100644
--- a/openlp/core/ui/generaltab.py
+++ b/openlp/core/ui/generaltab.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# 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.setObjectName(u'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
self.timeoutLabel = QtGui.QLabel(self.settingsGroupBox)
self.timeoutLabel.setObjectName(u'timeoutLabel')
@@ -218,8 +222,10 @@ class GeneralTab(SettingsTab):
'Unblank display when adding new live item'))
self.autoPreviewCheckBox.setText(translate('OpenLP.GeneralTab',
'Automatically preview next item in service'))
+ self.enableLoopCheckBox.setText(translate('OpenLP.GeneralTab',
+ 'Enable slide wrap-around'))
self.timeoutLabel.setText(translate('OpenLP.GeneralTab',
- 'Slide loop delay:'))
+ 'Timed slide interval:'))
self.timeoutSpinBox.setSuffix(translate('OpenLP.GeneralTab', ' sec'))
self.ccliGroupBox.setTitle(
translate('OpenLP.GeneralTab', 'CCLI Details'))
@@ -270,6 +276,8 @@ class GeneralTab(SettingsTab):
QtCore.QVariant(True)).toBool())
self.autoPreviewCheckBox.setChecked(settings.value(u'auto preview',
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',
QtCore.QVariant(5)).toInt()[0])
self.overrideCheckBox.setChecked(settings.value(u'override position',
@@ -313,6 +321,8 @@ class GeneralTab(SettingsTab):
QtCore.QVariant(self.autoUnblankCheckBox.isChecked()))
settings.setValue(u'auto preview',
QtCore.QVariant(self.autoPreviewCheckBox.isChecked()))
+ settings.setValue(u'enable slide loop',
+ QtCore.QVariant(self.enableLoopCheckBox.isChecked()))
settings.setValue(u'loop delay',
QtCore.QVariant(self.timeoutSpinBox.value()))
settings.setValue(u'ccli number',
diff --git a/openlp/core/ui/maindisplay.py b/openlp/core/ui/maindisplay.py
index 8af061f2b..dc7c28ded 100644
--- a/openlp/core/ui/maindisplay.py
+++ b/openlp/core/ui/maindisplay.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py
index 167fcdd4a..82f1b9253 100644
--- a/openlp/core/ui/mainwindow.py
+++ b/openlp/core/ui/mainwindow.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# 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.setDockNestingEnabled(True)
# Set up the main container, which contains all the other form widgets.
- self.MainContent = QtGui.QWidget(mainWindow)
- self.MainContent.setObjectName(u'MainContent')
- self.mainContentLayout = QtGui.QHBoxLayout(self.MainContent)
+ self.mainContent = QtGui.QWidget(mainWindow)
+ self.mainContent.setObjectName(u'mainContent')
+ self.mainContentLayout = QtGui.QHBoxLayout(self.mainContent)
self.mainContentLayout.setSpacing(0)
self.mainContentLayout.setMargin(0)
self.mainContentLayout.setObjectName(u'mainContentLayout')
- mainWindow.setCentralWidget(self.MainContent)
- self.controlSplitter = QtGui.QSplitter(self.MainContent)
+ mainWindow.setCentralWidget(self.mainContent)
+ self.controlSplitter = QtGui.QSplitter(self.mainContent)
self.controlSplitter.setOrientation(QtCore.Qt.Horizontal)
self.controlSplitter.setObjectName(u'controlSplitter')
self.mainContentLayout.addWidget(self.controlSplitter)
@@ -93,31 +94,31 @@ class Ui_MainWindow(object):
QtCore.QVariant(True)).toBool()
self.liveController.panel.setVisible(liveVisible)
# Create menu
- self.MenuBar = QtGui.QMenuBar(mainWindow)
- self.MenuBar.setObjectName(u'MenuBar')
- self.FileMenu = QtGui.QMenu(self.MenuBar)
- self.FileMenu.setObjectName(u'FileMenu')
- self.FileImportMenu = QtGui.QMenu(self.FileMenu)
- self.FileImportMenu.setObjectName(u'FileImportMenu')
- self.FileExportMenu = QtGui.QMenu(self.FileMenu)
- self.FileExportMenu.setObjectName(u'FileExportMenu')
+ self.menuBar = QtGui.QMenuBar(mainWindow)
+ self.menuBar.setObjectName(u'menuBar')
+ self.fileMenu = QtGui.QMenu(self.menuBar)
+ self.fileMenu.setObjectName(u'fileMenu')
+ self.fileImportMenu = QtGui.QMenu(self.fileMenu)
+ self.fileImportMenu.setObjectName(u'fileImportMenu')
+ self.fileExportMenu = QtGui.QMenu(self.fileMenu)
+ self.fileExportMenu.setObjectName(u'fileExportMenu')
# View Menu
- self.viewMenu = QtGui.QMenu(self.MenuBar)
+ self.viewMenu = QtGui.QMenu(self.menuBar)
self.viewMenu.setObjectName(u'viewMenu')
- self.ViewModeMenu = QtGui.QMenu(self.viewMenu)
- self.ViewModeMenu.setObjectName(u'ViewModeMenu')
+ self.viewModeMenu = QtGui.QMenu(self.viewMenu)
+ self.viewModeMenu.setObjectName(u'viewModeMenu')
# Tools Menu
- self.ToolsMenu = QtGui.QMenu(self.MenuBar)
- self.ToolsMenu.setObjectName(u'ToolsMenu')
+ self.toolsMenu = QtGui.QMenu(self.menuBar)
+ self.toolsMenu.setObjectName(u'toolsMenu')
# Settings Menu
- self.SettingsMenu = QtGui.QMenu(self.MenuBar)
- self.SettingsMenu.setObjectName(u'SettingsMenu')
- self.SettingsLanguageMenu = QtGui.QMenu(self.SettingsMenu)
- self.SettingsLanguageMenu.setObjectName(u'SettingsLanguageMenu')
+ self.settingsMenu = QtGui.QMenu(self.menuBar)
+ self.settingsMenu.setObjectName(u'settingsMenu')
+ self.settingsLanguageMenu = QtGui.QMenu(self.settingsMenu)
+ self.settingsLanguageMenu.setObjectName(u'settingsLanguageMenu')
# Help Menu
- self.HelpMenu = QtGui.QMenu(self.MenuBar)
- self.HelpMenu.setObjectName(u'HelpMenu')
- mainWindow.setMenuBar(self.MenuBar)
+ self.helpMenu = QtGui.QMenu(self.menuBar)
+ self.helpMenu.setObjectName(u'helpMenu')
+ mainWindow.setMenuBar(self.menuBar)
self.statusBar = QtGui.QStatusBar(mainWindow)
self.statusBar.setObjectName(u'statusBar')
mainWindow.setStatusBar(self.statusBar)
@@ -134,17 +135,17 @@ class Ui_MainWindow(object):
u'mediaManagerDock', u':/system/system_mediamanager.png')
self.mediaManagerDock.setStyleSheet(MEDIA_MANAGER_STYLE)
# Create the media toolbox
- self.MediaToolBox = QtGui.QToolBox(self.mediaManagerDock)
- self.MediaToolBox.setObjectName(u'MediaToolBox')
- self.mediaManagerDock.setWidget(self.MediaToolBox)
+ self.mediaToolBox = QtGui.QToolBox(self.mediaManagerDock)
+ self.mediaToolBox.setObjectName(u'mediaToolBox')
+ self.mediaManagerDock.setWidget(self.mediaToolBox)
mainWindow.addDockWidget(QtCore.Qt.LeftDockWidgetArea,
self.mediaManagerDock)
# Create the service manager
self.serviceManagerDock = OpenLPDockWidget(mainWindow,
u'serviceManagerDock', u':/system/system_servicemanager.png')
- self.ServiceManagerContents = ServiceManager(mainWindow,
+ self.serviceManagerContents = ServiceManager(mainWindow,
self.serviceManagerDock)
- self.serviceManagerDock.setWidget(self.ServiceManagerContents)
+ self.serviceManagerDock.setWidget(self.serviceManagerContents)
mainWindow.addDockWidget(QtCore.Qt.RightDockWidgetArea,
self.serviceManagerDock)
# Create the theme manager
@@ -159,75 +160,75 @@ class Ui_MainWindow(object):
# Create the menu items
action_list = ActionList.get_instance()
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')],
- self.ServiceManagerContents.onNewServiceClicked,
+ self.serviceManagerContents.onNewServiceClicked,
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')],
- self.ServiceManagerContents.onLoadServiceClicked,
+ self.serviceManagerContents.onLoadServiceClicked,
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')],
- self.ServiceManagerContents.saveFile,
+ self.serviceManagerContents.saveFile,
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')],
- self.ServiceManagerContents.saveFileAs, category=UiStrings().File)
+ self.serviceManagerContents.saveFileAs, category=UiStrings().File)
self.printServiceOrderItem = shortcut_action(mainWindow,
u'printServiceItem', [QtGui.QKeySequence(u'Ctrl+P')],
- self.ServiceManagerContents.printServiceOrder,
+ self.serviceManagerContents.printServiceOrder,
category=UiStrings().File)
- self.FileExitItem = shortcut_action(mainWindow, u'FileExitItem',
+ self.fileExitItem = shortcut_action(mainWindow, u'FileExitItem',
[QtGui.QKeySequence(u'Alt+F4')], mainWindow.close,
u':/system/system_exit.png', category=UiStrings().File)
action_list.add_category(UiStrings().Import, CategoryOrder.standardMenu)
- self.ImportThemeItem = base_action(
- mainWindow, u'ImportThemeItem', UiStrings().Import)
- self.ImportLanguageItem = base_action(
- mainWindow, u'ImportLanguageItem')#, UiStrings().Import)
+ self.importThemeItem = base_action(
+ mainWindow, u'importThemeItem', UiStrings().Import)
+ self.importLanguageItem = base_action(
+ mainWindow, u'importLanguageItem')#, UiStrings().Import)
action_list.add_category(UiStrings().Export, CategoryOrder.standardMenu)
- self.ExportThemeItem = base_action(
- mainWindow, u'ExportThemeItem', UiStrings().Export)
- self.ExportLanguageItem = base_action(
- mainWindow, u'ExportLanguageItem')#, UiStrings().Export)
+ self.exportThemeItem = base_action(
+ mainWindow, u'exportThemeItem', UiStrings().Export)
+ self.exportLanguageItem = base_action(
+ mainWindow, u'exportLanguageItem')#, UiStrings().Export)
action_list.add_category(UiStrings().View, CategoryOrder.standardMenu)
- self.ViewMediaManagerItem = shortcut_action(mainWindow,
- u'ViewMediaManagerItem', [QtGui.QKeySequence(u'F8')],
+ self.viewMediaManagerItem = shortcut_action(mainWindow,
+ u'viewMediaManagerItem', [QtGui.QKeySequence(u'F8')],
self.toggleMediaManager, u':/system/system_mediamanager.png',
self.mediaManagerDock.isVisible(), UiStrings().View)
- self.ViewThemeManagerItem = shortcut_action(mainWindow,
- u'ViewThemeManagerItem', [QtGui.QKeySequence(u'F10')],
+ self.viewThemeManagerItem = shortcut_action(mainWindow,
+ u'viewThemeManagerItem', [QtGui.QKeySequence(u'F10')],
self.toggleThemeManager, u':/system/system_thememanager.png',
self.themeManagerDock.isVisible(), UiStrings().View)
- self.ViewServiceManagerItem = shortcut_action(mainWindow,
- u'ViewServiceManagerItem', [QtGui.QKeySequence(u'F9')],
+ self.viewServiceManagerItem = shortcut_action(mainWindow,
+ u'viewServiceManagerItem', [QtGui.QKeySequence(u'F9')],
self.toggleServiceManager, u':/system/system_servicemanager.png',
self.serviceManagerDock.isVisible(), UiStrings().View)
- self.ViewPreviewPanel = shortcut_action(mainWindow,
- u'ViewPreviewPanel', [QtGui.QKeySequence(u'F11')],
+ self.viewPreviewPanel = shortcut_action(mainWindow,
+ u'viewPreviewPanel', [QtGui.QKeySequence(u'F11')],
self.setPreviewPanelVisibility, checked=previewVisible,
category=UiStrings().View)
- self.ViewLivePanel = shortcut_action(mainWindow, u'ViewLivePanel',
+ self.viewLivePanel = shortcut_action(mainWindow, u'viewLivePanel',
[QtGui.QKeySequence(u'F12')], self.setLivePanelVisibility,
checked=liveVisible, category=UiStrings().View)
action_list.add_category(UiStrings().ViewMode, CategoryOrder.standardMenu)
- self.ModeDefaultItem = checkable_action(
- mainWindow, u'ModeDefaultItem', category=UiStrings().ViewMode)
- self.ModeSetupItem = checkable_action(
- mainWindow, u'ModeLiveItem', category=UiStrings().ViewMode)
- self.ModeLiveItem = checkable_action(
- mainWindow, u'ModeLiveItem', True, UiStrings().ViewMode)
- self.ModeGroup = QtGui.QActionGroup(mainWindow)
- self.ModeGroup.addAction(self.ModeDefaultItem)
- self.ModeGroup.addAction(self.ModeSetupItem)
- self.ModeGroup.addAction(self.ModeLiveItem)
- self.ModeDefaultItem.setChecked(True)
+ self.modeDefaultItem = checkable_action(
+ mainWindow, u'modeDefaultItem', category=UiStrings().ViewMode)
+ self.modeSetupItem = checkable_action(
+ mainWindow, u'modeLiveItem', category=UiStrings().ViewMode)
+ self.modeLiveItem = checkable_action(
+ mainWindow, u'modeLiveItem', True, UiStrings().ViewMode)
+ self.modeGroup = QtGui.QActionGroup(mainWindow)
+ self.modeGroup.addAction(self.modeDefaultItem)
+ self.modeGroup.addAction(self.modeSetupItem)
+ self.modeGroup.addAction(self.modeLiveItem)
+ self.modeDefaultItem.setChecked(True)
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)
- self.ToolsOpenDataFolder = icon_action(mainWindow,
- u'ToolsOpenDataFolder', u':/general/general_open.png',
+ self.toolsOpenDataFolder = icon_action(mainWindow,
+ u'toolsOpenDataFolder', u':/general/general_open.png',
category=UiStrings().Tools)
self.updateThemeImages = base_action(mainWindow,
u'updateThemeImages', category=UiStrings().Tools)
@@ -237,82 +238,84 @@ class Ui_MainWindow(object):
self.onPluginItemClicked, u':/system/settings_plugin_list.png',
category=UiStrings().Settings)
# i18n Language Items
- self.AutoLanguageItem = checkable_action(mainWindow,
- u'AutoLanguageItem', LanguageManager.auto_language)
- self.LanguageGroup = QtGui.QActionGroup(mainWindow)
- self.LanguageGroup.setExclusive(True)
- self.LanguageGroup.setObjectName(u'LanguageGroup')
- add_actions(self.LanguageGroup, [self.AutoLanguageItem])
+ self.autoLanguageItem = checkable_action(mainWindow,
+ u'autoLanguageItem', LanguageManager.auto_language)
+ self.languageGroup = QtGui.QActionGroup(mainWindow)
+ self.languageGroup.setExclusive(True)
+ self.languageGroup.setObjectName(u'languageGroup')
+ add_actions(self.languageGroup, [self.autoLanguageItem])
qmList = LanguageManager.get_qm_list()
savedLanguage = LanguageManager.get_language()
for key in sorted(qmList.keys()):
languageItem = checkable_action(
mainWindow, key, qmList[key] == savedLanguage)
- add_actions(self.LanguageGroup, [languageItem])
- self.SettingsShortcutsItem = icon_action(mainWindow,
- u'SettingsShortcutsItem',
+ add_actions(self.languageGroup, [languageItem])
+ self.settingsShortcutsItem = icon_action(mainWindow,
+ u'settingsShortcutsItem',
u':/system/system_configure_shortcuts.png',
category=UiStrings().Settings)
- self.DisplayTagItem = icon_action(mainWindow,
- u'DisplayTagItem', u':/system/tag_editor.png',
+ self.displayTagItem = icon_action(mainWindow,
+ u'displayTagItem', u':/system/tag_editor.png',
category=UiStrings().Settings)
- self.SettingsConfigureItem = icon_action(mainWindow,
- u'SettingsConfigureItem', u':/system/system_settings.png',
+ self.settingsConfigureItem = icon_action(mainWindow,
+ u'settingsConfigureItem', u':/system/system_settings.png',
category=UiStrings().Settings)
action_list.add_category(UiStrings().Help, CategoryOrder.standardMenu)
- self.HelpDocumentationItem = icon_action(mainWindow,
- u'HelpDocumentationItem', u':/system/system_help_contents.png',
+ self.helpDocumentationItem = icon_action(mainWindow,
+ u'helpDocumentationItem', u':/system/system_help_contents.png',
category=None)#UiStrings().Help)
- self.HelpDocumentationItem.setEnabled(False)
- self.HelpAboutItem = shortcut_action(mainWindow, u'HelpAboutItem',
+ self.helpDocumentationItem.setEnabled(False)
+ self.helpAboutItem = shortcut_action(mainWindow, u'helpAboutItem',
[QtGui.QKeySequence(u'Ctrl+F1')], self.onHelpAboutItemClicked,
u':/system/system_about.png', category=UiStrings().Help)
- self.HelpOnlineHelpItem = base_action(
- mainWindow, u'HelpOnlineHelpItem', category=UiStrings().Help)
+ self.helpOnlineHelpItem = shortcut_action(
+ mainWindow, u'helpOnlineHelpItem', [QtGui.QKeySequence(u'F1')],
+ self.onHelpOnlineHelpClicked, u':/system/system_online_help.png',
+ category=UiStrings().Help)
self.helpWebSiteItem = base_action(
mainWindow, u'helpWebSiteItem', category=UiStrings().Help)
- add_actions(self.FileImportMenu,
- (self.ImportThemeItem, self.ImportLanguageItem))
- add_actions(self.FileExportMenu,
- (self.ExportThemeItem, self.ExportLanguageItem))
- self.FileMenuActions = (self.FileNewItem, self.FileOpenItem,
- self.FileSaveItem, self.FileSaveAsItem, None,
- self.printServiceOrderItem, None, self.FileImportMenu.menuAction(),
- self.FileExportMenu.menuAction(), self.FileExitItem)
- add_actions(self.ViewModeMenu, (self.ModeDefaultItem,
- self.ModeSetupItem, self.ModeLiveItem))
- add_actions(self.viewMenu, (self.ViewModeMenu.menuAction(),
- None, self.ViewMediaManagerItem, self.ViewServiceManagerItem,
- self.ViewThemeManagerItem, None, self.ViewPreviewPanel,
- self.ViewLivePanel))
+ add_actions(self.fileImportMenu,
+ (self.importThemeItem, self.importLanguageItem))
+ add_actions(self.fileExportMenu,
+ (self.exportThemeItem, self.exportLanguageItem))
+ self.fileMenuActions = (self.fileNewItem, self.fileOpenItem,
+ self.fileSaveItem, self.fileSaveAsItem, None,
+ self.printServiceOrderItem, None, self.fileImportMenu.menuAction(),
+ self.fileExportMenu.menuAction(), self.fileExitItem)
+ add_actions(self.viewModeMenu, (self.modeDefaultItem,
+ self.modeSetupItem, self.modeLiveItem))
+ add_actions(self.viewMenu, (self.viewModeMenu.menuAction(),
+ None, self.viewMediaManagerItem, self.viewServiceManagerItem,
+ self.viewThemeManagerItem, None, self.viewPreviewPanel,
+ self.viewLivePanel))
# i18n add Language Actions
- add_actions(self.SettingsLanguageMenu, (self.AutoLanguageItem, None))
- add_actions(self.SettingsLanguageMenu, self.LanguageGroup.actions())
- add_actions(self.SettingsMenu, (self.settingsPluginListItem,
- self.SettingsLanguageMenu.menuAction(), None,
- self.DisplayTagItem, self.SettingsShortcutsItem,
- self.SettingsConfigureItem))
- add_actions(self.ToolsMenu, (self.ToolsAddToolItem, None))
- add_actions(self.ToolsMenu, (self.ToolsOpenDataFolder, None))
- add_actions(self.ToolsMenu, [self.updateThemeImages])
- add_actions(self.HelpMenu, (self.HelpDocumentationItem,
- self.HelpOnlineHelpItem, None, self.helpWebSiteItem,
- self.HelpAboutItem))
- add_actions(self.MenuBar, (self.FileMenu.menuAction(),
- self.viewMenu.menuAction(), self.ToolsMenu.menuAction(),
- self.SettingsMenu.menuAction(), self.HelpMenu.menuAction()))
+ add_actions(self.settingsLanguageMenu, (self.autoLanguageItem, None))
+ add_actions(self.settingsLanguageMenu, self.languageGroup.actions())
+ add_actions(self.settingsMenu, (self.settingsPluginListItem,
+ self.settingsLanguageMenu.menuAction(), None,
+ self.displayTagItem, self.settingsShortcutsItem,
+ self.settingsConfigureItem))
+ add_actions(self.toolsMenu, (self.toolsAddToolItem, None))
+ add_actions(self.toolsMenu, (self.toolsOpenDataFolder, None))
+ add_actions(self.toolsMenu, [self.updateThemeImages])
+ add_actions(self.helpMenu, (self.helpDocumentationItem,
+ self.helpOnlineHelpItem, None, self.helpWebSiteItem,
+ self.helpAboutItem))
+ add_actions(self.menuBar, (self.fileMenu.menuAction(),
+ self.viewMenu.menuAction(), self.toolsMenu.menuAction(),
+ self.settingsMenu.menuAction(), self.helpMenu.menuAction()))
# Initialise the translation
self.retranslateUi(mainWindow)
- self.MediaToolBox.setCurrentIndex(0)
+ self.mediaToolBox.setCurrentIndex(0)
# Connect up some signals and slots
- QtCore.QObject.connect(self.FileMenu,
+ QtCore.QObject.connect(self.fileMenu,
QtCore.SIGNAL(u'aboutToShow()'), self.updateFileMenu)
QtCore.QMetaObject.connectSlotsByName(mainWindow)
# Hide the entry, as it does not have any functionality yet.
- self.ToolsAddToolItem.setVisible(False)
- self.ImportLanguageItem.setVisible(False)
- self.ExportLanguageItem.setVisible(False)
- self.HelpDocumentationItem.setVisible(False)
+ self.toolsAddToolItem.setVisible(False)
+ self.importLanguageItem.setVisible(False)
+ self.exportLanguageItem.setVisible(False)
+ self.helpDocumentationItem.setVisible(False)
def retranslateUi(self, mainWindow):
"""
@@ -320,136 +323,133 @@ class Ui_MainWindow(object):
"""
mainWindow.mainTitle = UiStrings().OLPV2
mainWindow.setWindowTitle(mainWindow.mainTitle)
- self.FileMenu.setTitle(translate('OpenLP.MainWindow', '&File'))
- self.FileImportMenu.setTitle(translate('OpenLP.MainWindow', '&Import'))
- self.FileExportMenu.setTitle(translate('OpenLP.MainWindow', '&Export'))
+ self.fileMenu.setTitle(translate('OpenLP.MainWindow', '&File'))
+ self.fileImportMenu.setTitle(translate('OpenLP.MainWindow', '&Import'))
+ self.fileExportMenu.setTitle(translate('OpenLP.MainWindow', '&Export'))
self.viewMenu.setTitle(translate('OpenLP.MainWindow', '&View'))
- self.ViewModeMenu.setTitle(translate('OpenLP.MainWindow', 'M&ode'))
- self.ToolsMenu.setTitle(translate('OpenLP.MainWindow', '&Tools'))
- self.SettingsMenu.setTitle(translate('OpenLP.MainWindow', '&Settings'))
- self.SettingsLanguageMenu.setTitle(translate('OpenLP.MainWindow',
+ self.viewModeMenu.setTitle(translate('OpenLP.MainWindow', 'M&ode'))
+ self.toolsMenu.setTitle(translate('OpenLP.MainWindow', '&Tools'))
+ self.settingsMenu.setTitle(translate('OpenLP.MainWindow', '&Settings'))
+ self.settingsLanguageMenu.setTitle(translate('OpenLP.MainWindow',
'&Language'))
- self.HelpMenu.setTitle(translate('OpenLP.MainWindow', '&Help'))
+ self.helpMenu.setTitle(translate('OpenLP.MainWindow', '&Help'))
self.mediaManagerDock.setWindowTitle(
translate('OpenLP.MainWindow', 'Media Manager'))
self.serviceManagerDock.setWindowTitle(
translate('OpenLP.MainWindow', 'Service Manager'))
self.themeManagerDock.setWindowTitle(
translate('OpenLP.MainWindow', 'Theme Manager'))
- self.FileNewItem.setText(translate('OpenLP.MainWindow', '&New'))
- self.FileNewItem.setToolTip(UiStrings().NewService)
- self.FileNewItem.setStatusTip(UiStrings().CreateService)
- self.FileOpenItem.setText(translate('OpenLP.MainWindow', '&Open'))
- self.FileOpenItem.setToolTip(UiStrings().OpenService)
- self.FileOpenItem.setStatusTip(
+ self.fileNewItem.setText(translate('OpenLP.MainWindow', '&New'))
+ self.fileNewItem.setToolTip(UiStrings().NewService)
+ self.fileNewItem.setStatusTip(UiStrings().CreateService)
+ self.fileOpenItem.setText(translate('OpenLP.MainWindow', '&Open'))
+ self.fileOpenItem.setToolTip(UiStrings().OpenService)
+ self.fileOpenItem.setStatusTip(
translate('OpenLP.MainWindow', 'Open an existing service.'))
- self.FileSaveItem.setText(translate('OpenLP.MainWindow', '&Save'))
- self.FileSaveItem.setToolTip(UiStrings().SaveService)
- self.FileSaveItem.setStatusTip(
+ self.fileSaveItem.setText(translate('OpenLP.MainWindow', '&Save'))
+ self.fileSaveItem.setToolTip(UiStrings().SaveService)
+ self.fileSaveItem.setStatusTip(
translate('OpenLP.MainWindow', 'Save the current service to disk.'))
- self.FileSaveAsItem.setText(
+ self.fileSaveAsItem.setText(
translate('OpenLP.MainWindow', 'Save &As...'))
- self.FileSaveAsItem.setToolTip(
+ self.fileSaveAsItem.setToolTip(
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.'))
self.printServiceOrderItem.setText(UiStrings().PrintServiceOrder)
self.printServiceOrderItem.setStatusTip(translate('OpenLP.MainWindow',
'Print the current Service Order.'))
- self.FileExitItem.setText(
+ self.fileExitItem.setText(
translate('OpenLP.MainWindow', 'E&xit'))
- self.FileExitItem.setStatusTip(
+ self.fileExitItem.setStatusTip(
translate('OpenLP.MainWindow', 'Quit OpenLP'))
- self.ImportThemeItem.setText(
+ self.importThemeItem.setText(
translate('OpenLP.MainWindow', '&Theme'))
- self.ImportLanguageItem.setText(
+ self.importLanguageItem.setText(
translate('OpenLP.MainWindow', '&Language'))
- self.ExportThemeItem.setText(
+ self.exportThemeItem.setText(
translate('OpenLP.MainWindow', '&Theme'))
- self.ExportLanguageItem.setText(
+ self.exportLanguageItem.setText(
translate('OpenLP.MainWindow', '&Language'))
- self.SettingsShortcutsItem.setText(
+ self.settingsShortcutsItem.setText(
translate('OpenLP.MainWindow', 'Configure &Shortcuts...'))
- self.DisplayTagItem.setText(
+ self.displayTagItem.setText(
translate('OpenLP.MainWindow', '&Configure Display Tags'))
- self.SettingsConfigureItem.setText(
+ self.settingsConfigureItem.setText(
translate('OpenLP.MainWindow', '&Configure OpenLP...'))
- self.ViewMediaManagerItem.setText(
+ self.viewMediaManagerItem.setText(
translate('OpenLP.MainWindow', '&Media Manager'))
- self.ViewMediaManagerItem.setToolTip(
+ self.viewMediaManagerItem.setToolTip(
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.'))
- self.ViewThemeManagerItem.setText(
+ self.viewThemeManagerItem.setText(
translate('OpenLP.MainWindow', '&Theme Manager'))
- self.ViewThemeManagerItem.setToolTip(
+ self.viewThemeManagerItem.setToolTip(
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.'))
- self.ViewServiceManagerItem.setText(
+ self.viewServiceManagerItem.setText(
translate('OpenLP.MainWindow', '&Service Manager'))
- self.ViewServiceManagerItem.setToolTip(
+ self.viewServiceManagerItem.setToolTip(
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.'))
- self.ViewPreviewPanel.setText(
+ self.viewPreviewPanel.setText(
translate('OpenLP.MainWindow', '&Preview Panel'))
- self.ViewPreviewPanel.setToolTip(
+ self.viewPreviewPanel.setToolTip(
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.'))
- self.ViewLivePanel.setText(
+ self.viewLivePanel.setText(
translate('OpenLP.MainWindow', '&Live Panel'))
- self.ViewLivePanel.setToolTip(
+ self.viewLivePanel.setToolTip(
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.'))
self.settingsPluginListItem.setText(translate('OpenLP.MainWindow',
'&Plugin List'))
self.settingsPluginListItem.setStatusTip(
translate('OpenLP.MainWindow', 'List the Plugins'))
- self.HelpDocumentationItem.setText(
+ self.helpDocumentationItem.setText(
translate('OpenLP.MainWindow', '&User Guide'))
- self.HelpAboutItem.setText(translate('OpenLP.MainWindow', '&About'))
- self.HelpAboutItem.setStatusTip(
+ self.helpAboutItem.setText(translate('OpenLP.MainWindow', '&About'))
+ self.helpAboutItem.setStatusTip(
translate('OpenLP.MainWindow', 'More information about OpenLP'))
- self.HelpOnlineHelpItem.setText(
+ self.helpOnlineHelpItem.setText(
translate('OpenLP.MainWindow', '&Online Help'))
- # Uncomment after 1.9.5 beta string freeze
- #self.HelpOnlineHelpItem.setShortcut(
- # translate('OpenLP.MainWindow', 'F1'))
self.helpWebSiteItem.setText(
translate('OpenLP.MainWindow', '&Web Site'))
- for item in self.LanguageGroup.actions():
+ for item in self.languageGroup.actions():
item.setText(item.objectName())
item.setStatusTip(unicode(translate('OpenLP.MainWindow',
'Set the interface language to %s')) % item.objectName())
- self.AutoLanguageItem.setText(
+ self.autoLanguageItem.setText(
translate('OpenLP.MainWindow', '&Autodetect'))
- self.AutoLanguageItem.setStatusTip(translate('OpenLP.MainWindow',
+ self.autoLanguageItem.setStatusTip(translate('OpenLP.MainWindow',
'Use the system language, if available.'))
- self.ToolsAddToolItem.setText(
+ self.toolsAddToolItem.setText(
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.'))
- self.ToolsOpenDataFolder.setText(
+ self.toolsOpenDataFolder.setText(
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.'))
self.updateThemeImages.setText(
translate('OpenLP.MainWindow', 'Update Theme Images'))
self.updateThemeImages.setStatusTip(
translate('OpenLP.MainWindow', 'Update the preview images for all '
'themes.'))
- self.ModeDefaultItem.setText(
+ self.modeDefaultItem.setText(
translate('OpenLP.MainWindow', '&Default'))
- self.ModeDefaultItem.setStatusTip(translate('OpenLP.MainWindow',
+ self.modeDefaultItem.setStatusTip(translate('OpenLP.MainWindow',
'Set the view mode back to the default.'))
- self.ModeSetupItem.setText(translate('OpenLP.MainWindow', '&Setup'))
- self.ModeSetupItem.setStatusTip(
+ self.modeSetupItem.setText(translate('OpenLP.MainWindow', '&Setup'))
+ self.modeSetupItem.setStatusTip(
translate('OpenLP.MainWindow', 'Set the view mode to Setup.'))
- self.ModeLiveItem.setText(translate('OpenLP.MainWindow', '&Live'))
- self.ModeLiveItem.setStatusTip(
+ self.modeLiveItem.setText(translate('OpenLP.MainWindow', '&Live'))
+ self.modeLiveItem.setStatusTip(
translate('OpenLP.MainWindow', 'Set the view mode to Live.'))
@@ -492,42 +492,40 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
self.updateFileMenu()
self.pluginForm = PluginForm(self)
# Set up signals and slots
- QtCore.QObject.connect(self.ImportThemeItem,
+ QtCore.QObject.connect(self.importThemeItem,
QtCore.SIGNAL(u'triggered()'),
self.themeManagerContents.onImportTheme)
- QtCore.QObject.connect(self.ExportThemeItem,
+ QtCore.QObject.connect(self.exportThemeItem,
QtCore.SIGNAL(u'triggered()'),
self.themeManagerContents.onExportTheme)
QtCore.QObject.connect(self.mediaManagerDock,
QtCore.SIGNAL(u'visibilityChanged(bool)'),
- self.ViewMediaManagerItem.setChecked)
+ self.viewMediaManagerItem.setChecked)
QtCore.QObject.connect(self.serviceManagerDock,
QtCore.SIGNAL(u'visibilityChanged(bool)'),
- self.ViewServiceManagerItem.setChecked)
+ self.viewServiceManagerItem.setChecked)
QtCore.QObject.connect(self.themeManagerDock,
QtCore.SIGNAL(u'visibilityChanged(bool)'),
- self.ViewThemeManagerItem.setChecked)
+ self.viewThemeManagerItem.setChecked)
QtCore.QObject.connect(self.helpWebSiteItem,
QtCore.SIGNAL(u'triggered()'), self.onHelpWebSiteClicked)
- QtCore.QObject.connect(self.HelpOnlineHelpItem,
- QtCore.SIGNAL(u'triggered()'), self.onHelpOnLineHelpClicked)
- QtCore.QObject.connect(self.ToolsOpenDataFolder,
+ QtCore.QObject.connect(self.toolsOpenDataFolder,
QtCore.SIGNAL(u'triggered()'), self.onToolsOpenDataFolderClicked)
QtCore.QObject.connect(self.updateThemeImages,
QtCore.SIGNAL(u'triggered()'), self.onUpdateThemeImages)
- QtCore.QObject.connect(self.DisplayTagItem,
+ QtCore.QObject.connect(self.displayTagItem,
QtCore.SIGNAL(u'triggered()'), self.onDisplayTagItemClicked)
- QtCore.QObject.connect(self.SettingsConfigureItem,
+ QtCore.QObject.connect(self.settingsConfigureItem,
QtCore.SIGNAL(u'triggered()'), self.onSettingsConfigureItemClicked)
- QtCore.QObject.connect(self.SettingsShortcutsItem,
+ QtCore.QObject.connect(self.settingsShortcutsItem,
QtCore.SIGNAL(u'triggered()'), self.onSettingsShortcutsItemClicked)
# i18n set signals for languages
- self.LanguageGroup.triggered.connect(LanguageManager.set_language)
- QtCore.QObject.connect(self.ModeDefaultItem,
+ self.languageGroup.triggered.connect(LanguageManager.set_language)
+ QtCore.QObject.connect(self.modeDefaultItem,
QtCore.SIGNAL(u'triggered()'), self.onModeDefaultItemClicked)
- QtCore.QObject.connect(self.ModeSetupItem,
+ QtCore.QObject.connect(self.modeSetupItem,
QtCore.SIGNAL(u'triggered()'), self.onModeSetupItemClicked)
- QtCore.QObject.connect(self.ModeLiveItem,
+ QtCore.QObject.connect(self.modeLiveItem,
QtCore.SIGNAL(u'triggered()'), self.onModeLiveItemClicked)
QtCore.QObject.connect(Receiver.get_receiver(),
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.QObject.connect(Receiver.get_receiver(),
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')
# Simple message boxes
QtCore.QObject.connect(Receiver.get_receiver(),
@@ -553,13 +554,13 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
# ThemeManager needs to call Renderer
self.renderer = Renderer(self.image_manager, self.themeManagerContents)
# Define the media Dock Manager
- self.mediaDockManager = MediaDockManager(self.MediaToolBox)
+ self.mediaDockManager = MediaDockManager(self.mediaToolBox)
log.info(u'Load Plugins')
# make the controllers available to the plugins
self.pluginHelpers[u'preview'] = self.previewController
self.pluginHelpers[u'live'] = self.liveController
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'toolbox'] = self.mediaDockManager
self.pluginHelpers[u'pluginmanager'] = self.pluginManager
@@ -575,11 +576,11 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
self.pluginManager.hook_media_manager(self.mediaDockManager)
# Call the hook method to pull in import 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.
- self.pluginManager.hook_export_menu(self.FileExportMenu)
+ self.pluginManager.hook_export_menu(self.fileExportMenu)
# 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.
log.info(u'initialise plugins')
self.pluginManager.initialise_plugins()
@@ -592,7 +593,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
savedPlugin = QtCore.QSettings().value(
u'advanced/current media plugin', QtCore.QVariant()).toInt()[0]
if savedPlugin != -1:
- self.MediaToolBox.setCurrentIndex(savedPlugin)
+ self.mediaToolBox.setCurrentIndex(savedPlugin)
self.settingsForm.postSetUp()
# Once all components are initialised load the Themes
log.info(u'Load Themes')
@@ -600,9 +601,14 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
Receiver.send_message(u'cursor_normal')
def setAutoLanguage(self, value):
- self.LanguageGroup.setDisabled(value)
+ self.languageGroup.setDisabled(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):
"""
@@ -625,29 +631,25 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
if self.liveController.display.isVisible():
self.liveController.display.setFocus()
self.activateWindow()
- # On Windows, arguments contains the entire commandline
- # So args[0]=='python' args[1]=='openlp.pyw'
- # Therefore this approach is not going to work
- # Bypass for now.
- if len(self.arguments) and os.name != u'nt':
+ if len(self.arguments):
args = []
for a in self.arguments:
args.extend([a])
- self.ServiceManagerContents.loadFile(unicode(args[0]))
+ self.serviceManagerContents.loadFile(unicode(args[0]))
elif QtCore.QSettings().value(
self.generalSettingsSection + u'/auto open',
QtCore.QVariant(False)).toBool():
- self.ServiceManagerContents.loadLastFile()
+ self.serviceManagerContents.loadLastFile()
view_mode = QtCore.QSettings().value(u'%s/view mode' % \
self.generalSettingsSection, u'default')
if view_mode == u'default':
- self.ModeDefaultItem.setChecked(True)
+ self.modeDefaultItem.setChecked(True)
elif view_mode == u'setup':
self.setViewMode(True, True, False, True, False)
- self.ModeSetupItem.setChecked(True)
+ self.modeSetupItem.setChecked(True)
elif view_mode == u'live':
self.setViewMode(False, True, False, False, True)
- self.ModeLiveItem.setChecked(True)
+ self.modeLiveItem.setChecked(True)
def firstTime(self):
# Import themes if first time
@@ -700,7 +702,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
import webbrowser
webbrowser.open_new(u'http://openlp.org/')
- def onHelpOnLineHelpClicked(self):
+ def onHelpOnlineHelpClicked(self):
"""
Load the online OpenLP manual
"""
@@ -811,10 +813,10 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
"""
Hook to close the main window and display windows on exit
"""
- if self.ServiceManagerContents.isModified():
- ret = self.ServiceManagerContents.saveModifiedService()
+ if self.serviceManagerContents.isModified():
+ ret = self.serviceManagerContents.saveModifiedService()
if ret == QtGui.QMessageBox.Save:
- if self.ServiceManagerContents.saveFile():
+ if self.serviceManagerContents.saveFile():
self.cleanUp()
event.accept()
else:
@@ -849,11 +851,11 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
Runs all the cleanup code before OpenLP shuts down
"""
# Clean temporary files used by services
- self.ServiceManagerContents.cleanUp()
+ self.serviceManagerContents.cleanUp()
if QtCore.QSettings().value(u'advanced/save current plugin',
QtCore.QVariant(False)).toBool():
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.
log.info(u'cleanup plugins')
self.pluginManager.finalise_plugins()
@@ -931,7 +933,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
self.previewController.panel.setVisible(visible)
QtCore.QSettings().setValue(u'user interface/preview panel',
QtCore.QVariant(visible))
- self.ViewPreviewPanel.setChecked(visible)
+ self.viewPreviewPanel.setChecked(visible)
def setLivePanelVisibility(self, visible):
"""
@@ -946,7 +948,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
self.liveController.panel.setVisible(visible)
QtCore.QSettings().setValue(u'user interface/live panel',
QtCore.QVariant(visible))
- self.ViewLivePanel.setChecked(visible)
+ self.viewLivePanel.setChecked(visible)
def loadSettings(self):
"""
@@ -991,13 +993,13 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
"""
recentFileCount = QtCore.QSettings().value(
u'advanced/recent file count', QtCore.QVariant(4)).toInt()[0]
- self.FileMenu.clear()
- add_actions(self.FileMenu, self.FileMenuActions[:-1])
+ self.fileMenu.clear()
+ add_actions(self.fileMenu, self.fileMenuActions[:-1])
existingRecentFiles = [recentFile for recentFile in self.recentFiles
if QtCore.QFile.exists(recentFile)]
recentFilesToDisplay = existingRecentFiles[0:recentFileCount]
if recentFilesToDisplay:
- self.FileMenu.addSeparator()
+ self.fileMenu.addSeparator()
for fileId, filename in enumerate(recentFilesToDisplay):
log.debug('Recent file name: %s', filename)
action = base_action(self, u'')
@@ -1005,10 +1007,10 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
(fileId + 1, QtCore.QFileInfo(filename).fileName()))
action.setData(QtCore.QVariant(filename))
self.connect(action, QtCore.SIGNAL(u'triggered()'),
- self.ServiceManagerContents.onRecentServiceClicked)
- self.FileMenu.addAction(action)
- self.FileMenu.addSeparator()
- self.FileMenu.addAction(self.FileMenuActions[-1])
+ self.serviceManagerContents.onRecentServiceClicked)
+ self.fileMenu.addAction(action)
+ self.fileMenu.addSeparator()
+ self.fileMenu.addAction(self.fileMenuActions[-1])
def addRecentFile(self, filename):
"""
diff --git a/openlp/core/ui/mediadockmanager.py b/openlp/core/ui/mediadockmanager.py
index ca4f4d442..f22ec0b92 100644
--- a/openlp/core/ui/mediadockmanager.py
+++ b/openlp/core/ui/mediadockmanager.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/plugindialog.py b/openlp/core/ui/plugindialog.py
index 84fb845c6..08683a2b6 100644
--- a/openlp/core/ui/plugindialog.py
+++ b/openlp/core/ui/plugindialog.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# 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,
translate('OpenLP.PluginForm', 'Active'))
self.statusComboBox.setItemText(1,
- translate('OpenLP.PluginForm', 'Inactive'))
\ No newline at end of file
+ translate('OpenLP.PluginForm', 'Inactive'))
diff --git a/openlp/core/ui/pluginform.py b/openlp/core/ui/pluginform.py
index bfac5f3e0..0f7f6dbeb 100644
--- a/openlp/core/ui/pluginform.py
+++ b/openlp/core/ui/pluginform.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/printservicedialog.py b/openlp/core/ui/printservicedialog.py
index f9d1163d0..4afd58b74 100644
--- a/openlp/core/ui/printservicedialog.py
+++ b/openlp/core/ui/printservicedialog.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/printserviceform.py b/openlp/core/ui/printserviceform.py
index bb87cf32f..09ae8857f 100644
--- a/openlp/core/ui/printserviceform.py
+++ b/openlp/core/ui/printserviceform.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/screen.py b/openlp/core/ui/screen.py
index 2186a221e..2b6e10644 100644
--- a/openlp/core/ui/screen.py
+++ b/openlp/core/ui/screen.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/serviceitemeditdialog.py b/openlp/core/ui/serviceitemeditdialog.py
index 4e966a38b..febc01524 100644
--- a/openlp/core/ui/serviceitemeditdialog.py
+++ b/openlp/core/ui/serviceitemeditdialog.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/serviceitemeditform.py b/openlp/core/ui/serviceitemeditform.py
index 400566099..e05f4751e 100644
--- a/openlp/core/ui/serviceitemeditform.py
+++ b/openlp/core/ui/serviceitemeditform.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py
index 358877cc7..349b0a4a3 100644
--- a/openlp/core/ui/servicemanager.py
+++ b/openlp/core/ui/servicemanager.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# 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):
self.timeAction.setVisible(True)
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)
+ # 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))
def onServiceItemNoteForm(self):
@@ -757,7 +768,7 @@ class ServiceManager(QtGui.QWidget):
"""
Called by a signal to select a specific item.
"""
- self.setItem(int(message[0]))
+ self.setItem(int(message))
def setItem(self, index):
"""
@@ -1108,6 +1119,7 @@ class ServiceManager(QtGui.QWidget):
"""
Send the current item to the Preview slide controller
"""
+ Receiver.send_message(u'cursor_busy')
item, child = self.findServiceItem()
if self.serviceItems[item][u'service_item'].is_valid:
self.mainwindow.previewController.addServiceManagerItem(
@@ -1117,6 +1129,7 @@ class ServiceManager(QtGui.QWidget):
translate('OpenLP.ServiceManager', 'Missing Display Handler'),
translate('OpenLP.ServiceManager', 'Your item cannot be '
'displayed as there is no handler to display it'))
+ Receiver.send_message(u'cursor_normal')
def getServiceItem(self):
"""
@@ -1149,6 +1162,7 @@ class ServiceManager(QtGui.QWidget):
return
if row != -1:
child = row
+ Receiver.send_message(u'cursor_busy')
if self.serviceItems[item][u'service_item'].is_valid:
self.mainwindow.liveController.addServiceManagerItem(
self.serviceItems[item][u'service_item'], child)
@@ -1168,6 +1182,7 @@ class ServiceManager(QtGui.QWidget):
translate('OpenLP.ServiceManager', 'Your item cannot be '
'displayed as the plugin required to display it is missing '
'or inactive'))
+ Receiver.send_message(u'cursor_normal')
def remoteEdit(self):
"""
@@ -1275,16 +1290,33 @@ class ServiceManager(QtGui.QWidget):
self.themeComboBox.clear()
self.themeMenu.clear()
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:
self.themeComboBox.addItem(theme)
- context_menu_action(self.themeMenu, None, theme,
+ themeAction = context_menu_action(self.themeMenu, None, theme,
self.onThemeChangeAction)
+ themeAction.setObjectName(theme)
+ themeAction.setCheckable(True)
+ themeGroup.addAction(themeAction)
find_and_set_in_combo_box(self.themeComboBox, self.service_theme)
self.mainwindow.renderer.set_service_theme(self.service_theme)
self.regenerateServiceItems()
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]
self.serviceItems[item][u'service_item'].theme = theme
self.regenerateServiceItems()
diff --git a/openlp/core/ui/servicenoteform.py b/openlp/core/ui/servicenoteform.py
index ef1c627d4..9a6cb4e22 100644
--- a/openlp/core/ui/servicenoteform.py
+++ b/openlp/core/ui/servicenoteform.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/settingsdialog.py b/openlp/core/ui/settingsdialog.py
index 50bcca4e2..6bdf4f749 100644
--- a/openlp/core/ui/settingsdialog.py
+++ b/openlp/core/ui/settingsdialog.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/settingsform.py b/openlp/core/ui/settingsform.py
index 265a03f48..5ecb61c3f 100644
--- a/openlp/core/ui/settingsform.py
+++ b/openlp/core/ui/settingsform.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/shortcutlistdialog.py b/openlp/core/ui/shortcutlistdialog.py
index e22bf1241..b98df4cf4 100644
--- a/openlp/core/ui/shortcutlistdialog.py
+++ b/openlp/core/ui/shortcutlistdialog.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# 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.descriptionLabel = QtGui.QLabel(shortcutListDialog)
self.descriptionLabel.setObjectName(u'descriptionLabel')
- self.descriptionLabel.setWordWrap(True)
+ self.descriptionLabel.setWordWrap(True)
self.shortcutListLayout.addWidget(self.descriptionLabel)
self.treeWidget = QtGui.QTreeWidget(shortcutListDialog)
self.treeWidget.setObjectName(u'treeWidget')
diff --git a/openlp/core/ui/shortcutlistform.py b/openlp/core/ui/shortcutlistform.py
index 8e38ebff5..d679d6cfa 100644
--- a/openlp/core/ui/shortcutlistform.py
+++ b/openlp/core/ui/shortcutlistform.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# 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():
# When we do not have a primary shortcut, the just entered alternate
# 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.alternatePushButton.setText(u'')
self.refreshShortcutList()
diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py
index c298f897f..97ee61114 100644
--- a/openlp/core/ui/slidecontroller.py
+++ b/openlp/core/ui/slidecontroller.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
@@ -65,7 +66,7 @@ class SlideController(QtGui.QWidget):
float(self.screens.current[u'size'].height())
self.image_manager = self.parent.image_manager
self.loopList = [
- u'Start Loop',
+ u'Play Slides Menu',
u'Loop Separator',
u'Image SpinBox'
]
@@ -139,19 +140,20 @@ class SlideController(QtGui.QWidget):
self.previousItem = self.toolbar.addToolbarButton(
translate('OpenLP.SlideController', 'Previous Slide'),
u':/slides/slide_previous.png',
- translate('OpenLP.SlideController', 'Move to previous'),
+ translate('OpenLP.SlideController', 'Move to previous.'),
self.onSlideSelectedPrevious,
shortcuts=[QtCore.Qt.Key_Up, QtCore.Qt.Key_PageUp],
context=QtCore.Qt.WidgetWithChildrenShortcut)
self.nextItem = self.toolbar.addToolbarButton(
translate('OpenLP.SlideController', 'Next Slide'),
u':/slides/slide_next.png',
- translate('OpenLP.SlideController', 'Move to next'),
+ translate('OpenLP.SlideController', 'Move to next.'),
self.onSlideSelectedNext,
shortcuts=[QtCore.Qt.Key_Down, QtCore.Qt.Key_PageDown],
context=QtCore.Qt.WidgetWithChildrenShortcut)
self.toolbar.addToolbarSeparator(u'Close Separator')
if self.isLive:
+ # Hide Menu
self.hideMenu = QtGui.QToolButton(self.toolbar)
self.hideMenu.setText(translate('OpenLP.SlideController', 'Hide'))
self.hideMenu.setPopupMode(QtGui.QToolButton.MenuButtonPopup)
@@ -179,58 +181,72 @@ class SlideController(QtGui.QWidget):
self.hideMenu.menu().addAction(self.themeScreen)
self.hideMenu.menu().addAction(self.desktopScreen)
self.toolbar.addToolbarSeparator(u'Loop Separator')
- startLoop = self.toolbar.addToolbarButton(
- # Does not need translating - control string.
- u'Start Loop', u':/media/media_time.png',
- translate('OpenLP.SlideController', 'Start continuous loop'),
- self.onStartLoop)
- action_list = ActionList.get_instance()
- action_list.add_action(startLoop, UiStrings().LiveToolbar)
- stopLoop = self.toolbar.addToolbarButton(
- # Does not need translating - control string.
- u'Stop Loop', u':/media/media_stop.png',
- translate('OpenLP.SlideController', 'Stop continuous loop'),
- self.onStopLoop)
- action_list.add_action(stopLoop, UiStrings().LiveToolbar)
- self.toogleLoop = shortcut_action(self, u'toogleLoop',
- [QtGui.QKeySequence(u'L')], self.onToggleLoop,
- category=UiStrings().LiveToolbar)
- self.toogleLoop.setText(translate('OpenLP.SlideController',
- 'Start/Stop continuous loop'))
- self.addAction(self.toogleLoop)
+ # Play Slides Menu
+ self.playSlidesMenu = QtGui.QToolButton(self.toolbar)
+ self.playSlidesMenu.setText(translate('OpenLP.SlideController',
+ 'Play Slides'))
+ self.playSlidesMenu.setPopupMode(QtGui.QToolButton.MenuButtonPopup)
+ self.toolbar.addToolbarWidget(u'Play Slides Menu',
+ self.playSlidesMenu)
+ self.playSlidesMenu.setMenu(QtGui.QMenu(
+ translate('OpenLP.SlideController', 'Play Slides'),
+ self.toolbar))
+ self.playSlidesLoop = shortcut_action(self.playSlidesMenu,
+ u'playSlidesLoop', [], self.onPlaySlidesLoop,
+ u':/media/media_time.png', False, UiStrings().LiveToolbar)
+ self.playSlidesLoop.setText(
+ translate('OpenLP.SlideController', 'Play Slides in Loop'))
+ self.playSlidesOnce = shortcut_action(self.playSlidesMenu,
+ u'playSlidesOnce', [], self.onPlaySlidesOnce,
+ u':/media/media_time.png', False, UiStrings().LiveToolbar)
+ self.playSlidesOnce.setText(
+ translate('OpenLP.SlideController', 'Play Slides to End'))
+ if QtCore.QSettings().value(self.parent.generalSettingsSection +
+ u'/enable slide loop', QtCore.QVariant(True)).toBool():
+ self.playSlidesMenu.setDefaultAction(self.playSlidesLoop)
+ else:
+ self.playSlidesMenu.setDefaultAction(self.playSlidesOnce)
+ self.playSlidesMenu.menu().addAction(self.playSlidesLoop)
+ self.playSlidesMenu.menu().addAction(self.playSlidesOnce)
+ # Loop Delay Spinbox
self.delaySpinBox = QtGui.QSpinBox()
self.delaySpinBox.setRange(1, 180)
self.toolbar.addToolbarWidget(u'Image SpinBox', self.delaySpinBox)
self.delaySpinBox.setSuffix(UiStrings().Seconds)
self.delaySpinBox.setToolTip(translate('OpenLP.SlideController',
- 'Delay between slides in seconds'))
+ 'Delay between slides in seconds.'))
else:
self.toolbar.addToolbarButton(
# Does not need translating - control string.
u'Go Live', u':/general/general_live.png',
- translate('OpenLP.SlideController', 'Move to live'),
+ translate('OpenLP.SlideController', 'Move to live.'),
self.onGoLive)
+ self.toolbar.addToolbarButton(
+ # Does not need translating - control string.
+ u'Add to Service', u':/general/general_add.png',
+ translate('OpenLP.SlideController', 'Add to Service.'),
+ self.onPreviewAddToService)
self.toolbar.addToolbarSeparator(u'Close Separator')
self.toolbar.addToolbarButton(
# Does not need translating - control string.
u'Edit Song', u':/general/general_edit.png',
translate('OpenLP.SlideController',
- 'Edit and reload song preview'),
+ 'Edit and reload song preview.'),
self.onEditSong)
self.controllerLayout.addWidget(self.toolbar)
# Build a Media ToolBar
self.mediabar = OpenLPToolbar(self)
self.mediabar.addToolbarButton(
u'Media Start', u':/slides/media_playback_start.png',
- translate('OpenLP.SlideController', 'Start playing media'),
+ translate('OpenLP.SlideController', 'Start playing media.'),
self.onMediaPlay)
self.mediabar.addToolbarButton(
u'Media Pause', u':/slides/media_playback_pause.png',
- translate('OpenLP.SlideController', 'Start playing media'),
+ translate('OpenLP.SlideController', 'Start playing media.'),
self.onMediaPause)
self.mediabar.addToolbarButton(
u'Media Stop', u':/slides/media_playback_stop.png',
- translate('OpenLP.SlideController', 'Start playing media'),
+ translate('OpenLP.SlideController', 'Start playing media.'),
self.onMediaStop)
if self.isLive:
# Build the Song Toolbar
@@ -313,7 +329,6 @@ class SlideController(QtGui.QWidget):
QtCore.SIGNAL(u'slidecontroller_live_spin_delay'),
self.receiveSpinDelay)
self.toolbar.makeWidgetsInvisible(self.loopList)
- self.toolbar.actions[u'Stop Loop'].setVisible(False)
else:
QtCore.QObject.connect(self.previewListWidget,
QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
@@ -340,13 +355,6 @@ class SlideController(QtGui.QWidget):
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'slidecontroller_%s_previous' % self.typePrefix),
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.SIGNAL(u'slidecontroller_%s_last' % self.typePrefix),
self.onSlideSelectedLast)
@@ -495,10 +503,6 @@ class SlideController(QtGui.QWidget):
self.mediabar.setVisible(False)
self.toolbar.makeWidgetsInvisible([u'Song Menu'])
self.toolbar.makeWidgetsInvisible(self.loopList)
- self.toogleLoop.setEnabled(False)
- self.toolbar.actions[u'Start Loop'].setEnabled(False)
- self.toolbar.actions[u'Stop Loop'].setEnabled(False)
- self.toolbar.actions[u'Stop Loop'].setVisible(False)
if item.is_text():
if QtCore.QSettings().value(
self.parent.songsSettingsSection + u'/display songbar',
@@ -507,9 +511,6 @@ class SlideController(QtGui.QWidget):
if item.is_capable(ItemCapabilities.AllowsLoop) and \
len(item.get_frames()) > 1:
self.toolbar.makeWidgetsVisible(self.loopList)
- self.toogleLoop.setEnabled(True)
- self.toolbar.actions[u'Start Loop'].setEnabled(True)
- self.toolbar.actions[u'Stop Loop'].setEnabled(True)
if item.is_media():
self.toolbar.setVisible(False)
self.mediabar.setVisible(True)
@@ -840,6 +841,11 @@ class SlideController(QtGui.QWidget):
Receiver.send_message(u'%s_unblank'
% self.serviceItem.name.lower(),
[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):
"""
@@ -858,6 +864,11 @@ class SlideController(QtGui.QWidget):
Receiver.send_message(u'%s_unblank'
% self.serviceItem.name.lower(),
[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):
"""
@@ -932,10 +943,7 @@ class SlideController(QtGui.QWidget):
rect.y(), rect.width(), rect.height())
self.slidePreview.setPixmap(winimg)
- def onSlideSelectedNextNoloop(self):
- self.onSlideSelectedNext(False)
-
- def onSlideSelectedNext(self, loop=True):
+ def onSlideSelectedNext(self, wrap=None):
"""
Go to the next slide.
"""
@@ -948,18 +956,18 @@ class SlideController(QtGui.QWidget):
else:
row = self.previewListWidget.currentRow() + 1
if row == self.previewListWidget.rowCount():
- if loop:
+ if wrap is None:
+ wrap = QtCore.QSettings().value(
+ self.parent.generalSettingsSection +
+ u'/enable slide loop', QtCore.QVariant(True)).toBool()
+ if wrap:
row = 0
else:
- Receiver.send_message('servicemanager_next_item')
- return
+ row = self.previewListWidget.rowCount() - 1
self.__checkUpdateSelectedSlide(row)
self.slideSelected()
- def onSlideSelectedPreviousNoloop(self):
- self.onSlideSelectedPrevious(False)
-
- def onSlideSelectedPrevious(self, loop=True):
+ def onSlideSelectedPrevious(self):
"""
Go to the previous slide.
"""
@@ -972,7 +980,8 @@ class SlideController(QtGui.QWidget):
else:
row = self.previewListWidget.currentRow() - 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
else:
row = 0
@@ -1000,11 +1009,11 @@ class SlideController(QtGui.QWidget):
self.previewListWidget.rowCount() - 1)
self.slideSelected()
- def onToggleLoop(self, toggled):
+ def onToggleLoop(self):
"""
Toggles the loop state.
"""
- if self.toolbar.actions[u'Start Loop'].isVisible():
+ if self.playSlidesLoop.isChecked() or self.playSlidesOnce.isChecked():
self.onStartLoop()
else:
self.onStopLoop()
@@ -1016,8 +1025,6 @@ class SlideController(QtGui.QWidget):
if self.previewListWidget.rowCount() > 1:
self.timer_id = self.startTimer(
int(self.delaySpinBox.value()) * 1000)
- self.toolbar.actions[u'Stop Loop'].setVisible(True)
- self.toolbar.actions[u'Start Loop'].setVisible(False)
def onStopLoop(self):
"""
@@ -1026,15 +1033,39 @@ class SlideController(QtGui.QWidget):
if self.timer_id != 0:
self.killTimer(self.timer_id)
self.timer_id = 0
- self.toolbar.actions[u'Start Loop'].setVisible(True)
- self.toolbar.actions[u'Stop Loop'].setVisible(False)
+
+ def onPlaySlidesLoop(self, checked=None):
+ """
+ Start or stop 'Play Slides in Loop'
+ """
+ if checked is None:
+ checked = self.playSlidesLoop.isChecked()
+ else:
+ self.playSlidesLoop.setChecked(checked)
+ log.debug(u'onPlaySlidesLoop %s' % checked)
+ self.playSlidesMenu.setDefaultAction(self.playSlidesLoop)
+ self.playSlidesOnce.setChecked(False)
+ self.onToggleLoop()
+
+ def onPlaySlidesOnce(self, checked=None):
+ """
+ Start or stop 'Play Slides to End'
+ """
+ if checked is None:
+ checked = self.playSlidesOnce.isChecked()
+ else:
+ self.playSlidesOnce.setChecked(checked)
+ log.debug(u'onPlaySlidesOnce %s' % checked)
+ self.playSlidesMenu.setDefaultAction(self.playSlidesOnce)
+ self.playSlidesLoop.setChecked(False)
+ self.onToggleLoop()
def timerEvent(self, event):
"""
If the timer event is for this window select next slide
"""
if event.timerId() == self.timer_id:
- self.onSlideSelectedNext()
+ self.onSlideSelectedNext(self.playSlidesLoop.isChecked())
def onEditSong(self):
"""
@@ -1044,12 +1075,27 @@ class SlideController(QtGui.QWidget):
Receiver.send_message(u'%s_edit' % self.serviceItem.name.lower(),
u'P:%s' % self.serviceItem.edit_id)
+ def onPreviewAddToService(self):
+ """
+ From the preview display request the Item to be added to service
+ """
+ if self.serviceItem:
+ self.parent.serviceManagerContents.addServiceItem(self.serviceItem)
+
def onGoLiveClick(self):
"""
triggered by clicking the Preview slide items
"""
if QtCore.QSettings().value(u'advanced/double click live',
QtCore.QVariant(False)).toBool():
+ # Live and Preview have issues if we have video or presentations
+ # playing in both at the same time.
+ if self.serviceItem.is_command():
+ Receiver.send_message(u'%s_stop' %
+ self.serviceItem.name.lower(),
+ [self.serviceItem, self.isLive])
+ if self.serviceItem.is_media():
+ self.onMediaClose()
self.onGoLive()
def onGoLive(self):
diff --git a/openlp/core/ui/splashscreen.py b/openlp/core/ui/splashscreen.py
index 2bb516d00..1d4c845d0 100644
--- a/openlp/core/ui/splashscreen.py
+++ b/openlp/core/ui/splashscreen.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/starttimedialog.py b/openlp/core/ui/starttimedialog.py
index 2d1711231..42d151dcc 100644
--- a/openlp/core/ui/starttimedialog.py
+++ b/openlp/core/ui/starttimedialog.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# 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.startLabel.setText(translate('OpenLP.StartTimeForm', 'Start'))
self.finishLabel.setText(translate('OpenLP.StartTimeForm', 'Finish'))
- self.lengthLabel.setText(translate('OpenLP.StartTimeForm', 'Length'))
\ No newline at end of file
+ self.lengthLabel.setText(translate('OpenLP.StartTimeForm', 'Length'))
diff --git a/openlp/core/ui/starttimeform.py b/openlp/core/ui/starttimeform.py
index 956b01a9d..e33f88da0 100644
--- a/openlp/core/ui/starttimeform.py
+++ b/openlp/core/ui/starttimeform.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/themeform.py b/openlp/core/ui/themeform.py
index 019ab5bfe..bae3e8692 100644
--- a/openlp/core/ui/themeform.py
+++ b/openlp/core/ui/themeform.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py
index 190939ab9..72bdf4558 100644
--- a/openlp/core/ui/thememanager.py
+++ b/openlp/core/ui/thememanager.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
@@ -28,6 +29,7 @@ import os
import zipfile
import shutil
import logging
+import locale
from xml.etree.ElementTree import ElementTree, XML
from PyQt4 import QtCore, QtGui
@@ -55,8 +57,6 @@ class ThemeManager(QtGui.QWidget):
self.settingsSection = u'themes'
self.themeForm = ThemeForm(self)
self.fileRenameForm = FileRenameForm(self)
- self.serviceComboBox = \
- self.mainwindow.ServiceManagerContents.themeComboBox
# start with the layout
self.layout = QtGui.QVBoxLayout(self)
self.layout.setSpacing(0)
@@ -461,7 +461,10 @@ class ThemeManager(QtGui.QWidget):
QtCore.QVariant(theme.theme_name))
self.configUpdated()
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
for name in files:
# check to see file is in theme root directory
diff --git a/openlp/core/ui/themestab.py b/openlp/core/ui/themestab.py
index 20f24d9fe..7e8188f42 100644
--- a/openlp/core/ui/themestab.py
+++ b/openlp/core/ui/themestab.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
@@ -144,10 +145,8 @@ class ThemesTab(SettingsTab):
def save(self):
settings = QtCore.QSettings()
settings.beginGroup(self.settingsSection)
- settings.setValue(u'theme level',
- QtCore.QVariant(self.theme_level))
- settings.setValue(u'global theme',
- QtCore.QVariant(self.global_theme))
+ settings.setValue(u'theme level', QtCore.QVariant(self.theme_level))
+ settings.setValue(u'global theme', QtCore.QVariant(self.global_theme))
settings.endGroup()
self.mainwindow.renderer.set_global_theme(
self.global_theme, self.theme_level)
@@ -185,8 +184,7 @@ class ThemesTab(SettingsTab):
self.settingsSection + u'/global theme',
QtCore.QVariant(u'')).toString())
self.DefaultComboBox.clear()
- for theme in theme_list:
- self.DefaultComboBox.addItem(theme)
+ self.DefaultComboBox.addItems(theme_list)
find_and_set_in_combo_box(self.DefaultComboBox, self.global_theme)
self.mainwindow.renderer.set_global_theme(
self.global_theme, self.theme_level)
diff --git a/openlp/core/ui/themewizard.py b/openlp/core/ui/themewizard.py
index 759b36101..2f75a01c2 100644
--- a/openlp/core/ui/themewizard.py
+++ b/openlp/core/ui/themewizard.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# 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(),
self.horizontalLabel.minimumSizeHint().width())
self.spacer.changeSize(labelWidth, 0,
- QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
\ No newline at end of file
+ QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
diff --git a/openlp/core/ui/wizard.py b/openlp/core/ui/wizard.py
index 9d1147638..6275b64b6 100644
--- a/openlp/core/ui/wizard.py
+++ b/openlp/core/ui/wizard.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/utils/__init__.py b/openlp/core/utils/__init__.py
index c5c08fad4..4ef445e36 100644
--- a/openlp/core/utils/__init__.py
+++ b/openlp/core/utils/__init__.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/core/utils/actions.py b/openlp/core/utils/actions.py
index 0c4eee655..b34ed4c9b 100644
--- a/openlp/core/utils/actions.py
+++ b/openlp/core/utils/actions.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# 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.
``action``
- The action to add (QAction).
+ The action to add (QAction). **Note**, the action must not have an
+ empty ``objectName``.
``category``
The category this action belongs to. The category can be a QString
diff --git a/openlp/core/utils/languagemanager.py b/openlp/core/utils/languagemanager.py
index e62e6279d..0c0a4ed56 100644
--- a/openlp/core/utils/languagemanager.py
+++ b/openlp/core/utils/languagemanager.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
@@ -122,7 +123,7 @@ class LanguageManager(object):
language = u'en'
if action:
action_name = unicode(action.objectName())
- if action_name == u'AutoLanguageItem':
+ if action_name == u'autoLanguageItem':
LanguageManager.auto_language = True
else:
LanguageManager.auto_language = False
diff --git a/openlp/plugins/__init__.py b/openlp/plugins/__init__.py
index 7a160a316..fec8ebe71 100644
--- a/openlp/plugins/__init__.py
+++ b/openlp/plugins/__init__.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/alerts/__init__.py b/openlp/plugins/alerts/__init__.py
index 3a0892d49..c8e82eaa2 100644
--- a/openlp/plugins/alerts/__init__.py
+++ b/openlp/plugins/alerts/__init__.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/alerts/alertsplugin.py b/openlp/plugins/alerts/alertsplugin.py
index 979ebb01d..9a61ff7d6 100644
--- a/openlp/plugins/alerts/alertsplugin.py
+++ b/openlp/plugins/alerts/alertsplugin.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
@@ -67,7 +68,7 @@ class AlertsPlugin(Plugin):
self.toolsAlertItem.setStatusTip(
translate('AlertsPlugin', 'Show an alert message.'))
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.SIGNAL(u'triggered()'), self.onAlertsTrigger)
self.toolsAlertItem.setVisible(False)
diff --git a/openlp/plugins/alerts/forms/__init__.py b/openlp/plugins/alerts/forms/__init__.py
index bb4a9940f..4c9b353d4 100644
--- a/openlp/plugins/alerts/forms/__init__.py
+++ b/openlp/plugins/alerts/forms/__init__.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/alerts/forms/alertdialog.py b/openlp/plugins/alerts/forms/alertdialog.py
index da788f2bd..8ee777ebe 100644
--- a/openlp/plugins/alerts/forms/alertdialog.py
+++ b/openlp/plugins/alerts/forms/alertdialog.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/alerts/forms/alertform.py b/openlp/plugins/alerts/forms/alertform.py
index 6f6311392..13cb4503a 100644
--- a/openlp/plugins/alerts/forms/alertform.py
+++ b/openlp/plugins/alerts/forms/alertform.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/alerts/lib/__init__.py b/openlp/plugins/alerts/lib/__init__.py
index 39cbbfe59..2ac257585 100644
--- a/openlp/plugins/alerts/lib/__init__.py
+++ b/openlp/plugins/alerts/lib/__init__.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/alerts/lib/alertsmanager.py b/openlp/plugins/alerts/lib/alertsmanager.py
index d12fb41ec..c55e76ef7 100644
--- a/openlp/plugins/alerts/lib/alertsmanager.py
+++ b/openlp/plugins/alerts/lib/alertsmanager.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/alerts/lib/alertstab.py b/openlp/plugins/alerts/lib/alertstab.py
index 8c8778f9f..31e59a35d 100644
--- a/openlp/plugins/alerts/lib/alertstab.py
+++ b/openlp/plugins/alerts/lib/alertstab.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/alerts/lib/db.py b/openlp/plugins/alerts/lib/db.py
index 72c671620..b70dbffd2 100644
--- a/openlp/plugins/alerts/lib/db.py
+++ b/openlp/plugins/alerts/lib/db.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/bibles/__init__.py b/openlp/plugins/bibles/__init__.py
index 5a2035e13..273148af2 100644
--- a/openlp/plugins/bibles/__init__.py
+++ b/openlp/plugins/bibles/__init__.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/bibles/bibleplugin.py b/openlp/plugins/bibles/bibleplugin.py
index de7ce144e..2deb86cc1 100644
--- a/openlp/plugins/bibles/bibleplugin.py
+++ b/openlp/plugins/bibles/bibleplugin.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
@@ -93,7 +94,7 @@ class BiblePlugin(Plugin):
def about(self):
about_text = translate('BiblesPlugin', 'Bible Plugin'
- '
The Bible plugin provides the ability to display bible '
+ '
The Bible plugin provides the ability to display Bible '
'verses from different sources during the service.')
return about_text
diff --git a/openlp/plugins/bibles/forms/__init__.py b/openlp/plugins/bibles/forms/__init__.py
index e6897e53f..83b444394 100644
--- a/openlp/plugins/bibles/forms/__init__.py
+++ b/openlp/plugins/bibles/forms/__init__.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/bibles/forms/bibleimportform.py b/openlp/plugins/bibles/forms/bibleimportform.py
index 439724b66..e05e29d57 100644
--- a/openlp/plugins/bibles/forms/bibleimportform.py
+++ b/openlp/plugins/bibles/forms/bibleimportform.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
@@ -30,6 +31,7 @@ import csv
import logging
import os
import os.path
+import locale
from PyQt4 import QtCore, QtGui
@@ -531,7 +533,7 @@ class BibleImportForm(OpenLPWizard):
"""
self.webTranslationComboBox.clear()
bibles = self.web_bible_list[index].keys()
- bibles.sort()
+ bibles.sort(cmp=locale.strcoll)
self.webTranslationComboBox.addItems(bibles)
def onOsisBrowseButtonClicked(self):
@@ -694,7 +696,7 @@ class BibleImportForm(OpenLPWizard):
if bible_type == BibleFormat.WebDownload:
self.progressLabel.setText(translate(
'BiblesPlugin.ImportWizardForm',
- 'Starting Registering bible...'))
+ 'Registering Bible...'))
else:
self.progressLabel.setText(WizardStrings.StartingImport)
Receiver.send_message(u'openlp_process_events')
@@ -757,7 +759,7 @@ class BibleImportForm(OpenLPWizard):
if bible_type == BibleFormat.WebDownload:
self.progressLabel.setText(
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.'))
else:
self.progressLabel.setText(WizardStrings.FinishedImport)
@@ -765,4 +767,4 @@ class BibleImportForm(OpenLPWizard):
self.progressLabel.setText(translate(
'BiblesPlugin.ImportWizardForm', 'Your Bible import failed.'))
del self.manager.db_cache[importer.name]
- delete_database(self.plugin.settingsSection, importer.file)
\ No newline at end of file
+ delete_database(self.plugin.settingsSection, importer.file)
diff --git a/openlp/plugins/bibles/lib/__init__.py b/openlp/plugins/bibles/lib/__init__.py
index e219fbc00..9fda8fbd6 100644
--- a/openlp/plugins/bibles/lib/__init__.py
+++ b/openlp/plugins/bibles/lib/__init__.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/bibles/lib/biblestab.py b/openlp/plugins/bibles/lib/biblestab.py
index 33c2c1f9f..321148a22 100644
--- a/openlp/plugins/bibles/lib/biblestab.py
+++ b/openlp/plugins/bibles/lib/biblestab.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# 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'')
for theme in theme_list:
self.bibleThemeComboBox.addItem(theme)
- find_and_set_in_combo_box(self.bibleThemeComboBox, self.bible_theme)
\ No newline at end of file
+ find_and_set_in_combo_box(self.bibleThemeComboBox, self.bible_theme)
diff --git a/openlp/plugins/bibles/lib/csvbible.py b/openlp/plugins/bibles/lib/csvbible.py
index 9ff7394d1..37764108a 100644
--- a/openlp/plugins/bibles/lib/csvbible.py
+++ b/openlp/plugins/bibles/lib/csvbible.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/bibles/lib/db.py b/openlp/plugins/bibles/lib/db.py
index 028a2867b..c896528ea 100644
--- a/openlp/plugins/bibles/lib/db.py
+++ b/openlp/plugins/bibles/lib/db.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
@@ -323,7 +324,7 @@ class BibleDB(QtCore.QObject, Manager):
"""
return self.get_all_objects(Book, order_by_ref=Book.id)
- def get_verses(self, reference_list):
+ def get_verses(self, reference_list, show_error=True):
"""
This is probably the most used function. It retrieves the list of
verses based on the user's query.
@@ -360,11 +361,12 @@ class BibleDB(QtCore.QObject, Manager):
verse_list.extend(verses)
else:
log.debug(u'OpenLP failed to find book %s', book)
- critical_error_message_box(
- translate('BiblesPlugin', 'No Book Found'),
- translate('BiblesPlugin', 'No matching book '
- 'could be found in this Bible. Check that you have '
- 'spelled the name of the book correctly.'))
+ if show_error:
+ critical_error_message_box(
+ translate('BiblesPlugin', 'No Book Found'),
+ translate('BiblesPlugin', 'No matching book '
+ 'could be found in this Bible. Check that you '
+ 'have spelled the name of the book correctly.'))
return verse_list
def verse_search(self, text):
diff --git a/openlp/plugins/bibles/lib/http.py b/openlp/plugins/bibles/lib/http.py
index 6a6ef131a..b66aa0373 100644
--- a/openlp/plugins/bibles/lib/http.py
+++ b/openlp/plugins/bibles/lib/http.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
@@ -425,7 +426,7 @@ class HTTPBible(BibleDB):
self.create_meta(u'proxy password', self.proxy_password)
return True
- def get_verses(self, reference_list):
+ def get_verses(self, reference_list, show_error=True):
"""
A reimplementation of the ``BibleDB.get_verses`` method, this one is
specifically for web Bibles. It first checks to see if the particular
@@ -453,11 +454,12 @@ class HTTPBible(BibleDB):
if not db_book:
book_details = HTTPBooks.get_book(book)
if not book_details:
- critical_error_message_box(
- translate('BiblesPlugin', 'No Book Found'),
- translate('BiblesPlugin', 'No matching '
- 'book could be found in this Bible. Check that you '
- 'have spelled the name of the book correctly.'))
+ if show_error:
+ critical_error_message_box(
+ translate('BiblesPlugin', 'No Book Found'),
+ translate('BiblesPlugin', 'No matching '
+ 'book could be found in this Bible. Check that you '
+ 'have spelled the name of the book correctly.'))
return []
db_book = self.create_book(book_details[u'name'],
book_details[u'abbreviation'],
@@ -480,7 +482,7 @@ class HTTPBible(BibleDB):
Receiver.send_message(u'openlp_process_events')
Receiver.send_message(u'cursor_normal')
Receiver.send_message(u'openlp_process_events')
- return BibleDB.get_verses(self, reference_list)
+ return BibleDB.get_verses(self, reference_list, show_error)
def get_chapter(self, book, chapter):
"""
diff --git a/openlp/plugins/bibles/lib/manager.py b/openlp/plugins/bibles/lib/manager.py
index 3dfefb3e6..e367e091e 100644
--- a/openlp/plugins/bibles/lib/manager.py
+++ b/openlp/plugins/bibles/lib/manager.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
@@ -231,7 +232,7 @@ class BibleManager(object):
bible, book, chapter)
return self.db_cache[bible].get_verse_count(book, chapter)
- def get_verses(self, bible, versetext):
+ def get_verses(self, bible, versetext, show_error=True):
"""
Parses a scripture reference, fetches the verses from the Bible
specified, and returns a list of ``Verse`` objects.
@@ -252,32 +253,34 @@ class BibleManager(object):
"""
log.debug(u'BibleManager.get_verses("%s", "%s")', bible, versetext)
if not bible:
- Receiver.send_message(u'openlp_information_message', {
- u'title': translate('BiblesPlugin.BibleManager',
- 'No Bibles Available'),
- u'message': translate('BiblesPlugin.BibleManager',
- 'There are no Bibles currently installed. Please use the '
- 'Import Wizard to install one or more Bibles.')
- })
+ if show_error:
+ Receiver.send_message(u'openlp_information_message', {
+ u'title': translate('BiblesPlugin.BibleManager',
+ 'No Bibles Available'),
+ u'message': translate('BiblesPlugin.BibleManager',
+ 'There are no Bibles currently installed. Please use the '
+ 'Import Wizard to install one or more Bibles.')
+ })
return None
reflist = parse_reference(versetext)
if reflist:
- return self.db_cache[bible].get_verses(reflist)
+ return self.db_cache[bible].get_verses(reflist, show_error)
else:
- Receiver.send_message(u'openlp_information_message', {
- u'title': translate('BiblesPlugin.BibleManager',
- 'Scripture Reference Error'),
- u'message': translate('BiblesPlugin.BibleManager',
- 'Your scripture reference is either not supported by OpenLP '
- 'or is invalid. Please make sure your reference conforms to '
- 'one of the following patterns:\n\n'
- 'Book Chapter\n'
- 'Book Chapter-Chapter\n'
- 'Book Chapter:Verse-Verse\n'
- 'Book Chapter:Verse-Verse,Verse-Verse\n'
- 'Book Chapter:Verse-Verse,Chapter:Verse-Verse\n'
- 'Book Chapter:Verse-Chapter:Verse')
- })
+ if show_error:
+ Receiver.send_message(u'openlp_information_message', {
+ u'title': translate('BiblesPlugin.BibleManager',
+ 'Scripture Reference Error'),
+ u'message': translate('BiblesPlugin.BibleManager',
+ 'Your scripture reference is either not supported by '
+ 'OpenLP or is invalid. Please make sure your reference '
+ 'conforms to one of the following patterns:\n\n'
+ 'Book Chapter\n'
+ 'Book Chapter-Chapter\n'
+ 'Book Chapter:Verse-Verse\n'
+ 'Book Chapter:Verse-Verse,Verse-Verse\n'
+ 'Book Chapter:Verse-Verse,Chapter:Verse-Verse\n'
+ 'Book Chapter:Verse-Chapter:Verse')
+ })
return None
def verse_search(self, bible, second_bible, text):
diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py
index 0fb3b1eee..41059f942 100644
--- a/openlp/plugins/bibles/lib/mediaitem.py
+++ b/openlp/plugins/bibles/lib/mediaitem.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
@@ -25,6 +26,7 @@
###############################################################################
import logging
+import locale
from PyQt4 import QtCore, QtGui
@@ -61,6 +63,7 @@ class BibleMediaItem(MediaManagerItem):
# Place to store the search results for both bibles.
self.settings = self.parent.settings_tab
self.quickPreviewAllowed = True
+ self.hasSearch = True
self.search_results = {}
self.second_search_results = {}
self.check_search_result()
@@ -270,6 +273,12 @@ class BibleMediaItem(MediaManagerItem):
QtCore.SIGNAL(u'currentChanged(int)'),
self.onSearchTabBarCurrentChanged)
+ def onFocus(self):
+ if self.quickTab.isVisible():
+ self.quickSearchEdit.setFocus()
+ else:
+ self.advancedBookComboBox.setFocus()
+
def configUpdated(self):
log.debug(u'configUpdated')
if QtCore.QSettings().value(self.settingsSection + u'/second bibles',
@@ -357,7 +366,7 @@ class BibleMediaItem(MediaManagerItem):
self.advancedSecondComboBox.addItem(u'')
# Get all bibles and sort the list.
bibles = self.parent.manager.get_bibles().keys()
- bibles.sort()
+ bibles.sort(cmp=locale.strcoll)
# Load the bibles into the combo boxes.
for bible in bibles:
if bible:
@@ -441,7 +450,7 @@ class BibleMediaItem(MediaManagerItem):
if bible:
book_data = bibles[bible].get_books()
books = [book.name + u' ' for book in book_data]
- books.sort()
+ books.sort(cmp=locale.strcoll)
add_widget_completer(books, self.quickSearchEdit)
def onImportClick(self):
@@ -460,6 +469,7 @@ class BibleMediaItem(MediaManagerItem):
else:
self.quickTab.setVisible(False)
self.advancedTab.setVisible(True)
+ self.advancedBookComboBox.setFocus()
def onLockButtonToggled(self, checked):
if checked:
@@ -646,6 +656,19 @@ class BibleMediaItem(MediaManagerItem):
Receiver.send_message(u'openlp_process_events')
def displayResults(self, bible, second_bible=u''):
+ """
+ Displays the search results in the media manager. All data needed for
+ further action is saved for/in each row.
+ """
+ items = self.buildDisplayResults(bible, second_bible,
+ self.search_results)
+ for bible_verse in items:
+ self.listView.addItem(bible_verse)
+ self.listView.selectAll()
+ self.search_results = {}
+ self.second_search_results = {}
+
+ def buildDisplayResults(self, bible, second_bible, search_results):
"""
Displays the search results in the media manager. All data needed for
further action is saved for/in each row.
@@ -665,7 +688,8 @@ class BibleMediaItem(MediaManagerItem):
second_bible, u'Copyright').value
second_permissions = self.parent.manager.get_meta_data(
second_bible, u'Permissions').value
- for count, verse in enumerate(self.search_results):
+ items = []
+ for count, verse in enumerate(search_results):
data = {
'book': QtCore.QVariant(verse.book.name),
'chapter': QtCore.QVariant(verse.chapter),
@@ -697,10 +721,8 @@ class BibleMediaItem(MediaManagerItem):
verse.chapter, verse_separator, verse.verse, version)
bible_verse = QtGui.QListWidgetItem(bible_text)
bible_verse.setData(QtCore.Qt.UserRole, QtCore.QVariant(data))
- self.listView.addItem(bible_verse)
- self.listView.selectAll()
- self.search_results = {}
- self.second_search_results = {}
+ items.append(bible_verse)
+ return items
def generateSlideData(self, service_item, item=None, xmlVersion=False):
"""
@@ -708,7 +730,10 @@ class BibleMediaItem(MediaManagerItem):
service item's title.
"""
log.debug(u'generating slide data')
- items = self.listView.selectedIndexes()
+ if item:
+ items = item
+ else:
+ items = self.listView.selectedItems()
if len(items) == 0:
return False
bible_text = u''
@@ -717,8 +742,7 @@ class BibleMediaItem(MediaManagerItem):
raw_slides = []
raw_title = []
verses = VerseReferenceList()
- for item in items:
- bitem = self.listView.item(item.row())
+ for bitem in items:
book = self._decodeQtObject(bitem, 'book')
chapter = int(self._decodeQtObject(bitem, 'chapter'))
verse = int(self._decodeQtObject(bitem, 'verse'))
@@ -751,12 +775,13 @@ class BibleMediaItem(MediaManagerItem):
# We have to be 'Continuous'.
else:
bible_text = u'%s %s %s\n' % (bible_text, verse_text, text)
+ bible_text = bible_text.strip(u' ')
if not old_item:
- start_item = item
- elif self.checkTitle(item, old_item):
+ start_item = bitem
+ elif self.checkTitle(bitem, old_item):
raw_title.append(self.formatTitle(start_item, old_item))
- start_item = item
- old_item = item
+ start_item = bitem
+ old_item = bitem
old_chapter = chapter
# Add footer
service_item.raw_footer.append(verses.format_verses())
@@ -764,7 +789,7 @@ class BibleMediaItem(MediaManagerItem):
verses.add_version(second_version, second_copyright,
second_permissions)
service_item.raw_footer.append(verses.format_versions())
- raw_title.append(self.formatTitle(start_item, item))
+ raw_title.append(self.formatTitle(start_item, bitem))
# If there are no more items we check whether we have to add bible_text.
if bible_text:
raw_slides.append(bible_text.lstrip())
@@ -787,9 +812,9 @@ class BibleMediaItem(MediaManagerItem):
[service_item.add_from_text(slide[:30], slide) for slide in raw_slides]
return True
- def formatTitle(self, start_item, old_item):
+ def formatTitle(self, start_bitem, old_bitem):
"""
- This methode is called, when we have to change the title, because
+ This method is called, when we have to change the title, because
we are at the end of a verse range. E. g. if we want to add
Genesis 1:1-6 as well as Daniel 2:14.
@@ -801,10 +826,8 @@ class BibleMediaItem(MediaManagerItem):
"""
verse_separator = get_reference_match(u'sep_v_display')
range_separator = get_reference_match(u'sep_r_display')
- old_bitem = self.listView.item(old_item.row())
old_chapter = self._decodeQtObject(old_bitem, 'chapter')
old_verse = self._decodeQtObject(old_bitem, 'verse')
- start_bitem = self.listView.item(start_item.row())
start_book = self._decodeQtObject(start_bitem, 'book')
start_chapter = self._decodeQtObject(start_bitem, 'chapter')
start_verse = self._decodeQtObject(start_bitem, 'verse')
@@ -825,9 +848,9 @@ class BibleMediaItem(MediaManagerItem):
range_separator + old_chapter + verse_separator + old_verse
return u'%s %s (%s)' % (start_book, verse_range, bibles)
- def checkTitle(self, item, old_item):
+ def checkTitle(self, bitem, old_bitem):
"""
- This methode checks if we are at the end of an verse range. If that is
+ This method checks if we are at the end of an verse range. If that is
the case, we return True, otherwise False. E. g. if we added
Genesis 1:1-6, but the next verse is Daniel 2:14, we return True.
@@ -838,13 +861,11 @@ class BibleMediaItem(MediaManagerItem):
The item we were previously dealing with.
"""
# Get all the necessary meta data.
- bitem = self.listView.item(item.row())
book = self._decodeQtObject(bitem, 'book')
chapter = int(self._decodeQtObject(bitem, 'chapter'))
verse = int(self._decodeQtObject(bitem, 'verse'))
bible = self._decodeQtObject(bitem, 'bible')
second_bible = self._decodeQtObject(bitem, 'second_bible')
- old_bitem = self.listView.item(old_item.row())
old_book = self._decodeQtObject(old_bitem, 'book')
old_chapter = int(self._decodeQtObject(old_bitem, 'chapter'))
old_verse = int(self._decodeQtObject(old_bitem, 'verse'))
@@ -896,3 +917,22 @@ class BibleMediaItem(MediaManagerItem):
if self.settings.display_style == DisplayStyle.Square:
return u'{su}[%s]{/su}' % verse_text
return u'{su}%s{/su}' % verse_text
+
+ def search(self, string):
+ """
+ Search for some Bible verses (by reference).
+ """
+ bible = unicode(self.quickVersionComboBox.currentText())
+ search_results = self.parent.manager.get_verses(bible, string, False)
+ results = []
+ if search_results:
+ versetext = u' '.join([verse.text for verse in search_results])
+ return [[string, versetext]]
+ return []
+
+ def createItemFromId(self, item_id):
+ item = QtGui.QListWidgetItem()
+ bible = unicode(self.quickVersionComboBox.currentText())
+ search_results = self.parent.manager.get_verses(bible, item_id, False)
+ items = self.buildDisplayResults(bible, u'', search_results)
+ return items
diff --git a/openlp/plugins/bibles/lib/openlp1.py b/openlp/plugins/bibles/lib/openlp1.py
index e43417c02..c3a1c9f68 100644
--- a/openlp/plugins/bibles/lib/openlp1.py
+++ b/openlp/plugins/bibles/lib/openlp1.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/bibles/lib/opensong.py b/openlp/plugins/bibles/lib/opensong.py
index 585ecf9c7..115b08e42 100644
--- a/openlp/plugins/bibles/lib/opensong.py
+++ b/openlp/plugins/bibles/lib/opensong.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/bibles/lib/osis.py b/openlp/plugins/bibles/lib/osis.py
index a080524eb..958d70d90 100644
--- a/openlp/plugins/bibles/lib/osis.py
+++ b/openlp/plugins/bibles/lib/osis.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/bibles/lib/versereferencelist.py b/openlp/plugins/bibles/lib/versereferencelist.py
index bab6d7e11..c51eb106e 100644
--- a/openlp/plugins/bibles/lib/versereferencelist.py
+++ b/openlp/plugins/bibles/lib/versereferencelist.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/custom/__init__.py b/openlp/plugins/custom/__init__.py
index 5171155d2..82729a11c 100644
--- a/openlp/plugins/custom/__init__.py
+++ b/openlp/plugins/custom/__init__.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/custom/customplugin.py b/openlp/plugins/custom/customplugin.py
index 8b8a7e6ae..e790a2449 100644
--- a/openlp/plugins/custom/customplugin.py
+++ b/openlp/plugins/custom/customplugin.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
@@ -26,8 +27,6 @@
import logging
-from forms import EditCustomForm
-
from openlp.core.lib import Plugin, StringContent, build_icon, translate
from openlp.core.lib.db import Manager
from openlp.plugins.custom.lib import CustomMediaItem, CustomTab
@@ -51,7 +50,6 @@ class CustomPlugin(Plugin):
CustomMediaItem, CustomTab)
self.weight = -5
self.manager = Manager(u'custom', init_schema)
- self.edit_custom_form = EditCustomForm(self)
self.icon_path = u':/plugins/plugin_custom.png'
self.icon = build_icon(self.icon_path)
diff --git a/openlp/plugins/custom/forms/__init__.py b/openlp/plugins/custom/forms/__init__.py
index fb3cf975b..53953c428 100644
--- a/openlp/plugins/custom/forms/__init__.py
+++ b/openlp/plugins/custom/forms/__init__.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/custom/forms/editcustomdialog.py b/openlp/plugins/custom/forms/editcustomdialog.py
index 7a6c1f07b..418c7ea76 100644
--- a/openlp/plugins/custom/forms/editcustomdialog.py
+++ b/openlp/plugins/custom/forms/editcustomdialog.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# 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:'))
self.creditLabel.setText(
translate('CustomPlugin.EditCustomForm', '&Credits:'))
- self.previewButton.setText(UiStrings().SaveAndPreview)
\ No newline at end of file
+ self.previewButton.setText(UiStrings().SaveAndPreview)
diff --git a/openlp/plugins/custom/forms/editcustomform.py b/openlp/plugins/custom/forms/editcustomform.py
index 7b8a15c21..00165e6ff 100644
--- a/openlp/plugins/custom/forms/editcustomform.py
+++ b/openlp/plugins/custom/forms/editcustomform.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# 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.
"""
log.info(u'Custom Editor loaded')
- def __init__(self, parent):
+ def __init__(self, parent, manager):
"""
Constructor
"""
QtGui.QDialog.__init__(self)
self.parent = parent
- self.manager = self.parent.manager
+ self.manager = manager
self.setupUi(self)
# Create other objects and forms.
self.editSlideForm = EditCustomSlideForm(self)
@@ -65,6 +66,9 @@ class EditCustomForm(QtGui.QDialog, Ui_CustomEditDialog):
QtCore.SIGNAL(u'theme_update_list'), self.loadThemes)
QtCore.QObject.connect(self.slideListView,
QtCore.SIGNAL(u'currentRowChanged(int)'), self.onCurrentRowChanged)
+ QtCore.QObject.connect(self.slideListView,
+ QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
+ self.onEditButtonPressed)
def loadThemes(self, themelist):
self.themeComboBox.clear()
@@ -132,7 +136,9 @@ class EditCustomForm(QtGui.QDialog, Ui_CustomEditDialog):
self.customSlide.text = unicode(sxml.extract_xml(), u'utf-8')
self.customSlide.credits = unicode(self.creditEdit.text())
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):
selectedRow = self.slideListView.currentRow()
@@ -261,4 +267,4 @@ class EditCustomForm(QtGui.QDialog, Ui_CustomEditDialog):
message=translate('CustomPlugin.EditCustomForm',
'You need to add at least one slide'))
return False
- return True
\ No newline at end of file
+ return True
diff --git a/openlp/plugins/custom/forms/editcustomslidedialog.py b/openlp/plugins/custom/forms/editcustomslidedialog.py
index d6ebf23ec..165e6d847 100644
--- a/openlp/plugins/custom/forms/editcustomslidedialog.py
+++ b/openlp/plugins/custom/forms/editcustomslidedialog.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
@@ -26,7 +27,7 @@
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import translate, SpellTextEdit
+from openlp.core.lib import translate, SpellTextEdit, build_icon
from openlp.core.lib.ui import create_accept_reject_button_box
class Ui_CustomSlideEditDialog(object):
@@ -39,9 +40,15 @@ class Ui_CustomSlideEditDialog(object):
self.dialogLayout.addWidget(self.slideTextEdit)
self.buttonBox = create_accept_reject_button_box(customSlideEditDialog)
self.splitButton = QtGui.QPushButton(customSlideEditDialog)
+ self.splitButton.setIcon(build_icon(u':/general/general_add.png'))
self.splitButton.setObjectName(u'splitButton')
self.buttonBox.addButton(self.splitButton,
QtGui.QDialogButtonBox.ActionRole)
+ self.insertButton = QtGui.QPushButton(customSlideEditDialog)
+ self.insertButton.setIcon(build_icon(u':/general/general_add.png'))
+ self.insertButton.setObjectName(u'insertButton')
+ self.buttonBox.addButton(self.insertButton,
+ QtGui.QDialogButtonBox.ActionRole)
self.dialogLayout.addWidget(self.buttonBox)
self.retranslateUi(customSlideEditDialog)
QtCore.QMetaObject.connectSlotsByName(customSlideEditDialog)
@@ -50,5 +57,10 @@ class Ui_CustomSlideEditDialog(object):
self.splitButton.setText(
translate('CustomPlugin.EditCustomForm', 'Split Slide'))
self.splitButton.setToolTip(
+ translate('CustomPlugin.EditCustomForm', 'Split a slide into two '
+ 'only if it does not fit on the screen as one slide.'))
+ self.insertButton.setText(
+ translate('CustomPlugin.EditCustomForm', 'Insert Slide'))
+ self.insertButton.setToolTip(
translate('CustomPlugin.EditCustomForm', 'Split a slide into two '
'by inserting a slide splitter.'))
diff --git a/openlp/plugins/custom/forms/editcustomslideform.py b/openlp/plugins/custom/forms/editcustomslideform.py
index bf775a1f2..d8087dc2c 100644
--- a/openlp/plugins/custom/forms/editcustomslideform.py
+++ b/openlp/plugins/custom/forms/editcustomslideform.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
@@ -44,6 +45,8 @@ class EditCustomSlideForm(QtGui.QDialog, Ui_CustomSlideEditDialog):
QtGui.QDialog.__init__(self, parent)
self.setupUi(self)
# Connecting signals and slots
+ QtCore.QObject.connect(self.insertButton,
+ QtCore.SIGNAL(u'clicked()'), self.onInsertButtonPressed)
QtCore.QObject.connect(self.splitButton,
QtCore.SIGNAL(u'clicked()'), self.onSplitButtonPressed)
@@ -65,7 +68,7 @@ class EditCustomSlideForm(QtGui.QDialog, Ui_CustomSlideEditDialog):
"""
return self.slideTextEdit.toPlainText().split(u'\n[===]\n')
- def onSplitButtonPressed(self):
+ def onInsertButtonPressed(self):
"""
Adds a slide split at the cursor.
"""
@@ -73,3 +76,12 @@ class EditCustomSlideForm(QtGui.QDialog, Ui_CustomSlideEditDialog):
self.slideTextEdit.insertPlainText(u'\n')
self.slideTextEdit.insertPlainText(u'[===]\n')
self.slideTextEdit.setFocus()
+
+ def onSplitButtonPressed(self):
+ """
+ Adds a virtual split at cursor.
+ """
+ if self.slideTextEdit.textCursor().columnNumber() != 0:
+ self.slideTextEdit.insertPlainText(u'\n')
+ self.slideTextEdit.insertPlainText(u'[---]')
+ self.slideTextEdit.setFocus()
diff --git a/openlp/plugins/custom/lib/__init__.py b/openlp/plugins/custom/lib/__init__.py
index 25abdd38b..678c0065c 100644
--- a/openlp/plugins/custom/lib/__init__.py
+++ b/openlp/plugins/custom/lib/__init__.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/custom/lib/customtab.py b/openlp/plugins/custom/lib/customtab.py
index 9de294418..fb83fab81 100644
--- a/openlp/plugins/custom/lib/customtab.py
+++ b/openlp/plugins/custom/lib/customtab.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/custom/lib/customxmlhandler.py b/openlp/plugins/custom/lib/customxmlhandler.py
index 2babe3d12..e1021fdad 100644
--- a/openlp/plugins/custom/lib/customxmlhandler.py
+++ b/openlp/plugins/custom/lib/customxmlhandler.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/custom/lib/db.py b/openlp/plugins/custom/lib/db.py
index 35c24413a..83f298856 100644
--- a/openlp/plugins/custom/lib/db.py
+++ b/openlp/plugins/custom/lib/db.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/custom/lib/mediaitem.py b/openlp/plugins/custom/lib/mediaitem.py
index 4bd3a8d4b..d0a3de061 100644
--- a/openlp/plugins/custom/lib/mediaitem.py
+++ b/openlp/plugins/custom/lib/mediaitem.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
@@ -25,17 +26,29 @@
###############################################################################
import logging
+import locale
from PyQt4 import QtCore, QtGui
+from sqlalchemy.sql import or_, func
from openlp.core.lib import MediaManagerItem, Receiver, ItemCapabilities, \
- check_item_selected
+ check_item_selected, translate
+from openlp.core.lib.searchedit import SearchEdit
from openlp.core.lib.ui import UiStrings
+from openlp.plugins.custom.forms import EditCustomForm
from openlp.plugins.custom.lib import CustomXMLParser
from openlp.plugins.custom.lib.db import CustomSlide
log = logging.getLogger(__name__)
+class CustomSearch(object):
+ """
+ An enumeration for custom search methods.
+ """
+ Titles = 1
+ Themes = 2
+
+
class CustomMediaItem(MediaManagerItem):
"""
This is the custom media manager item for Custom Slides.
@@ -45,14 +58,51 @@ class CustomMediaItem(MediaManagerItem):
def __init__(self, parent, plugin, icon):
self.IconPath = u'custom/custom'
MediaManagerItem.__init__(self, parent, self, icon)
+ self.edit_custom_form = EditCustomForm(self, self.parent.manager)
self.singleServiceItem = False
self.quickPreviewAllowed = True
+ self.hasSearch = True
# Holds information about whether the edit is remotly triggered and
# which Custom is required.
self.remoteCustom = -1
self.manager = parent.manager
def addEndHeaderBar(self):
+ self.addToolbarSeparator()
+ self.searchWidget = QtGui.QWidget(self)
+ self.searchWidget.setObjectName(u'searchWidget')
+ self.searchLayout = QtGui.QVBoxLayout(self.searchWidget)
+ self.searchLayout.setObjectName(u'searchLayout')
+ self.searchTextLayout = QtGui.QFormLayout()
+ self.searchTextLayout.setObjectName(u'searchTextLayout')
+ self.searchTextLabel = QtGui.QLabel(self.searchWidget)
+ self.searchTextLabel.setObjectName(u'searchTextLabel')
+ self.searchTextEdit = SearchEdit(self.searchWidget)
+ self.searchTextEdit.setObjectName(u'searchTextEdit')
+ self.searchTextLabel.setBuddy(self.searchTextEdit)
+ self.searchTextLayout.addRow(self.searchTextLabel, self.searchTextEdit)
+ self.searchLayout.addLayout(self.searchTextLayout)
+ self.searchButtonLayout = QtGui.QHBoxLayout()
+ self.searchButtonLayout.setObjectName(u'searchButtonLayout')
+ self.searchButtonLayout.addStretch()
+ self.searchTextButton = QtGui.QPushButton(self.searchWidget)
+ self.searchTextButton.setObjectName(u'searchTextButton')
+ self.searchButtonLayout.addWidget(self.searchTextButton)
+ self.searchLayout.addLayout(self.searchButtonLayout)
+ self.pageLayout.addWidget(self.searchWidget)
+ # Signals and slots
+ QtCore.QObject.connect(self.searchTextEdit,
+ QtCore.SIGNAL(u'returnPressed()'), self.onSearchTextButtonClick)
+ QtCore.QObject.connect(self.searchTextButton,
+ QtCore.SIGNAL(u'pressed()'), self.onSearchTextButtonClick)
+ QtCore.QObject.connect(self.searchTextEdit,
+ QtCore.SIGNAL(u'textChanged(const QString&)'),
+ self.onSearchTextEditChanged)
+ QtCore.QObject.connect(self.searchTextEdit,
+ QtCore.SIGNAL(u'cleared()'), self.onClearTextButtonClick)
+ QtCore.QObject.connect(self.searchTextEdit,
+ QtCore.SIGNAL(u'searchTypeChanged(int)'),
+ self.onSearchTextButtonClick)
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'custom_edit'), self.onRemoteEdit)
QtCore.QObject.connect(Receiver.get_receiver(),
@@ -62,9 +112,22 @@ class CustomMediaItem(MediaManagerItem):
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'custom_preview'), self.onPreviewClick)
+ def retranslateUi(self):
+ self.searchTextLabel.setText(u'%s:' % UiStrings().Search)
+ self.searchTextButton.setText(UiStrings().Search)
+
def initialise(self):
+ self.searchTextEdit.setSearchTypes([
+ (CustomSearch.Titles, u':/songs/song_search_title.png',
+ translate('SongsPlugin.MediaItem', 'Titles')),
+ (CustomSearch.Themes, u':/slides/slide_theme.png',
+ UiStrings().Themes)
+ ])
self.loadList(self.manager.get_all_objects(
CustomSlide, order_by_ref=CustomSlide.title))
+ self.searchTextEdit.setCurrentSearchType(QtCore.QSettings().value(
+ u'%s/last search type' % self.settingsSection,
+ QtCore.QVariant(CustomSearch.Titles)).toInt()[0])
# Called to redisplay the custom list screen edith from a search
# or from the exit of the Custom edit dialog. If remote editing is
# active trigger it and clean up so it will not update again.
@@ -74,37 +137,47 @@ class CustomMediaItem(MediaManagerItem):
self.onPreviewClick()
self.onRemoteEditClear()
- def loadList(self, list):
+ def loadList(self, custom_slides):
+ # Sort out what custom we want to select after loading the list.
+ self.save_auto_select_id()
self.listView.clear()
- for customSlide in list:
- custom_name = QtGui.QListWidgetItem(customSlide.title)
+ # Sort the customs by its title considering language specific
+ # characters. lower() is needed for windows!
+ custom_slides.sort(
+ cmp=locale.strcoll, key=lambda custom: custom.title.lower())
+ for custom_slide in custom_slides:
+ custom_name = QtGui.QListWidgetItem(custom_slide.title)
custom_name.setData(
- QtCore.Qt.UserRole, QtCore.QVariant(customSlide.id))
+ QtCore.Qt.UserRole, QtCore.QVariant(custom_slide.id))
self.listView.addItem(custom_name)
+ # Auto-select the custom.
+ if custom_slide.id == self.auto_select_id:
+ self.listView.setCurrentItem(custom_name)
+ self.auto_select_id = -1
def onNewClick(self):
- self.parent.edit_custom_form.loadCustom(0)
- self.parent.edit_custom_form.exec_()
+ self.edit_custom_form.loadCustom(0)
+ self.edit_custom_form.exec_()
self.initialise()
def onRemoteEditClear(self):
self.remoteTriggered = None
self.remoteCustom = -1
- def onRemoteEdit(self, customid):
+ def onRemoteEdit(self, message):
"""
Called by ServiceManager or SlideController by event passing
- the Song Id in the payload along with an indicator to say which
+ the custom Id in the payload along with an indicator to say which
type of display is required.
"""
- fields = customid.split(u':')
- valid = self.manager.get_object(CustomSlide, fields[1])
+ remote_type, custom_id = message.split(u':')
+ custom_id = int(custom_id)
+ valid = self.manager.get_object(CustomSlide, custom_id)
if valid:
- self.remoteCustom = fields[1]
- self.remoteTriggered = fields[0]
- self.parent.edit_custom_form.loadCustom(fields[1],
- (fields[0] == u'P'))
- self.parent.edit_custom_form.exec_()
+ self.remoteCustom = custom_id
+ self.remoteTriggered = remote_type
+ self.edit_custom_form.loadCustom(custom_id, (remote_type == u'P'))
+ self.edit_custom_form.exec_()
def onEditClick(self):
"""
@@ -113,8 +186,8 @@ class CustomMediaItem(MediaManagerItem):
if check_item_selected(self.listView, UiStrings().SelectEdit):
item = self.listView.currentItem()
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
- self.parent.edit_custom_form.loadCustom(item_id, False)
- self.parent.edit_custom_form.exec_()
+ self.edit_custom_form.loadCustom(item_id, False)
+ self.edit_custom_form.exec_()
self.initialise()
def onDeleteClick(self):
@@ -131,8 +204,10 @@ class CustomMediaItem(MediaManagerItem):
for row in row_list:
self.listView.takeItem(row)
+ def onFocus(self):
+ self.searchTextEdit.setFocus()
+
def generateSlideData(self, service_item, item=None, xmlVersion=False):
- raw_slides = []
raw_footer = []
slide = None
theme = None
@@ -150,8 +225,7 @@ class CustomMediaItem(MediaManagerItem):
service_item.theme = theme
customXML = CustomXMLParser(customSlide.text)
verseList = customXML.get_verses()
- for verse in verseList:
- raw_slides.append(verse[1])
+ raw_slides = [verse[1] for verse in verseList]
service_item.title = title
for slide in raw_slides:
service_item.add_from_text(slide[:30], slide)
@@ -161,4 +235,56 @@ class CustomMediaItem(MediaManagerItem):
else:
raw_footer.append(u'')
service_item.raw_footer = raw_footer
- return True
\ No newline at end of file
+ return True
+
+ def onSearchTextButtonClick(self):
+ # Save the current search type to the configuration.
+ QtCore.QSettings().setValue(u'%s/last search type' %
+ self.settingsSection,
+ QtCore.QVariant(self.searchTextEdit.currentSearchType()))
+ # Reload the list considering the new search type.
+ search_keywords = unicode(self.searchTextEdit.displayText())
+ search_results = []
+ search_type = self.searchTextEdit.currentSearchType()
+ if search_type == CustomSearch.Titles:
+ log.debug(u'Titles Search')
+ search_results = self.parent.manager.get_all_objects(CustomSlide,
+ CustomSlide.title.like(u'%' + self.whitespace.sub(u' ',
+ search_keywords) + u'%'), order_by_ref=CustomSlide.title)
+ self.loadList(search_results)
+ elif search_type == CustomSearch.Themes:
+ log.debug(u'Theme Search')
+ search_results = self.parent.manager.get_all_objects(CustomSlide,
+ CustomSlide.theme_name.like(u'%' + self.whitespace.sub(u' ',
+ search_keywords) + u'%'), order_by_ref=CustomSlide.title)
+ self.loadList(search_results)
+ self.check_search_result()
+
+ def onSearchTextEditChanged(self, text):
+ """
+ If search as type enabled invoke the search on each key press.
+ If the Title is being searched do not start until 2 characters
+ have been entered.
+ """
+ search_length = 2
+ if len(text) > search_length:
+ self.onSearchTextButtonClick()
+ elif len(text) == 0:
+ self.onClearTextButtonClick()
+
+ def onClearTextButtonClick(self):
+ """
+ Clear the search text.
+ """
+ self.searchTextEdit.clear()
+ self.onSearchTextButtonClick()
+
+ def search(self, string):
+ search_results = self.manager.get_all_objects(CustomSlide,
+ or_(func.lower(CustomSlide.title).like(u'%' +
+ string.lower() + u'%'),
+ func.lower(CustomSlide.text).like(u'%' +
+ string.lower() + u'%')),
+ order_by_ref=CustomSlide.title)
+ return [[custom.id, custom.title] for custom in search_results]
+
diff --git a/openlp/plugins/images/__init__.py b/openlp/plugins/images/__init__.py
index a375f863f..5d9f77ab9 100644
--- a/openlp/plugins/images/__init__.py
+++ b/openlp/plugins/images/__init__.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/images/imageplugin.py b/openlp/plugins/images/imageplugin.py
index 8d98e809b..3a05f7923 100644
--- a/openlp/plugins/images/imageplugin.py
+++ b/openlp/plugins/images/imageplugin.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/images/lib/__init__.py b/openlp/plugins/images/lib/__init__.py
index 6a9e364f9..370dba7b0 100644
--- a/openlp/plugins/images/lib/__init__.py
+++ b/openlp/plugins/images/lib/__init__.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/images/lib/mediaitem.py b/openlp/plugins/images/lib/mediaitem.py
index 21b81128d..f760a984e 100644
--- a/openlp/plugins/images/lib/mediaitem.py
+++ b/openlp/plugins/images/lib/mediaitem.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
@@ -26,6 +27,7 @@
import logging
import os
+import locale
from PyQt4 import QtCore, QtGui
@@ -47,6 +49,7 @@ class ImageMediaItem(MediaManagerItem):
self.IconPath = u'images/image'
MediaManagerItem.__init__(self, parent, self, icon)
self.quickPreviewAllowed = True
+ self.hasSearch = True
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'live_theme_changed'), self.liveThemeChanged)
@@ -110,6 +113,10 @@ class ImageMediaItem(MediaManagerItem):
def loadList(self, list, initialLoad=False):
if not initialLoad:
self.parent.formparent.displayProgressBar(len(list))
+ # Sort the themes by its filename considering language specific
+ # characters. lower() is needed for windows!
+ list.sort(cmp=locale.strcoll,
+ key=lambda filename: os.path.split(unicode(filename))[1].lower())
for imageFile in list:
if not initialLoad:
self.parent.formparent.incrementProgressBar()
@@ -130,51 +137,51 @@ class ImageMediaItem(MediaManagerItem):
self.parent.formparent.finishedProgressBar()
def generateSlideData(self, service_item, item=None, xmlVersion=False):
- items = self.listView.selectedIndexes()
- if items:
- service_item.title = unicode(self.plugin.nameStrings[u'plural'])
- service_item.add_capability(ItemCapabilities.AllowsMaintain)
- service_item.add_capability(ItemCapabilities.AllowsPreview)
- service_item.add_capability(ItemCapabilities.AllowsLoop)
- service_item.add_capability(ItemCapabilities.AllowsAdditions)
- # force a nonexistent theme
- service_item.theme = -1
- missing_items = []
- missing_items_filenames = []
- for item in items:
- bitem = self.listView.item(item.row())
- filename = unicode(bitem.data(QtCore.Qt.UserRole).toString())
- if not os.path.exists(filename):
- missing_items.append(item)
- missing_items_filenames.append(filename)
- for item in missing_items:
- items.remove(item)
- # We cannot continue, as all images do not exist.
- if not items:
- critical_error_message_box(
- translate('ImagePlugin.MediaItem', 'Missing Image(s)'),
- unicode(translate('ImagePlugin.MediaItem',
- 'The following image(s) no longer exist: %s')) %
- u'\n'.join(missing_items_filenames))
- return False
- # We have missing as well as existing images. We ask what to do.
- elif missing_items and QtGui.QMessageBox.question(self,
- translate('ImagePlugin.MediaItem', 'Missing Image(s)'),
- unicode(translate('ImagePlugin.MediaItem', 'The following '
- 'image(s) no longer exist: %s\nDo you want to add the other '
- 'images anyway?')) % u'\n'.join(missing_items_filenames),
- QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No |
- QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.No:
- return False
- # Continue with the existing images.
- for item in items:
- bitem = self.listView.item(item.row())
- filename = unicode(bitem.data(QtCore.Qt.UserRole).toString())
- (path, name) = os.path.split(filename)
- service_item.add_from_image(filename, name)
- return True
+ if item:
+ items = [item]
else:
+ items = self.listView.selectedItems()
+ if not items:
+ return False
+ service_item.title = unicode(self.plugin.nameStrings[u'plural'])
+ service_item.add_capability(ItemCapabilities.AllowsMaintain)
+ service_item.add_capability(ItemCapabilities.AllowsPreview)
+ service_item.add_capability(ItemCapabilities.AllowsLoop)
+ service_item.add_capability(ItemCapabilities.AllowsAdditions)
+ # force a nonexistent theme
+ service_item.theme = -1
+ missing_items = []
+ missing_items_filenames = []
+ for bitem in items:
+ filename = unicode(bitem.data(QtCore.Qt.UserRole).toString())
+ if not os.path.exists(filename):
+ missing_items.append(item)
+ missing_items_filenames.append(filename)
+ for item in missing_items:
+ items.remove(item)
+ # We cannot continue, as all images do not exist.
+ if not items:
+ critical_error_message_box(
+ translate('ImagePlugin.MediaItem', 'Missing Image(s)'),
+ unicode(translate('ImagePlugin.MediaItem',
+ 'The following image(s) no longer exist: %s')) %
+ u'\n'.join(missing_items_filenames))
return False
+ # We have missing as well as existing images. We ask what to do.
+ elif missing_items and QtGui.QMessageBox.question(self,
+ translate('ImagePlugin.MediaItem', 'Missing Image(s)'),
+ unicode(translate('ImagePlugin.MediaItem', 'The following '
+ 'image(s) no longer exist: %s\nDo you want to add the other '
+ 'images anyway?')) % u'\n'.join(missing_items_filenames),
+ QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No |
+ QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.No:
+ return False
+ # Continue with the existing images.
+ for bitem in items:
+ filename = unicode(bitem.data(QtCore.Qt.UserRole).toString())
+ (path, name) = os.path.split(filename)
+ service_item.add_from_image(filename, name)
+ return True
def onResetClick(self):
"""
@@ -208,3 +215,14 @@ class ImageMediaItem(MediaManagerItem):
unicode(translate('ImagePlugin.MediaItem',
'There was a problem replacing your background, '
'the image file "%s" no longer exists.')) % filename)
+
+ def search(self, string):
+ list = SettingsManager.load_list(self.settingsSection,
+ self.settingsSection)
+ results = []
+ string = string.lower()
+ for file in list:
+ filename = os.path.split(unicode(file))[1]
+ if filename.lower().find(string) > -1:
+ results.append([file, filename])
+ return results
diff --git a/openlp/plugins/media/__init__.py b/openlp/plugins/media/__init__.py
index 9271a0936..24dc4554a 100644
--- a/openlp/plugins/media/__init__.py
+++ b/openlp/plugins/media/__init__.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/media/lib/__init__.py b/openlp/plugins/media/lib/__init__.py
index 7f63c8108..434eec67a 100644
--- a/openlp/plugins/media/lib/__init__.py
+++ b/openlp/plugins/media/lib/__init__.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/media/lib/mediaitem.py b/openlp/plugins/media/lib/mediaitem.py
index aa574d029..9dc17f4d3 100644
--- a/openlp/plugins/media/lib/mediaitem.py
+++ b/openlp/plugins/media/lib/mediaitem.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
@@ -27,6 +28,7 @@
from datetime import datetime
import logging
import os
+import locale
from PyQt4 import QtCore, QtGui
@@ -50,6 +52,7 @@ class MediaMediaItem(MediaManagerItem):
u':/media/media_video.png').toImage()
MediaManagerItem.__init__(self, parent, self, icon)
self.singleServiceItem = False
+ self.hasSearch = True
self.mediaObject = None
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'video_background_replaced'),
@@ -200,6 +203,10 @@ class MediaMediaItem(MediaManagerItem):
self.settingsSection, self.getFileList())
def loadList(self, list):
+ # Sort the themes by its filename considering language specific
+ # characters. lower() is needed for windows!
+ list.sort(cmp=locale.strcoll,
+ key=lambda filename: os.path.split(unicode(filename))[1].lower())
for file in list:
filename = os.path.split(unicode(file))[1]
item_name = QtGui.QListWidgetItem(filename)
@@ -212,3 +219,14 @@ class MediaMediaItem(MediaManagerItem):
log.debug(u'CreatePhonon')
if not self.mediaObject:
self.mediaObject = Phonon.MediaObject(self)
+
+ def search(self, string):
+ list = SettingsManager.load_list(self.settingsSection,
+ self.settingsSection)
+ results = []
+ string = string.lower()
+ for file in list:
+ filename = os.path.split(unicode(file))[1]
+ if filename.lower().find(string) > -1:
+ results.append([file, filename])
+ return results
diff --git a/openlp/plugins/media/lib/mediatab.py b/openlp/plugins/media/lib/mediatab.py
index f54aa02fa..2e11cdd6b 100644
--- a/openlp/plugins/media/lib/mediatab.py
+++ b/openlp/plugins/media/lib/mediatab.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/media/mediaplugin.py b/openlp/plugins/media/mediaplugin.py
index 82d87455a..e27f73634 100644
--- a/openlp/plugins/media/mediaplugin.py
+++ b/openlp/plugins/media/mediaplugin.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/presentations/__init__.py b/openlp/plugins/presentations/__init__.py
index bf077953a..573716b93 100644
--- a/openlp/plugins/presentations/__init__.py
+++ b/openlp/plugins/presentations/__init__.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/presentations/lib/__init__.py b/openlp/plugins/presentations/lib/__init__.py
index b41c2f2f6..154709800 100644
--- a/openlp/plugins/presentations/lib/__init__.py
+++ b/openlp/plugins/presentations/lib/__init__.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/presentations/lib/impresscontroller.py b/openlp/plugins/presentations/lib/impresscontroller.py
index b691c47ce..0d0cc43a3 100644
--- a/openlp/plugins/presentations/lib/impresscontroller.py
+++ b/openlp/plugins/presentations/lib/impresscontroller.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
@@ -45,6 +46,7 @@ else:
try:
import uno
from com.sun.star.beans import PropertyValue
+ from com.sun.star.task import ErrorCodeIOException
uno_available = True
except ImportError:
uno_available = False
@@ -286,6 +288,9 @@ class ImpressDocument(PresentationDocument):
doc.storeToURL(urlpath, props)
self.convert_thumbnail(path, idx + 1)
delete_file(path)
+ except ErrorCodeIOException, exception:
+ log.exception(u'ERROR! ErrorCodeIOException %d' %
+ exception.ErrCode)
except:
log.exception(u'%s - Unable to store openoffice preview' % path)
diff --git a/openlp/plugins/presentations/lib/mediaitem.py b/openlp/plugins/presentations/lib/mediaitem.py
index 65b85454d..b757b5bfd 100644
--- a/openlp/plugins/presentations/lib/mediaitem.py
+++ b/openlp/plugins/presentations/lib/mediaitem.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
@@ -26,6 +27,7 @@
import logging
import os
+import locale
from PyQt4 import QtCore, QtGui
@@ -53,6 +55,7 @@ class PresentationMediaItem(MediaManagerItem):
self.Automatic = u''
MediaManagerItem.__init__(self, parent, self, icon)
self.message_listener = MessageListener(self)
+ self.hasSearch = True
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'mediaitem_presentation_rebuild'), self.rebuild)
@@ -148,20 +151,22 @@ class PresentationMediaItem(MediaManagerItem):
else:
self.presentationWidget.hide()
- def loadList(self, list, initialLoad=False):
+ def loadList(self, files, initialLoad=False):
"""
Add presentations into the media manager
This is called both on initial load of the plugin to populate with
existing files, and when the user adds new files via the media manager
"""
currlist = self.getFileList()
- titles = []
- for file in currlist:
- titles.append(os.path.split(file)[1])
+ titles = [os.path.split(file)[1] for file in currlist]
Receiver.send_message(u'cursor_busy')
if not initialLoad:
- self.parent.formparent.displayProgressBar(len(list))
- for file in list:
+ self.parent.formparent.displayProgressBar(len(files))
+ # Sort the themes by its filename considering language specific
+ # characters. lower() is needed for windows!
+ files.sort(cmp=locale.strcoll,
+ key=lambda filename: os.path.split(unicode(filename))[1].lower())
+ for file in files:
if not initialLoad:
self.parent.formparent.incrementProgressBar()
if currlist.count(file) > 0:
@@ -231,17 +236,19 @@ class PresentationMediaItem(MediaManagerItem):
in the slidecontroller. In the case of powerpoints, an image
for each slide
"""
- items = self.listView.selectedIndexes()
- if len(items) > 1:
- return False
+ if item:
+ items = [item]
+ else:
+ items = self.listView.selectedItems()
+ if len(items) > 1:
+ return False
service_item.title = unicode(self.displayTypeComboBox.currentText())
service_item.shortname = unicode(self.displayTypeComboBox.currentText())
service_item.add_capability(ItemCapabilities.ProvidesOwnDisplay)
service_item.add_capability(ItemCapabilities.AllowsDetailedTitleDisplay)
shortname = service_item.shortname
if shortname:
- for item in items:
- bitem = self.listView.item(item.row())
+ for bitem in items:
filename = unicode(bitem.data(QtCore.Qt.UserRole).toString())
if os.path.exists(filename):
if shortname == self.Automatic:
@@ -303,3 +310,12 @@ class PresentationMediaItem(MediaManagerItem):
if filetype in self.controllers[controller].alsosupports:
return controller
return None
+
+ def search(self, string):
+ list = SettingsManager.load_list(self.settingsSection, u'presentations')
+ results = []
+ string = string.lower()
+ for file in list:
+ if file.lower().find(string) > -1:
+ results.append([file, file])
+ return results
diff --git a/openlp/plugins/presentations/lib/messagelistener.py b/openlp/plugins/presentations/lib/messagelistener.py
index 94cd2bfa4..6b2c9cbd2 100644
--- a/openlp/plugins/presentations/lib/messagelistener.py
+++ b/openlp/plugins/presentations/lib/messagelistener.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/presentations/lib/powerpointcontroller.py b/openlp/plugins/presentations/lib/powerpointcontroller.py
index 12e0d2746..fb2ce7bcc 100644
--- a/openlp/plugins/presentations/lib/powerpointcontroller.py
+++ b/openlp/plugins/presentations/lib/powerpointcontroller.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/presentations/lib/pptviewcontroller.py b/openlp/plugins/presentations/lib/pptviewcontroller.py
index 354c33361..7e2336b75 100644
--- a/openlp/plugins/presentations/lib/pptviewcontroller.py
+++ b/openlp/plugins/presentations/lib/pptviewcontroller.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
@@ -244,4 +245,4 @@ class PptviewDocument(PresentationDocument):
"""
Triggers the previous slide on the running presentation
"""
- self.controller.process.PrevStep(self.pptid)
\ No newline at end of file
+ self.controller.process.PrevStep(self.pptid)
diff --git a/openlp/plugins/presentations/lib/pptviewlib/ppttest.py b/openlp/plugins/presentations/lib/pptviewlib/ppttest.py
index 337bdb09f..fe483655c 100644
--- a/openlp/plugins/presentations/lib/pptviewlib/ppttest.py
+++ b/openlp/plugins/presentations/lib/pptviewlib/ppttest.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/presentations/lib/presentationcontroller.py b/openlp/plugins/presentations/lib/presentationcontroller.py
index 8d48d98a3..63bd44cc4 100644
--- a/openlp/plugins/presentations/lib/presentationcontroller.py
+++ b/openlp/plugins/presentations/lib/presentationcontroller.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/presentations/lib/presentationtab.py b/openlp/plugins/presentations/lib/presentationtab.py
index bba2b469e..5579a2a99 100644
--- a/openlp/plugins/presentations/lib/presentationtab.py
+++ b/openlp/plugins/presentations/lib/presentationtab.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
@@ -131,4 +132,4 @@ class PresentationTab(SettingsTab):
QtCore.QVariant(self.OverrideAppCheckBox.checkState()))
changed = True
if changed:
- Receiver.send_message(u'mediaitem_presentation_rebuild')
\ No newline at end of file
+ Receiver.send_message(u'mediaitem_presentation_rebuild')
diff --git a/openlp/plugins/presentations/presentationplugin.py b/openlp/plugins/presentations/presentationplugin.py
index ec3aff440..171039d15 100644
--- a/openlp/plugins/presentations/presentationplugin.py
+++ b/openlp/plugins/presentations/presentationplugin.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/remotes/__init__.py b/openlp/plugins/remotes/__init__.py
index 6dc3d5cce..b4a914d45 100644
--- a/openlp/plugins/remotes/__init__.py
+++ b/openlp/plugins/remotes/__init__.py
@@ -5,10 +5,11 @@
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# 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 #
# under the terms of the GNU General Public License as published by the Free #
diff --git a/openlp/plugins/remotes/html/index.html b/openlp/plugins/remotes/html/index.html
index 3708db654..6390b9446 100644
--- a/openlp/plugins/remotes/html/index.html
+++ b/openlp/plugins/remotes/html/index.html
@@ -8,7 +8,8 @@
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
+# Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode #
+# Woldsund #
# --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it #
# under the terms of the GNU General Public License as published by the Free #
@@ -43,6 +44,7 @@
Service Manager
Slide Controller
Alerts
+ Search
@@ -50,6 +52,7 @@