diff --git a/copyright.txt b/copyright.txt index a78b7d0d7..1a348a0df 100644 --- a/copyright.txt +++ b/copyright.txt @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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.pyw b/openlp.pyw index 1de9c8417..d9880865b 100755 --- a/openlp.pyw +++ b/openlp.pyw @@ -7,8 +7,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/.version b/openlp/.version index 4489023a7..338414e8c 100644 --- a/openlp/.version +++ b/openlp/.version @@ -1 +1 @@ -1.9.0-bzr722 +1.9.0-bzr743 diff --git a/openlp/__init__.py b/openlp/__init__.py index bc50edda3..1a348a0df 100644 --- a/openlp/__init__.py +++ b/openlp/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -21,4 +21,4 @@ # You should have received a copy of the GNU General Public License along # # with this program; if not, write to the Free Software Foundation, Inc., 59 # # Temple Place, Suite 330, Boston, MA 02111-1307 USA # -############################################################################### \ No newline at end of file +############################################################################### diff --git a/openlp/core/__init__.py b/openlp/core/__init__.py index bc50edda3..1a348a0df 100644 --- a/openlp/core/__init__.py +++ b/openlp/core/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -21,4 +21,4 @@ # You should have received a copy of the GNU General Public License along # # with this program; if not, write to the Free Software Foundation, Inc., 59 # # Temple Place, Suite 330, Boston, MA 02111-1307 USA # -############################################################################### \ No newline at end of file +############################################################################### diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index 899b5cf73..fc6a4bf0c 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/baselistwithdnd.py b/openlp/core/lib/baselistwithdnd.py index f7095550a..bc043082c 100644 --- a/openlp/core/lib/baselistwithdnd.py +++ b/openlp/core/lib/baselistwithdnd.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/dockwidget.py b/openlp/core/lib/dockwidget.py index ce8302b43..fcee02af8 100644 --- a/openlp/core/lib/dockwidget.py +++ b/openlp/core/lib/dockwidget.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/eventreceiver.py b/openlp/core/lib/eventreceiver.py index be7dff67a..45eeb5145 100644 --- a/openlp/core/lib/eventreceiver.py +++ b/openlp/core/lib/eventreceiver.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/mediamanageritem.py b/openlp/core/lib/mediamanageritem.py index fd6d37ca6..f735065a3 100644 --- a/openlp/core/lib/mediamanageritem.py +++ b/openlp/core/lib/mediamanageritem.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/plugin.py b/openlp/core/lib/plugin.py index e98c789d0..57dd984c3 100644 --- a/openlp/core/lib/plugin.py +++ b/openlp/core/lib/plugin.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/pluginconfig.py b/openlp/core/lib/pluginconfig.py index 41b902bbc..936a2f3a0 100644 --- a/openlp/core/lib/pluginconfig.py +++ b/openlp/core/lib/pluginconfig.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -190,4 +190,4 @@ class PluginConfig(object): name = u'last directory %d' % num else: name = u'last directory' - self.set_config(name, directory) \ No newline at end of file + self.set_config(name, directory) diff --git a/openlp/core/lib/pluginmanager.py b/openlp/core/lib/pluginmanager.py index 2518f88be..fe48ccf0a 100644 --- a/openlp/core/lib/pluginmanager.py +++ b/openlp/core/lib/pluginmanager.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/renderer.py b/openlp/core/lib/renderer.py index f0da82b0e..41b25df0a 100644 --- a/openlp/core/lib/renderer.py +++ b/openlp/core/lib/renderer.py @@ -1,4 +1,4 @@ - # -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- # vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 ############################################################################### @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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,7 +43,6 @@ class Renderer(object): """ self._rect = None self._debug = False - self._right_margin = 64 # the amount of right indent self._display_shadow_size_footer = 0 self._display_outline_size_footer = 0 self.theme_name = None @@ -149,7 +148,7 @@ class Renderer(object): def pre_render_text(self, text): metrics = QtGui.QFontMetrics(self.mainFont) #work out line width - line_width = self._rect.width() - self._right_margin + line_width = self._rect.width() #number of lines on a page - adjust for rounding up. line_height = metrics.height() if self._theme.display_shadow: @@ -224,6 +223,7 @@ class Renderer(object): ``rect_footer`` The footer text block. """ + log.debug(u'set_text_rectangle %s , %s' %(rect_main, rect_footer) ) self._rect = rect_main self._rect_footer = rect_footer @@ -447,8 +447,7 @@ class Renderer(object): rightextent = x + w # shift right from last line's rh edge if self._theme.display_wrapStyle == 1 and linenum != 0: - rightextent = self._first_line_right_extent + \ - self._right_margin + rightextent = self._first_line_right_extent if rightextent > maxx: rightextent = maxx x = rightextent - w diff --git a/openlp/core/lib/rendermanager.py b/openlp/core/lib/rendermanager.py index edab3d309..9a621979b 100644 --- a/openlp/core/lib/rendermanager.py +++ b/openlp/core/lib/rendermanager.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -146,13 +146,13 @@ class RenderManager(object): footer_rect = None if not theme.font_main_override: main_rect = QtCore.QRect(10, 0, - self.width - 1, self.footer_start) + self.width - 20, self.footer_start) else: main_rect = QtCore.QRect(theme.font_main_x, theme.font_main_y, theme.font_main_width - 1, theme.font_main_height - 1) if not theme.font_footer_override: footer_rect = QtCore.QRect(10, self.footer_start, - self.width - 1, self.height - self.footer_start) + self.width - 20, self.height - self.footer_start) else: footer_rect = QtCore.QRect(theme.font_footer_x, theme.font_footer_y, theme.font_footer_width - 1, diff --git a/openlp/core/lib/serviceitem.py b/openlp/core/lib/serviceitem.py index 7d869a610..52da22d01 100644 --- a/openlp/core/lib/serviceitem.py +++ b/openlp/core/lib/serviceitem.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/settingsmanager.py b/openlp/core/lib/settingsmanager.py index be5c14af1..fe2858cd0 100644 --- a/openlp/core/lib/settingsmanager.py +++ b/openlp/core/lib/settingsmanager.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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 f9d4aa8a0..d22d72750 100644 --- a/openlp/core/lib/settingstab.py +++ b/openlp/core/lib/settingstab.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -90,4 +90,4 @@ class SettingsTab(QtGui.QWidget): """ Changes which need to be made after setup of application """ - pass \ No newline at end of file + pass diff --git a/openlp/core/lib/songxmlhandler.py b/openlp/core/lib/songxmlhandler.py index 7a532970d..4b0a26d7b 100644 --- a/openlp/core/lib/songxmlhandler.py +++ b/openlp/core/lib/songxmlhandler.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -148,6 +148,8 @@ class SongXMLParser(object): verse_list = [] for element in iter: if element.tag == u'verse': + if element.text is None: + element.text = u'' verse_list.append([element.attrib, unicode(element.text).decode('unicode-escape')]) return verse_list diff --git a/openlp/core/lib/themexmlhandler.py b/openlp/core/lib/themexmlhandler.py index cbd46d597..c30184328 100644 --- a/openlp/core/lib/themexmlhandler.py +++ b/openlp/core/lib/themexmlhandler.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -53,7 +53,7 @@ blankthemexml=\ Normal False 0 - + Arial @@ -62,7 +62,7 @@ blankthemexml=\ Normal False 0 - + True diff --git a/openlp/core/lib/toolbar.py b/openlp/core/lib/toolbar.py index 3753fedc0..e50459943 100644 --- a/openlp/core/lib/toolbar.py +++ b/openlp/core/lib/toolbar.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/xmlrootclass.py b/openlp/core/lib/xmlrootclass.py index c56474d17..78682c5a3 100644 --- a/openlp/core/lib/xmlrootclass.py +++ b/openlp/core/lib/xmlrootclass.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/test/test_mediamanageritem.py b/openlp/core/test/test_mediamanageritem.py index f9539174c..a80bcdb64 100644 --- a/openlp/core/test/test_mediamanageritem.py +++ b/openlp/core/test/test_mediamanageritem.py @@ -1,3 +1,28 @@ +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 + +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2010 Raoul Snyman # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### + import logging import os import sys diff --git a/openlp/core/test/test_plugin_manager.py b/openlp/core/test/test_plugin_manager.py index 1bc47d6d2..c927fce9b 100644 --- a/openlp/core/test/test_plugin_manager.py +++ b/openlp/core/test/test_plugin_manager.py @@ -1,3 +1,28 @@ +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 + +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2010 Raoul Snyman # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### + import logging import os import sys @@ -46,4 +71,4 @@ if __name__ == "__main__": log.debug(u'List of plugins found:') for plugin in t.p.plugins: log.debug(u'Plugin %s, name=%s (version=%d)' %(unicode(plugin), - plugin.name, plugin.version)) + plugin.name, plugin.version)) diff --git a/openlp/core/test/test_render.py b/openlp/core/test/test_render.py index 36052a6e9..92f79cf37 100644 --- a/openlp/core/test/test_render.py +++ b/openlp/core/test/test_render.py @@ -1,20 +1,27 @@ -""" -OpenLP - Open Source Lyrics Projection -Copyright (c) 2008 Raoul Snyman -Portions copyright (c) 2008 Martin Thompson, Tim Bentley +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA -""" +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2010 Raoul Snyman # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### import sys import os @@ -135,13 +142,13 @@ class TestRender(TestRender_base): def test_longer(self): answer = self.renderer._render_single_line( - u'Test line with more words than fit on one line', - tlcorner = (10,10)) + u'Test line with more words than fit on one line', + tlcorner = (10,10)) assert(answer == (753,136)) def test_even_longer(self): answer = self.renderer._render_single_line( - u'Test line with more words than fit on either one or two lines', + u'Test line with more words than fit on either one or two lines', tlcorner = (10,10)) assert(answer == (753,199)) def test_lines(self): diff --git a/openlp/core/test/test_render_theme.py b/openlp/core/test/test_render_theme.py index 05f692393..2b5d1a2b5 100644 --- a/openlp/core/test/test_render_theme.py +++ b/openlp/core/test/test_render_theme.py @@ -1,20 +1,27 @@ -""" -OpenLP - Open Source Lyrics Projection -Copyright (c) 2008 Raoul Snyman -Portions copyright (c) 2008 Martin Thompson, Tim Bentley +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA -""" +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2010 Raoul Snyman # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### import sys import os @@ -163,7 +170,7 @@ And drives away his fear. t = Theme(u'blank_theme.xml') t.BackgroundType = 2 t.BackgroundParameter1 = os.path.join(u'data_for_tests', - 'treessmall.jpg') + 'treessmall.jpg') t.BackgroundParameter2 = QtGui.QColor(0,0,64) t.BackgroundParameter3 = 0 t.VerticalAlign = 2 diff --git a/openlp/core/theme/__init__.py b/openlp/core/theme/__init__.py index b6b37022f..0975e977b 100644 --- a/openlp/core/theme/__init__.py +++ b/openlp/core/theme/__init__.py @@ -5,8 +5,9 @@ # OpenLP - Open Source Lyrics Projection # # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # -# Portions copyright (c) 2008-2010 Martin Thompson, Tim Bentley, Carsten # -# Tinggaard, Jon Tibble, Jonathan Corwin, Maikel Stuivenberg, Scott Guerrieri # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -22,4 +23,4 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -from theme import Theme \ No newline at end of file +from theme import Theme diff --git a/openlp/core/theme/test/test_theme.py b/openlp/core/theme/test/test_theme.py index 024142508..2e8c2b500 100644 --- a/openlp/core/theme/test/test_theme.py +++ b/openlp/core/theme/test/test_theme.py @@ -1,3 +1,28 @@ +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 + +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2010 Raoul Snyman # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### + import os import os.path import sys @@ -49,7 +74,7 @@ def test_theme(): assert(theme.Outline == 0) assert(theme.Shadow == 0) assert(theme.VerticalAlign == 0) - + print "Tests passed" if __name__ == "__main__": diff --git a/openlp/core/theme/theme.py b/openlp/core/theme/theme.py index 27969c9d9..b01126564 100644 --- a/openlp/core/theme/theme.py +++ b/openlp/core/theme/theme.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -149,4 +149,4 @@ class Theme(object): for key in dir(self): if key[0:1] != u'_': theme_strings.append(u'%30s : %s' % (key, getattr(self, key))) - return u'\n'.join(theme_strings) \ No newline at end of file + return u'\n'.join(theme_strings) diff --git a/openlp/core/ui/__init__.py b/openlp/core/ui/__init__.py index c2f571c3b..414a9503a 100644 --- a/openlp/core/ui/__init__.py +++ b/openlp/core/ui/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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 c93c1f176..996f54452 100644 --- a/openlp/core/ui/aboutdialog.py +++ b/openlp/core/ui/aboutdialog.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -142,13 +142,17 @@ class Ui_AboutDialog(object): ' Michael "cocooncrash" Gorven\n' ' Scott "sguerrieri" Guerrieri\n' ' Raoul "superfly" Snyman\n' - ' Maikel Stuivenberg\n' ' Martin "mijiti" Thompson\n' ' Jon "Meths" Tibble\n' + '\n' + 'Contributors\n' + ' Christian "crichter" Richter\n' + ' Maikel Stuivenberg\n' ' Carsten "catini" Tingaard\n' '\n' 'Testers\n' - ' Wesley "wrst" Stout' + ' Wesley "wrst" Stout\n' + ' Philip "Phill" Ridout' )) self.AboutNotebook.setTabText( self.AboutNotebook.indexOf(self.CreditsTab), @@ -158,8 +162,8 @@ class Ui_AboutDialog(object): 'Snyman\n' 'Portions copyright ' + u'\u00a9'.encode('utf8') + ' 2004-2009 ' 'Tim Bentley, Jonathan Corwin, Michael Gorven, Scott Guerrieri, ' - 'Maikel Stuivenberg, Martin Thompson, Jon Tibble, Carsten ' - 'Tinggaard\n' + 'Christian Richter, Maikel Stuivenberg, Martin Thompson, Jon ' + 'Tibble, Carsten Tinggaard\n' '\n' 'This program is free software; you can redistribute it and/or ' 'modify it under the terms of the GNU General Public License as ' diff --git a/openlp/core/ui/aboutform.py b/openlp/core/ui/aboutform.py index c3eb7bdcb..fe576767f 100644 --- a/openlp/core/ui/aboutform.py +++ b/openlp/core/ui/aboutform.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -53,4 +53,4 @@ class AboutForm(QtGui.QDialog, Ui_AboutDialog): """ import webbrowser url = u'http://www.openlp.org/en/documentation/introduction/contributing.html' - webbrowser.open_new(url) \ No newline at end of file + webbrowser.open_new(url) diff --git a/openlp/core/ui/amendthemedialog.py b/openlp/core/ui/amendthemedialog.py index 4cf8528f1..e819392e2 100644 --- a/openlp/core/ui/amendthemedialog.py +++ b/openlp/core/ui/amendthemedialog.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -685,4 +685,4 @@ class Ui_AmendThemeDialog(object): self.ThemeTabWidget.setTabText( self.ThemeTabWidget.indexOf(self.OtherOptionsTab), self.trUtf8('Other Options')) - self.PreviewGroupBox.setTitle(self.trUtf8('Preview')) \ No newline at end of file + self.PreviewGroupBox.setTitle(self.trUtf8('Preview')) diff --git a/openlp/core/ui/amendthemeform.py b/openlp/core/ui/amendthemeform.py index 97eecd1e8..97ae9858b 100644 --- a/openlp/core/ui/amendthemeform.py +++ b/openlp/core/ui/amendthemeform.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/generaltab.py b/openlp/core/ui/generaltab.py index c65ea3dd0..c6a544430 100644 --- a/openlp/core/ui/generaltab.py +++ b/openlp/core/ui/generaltab.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/maindisplay.py b/openlp/core/ui/maindisplay.py index 510b0ecc7..f16b3b455 100644 --- a/openlp/core/ui/maindisplay.py +++ b/openlp/core/ui/maindisplay.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -168,8 +168,7 @@ class MainDisplay(DisplayWidget): self.screen[u'size'].height(), QtGui.QImage.Format_ARGB32_Premultiplied) painter.begin(self.blankFrame) - #TODO make black when testing finished - painter.fillRect(self.blankFrame.rect(), QtCore.Qt.red) + painter.fillRect(self.blankFrame.rect(), QtCore.Qt.black) #build a blank transparent image self.transparent = QtGui.QPixmap(self.screen[u'size'].width(), self.screen[u'size'].height()) @@ -227,6 +226,7 @@ class MainDisplay(DisplayWidget): ``frame`` Image frame to be rendered """ + log.debug(u'frameView %d' % (self.displayBlank)) if not self.displayBlank: if transition: if self.frame is not None: @@ -249,14 +249,22 @@ class MainDisplay(DisplayWidget): if not self.isVisible(): self.setVisible(True) self.showFullScreen() + else: + self.waitingFrame = frame + self.waitingFrameTrans = transition def blankDisplay(self, blanked=True): + log.debug(u'Blank main Display %d' % blanked) if blanked: self.displayBlank = True self.display_text.setPixmap(QtGui.QPixmap.fromImage(self.blankFrame)) + self.waitingFrame = None + self.waitingFrameTrans = False else: self.displayBlank = False - if self.display_frame: + if self.waitingFrame: + self.frameView(self.waitingFrame, self.waitingFrameTrans) + elif self.display_frame: self.frameView(self.display_frame) def onMediaQueue(self, message): diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 41b6d245f..0fc0588ae 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -23,7 +23,6 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -import os import logging import time @@ -68,7 +67,8 @@ class VersionThread(QtCore.QThread): """ Run the thread. """ - time.sleep(2) + time.sleep(1) + Receiver.send_message(u'blank_check') version = check_latest_version(self.generalConfig, self.app_version) #new version has arrived if version != self.app_version: @@ -419,7 +419,7 @@ class Ui_MainWindow(object): self.LanguageEnglishItem.setText(self.trUtf8('English')) self.LanguageEnglishItem.setStatusTip( self.trUtf8('Set the interface language to English')) - self.ToolsAddToolItem.setText(self.trUtf8('&Add Tool...')) + self.ToolsAddToolItem.setText(self.trUtf8('Add &Tool...')) self.ToolsAddToolItem.setStatusTip( self.trUtf8('Add an application to the list of tools')) self.action_Preview_Panel.setText(self.trUtf8('&Preview Pane')) @@ -494,6 +494,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): QtCore.SIGNAL(u'update_global_theme'), self.defaultThemeChanged) QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'version_check'), self.versionCheck) + QtCore.QObject.connect(Receiver.get_receiver(), + QtCore.SIGNAL(u'blank_check'), self.blankCheck) QtCore.QObject.connect(self.FileNewItem, QtCore.SIGNAL(u'triggered()'), self.ServiceManagerContents.onNewService) @@ -583,6 +585,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): self.activateWindow() if str_to_bool(self.generalConfig.get_config(u'auto open', False)): self.ServiceManagerContents.onLoadService(True) + + def blankCheck(self): if str_to_bool(self.generalConfig.get_config(u'screen blank', False)) \ and str_to_bool(self.generalConfig.get_config(u'blank warning', False)): self.LiveController.onBlankDisplay(True) @@ -621,6 +625,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): self.screens.set_current_display(updated_display) self.RenderManager.update_display(updated_display) self.mainDisplay.setup(updated_display) + #Trigger after changes have been made + Receiver.send_message(u'config_updated') self.activateWindow() def closeEvent(self, event): diff --git a/openlp/core/ui/mediadockmanager.py b/openlp/core/ui/mediadockmanager.py index 0873133b2..574b181da 100644 --- a/openlp/core/ui/mediadockmanager.py +++ b/openlp/core/ui/mediadockmanager.py @@ -6,15 +6,15 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # # Software Foundation; version 2 of the License. # # # # This program is distributed in the hope that it will be useful, but WITHOUT # -# ANY WARRANTY; without even the implied warranty of MERCHANdockILITY or # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # # more details. # # # diff --git a/openlp/core/ui/plugindialog.py b/openlp/core/ui/plugindialog.py index a20e669cc..f4a1773c9 100644 --- a/openlp/core/ui/plugindialog.py +++ b/openlp/core/ui/plugindialog.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -105,4 +105,4 @@ class Ui_PluginViewDialog(object): self.AboutLabel.setText(self.trUtf8('About:')) self.StatusLabel.setText(self.trUtf8('Status:')) self.StatusComboBox.setItemText(0, self.trUtf8('Active')) - self.StatusComboBox.setItemText(1, self.trUtf8('Inactive')) \ No newline at end of file + self.StatusComboBox.setItemText(1, self.trUtf8('Inactive')) diff --git a/openlp/core/ui/pluginform.py b/openlp/core/ui/pluginform.py index 9af8b7ca3..9969ed165 100644 --- a/openlp/core/ui/pluginform.py +++ b/openlp/core/ui/pluginform.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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 b85b3b003..baf7e0d5e 100644 --- a/openlp/core/ui/screen.py +++ b/openlp/core/ui/screen.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -22,6 +22,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., 59 # # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### + import logging log = logging.getLogger(__name__) diff --git a/openlp/core/ui/serviceitemdialog.py b/openlp/core/ui/serviceitemdialog.py index 1fe86a913..e1d830c5e 100644 --- a/openlp/core/ui/serviceitemdialog.py +++ b/openlp/core/ui/serviceitemdialog.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/serviceitemform.py b/openlp/core/ui/serviceitemform.py index 43011ead8..59183a161 100644 --- a/openlp/core/ui/serviceitemform.py +++ b/openlp/core/ui/serviceitemform.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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 e2e343f9e..45bf0eb6d 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -100,6 +100,7 @@ class ServiceManager(QtGui.QWidget): self.parent = parent self.serviceItems = [] self.serviceName = u'' + self.droppos = 0 #is a new service and has not been saved self.isNew = True #Indicates if remoteTriggering is active. If it is the next addServiceItem call @@ -190,6 +191,8 @@ class ServiceManager(QtGui.QWidget): QtCore.SIGNAL(u'presentation types'), self.onPresentationTypes) QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'servicemanager_next_item'), self.nextItem) + QtCore.QObject.connect(Receiver.get_receiver(), + QtCore.SIGNAL(u'config_updated'), self.regenerateServiceItems) # Last little bits of setting up self.config = PluginConfig(u'ServiceManager') self.servicePath = self.config.get_data_path() @@ -474,7 +477,8 @@ class ServiceManager(QtGui.QWidget): log.debug(u'onSaveService') if not quick or self.isNew: filename = QtGui.QFileDialog.getSaveFileName(self, - u'Save Service', self.config.get_last_dir()) + self.trUtf8(u'Save Service'), self.config.get_last_dir(), + self.trUtf8(u'OpenLP Service Files (*.osz)')) else: filename = self.config.get_last_dir() if filename: @@ -513,9 +517,9 @@ class ServiceManager(QtGui.QWidget): os.remove(servicefile) except: pass #if not present do not worry - name = filename.split(os.path.sep) - self.serviceName = name[-1] - self.parent.serviceChanged(True, self.serviceName) + name = filename.split(os.path.sep) + self.serviceName = name[-1] + self.parent.serviceChanged(True, self.serviceName) def onQuickSaveService(self): self.onSaveService(True) @@ -617,7 +621,7 @@ class ServiceManager(QtGui.QWidget): for item in tempServiceItems: self.addServiceItem(item[u'service_item'], False, item[u'expanded']) #Set to False as items may have changed rendering - #does not impact the saved song so True may aslo be valid + #does not impact the saved song so True may also be valid self.parent.serviceChanged(False, self.serviceName) def addServiceItem(self, item, rebuild=False, expand=True): @@ -637,19 +641,21 @@ class ServiceManager(QtGui.QWidget): self.repaintServiceList(sitem + 1, 0) self.parent.LiveController.replaceServiceManagerItem(item) else: - if sitem == -1: + #nothing selected or dnd + if self.droppos == 0: self.serviceItems.append({u'service_item': item, u'order': len(self.serviceItems) + 1, u'expanded':expand}) self.repaintServiceList(len(self.serviceItems) + 1, 0) else: - self.serviceItems.insert(sitem + 1, {u'service_item': item, - u'order': len(self.serviceItems)+1, + self.serviceItems.insert(self.droppos, {u'service_item': item, + u'order': self.droppos, u'expanded':expand}) - self.repaintServiceList(sitem + 1, 0) + self.repaintServiceList(self.droppos, 0) #if rebuilding list make sure live is fixed. if rebuild: self.parent.LiveController.replaceServiceManagerItem(item) + self.droppos = 0 self.parent.serviceChanged(False, self.serviceName) def makePreview(self): @@ -730,18 +736,13 @@ class ServiceManager(QtGui.QWidget): link = event.mimeData() if link.hasText(): plugin = event.mimeData().text() + item = self.ServiceManagerList.itemAt(event.pos()) if plugin == u'ServiceManager': startpos, startCount = self.findServiceItem() - item = self.ServiceManagerList.itemAt(event.pos()) if item is None: endpos = len(self.serviceItems) else: - parentitem = item.parent() - if parentitem is None: - endpos = item.data(0, QtCore.Qt.UserRole).toInt()[0] - else: - endpos = parentitem.data(0, QtCore.Qt.UserRole).toInt()[0] - endpos -= 1 + endpos = self._getParentItemData(item) - 1 if endpos < startpos: newpos = endpos else: @@ -751,6 +752,10 @@ class ServiceManager(QtGui.QWidget): self.serviceItems.insert(newpos, serviceItem) self.repaintServiceList(endpos, startCount) else: + if item == None: + self.droppos = len(self.serviceItems) + else: + self.droppos = self._getParentItemData(item) Receiver.send_message(u'%s_add_service_item' % plugin) def updateThemeList(self, theme_list): @@ -785,3 +790,10 @@ class ServiceManager(QtGui.QWidget): item, count = self.findServiceItem() self.serviceItems[item][u'service_item'].theme = theme self.regenerateServiceItems() + + def _getParentItemData(self, item): + parentitem = item.parent() + if parentitem is None: + return item.data(0, QtCore.Qt.UserRole).toInt()[0] + else: + return parentitem.data(0, QtCore.Qt.UserRole).toInt()[0] diff --git a/openlp/core/ui/settingsdialog.py b/openlp/core/ui/settingsdialog.py index 9ed843e60..7148b0478 100644 --- a/openlp/core/ui/settingsdialog.py +++ b/openlp/core/ui/settingsdialog.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -59,4 +59,4 @@ class Ui_SettingsDialog(object): QtCore.QMetaObject.connectSlotsByName(SettingsDialog) def retranslateUi(self, SettingsDialog): - SettingsDialog.setWindowTitle(self.trUtf8('Settings')) \ No newline at end of file + SettingsDialog.setWindowTitle(self.trUtf8('Settings')) diff --git a/openlp/core/ui/settingsform.py b/openlp/core/ui/settingsform.py index 4a3902347..4d59b850f 100644 --- a/openlp/core/ui/settingsform.py +++ b/openlp/core/ui/settingsform.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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,7 +28,6 @@ import logging from PyQt4 import QtGui from openlp.core.ui import GeneralTab, ThemesTab -from openlp.core.lib import Receiver from settingsdialog import Ui_SettingsDialog log = logging.getLogger(__name__) @@ -45,7 +44,7 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog): self.ThemesTab = ThemesTab(mainWindow) self.addTab(u'Themes', self.ThemesTab) - def addTab(self, name, tab): + def addTab(self, name, tab): log.info(u'Adding %s tab' % tab.tabTitle) self.SettingsTabWidget.addTab(tab, tab.tabTitleVisible) @@ -65,7 +64,6 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog): def accept(self): for tab_index in range(0, self.SettingsTabWidget.count()): self.SettingsTabWidget.widget(tab_index).save() - Receiver.send_message(u'config_updated') return QtGui.QDialog.accept(self) def postSetUp(self): diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py index 71b12d95d..ecba32d8e 100644 --- a/openlp/core/ui/slidecontroller.py +++ b/openlp/core/ui/slidecontroller.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -299,6 +299,8 @@ class SlideController(QtGui.QWidget): QtCore.SIGNAL(u'%s_change' % prefix), self.onSlideChange) QtCore.QObject.connect(self.Splitter, QtCore.SIGNAL(u'splitterMoved(int, int)'), self.trackSplitter) + QtCore.QObject.connect(Receiver.get_receiver(), + QtCore.SIGNAL(u'config_updated'), self.refreshServiceItem) def widthChanged(self): """ @@ -377,6 +379,17 @@ class SlideController(QtGui.QWidget): self.Mediabar.setVisible(True) self.volumeSlider.setAudioOutput(self.audio) + def refreshServiceItem(self): + """ + Method to update the service item if the screen has changed + """ + log.debug(u'refreshServiceItem') + if self.serviceItem: + if self.serviceItem.is_text() or self.serviceItem.is_image(): + item = self.serviceItem + item.render() + self.addServiceManagerItem(item, self.selectedRow) + def addServiceItem(self, item): """ Method to install the service item into the controller @@ -390,14 +403,14 @@ class SlideController(QtGui.QWidget): if self.songEdit: slideno = self.selectedRow self.songEdit = False - self.addServiceManagerItem(item, slideno) + self._processItem(item, slideno) def replaceServiceManagerItem(self, item): """ Replacement item following a remote edit """ if item.__eq__(self.serviceItem): - self.addServiceManagerItem(item, self.PreviewListWidget.currentRow()) + self._processItem(item, self.PreviewListWidget.currentRow()) def addServiceManagerItem(self, item, slideno): """ @@ -406,27 +419,32 @@ class SlideController(QtGui.QWidget): Called by ServiceManager """ log.debug(u'addServiceManagerItem') - #If old item was a command tell it to stop - if self.serviceItem and self.serviceItem.is_command(): - self.onMediaStop() - if item.is_media(): - self.onMediaStart(item) - elif item.is_command(): - if self.isLive: - blanked = self.blankButton.isChecked() - else: - blanked = False - Receiver.send_message(u'%s_start' % item.name.lower(), \ - [item.title, item.service_item_path, - item.get_frame_title(), slideno, self.isLive, blanked]) - self.displayServiceManagerItems(item, slideno) + #If service item is the same as the current on only change slide + if item.__eq__(self.serviceItem): + self.PreviewListWidget.selectRow(slideno) + self.onSlideSelected() + return + self._processItem(item, slideno) - def displayServiceManagerItems(self, serviceItem, slideno): + def _processItem(self, serviceItem, slideno): """ Loads a ServiceItem into the system from ServiceManager Display the slide number passed """ - log.debug(u'displayServiceManagerItems Start') + log.debug(u'processsManagerItem') + #If old item was a command tell it to stop + if self.serviceItem and self.serviceItem.is_command(): + self.onMediaStop() + if serviceItem.is_media(): + self.onMediaStart(serviceItem) + elif serviceItem.is_command(): + if self.isLive: + blanked = self.blankButton.isChecked() + else: + blanked = False + Receiver.send_message(u'%s_start' % serviceItem.name.lower(), \ + [serviceItem.title, serviceItem.service_item_path, + serviceItem.get_frame_title(), slideno, self.isLive, blanked]) self.slideList = {} width = self.parent.ControlSplitter.sizes()[self.split] #Set pointing cursor when we have somthing to point at @@ -490,7 +508,6 @@ class SlideController(QtGui.QWidget): log.log(15, u'Display Rendering took %4s' % (time.time() - before)) if self.isLive: self.serviceItem.request_audit() - log.debug(u'displayServiceManagerItems End') #Screen event methods def onSlideSelectedFirst(self): @@ -511,6 +528,7 @@ class SlideController(QtGui.QWidget): """ Handle the blank screen button """ + log.debug(u'onBlankDisplay %d' % force) if force: self.blankButton.setChecked(True) self.blankScreen(self.blankButton.isChecked()) @@ -527,6 +545,8 @@ class SlideController(QtGui.QWidget): Receiver.send_message(u'%s_blank'% self.serviceItem.name.lower()) else: Receiver.send_message(u'%s_unblank'% self.serviceItem.name.lower()) + else: + self.parent.mainDisplay.blankDisplay(blanked) else: self.parent.mainDisplay.blankDisplay(blanked) diff --git a/openlp/core/ui/splashscreen.py b/openlp/core/ui/splashscreen.py index 69ef7910d..10cea5a11 100644 --- a/openlp/core/ui/splashscreen.py +++ b/openlp/core/ui/splashscreen.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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,4 +67,4 @@ class SplashScreen(object): self.splash_screen.repaint() def finish(self, widget): - self.splash_screen.finish(widget) \ No newline at end of file + self.splash_screen.finish(widget) diff --git a/openlp/core/ui/test/test_service_manager.py b/openlp/core/ui/test/test_service_manager.py index a23819383..3755e459c 100644 --- a/openlp/core/ui/test/test_service_manager.py +++ b/openlp/core/ui/test/test_service_manager.py @@ -1,20 +1,27 @@ -""" -OpenLP - Open Source Lyrics Projection -Copyright (c) 2008 Raoul Snyman -Portions copyright (c) 2008 Martin Thompson, Tim Bentley +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA -""" +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2010 Raoul Snyman # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### import sys import os diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index 1d8be6499..3b211de28 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/themestab.py b/openlp/core/ui/themestab.py index b485745dd..fff8c384c 100644 --- a/openlp/core/ui/themestab.py +++ b/openlp/core/ui/themestab.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -186,4 +186,4 @@ class ThemesTab(SettingsTab): preview = QtGui.QPixmap(unicode(image)) display = preview.scaled(300, 255, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation) - self.DefaultListView.setPixmap(display) \ No newline at end of file + self.DefaultListView.setPixmap(display) diff --git a/openlp/core/utils/__init__.py b/openlp/core/utils/__init__.py index 5d97dd8f2..a64b0c06b 100644 --- a/openlp/core/utils/__init__.py +++ b/openlp/core/utils/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -29,6 +29,8 @@ import logging import urllib2 from datetime import datetime +import openlp + log = logging.getLogger(__name__) class AppLocation(object): @@ -42,8 +44,14 @@ class AppLocation(object): @staticmethod def get_directory(dir_type): + """ + Return the appropriate directory according to the directory type. + + ``dir_type`` + The directory type you want, for instance the data directory. + """ if dir_type == AppLocation.AppDir: - return os.path.abspath(os.path.split(sys.argv[0])[0]) + return os.path.abspath(os.path.split(sys.argv[0])[0]) elif dir_type == AppLocation.ConfigDir: if sys.platform == u'win32': path = os.path.join(os.getenv(u'APPDATA'), u'openlp') @@ -71,14 +79,32 @@ class AppLocation(object): path = os.path.join(os.getenv(u'HOME'), u'.openlp', u'data') return path elif dir_type == AppLocation.PluginsDir: + plugin_path = None app_path = os.path.abspath(os.path.split(sys.argv[0])[0]) - if hasattr(sys, u'frozen') and sys.frozen == 1: - return os.path.join(app_path, u'plugins') + if sys.platform == u'win32': + if hasattr(sys, u'frozen') and sys.frozen == 1: + plugin_path = os.path.join(app_path, u'plugins') + else: + plugin_path = os.path.join(app_path, u'openlp', u'plugins') + elif sys.platform == u'darwin': + plugin_path = os.path.join(app_path, u'plugins') else: - return os.path.join(app_path, u'openlp', u'plugins') + plugin_path = os.path.join( + os.path.split(openlp.__file__)[0], u'plugins') + return plugin_path def check_latest_version(config, current_version): + """ + Check the latest version of OpenLP against the version file on the OpenLP + site. + + ``config`` + The OpenLP config object. + + ``current_version`` + The current version of OpenLP. + """ version_string = current_version #set to prod in the distribution confif file. last_test = config.get_config(u'last version test', datetime.now().date()) @@ -97,6 +123,18 @@ def check_latest_version(config, current_version): log.exception(u'Reason for failure: %s', e.reason) return version_string +def variant_to_unicode(variant): + """ + Converts a QVariant to a unicode string. + + ``variant`` + The QVariant instance to convert to unicode. + """ + string = variant.toString() + if not isinstance(string, unicode): + string = unicode(string, u'utf8') + return string + from registry import Registry from confighelper import ConfigHelper diff --git a/openlp/core/utils/confighelper.py b/openlp/core/utils/confighelper.py index 7920013f2..c2be4bd24 100644 --- a/openlp/core/utils/confighelper.py +++ b/openlp/core/utils/confighelper.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/registry.py b/openlp/core/utils/registry.py index 2abbf81bb..ba7c72a89 100644 --- a/openlp/core/utils/registry.py +++ b/openlp/core/utils/registry.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -127,4 +127,4 @@ class Registry(object): return False finally: if file_handle: - file_handle.close() \ No newline at end of file + file_handle.close() diff --git a/openlp/migration/__init__.py b/openlp/migration/__init__.py index bc50edda3..1a348a0df 100644 --- a/openlp/migration/__init__.py +++ b/openlp/migration/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -21,4 +21,4 @@ # You should have received a copy of the GNU General Public License along # # with this program; if not, write to the Free Software Foundation, Inc., 59 # # Temple Place, Suite 330, Boston, MA 02111-1307 USA # -############################################################################### \ No newline at end of file +############################################################################### diff --git a/openlp/migration/display.py b/openlp/migration/display.py index 52951d31f..8553f432a 100644 --- a/openlp/migration/display.py +++ b/openlp/migration/display.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/migration/migratebibles.py b/openlp/migration/migratebibles.py index f9e10b756..cd07aa032 100644 --- a/openlp/migration/migratebibles.py +++ b/openlp/migration/migratebibles.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -29,4 +29,4 @@ class MigrateBibles(): def process(self): self.display.output(u'Bible process started') - self.display.output(u'Bible process finished') \ No newline at end of file + self.display.output(u'Bible process finished') diff --git a/openlp/migration/migratefiles.py b/openlp/migration/migratefiles.py index f1c9435ab..4fa6b5a29 100644 --- a/openlp/migration/migratefiles.py +++ b/openlp/migration/migratefiles.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -46,4 +46,4 @@ class MigrateFiles(): self.display.sub_output(u'images created') ConfigHelper.get_config(u'presentations', u'data path') self.display.sub_output(u'presentations created') - self.display.output(u'Initial Setup finished') \ No newline at end of file + self.display.output(u'Initial Setup finished') diff --git a/openlp/migration/migratesongs.py b/openlp/migration/migratesongs.py index 66a738768..89b55bdee 100644 --- a/openlp/migration/migratesongs.py +++ b/openlp/migration/migratesongs.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -198,4 +198,4 @@ class MigrateSongs(): conn.execute(u'drop table songauthors_temp;') conn.commit() conn.execute(u'drop table settings;') - conn.commit() \ No newline at end of file + conn.commit() diff --git a/openlp/plugins/__init__.py b/openlp/plugins/__init__.py index bc50edda3..1a348a0df 100644 --- a/openlp/plugins/__init__.py +++ b/openlp/plugins/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -21,4 +21,4 @@ # You should have received a copy of the GNU General Public License along # # with this program; if not, write to the Free Software Foundation, Inc., 59 # # Temple Place, Suite 330, Boston, MA 02111-1307 USA # -############################################################################### \ No newline at end of file +############################################################################### diff --git a/openlp/plugins/alerts/__init__.py b/openlp/plugins/alerts/__init__.py index bc50edda3..1a348a0df 100644 --- a/openlp/plugins/alerts/__init__.py +++ b/openlp/plugins/alerts/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -21,4 +21,4 @@ # You should have received a copy of the GNU General Public License along # # with this program; if not, write to the Free Software Foundation, Inc., 59 # # Temple Place, Suite 330, Boston, MA 02111-1307 USA # -############################################################################### \ No newline at end of file +############################################################################### diff --git a/openlp/plugins/alerts/alertsplugin.py b/openlp/plugins/alerts/alertsplugin.py index 90e7946c7..983d5c1a4 100644 --- a/openlp/plugins/alerts/alertsplugin.py +++ b/openlp/plugins/alerts/alertsplugin.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/__init__.py b/openlp/plugins/alerts/forms/__init__.py index 14c30d73b..ba32fdcd1 100644 --- a/openlp/plugins/alerts/forms/__init__.py +++ b/openlp/plugins/alerts/forms/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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 53fc1fff5..442cfadd2 100644 --- a/openlp/plugins/alerts/forms/alertdialog.py +++ b/openlp/plugins/alerts/forms/alertdialog.py @@ -1,11 +1,27 @@ # -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 -# Form implementation generated from reading ui file 'alertform.ui' -# -# Created: Sat Feb 13 08:19:51 2010 -# by: PyQt4 UI code generator 4.6.2 -# -# WARNING! All changes made in this file will be lost! +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2010 Raoul Snyman # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### from PyQt4 import QtCore, QtGui diff --git a/openlp/plugins/alerts/forms/alerteditdialog.py b/openlp/plugins/alerts/forms/alerteditdialog.py index 6cf4769ef..c89462887 100644 --- a/openlp/plugins/alerts/forms/alerteditdialog.py +++ b/openlp/plugins/alerts/forms/alerteditdialog.py @@ -1,11 +1,27 @@ # -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 -# Form implementation generated from reading ui file 'alerteditdialog.ui' -# -# Created: Sun Feb 14 16:45:10 2010 -# by: PyQt4 UI code generator 4.6.2 -# -# WARNING! All changes made in this file will be lost! +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2010 Raoul Snyman # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### from PyQt4 import QtCore, QtGui diff --git a/openlp/plugins/alerts/forms/alerteditform.py b/openlp/plugins/alerts/forms/alerteditform.py index a88eff4f3..c8038054e 100644 --- a/openlp/plugins/alerts/forms/alerteditform.py +++ b/openlp/plugins/alerts/forms/alerteditform.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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 2d7dd1c21..0d21cf4b9 100644 --- a/openlp/plugins/alerts/forms/alertform.py +++ b/openlp/plugins/alerts/forms/alertform.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/alertstab.py b/openlp/plugins/alerts/forms/alertstab.py index c842c2e20..4942b8ede 100644 --- a/openlp/plugins/alerts/forms/alertstab.py +++ b/openlp/plugins/alerts/forms/alertstab.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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 c39574719..59a27b28e 100644 --- a/openlp/plugins/alerts/lib/__init__.py +++ b/openlp/plugins/alerts/lib/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -22,5 +22,6 @@ # with this program; if not, write to the Free Software Foundation, Inc., 59 # # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### + from alertsmanager import AlertsManager from manager import DBManager diff --git a/openlp/plugins/alerts/lib/alertsmanager.py b/openlp/plugins/alerts/lib/alertsmanager.py index 41fc25562..3b61125f4 100644 --- a/openlp/plugins/alerts/lib/alertsmanager.py +++ b/openlp/plugins/alerts/lib/alertsmanager.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/classes.py b/openlp/plugins/alerts/lib/classes.py index eec21300c..fd1883b71 100644 --- a/openlp/plugins/alerts/lib/classes.py +++ b/openlp/plugins/alerts/lib/classes.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/manager.py b/openlp/plugins/alerts/lib/manager.py index a3ed1ee7e..ec4654807 100644 --- a/openlp/plugins/alerts/lib/manager.py +++ b/openlp/plugins/alerts/lib/manager.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/meta.py b/openlp/plugins/alerts/lib/meta.py index 38b0f7206..affa31969 100644 --- a/openlp/plugins/alerts/lib/meta.py +++ b/openlp/plugins/alerts/lib/meta.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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,4 +35,4 @@ session = None # Global metadata. If you have multiple databases with overlapping table # names, you'll need a metadata for each database -metadata = MetaData() \ No newline at end of file +metadata = MetaData() diff --git a/openlp/plugins/alerts/lib/models.py b/openlp/plugins/alerts/lib/models.py index 4f556cd23..d95ebce5d 100644 --- a/openlp/plugins/alerts/lib/models.py +++ b/openlp/plugins/alerts/lib/models.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/tables.py b/openlp/plugins/alerts/lib/tables.py index 0a731fb13..0e707570d 100644 --- a/openlp/plugins/alerts/lib/tables.py +++ b/openlp/plugins/alerts/lib/tables.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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 bc50edda3..1a348a0df 100644 --- a/openlp/plugins/bibles/__init__.py +++ b/openlp/plugins/bibles/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -21,4 +21,4 @@ # You should have received a copy of the GNU General Public License along # # with this program; if not, write to the Free Software Foundation, Inc., 59 # # Temple Place, Suite 330, Boston, MA 02111-1307 USA # -############################################################################### \ No newline at end of file +############################################################################### diff --git a/openlp/plugins/bibles/bibleplugin.py b/openlp/plugins/bibles/bibleplugin.py index bd65b6622..01c92141f 100644 --- a/openlp/plugins/bibles/bibleplugin.py +++ b/openlp/plugins/bibles/bibleplugin.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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 +93,6 @@ class BiblePlugin(Plugin): 'displayed on the screen during the service.') return about_text - def can_delete_theme(self, theme): if self.settings_tab.bible_theme == theme: return False diff --git a/openlp/plugins/bibles/forms/__init__.py b/openlp/plugins/bibles/forms/__init__.py index dd504d347..312aa7506 100644 --- a/openlp/plugins/bibles/forms/__init__.py +++ b/openlp/plugins/bibles/forms/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -25,4 +25,4 @@ from importwizardform import ImportWizardForm -__all__ = ['ImportWizardForm'] \ No newline at end of file +__all__ = ['ImportWizardForm'] diff --git a/openlp/plugins/bibles/forms/bibleimportwizard.py b/openlp/plugins/bibles/forms/bibleimportwizard.py index 59e38e39a..2313072d3 100644 --- a/openlp/plugins/bibles/forms/bibleimportwizard.py +++ b/openlp/plugins/bibles/forms/bibleimportwizard.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/importwizardform.py b/openlp/plugins/bibles/forms/importwizardform.py index 422e869eb..2efbcdf1e 100644 --- a/openlp/plugins/bibles/forms/importwizardform.py +++ b/openlp/plugins/bibles/forms/importwizardform.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -32,7 +32,7 @@ from PyQt4 import QtCore, QtGui from bibleimportwizard import Ui_BibleImportWizard from openlp.core.lib import Receiver -from openlp.core.utils import AppLocation +from openlp.core.utils import AppLocation, variant_to_unicode from openlp.plugins.bibles.lib.manager import BibleFormat log = logging.getLogger(__name__) @@ -60,9 +60,21 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard): log.info(u'BibleImportForm loaded') def __init__(self, parent, config, manager, bibleplugin): - ''' - Constructor - ''' + """ + Instantiate the wizard, and run any extra setup we need to. + + ``parent`` + The QWidget-derived parent of the wizard. + + ``config`` + The configuration object for storing and retrieving settings. + + ``manager`` + The Bible manager. + + ``bibleplugin`` + The Bible plugin. + """ QtGui.QWizard.__init__(self, parent) self.setupUi(self) self.registerFields() @@ -97,10 +109,16 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard): self.onCurrentIdChanged) def exec_(self): + """ + Run the wizard. + """ self.setDefaults() return QtGui.QWizard.exec_(self) def validateCurrentPage(self): + """ + Validate the current page before moving on to the next page. + """ if self.currentId() == 0: # Welcome page return True @@ -144,7 +162,9 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard): return True elif self.currentId() == 2: # License details - if self.field(u'license_version').toString() == u'': + license_version = variant_to_unicode(self.field(u'license_version')) + license_copyright = variant_to_unicode(self.field(u'license_copyright')) + if license_version == u'': QtGui.QMessageBox.critical(self, self.trUtf8('Empty Version Name'), self.trUtf8('You need to specify a version name for your ' @@ -152,7 +172,7 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard): QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok)) self.VersionNameEdit.setFocus() return False - elif self.field(u'license_copyright').toString() == u'': + elif license_copyright == u'': QtGui.QMessageBox.critical(self, self.trUtf8('Empty Copyright'), self.trUtf8('You need to set a copyright for your Bible! ' @@ -161,8 +181,7 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard): QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok)) self.CopyrightEdit.setFocus() return False - elif self.manager.exists( - self.field(u'license_version').toString()): + elif self.manager.exists(license_version): QtGui.QMessageBox.critical(self, self.trUtf8('Bible Exists'), self.trUtf8('This Bible already exists! Please import ' @@ -176,27 +195,49 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard): return True def onLocationComboBoxChanged(self, index): + """ + Setup the list of Bibles when you select a different source on the web + download page. + + ``index`` + The index of the combo box. + """ self.BibleComboBox.clear() - for bible, abbreviation in self.web_bible_list[index].iteritems(): + for bible in self.web_bible_list[index].keys(): self.BibleComboBox.addItem(unicode(self.trUtf8(bible))) def onOsisFileButtonClicked(self): - self.getFileName(self.trUtf8('Open OSIS file'), + """ + Show the file open dialog for the OSIS file. + """ + self.getFileName(self.trUtf8('Open OSIS File'), self.OSISLocationEdit) def onBooksFileButtonClicked(self): - self.getFileName(self.trUtf8('Open Books CSV file'), + """ + Show the file open dialog for the books CSV file. + """ + self.getFileName(self.trUtf8('Open Books CSV File'), self.BooksLocationEdit) def onCsvVersesFileButtonClicked(self): - self.getFileName(self.trUtf8('Open Verses CSV file'), + """ + Show the file open dialog for the verses CSV file. + """ + self.getFileName(self.trUtf8('Open Verses CSV File'), self.CsvVerseLocationEdit) def onOpenSongBrowseButtonClicked(self): + """ + Show the file open dialog for the OpenSong file. + """ self.getFileName(self.trUtf8('Open OpenSong Bible'), self.OpenSongFileEdit) def onCancelButtonClicked(self, checked): + """ + Stop the import on pressing the cancel button. + """ log.debug('Cancel button pressed!') if self.currentId() == 3: Receiver.send_message(u'openlpstopimport') @@ -270,7 +311,7 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard): books_reader = csv.reader(books_file, dialect) for line in books_reader: self.web_bible_list[DownloadLocation.Crosswalk][line[0]] = \ - unicode(line[1], u'utf-8').strip() + unicode(line[1], u'utf8').strip() except: log.exception(u'Crosswalk resources missing') finally: @@ -315,25 +356,28 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard): def performImport(self): bible_type = self.field(u'source_format').toInt()[0] - success = False + license_version = variant_to_unicode(self.field(u'license_version')) + license_copyright = variant_to_unicode(self.field(u'license_copyright')) + license_permission = variant_to_unicode(self.field(u'license_permission')) + importer = None if bible_type == BibleFormat.OSIS: # Import an OSIS bible - success = self.manager.import_bible(BibleFormat.OSIS, - name=unicode(self.field(u'license_version').toString()), - filename=unicode(self.field(u'osis_location').toString()) + importer = self.manager.import_bible(BibleFormat.OSIS, + name=license_version, + filename=variant_to_unicode(self.field(u'osis_location')) ) elif bible_type == BibleFormat.CSV: # Import a CSV bible - success = self.manager.import_bible(BibleFormat.CSV, - name=unicode(self.field(u'license_version').toString()), - booksfile=self.field(u'csv_booksfile').toString(), - versefile=self.field(u'csv_versefile').toString() + importer = self.manager.import_bible(BibleFormat.CSV, + name=license_version, + booksfile=variant_to_unicode(self.field(u'csv_booksfile')), + versefile=variant_to_unicode(self.field(u'csv_versefile')) ) elif bible_type == BibleFormat.OpenSong: # Import an OpenSong bible - success = self.manager.import_bible(BibleFormat.OpenSong, - name=unicode(self.field(u'license_version').toString()), - filename=self.field(u'opensong_file').toString() + importer = self.manager.import_bible(BibleFormat.OpenSong, + name=license_version, + filename=variant_to_unicode(self.field(u'opensong_file')) ) elif bible_type == BibleFormat.WebDownload: # Import a bible from the web @@ -341,30 +385,29 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard): download_location = self.field(u'web_location').toInt()[0] if download_location == DownloadLocation.Crosswalk: bible = self.web_bible_list[DownloadLocation.Crosswalk][ - unicode(self.BibleComboBox.currentText())] + unicode(self.BibleComboBox.currentText(), u'utf8')] elif download_location == DownloadLocation.BibleGateway: bible = self.web_bible_list[DownloadLocation.BibleGateway][ - unicode(self.BibleComboBox.currentText())] - success = self.manager.import_bible(BibleFormat.WebDownload, - name=unicode(self.field(u'license_version').toString()), - download_source=unicode(DownloadLocation.get_name(download_location)), - download_name=unicode(bible), - proxy_server=unicode(self.field(u'proxy_server').toString()), - proxy_username=unicode(self.field(u'proxy_username').toString()), - proxy_password=unicode(self.field(u'proxy_password').toString()) + unicode(self.BibleComboBox.currentText(), u'utf8')] + importer = self.manager.import_bible( + BibleFormat.WebDownload, + name=license_version, + download_source=DownloadLocation.get_name(download_location), + download_name=bible, + proxy_server=variant_to_unicode(self.field(u'proxy_server')), + proxy_username=variant_to_unicode(self.field(u'proxy_username')), + proxy_password=variant_to_unicode(self.field(u'proxy_password')) ) + success = importer.do_import() if success: - self.manager.save_meta_data( - unicode(self.field(u'license_version').toString()), - unicode(self.field(u'license_version').toString()), - unicode(self.field(u'license_copyright').toString()), - unicode(self.field(u'license_permission').toString()) - ) + self.manager.save_meta_data(license_version, license_version, + license_copyright, license_permission) self.manager.reload_bibles() self.ImportProgressLabel.setText(self.trUtf8('Finished import.')) else: self.ImportProgressLabel.setText( self.trUtf8('Your Bible import failed.')) + importer.delete() def postImport(self): self.ImportProgressBar.setValue(self.ImportProgressBar.maximum()) diff --git a/openlp/plugins/bibles/lib/__init__.py b/openlp/plugins/bibles/lib/__init__.py index f60ef5bbc..a69db14b3 100644 --- a/openlp/plugins/bibles/lib/__init__.py +++ b/openlp/plugins/bibles/lib/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -26,4 +26,4 @@ from common import BibleCommon from manager import BibleManager from biblestab import BiblesTab -from mediaitem import BibleMediaItem \ No newline at end of file +from mediaitem import BibleMediaItem diff --git a/openlp/plugins/bibles/lib/biblestab.py b/openlp/plugins/bibles/lib/biblestab.py index 398040fd8..4c205b920 100644 --- a/openlp/plugins/bibles/lib/biblestab.py +++ b/openlp/plugins/bibles/lib/biblestab.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/common.py b/openlp/plugins/bibles/lib/common.py index 9a876266d..eef9b4dc3 100644 --- a/openlp/plugins/bibles/lib/common.py +++ b/openlp/plugins/bibles/lib/common.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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 +27,7 @@ import urllib2 import logging import re import chardet +import htmlentitydefs only_verses = re.compile(r'([\w .]+)[ ]+([0-9]+)[ ]*[:|v|V][ ]*([0-9]+)' r'(?:[ ]*-[ ]*([0-9]+|end))?(?:[ ]*,[ ]*([0-9]+)(?:[ ]*-[ ]*([0-9]+|end))?)?', @@ -115,7 +116,6 @@ def parse_reference(reference): log.debug(reference_list) return reference_list - class SearchResults(object): """ Encapsulate a set of search results. This is Bible-type independant. @@ -247,3 +247,33 @@ class BibleCommon(object): start_tag = text.find(u'<') text = text.replace(u'>', u'') return text.rstrip().lstrip() + + +def unescape(text): + """ + Removes HTML or XML character references and entities from a text string. + Courtesy of Fredrik Lundh, http://effbot.org/zone/re-sub.htm#unescape-html + + @param text The HTML (or XML) source text. + @return The plain text, as a Unicode string, if necessary. + """ + def fixup(m): + text = m.group(0) + if text[:2] == u'&#': + # character reference + try: + if text[:3] == u'&#x': + return unichr(int(text[3:-1], 16)) + else: + return unichr(int(text[2:-1])) + except ValueError: + pass + else: + # named entity + try: + text = unichr(htmlentitydefs.name2codepoint[text[1:-1]]) + except KeyError: + pass + return text # leave as is + return re.sub(u'&#?\w+;', fixup, text) + diff --git a/openlp/plugins/bibles/lib/csvbible.py b/openlp/plugins/bibles/lib/csvbible.py index a1a16339c..2f40e4b96 100644 --- a/openlp/plugins/bibles/lib/csvbible.py +++ b/openlp/plugins/bibles/lib/csvbible.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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 be4112a54..c57ecb83e 100644 --- a/openlp/plugins/bibles/lib/db.py +++ b/openlp/plugins/bibles/lib/db.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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 +26,7 @@ import os import logging import chardet +import re from sqlalchemy import or_ from PyQt4 import QtCore @@ -63,16 +64,21 @@ class BibleDB(QtCore.QObject): QtCore.QObject.__init__(self) if u'path' not in kwargs: raise KeyError(u'Missing keyword argument "path".') - if u'name' not in kwargs: - raise KeyError(u'Missing keyword argument "name".') if u'config' not in kwargs: raise KeyError(u'Missing keyword argument "config".') + if u'name' not in kwargs and u'file' not in kwargs: + raise KeyError(u'Missing keyword argument "name" or "file".') self.stop_import_flag = False - self.name = kwargs[u'name'] self.config = kwargs[u'config'] - self.db_file = os.path.join(kwargs[u'path'], - u'%s.sqlite' % kwargs[u'name']) - log.debug(u'Load bible %s on path %s', kwargs[u'name'], self.db_file) + if u'name' in kwargs: + self.name = kwargs[u'name'] + if not isinstance(self.name, unicode): + self.name = unicode(self.name, u'utf-8') + self.file = self.clean_filename(self.name) + if u'file' in kwargs: + self.file = kwargs[u'file'] + self.db_file = os.path.join(kwargs[u'path'], self.file) + log.debug(u'Load bible %s on path %s', self.file, self.db_file) db_type = self.config.get_config(u'db type', u'sqlite') db_url = u'' if db_type == u'sqlite': @@ -85,12 +91,35 @@ class BibleDB(QtCore.QObject): self.config.get_config(u'db database')) self.metadata, self.session = init_models(db_url) self.metadata.create_all(checkfirst=True) + if u'file' in kwargs: + self.get_name() + + def get_name(self): + version_name = self.get_meta(u'Version') + if version_name: + self.name = version_name.value + else: + self.name = None + return self.name + + def clean_filename(self, old_filename): + if not isinstance(old_filename, unicode): + old_filename = unicode(old_filename, u'utf-8') + old_filename = re.sub(r'[^\w]+', u'_', old_filename).strip(u'_') + return old_filename + u'.sqlite' + + def delete(self): + try: + os.remove(self.db_file) + return True + except: + return False def register(self, wizard): """ This method basically just initialialises the database. It is called from the Bible Manager when a Bible is imported. Descendant classes - may want to override this method to supply their own custom + may want to override this method to suVersionpply their own custom initialisation as well. """ self.wizard = wizard @@ -241,8 +270,6 @@ class BibleDB(QtCore.QObject): count = self.session.query(Verse.chapter).join(Book)\ .filter(Book.name==book)\ .distinct().count() - #verse = self.session.query(Verse).join(Book).filter( - # Book.name == bookname).order_by(Verse.chapter.desc()).first() if not count: return 0 else: @@ -254,9 +281,6 @@ class BibleDB(QtCore.QObject): .filter(Book.name==book)\ .filter(Verse.chapter==chapter)\ .count() - #verse = self.session.query(Verse).join(Book).filter( - # Book.name == bookname).filter( - # Verse.chapter == chapter).order_by(Verse.verse.desc()).first() if not count: return 0 else: diff --git a/openlp/plugins/bibles/lib/http.py b/openlp/plugins/bibles/lib/http.py index 5a170d84c..4a447de98 100644 --- a/openlp/plugins/bibles/lib/http.py +++ b/openlp/plugins/bibles/lib/http.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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,21 +28,30 @@ import urllib2 import os import sqlite3 -from BeautifulSoup import BeautifulSoup +from BeautifulSoup import BeautifulSoup, Tag, NavigableString from openlp.core.lib import Receiver from openlp.core.utils import AppLocation -from common import BibleCommon, SearchResults +from common import BibleCommon, SearchResults, unescape from db import BibleDB from openlp.plugins.bibles.lib.models import Book log = logging.getLogger(__name__) class HTTPBooks(object): + """ + A wrapper class around a small SQLite database which contains the books, + chapter counts and verse counts for the web download Bibles. This class + contains a singleton "cursor" so that only one connection to the SQLite + database is ever used. + """ cursor = None @staticmethod def get_cursor(): + """ + Return the cursor object. Instantiate one if it doesn't exist yet. + """ if HTTPBooks.cursor is None: filepath = os.path.join( AppLocation.get_directory(AppLocation.PluginsDir), u'bibles', @@ -53,12 +62,24 @@ class HTTPBooks(object): @staticmethod def run_sql(query, parameters=()): + """ + Run an SQL query on the database, returning the results. + + ``query`` + The actual SQL query to run. + + ``parameters`` + Any variable parameters to add to the query. + """ cursor = HTTPBooks.get_cursor() cursor.execute(query, parameters) return cursor.fetchall() @staticmethod def get_books(): + """ + Return a list of all the books of the Bible. + """ books = HTTPBooks.run_sql(u'SELECT id, testament_id, name, ' u'abbreviation, chapters FROM books ORDER BY id') book_list = [] @@ -74,6 +95,12 @@ class HTTPBooks(object): @staticmethod def get_book(name): + """ + Return a book by name or abbreviation. + + ``name`` + The name or abbreviation of the book. + """ if not isinstance(name, unicode): name = unicode(name) books = HTTPBooks.run_sql(u'SELECT id, testament_id, name, ' @@ -92,6 +119,15 @@ class HTTPBooks(object): @staticmethod def get_chapter(name, chapter): + """ + Return the chapter details for a specific chapter of a book. + + ``name`` + The name or abbreviation of a book. + + ``chapter`` + The chapter number. + """ if not isinstance(name, int): chapter = int(chapter) book = HTTPBooks.get_book(name) @@ -109,6 +145,12 @@ class HTTPBooks(object): @staticmethod def get_chapter_count(book): + """ + Return the number of chapters in a book. + + ``book`` + The name or abbreviation of the book. + """ details = HTTPBooks.get_book(book) if details: return details[u'chapters'] @@ -116,6 +158,15 @@ class HTTPBooks(object): @staticmethod def get_verse_count(book, chapter): + """ + Return the number of verses in a chapter. + + ``book`` + The name or abbreviation of the book. + + ``chapter`` + The number of the chapter. + """ details = HTTPBooks.get_chapter(book, chapter) if details: return details[u'verses'] @@ -123,7 +174,9 @@ class HTTPBooks(object): class BGExtract(BibleCommon): - log.info(u'%s BGExtract loaded', __name__) + """ + Extract verses from BibleGateway + """ def __init__(self, proxyurl=None): log.debug(u'init %s', proxyurl) @@ -133,7 +186,7 @@ class BGExtract(BibleCommon): """ Access and decode bibles via the BibleGateway website - ``Version`` + ``version`` The version of the bible like 31 for New International version ``bookname`` @@ -146,54 +199,76 @@ class BGExtract(BibleCommon): urlstring = u'http://www.biblegateway.com/passage/?search=%s+%s' \ u'&version=%s' % (bookname, chapter, version) log.debug(u'BibleGateway url = %s' % urlstring) - xml_string = self._get_web_text(urlstring, self.proxyurl) - verseSearch = u' -1: - # clear out string - verseText = u'' - versePos = xml_string.find(u'', versePos) + 6 - i = xml_string.find(verseSearch, versePos + 1) - # Not sure if this is needed now - if i == -1: - i = xml_string.find(u' 0 and j < i: - i = j - verseText = xml_string[versePos + 7 : i ] - # store the verse - bible[verse] = self._clean_text(verseText) - versePos = -1 - else: - verseText = xml_string[versePos: i] - start_tag = verseText.find(verseFootnote) - while start_tag > -1: - end_tag = verseText.find(u'') - verseText = verseText[:start_tag] + verseText[end_tag + 6:len(verseText)] - start_tag = verseText.find(verseFootnote) - # Chop off verse and start again - xml_string = xml_string[i:] - #look for the next verse - versePos = xml_string.find(verseSearch) - # store the verse - bible[verse] = self._clean_text(verseText) - verse += 1 - return SearchResults(bookname, chapter, bible) + # Let's get the page, and then open it in BeautifulSoup, so as to + # attempt to make "easy" work of bad HTML. + page = urllib2.urlopen(urlstring) + soup = BeautifulSoup(page) + verses = soup.find(u'div', u'result-text-style-normal') + verse_number = 0 + verse_list = {0: u''} + # http://www.codinghorror.com/blog/2009/11/parsing-html-the-cthulhu-way.html + # This is a PERFECT example of opening the Cthulu tag! + # O Bible Gateway, why doth ye such horrific HTML produce? + for verse in verses: + if isinstance(verse, Tag) and verse.name == u'div' and filter(lambda a: a[0] == u'class', verse.attrs)[0][1] == u'footnotes': + break + if isinstance(verse, Tag) and verse.name == u'sup' and filter(lambda a: a[0] == u'class', verse.attrs)[0][1] != u'versenum': + continue + if isinstance(verse, Tag) and verse.name == u'p' and not verse.contents: + continue + if isinstance(verse, Tag) and (verse.name == u'p' or verse.name == u'font') and verse.contents: + for item in verse.contents: + if isinstance(item, Tag) and (item.name == u'h4' or item.name == u'h5'): + continue + if isinstance(item, Tag) and item.name == u'sup' and filter(lambda a: a[0] == u'class', item.attrs)[0][1] != u'versenum': + continue + if isinstance(item, Tag) and item.name == u'p' and not item.contents: + continue + if isinstance(item, Tag) and item.name == u'sup': + verse_number = int(str(item.contents[0])) + verse_list[verse_number] = u'' + continue + if isinstance(item, Tag) and item.name == u'font': + for subitem in item.contents: + if isinstance(subitem, Tag) and subitem.name == u'sup' and filter(lambda a: a[0] == u'class', subitem.attrs)[0][1] != u'versenum': + continue + if isinstance(subitem, Tag) and subitem.name == u'p' and not subitem.contents: + continue + if isinstance(subitem, Tag) and subitem.name == u'sup': + verse_number = int(str(subitem.contents[0])) + verse_list[verse_number] = u'' + continue + if isinstance(subitem, NavigableString): + verse_list[verse_number] = verse_list[verse_number] + subitem.replace(u' ', u' ') + continue + if isinstance(item, NavigableString): + verse_list[verse_number] = verse_list[verse_number] + item.replace(u' ', u' ') + continue + if isinstance(verse, Tag) and verse.name == u'sup': + verse_number = int(str(verse.contents[0])) + verse_list[verse_number] = u'' + continue + if isinstance(verse, NavigableString): + if not isinstance(verse, unicode): + verse = unicode(verse, u'utf8') + verse_list[verse_number] = verse_list[verse_number] + \ + unescape(verse.replace(u' ', u' ')) + # Delete the "0" element, since we don't need it, it's just there for + # some stupid initial whitespace, courtesy of Bible Gateway. + del verse_list[0] + # Finally, return the list of verses in a "SearchResults" object. + return SearchResults(bookname, chapter, verse_list) class CWExtract(BibleCommon): - log.info(u'%s CWExtract loaded', __name__) + """ + Extract verses from CrossWalk/BibleStudyTools + """ def __init__(self, proxyurl=None): log.debug(u'init %s', proxyurl) self.proxyurl = proxyurl def get_bible_chapter(self, version, bookname, chapter): - log.debug(u'%s %s, %s, %s', __name__, version, bookname, chapter) """ Access and decode bibles via the Crosswalk website @@ -208,9 +283,9 @@ class CWExtract(BibleCommon): """ log.debug(u'get_bible_chapter %s,%s,%s', version, bookname, chapter) - bookname = bookname.replace(u' ', u'') + urlbookname = bookname.replace(u' ', u'-') chapter_url = u'http://www.biblestudytools.com/%s/%s/%s.html' % \ - (version, bookname.lower(), chapter) + (version, urlbookname.lower(), chapter) log.debug(u'URL: %s', chapter_url) page = urllib2.urlopen(chapter_url) if not page: @@ -268,6 +343,10 @@ class HTTPBible(BibleDB): self.proxy_password = None def do_import(self): + """ + Run the import. This method overrides the parent class method. Returns + ``True`` on success, ``False`` on failure. + """ self.wizard.ImportProgressBar.setMaximum(2) self.wizard.incrementProgressBar('Registering bible...') self.create_meta(u'download source', self.download_source) @@ -351,17 +430,43 @@ class HTTPBible(BibleDB): return None def get_books(self): + """ + Return the list of books. + """ return [Book.populate(name=book['name']) for book in HTTPBooks.get_books()] def lookup_book(self, book): + """ + Look up the name of a book. + """ return HTTPBooks.get_book(book) def get_chapter_count(self, book): + """ + Return the number of chapters in a particular book. + """ return HTTPBooks.get_chapter_count(book) def get_verse_count(self, book, chapter): + """ + Return the number of verses for the specified chapter and book. + + ``book`` + The name of the book. + + ``chapter`` + The chapter whose verses are being counted. + """ return HTTPBooks.get_verse_count(book, chapter) def set_proxy_server(self, server): + """ + Sets the proxy server. + + **Note: This is not actually used.** + + ``server`` + The hostname or IP address of the proxy server. + """ self.proxy_server = server diff --git a/openlp/plugins/bibles/lib/manager.py b/openlp/plugins/bibles/lib/manager.py index d24982532..8e622963d 100644 --- a/openlp/plugins/bibles/lib/manager.py +++ b/openlp/plugins/bibles/lib/manager.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -24,7 +24,6 @@ ############################################################################### import logging -import os from common import parse_reference from opensong import OpenSongBible @@ -61,6 +60,9 @@ class BibleFormat(object): def get_class(id): """ Return the appropriate imeplementation class. + + ``id`` + The Bible format. """ if id == BibleFormat.OSIS: return OSISBible @@ -75,6 +77,9 @@ class BibleFormat(object): @staticmethod def list(): + """ + Return a list of the supported Bible formats. + """ return [ BibleFormat.OSIS, BibleFormat.CSV, @@ -123,19 +128,21 @@ class BibleManager(object): log.debug(u'Bible Files %s', files) self.db_cache = {} for filename in files: - name, extension = os.path.splitext(filename) - self.db_cache[name] = BibleDB(self.parent, path=self.path, name=name, config=self.config) + bible = BibleDB(self.parent, path=self.path, file=filename, + config=self.config) + name = bible.get_name() + log.debug(u'Bible Name: "%s"', name) + self.db_cache[name] = bible # look to see if lazy load bible exists and get create getter. source = self.db_cache[name].get_meta(u'download source') if source: download_name = self.db_cache[name].get_meta(u'download name').value meta_proxy = self.db_cache[name].get_meta(u'proxy url') - web_bible = HTTPBible(self.parent, path=self.path, name=name, - config=self.config, download_source=source.value, - download_name=download_name) + web_bible = HTTPBible(self.parent, path=self.path, + file=filename, config=self.config, + download_source=source.value, download_name=download_name) if meta_proxy: web_bible.set_proxy_server(meta_proxy.value) - #del self.db_cache[name] self.db_cache[name] = web_bible log.debug(u'Bibles reloaded') @@ -164,7 +171,7 @@ class BibleManager(object): importer = class_(self.parent, **kwargs) name = importer.register(self.import_wizard) self.db_cache[name] = importer - return importer.do_import() + return importer def get_bibles(self): """ @@ -246,7 +253,7 @@ class BibleManager(object): """ if not isinstance(name, unicode): name = unicode(name) - for bible, db_object in self.db_cache.iteritems(): + for bible in self.db_cache.keys(): log.debug(u'Bible from cache in is_new_bible %s', bible) if not isinstance(bible, unicode): bible = unicode(bible) diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index 30403e69d..2d6233a6c 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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 +45,7 @@ class BibleListView(BaseListWithDnD): def resizeEvent(self, event): self.parent.onListViewResize(event.size().width(), event.size().width()) + class BibleMediaItem(MediaManagerItem): """ This is the custom media manager item for Bibles. @@ -64,6 +65,12 @@ class BibleMediaItem(MediaManagerItem): QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'openlpreloadbibles'), self.reloadBibles) + def _decodeQtObject(self, listobj, key): + obj = listobj[QtCore.QString(key)] + if isinstance(obj, QtCore.QVariant): + obj = obj.toPyObject() + return unicode(obj) + def initPluginNameVisible(self): self.PluginNameVisible = self.trUtf8('Bible') @@ -451,15 +458,17 @@ class BibleMediaItem(MediaManagerItem): # Let's loop through the main lot, and assemble our verses for item in items: bitem = self.ListView.item(item.row()) - reference = bitem.data(QtCore.Qt.UserRole).toPyObject() - bible = unicode(reference[QtCore.QString('bible')]) - book = unicode(reference[QtCore.QString('book')]) - chapter = unicode(reference[QtCore.QString('chapter')]) - verse = unicode(reference[QtCore.QString('verse')]) - text = unicode(reference[QtCore.QString('text')]) - version = unicode(reference[QtCore.QString('version')]) - copyright = unicode(reference[QtCore.QString('copyright')]) - permission = unicode(reference[QtCore.QString('permission')]) + reference = bitem.data(QtCore.Qt.UserRole) + if isinstance(reference, QtCore.QVariant): + reference = reference.toPyObject() + bible = self._decodeQtObject(reference, 'bible') + book = self._decodeQtObject(reference, 'book') + chapter = self._decodeQtObject(reference, 'chapter') + verse = self._decodeQtObject(reference, 'verse') + text = self._decodeQtObject(reference, 'text') + version = self._decodeQtObject(reference, 'version') + copyright = self._decodeQtObject(reference, 'copyright') + permission = self._decodeQtObject(reference, 'permission') if self.parent.settings_tab.display_style == 1: verse_text = self.formatVerse(old_chapter, chapter, verse, u'(u', u')') elif self.parent.settings_tab.display_style == 2: @@ -563,7 +572,7 @@ class BibleMediaItem(MediaManagerItem): permission = u'' else: permission = permission.value - for count, verse in enumerate(self.search_results): + for count, verse in enumerate(self.search_results): bible_text = u' %s %d:%d (%s)' % \ (verse.book.name, verse.chapter, verse.verse, bible) bible_verse = QtGui.QListWidgetItem(bible_text) diff --git a/openlp/plugins/bibles/lib/models.py b/openlp/plugins/bibles/lib/models.py index 2802cb27f..4631b1e32 100644 --- a/openlp/plugins/bibles/lib/models.py +++ b/openlp/plugins/bibles/lib/models.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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 6fa18cf6d..247c97672 100644 --- a/openlp/plugins/bibles/lib/opensong.py +++ b/openlp/plugins/bibles/lib/opensong.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -102,7 +102,7 @@ class OpenSongBible(BibleDB): finally: if file: file.close() - if self.stop_import: + if self.stop_import_flag: self.wizard.incrementProgressBar(u'Import canceled!') return False else: diff --git a/openlp/plugins/bibles/lib/osis.py b/openlp/plugins/bibles/lib/osis.py index e4cb79e73..4416bb2c6 100644 --- a/openlp/plugins/bibles/lib/osis.py +++ b/openlp/plugins/bibles/lib/osis.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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,6 +65,7 @@ class OSISBible(BibleDB): self.l_regex = re.compile(r'') self.w_regex = re.compile(r'') self.q_regex = re.compile(r'') + self.trans_regex = re.compile(r'(.*?)') self.spaces_regex = re.compile(r'([ ]{2,})') self.books = {} filepath = os.path.join( @@ -114,12 +115,14 @@ class OSISBible(BibleDB): osis = codecs.open(self.filename, u'r', details['encoding']) last_chapter = 0 testament = 1 + match_count = 0 db_book = None for file_record in osis: if self.stop_import_flag: break match = self.verse_regex.search(file_record) if match: + match_count += 1 book = match.group(1) chapter = int(match.group(2)) verse = int(match.group(3)) @@ -157,15 +160,18 @@ class OSISBible(BibleDB): verse_text = self.l_regex.sub(u'', verse_text) verse_text = self.w_regex.sub(u'', verse_text) verse_text = self.q_regex.sub(u'', verse_text) + verse_text = self.trans_regex.sub(u'', verse_text) verse_text = verse_text.replace(u'', u'')\ .replace(u'', u'').replace(u'', u'')\ .replace(u'', u'').replace(u'', u'')\ - .replace(u'', u'') + .replace(u'', u'').replace(u'', u'') verse_text = self.spaces_regex.sub(u' ', verse_text) self.create_verse(db_book.id, chapter, verse, verse_text) Receiver.send_message(u'process_events') self.commit() self.wizard.incrementProgressBar(u'Finishing import...') + if match_count == 0: + success = False except: log.exception(u'Loading bible from OSIS file failed') success = False diff --git a/openlp/plugins/bibles/test/__init__.py b/openlp/plugins/bibles/test/__init__.py index e69de29bb..1a348a0df 100644 --- a/openlp/plugins/bibles/test/__init__.py +++ b/openlp/plugins/bibles/test/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 + +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2010 Raoul Snyman # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### diff --git a/openlp/plugins/bibles/test/test_bibleManager.py b/openlp/plugins/bibles/test/test_bibleManager.py index 00af3a2c9..48868d339 100644 --- a/openlp/plugins/bibles/test/test_bibleManager.py +++ b/openlp/plugins/bibles/test/test_bibleManager.py @@ -1,20 +1,27 @@ -""" -OpenLP - Open Source Lyrics Projection -Copyright (c) 2008 Raoul Snyman -Portions copyright (c) 2008 Martin Thompson, Tim Bentley +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA -""" +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2010 Raoul Snyman # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### import logging import os @@ -52,25 +59,25 @@ class TestBibleManager: # Register a bible from files log.debug(u'\n.......testRegisterBibleFiles') self.bm.registerFileBible(u'TheMessage','biblebooks_msg_short.csv','bibleverses_msg_short.csv') - self.bm.registerFileBible(u'NIV','biblebooks_niv_short.csv','bibleverses_niv_short.csv') + self.bm.registerFileBible(u'NIV','biblebooks_niv_short.csv','bibleverses_niv_short.csv') b = self.bm.get_bibles() for b1 in b: log.debug( b1) - assert(b1 in b) - + assert(b1 in b) + def testRegisterHTTPBible(self): # Register a bible from files log.debug( '\n.......testRegisterBibleHTTP') self.bm.registerHTTPBible(u'asv', u'Crosswalk', u'', u'', u'') self.bm.registerHTTPBible(u'nasb', u'Biblegateway', u'', u'', u'') self.bm.registerHTTPBible(u'nkj', u'Biblegateway', - u'http://tigger2:3128/', u'', u'') + u'http://tigger2:3128/', u'', u'') b = self.bm.get_bibles() for b1 in b: log.debug( b1) - assert(b1 in b) + assert(b1 in b) + - def testGetBibles(self): log.debug(u'\n.......testGetBibles') # make sure the shuffled sequence does not lose any elements @@ -85,33 +92,33 @@ class TestBibleManager: for c1 in c: log.debug( c1) assert(c1 in c) - + def testGetBookChapterCount(self): - log.debug(u'\n.......testGetBookChapterCount') + log.debug(u'\n.......testGetBookChapterCount') assert(self.bm.get_book_chapter_count(u'Matthew') == '28') def testGetBookVerseCount(self): - log.debug(u'\n.......testGetBookVerseCount') + log.debug(u'\n.......testGetBookVerseCount') assert(self.bm.get_book_verse_count(u'Genesis', 1) == '31') assert(self.bm.get_book_verse_count(u'Genesis', 2) == '25') assert(self.bm.get_book_verse_count(u'Matthew', 1) == '25') - assert(self.bm.get_book_verse_count(u'Revelation', 1) == '20') + assert(self.bm.get_book_verse_count(u'Revelation', 1) == '20') def testGetVerseText(self): log.debug(u'\n.......testGetVerseText') #c = self.bm.get_verse_text(u'TheMessage",'Genesis',1,2,1) #log.debug( c ) #c = self.bm.get_verse_text(u'NIV','Genesis',1,1,2) - #log.debug( c ) + #log.debug( c ) c = self.bm.get_verse_text(u'asv','Genesis',10,1,20) log.debug( c ) c = self.bm.get_verse_text(u'nasb','Genesis',10,1,20) - log.debug( c ) + log.debug( c ) c = self.bm.get_verse_text(u'nkj','Revelation',10,1,20) - log.debug( c ) - + log.debug( c ) + def testLoadBible(self): log.debug(u'\n.......testLoadBible') #self.bm.loadBible(u'asv') - #self.bm.loadBible(u'nasb') - #self.bm.loadBible(u'nkj') + #self.bm.loadBible(u'nasb') + #self.bm.loadBible(u'nkj') diff --git a/openlp/plugins/bibles/test/test_bibleManagerAPI.py b/openlp/plugins/bibles/test/test_bibleManagerAPI.py index 1cae4237b..3cc329f4a 100644 --- a/openlp/plugins/bibles/test/test_bibleManagerAPI.py +++ b/openlp/plugins/bibles/test/test_bibleManagerAPI.py @@ -1,20 +1,27 @@ -""" -OpenLP - Open Source Lyrics Projection -Copyright (c) 2008 Raoul Snyman -Portions copyright (c) 2008 Martin Thompson, Tim Bentley +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA -""" +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2010 Raoul Snyman # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### import logging import os @@ -47,7 +54,7 @@ class TestBibleManager: def setup_class(self): log.debug(u'\n.......Register BM') self.bm = BibleManager() - + def testGetBibles(self): log.debug(u'\n.......testGetBibles') # make sure the shuffled sequence does not lose any elements @@ -62,32 +69,32 @@ class TestBibleManager: for c1 in c: log.debug( c1) assert(c1 in c) - + def testGetBookChapterCount(self): - log.debug(u'\n.......testGetBookChapterCount') + log.debug(u'\n.......testGetBookChapterCount') assert(self.bm.getBookChapterCount(u'asv', u'Matthew')[0] == 28) def testGetBookVerseCount(self): - log.debug(u'\n.......testGetBookVerseCount') + log.debug(u'\n.......testGetBookVerseCount') assert(self.bm.getBookVerseCount(u'asv', u'Genesis', 1)[0] == 31) assert(self.bm.getBookVerseCount(u'TheMessage', u'Genesis', 2)[0] == 25) assert(self.bm.getBookVerseCount(u'asv', u'Matthew', 1)[0] == 25) assert(self.bm.getBookVerseCount(u'TheMessage', u'Revelation', - 1)[0] == 20) + 1)[0] == 20) def testGetVerseText(self): log.debug(u'\n.......testGetVerseText') #c = self.bm.getVerseText(u'TheMessage",'Genesis',1,2,1) #log.debug( c ) #c = self.bm.getVerseText(u'NIV','Genesis',1,1,2) - #log.debug( c ) + #log.debug( c ) c = self.bm.getVerseText(u'asv', u'Genesis', 10, 1, 20) log.debug( c ) c = self.bm.getVerseText(u'TheMessage', u'Genesis', 10, 1, 20) - log.debug( c ) + log.debug( c ) c = self.bm.getVerseText(u'asv', u'Revelation', 10, 1, 20) - log.debug( c ) + log.debug( c ) c = self.bm.getVersesFromText(u'asv', u'Jesus wept') - log.debug( c ) + log.debug( c ) c = self.bm.getVersesFromText(u'TheMessage', u'Jesus wept') - log.debug( c ) + log.debug( c ) diff --git a/openlp/plugins/bibles/test/test_bibleManagerCSV.py b/openlp/plugins/bibles/test/test_bibleManagerCSV.py index 239338ebf..865e91a81 100644 --- a/openlp/plugins/bibles/test/test_bibleManagerCSV.py +++ b/openlp/plugins/bibles/test/test_bibleManagerCSV.py @@ -1,20 +1,27 @@ -""" -OpenLP - Open Source Lyrics Projection -Copyright (c) 2008 Raoul Snyman -Portions copyright (c) 2008 Martin Thompson, Tim Bentley +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA -""" +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2010 Raoul Snyman # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### import logging import os @@ -52,10 +59,10 @@ class TestBibleManager: # Register a bible from files log.debug(u'\n.......testRegisterBibleFiles') self.bm.registerCSVFileBible(u'TheMessage', - u'biblebooks_msg_short.csv', u'bibleverses_msg_short.csv') + u'biblebooks_msg_short.csv', u'bibleverses_msg_short.csv') self.bm.registerCSVFileBible(u'NIV', u'biblebooks_niv_short.csv', - u'bibleverses_niv_short.csv') + u'bibleverses_niv_short.csv') b = self.bm.get_bibles() for b1 in b: log.debug( b1) - assert(b1 in b) + assert(b1 in b) diff --git a/openlp/plugins/bibles/test/test_bibleManagerOSIS.py b/openlp/plugins/bibles/test/test_bibleManagerOSIS.py index bf1264050..9aea52a50 100644 --- a/openlp/plugins/bibles/test/test_bibleManagerOSIS.py +++ b/openlp/plugins/bibles/test/test_bibleManagerOSIS.py @@ -1,20 +1,27 @@ -""" -OpenLP - Open Source Lyrics Projection -Copyright (c) 2008 Raoul Snyman -Portions copyright (c) 2008 Martin Thompson, Tim Bentley +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA -""" +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2010 Raoul Snyman # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### import logging import os @@ -55,4 +62,4 @@ class TestBibleManager: b = self.bm.get_bibles() for b1 in b: log.debug( b1) - assert(b1 in b) + assert(b1 in b) diff --git a/openlp/plugins/custom/__init__.py b/openlp/plugins/custom/__init__.py index bc50edda3..1a348a0df 100644 --- a/openlp/plugins/custom/__init__.py +++ b/openlp/plugins/custom/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -21,4 +21,4 @@ # You should have received a copy of the GNU General Public License along # # with this program; if not, write to the Free Software Foundation, Inc., 59 # # Temple Place, Suite 330, Boston, MA 02111-1307 USA # -############################################################################### \ No newline at end of file +############################################################################### diff --git a/openlp/plugins/custom/customplugin.py b/openlp/plugins/custom/customplugin.py index 29905a760..979df411c 100644 --- a/openlp/plugins/custom/customplugin.py +++ b/openlp/plugins/custom/customplugin.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/__init__.py b/openlp/plugins/custom/forms/__init__.py index 994868dab..4a4a88237 100644 --- a/openlp/plugins/custom/forms/__init__.py +++ b/openlp/plugins/custom/forms/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -23,4 +23,4 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -from editcustomform import EditCustomForm \ No newline at end of file +from editcustomform import EditCustomForm diff --git a/openlp/plugins/custom/forms/editcustomdialog.py b/openlp/plugins/custom/forms/editcustomdialog.py index f2fa195cb..35af9ce8d 100644 --- a/openlp/plugins/custom/forms/editcustomdialog.py +++ b/openlp/plugins/custom/forms/editcustomdialog.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -164,4 +164,4 @@ class Ui_customEditDialog(object): self.ClearButton.setToolTip(self.trUtf8('Clear edit area')) self.ThemeLabel.setText(self.trUtf8('Theme:')) self.ThemeComboBox.setToolTip(self.trUtf8('Set Theme for Slides')) - self.CreditLabel.setText(self.trUtf8('Credits:')) \ No newline at end of file + self.CreditLabel.setText(self.trUtf8('Credits:')) diff --git a/openlp/plugins/custom/forms/editcustomform.py b/openlp/plugins/custom/forms/editcustomform.py index b4402ceb3..410bd6fed 100644 --- a/openlp/plugins/custom/forms/editcustomform.py +++ b/openlp/plugins/custom/forms/editcustomform.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -22,6 +22,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., 59 # # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### + import logging from PyQt4 import QtCore, QtGui @@ -87,6 +88,7 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog): def initialise(self): self.editAll = False + self.AddButton.setEnabled(True) self.DeleteButton.setEnabled(False) self.EditButton.setEnabled(False) self.EditAllButton.setEnabled(True) diff --git a/openlp/plugins/custom/lib/__init__.py b/openlp/plugins/custom/lib/__init__.py index 9fedfa9d6..e62669ad3 100644 --- a/openlp/plugins/custom/lib/__init__.py +++ b/openlp/plugins/custom/lib/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -25,4 +25,4 @@ from manager import CustomManager from mediaitem import CustomMediaItem -from customtab import CustomTab \ No newline at end of file +from customtab import CustomTab diff --git a/openlp/plugins/custom/lib/classes.py b/openlp/plugins/custom/lib/classes.py index 32707ea08..305852df2 100644 --- a/openlp/plugins/custom/lib/classes.py +++ b/openlp/plugins/custom/lib/classes.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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,4 +43,4 @@ class CustomSlide(BaseModel): """ Custom Slide model """ - pass \ No newline at end of file + pass diff --git a/openlp/plugins/custom/lib/customtab.py b/openlp/plugins/custom/lib/customtab.py index f42132a79..cceca1148 100644 --- a/openlp/plugins/custom/lib/customtab.py +++ b/openlp/plugins/custom/lib/customtab.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -71,4 +71,4 @@ class CustomTab(SettingsTab): self.DisplayFooterCheckBox.setChecked(self.displayFooter) def save(self): - self.config.set_config(u'display footer', unicode(self.displayFooter)) \ No newline at end of file + self.config.set_config(u'display footer', unicode(self.displayFooter)) diff --git a/openlp/plugins/custom/lib/manager.py b/openlp/plugins/custom/lib/manager.py index 1368b89ee..2deee9ba2 100644 --- a/openlp/plugins/custom/lib/manager.py +++ b/openlp/plugins/custom/lib/manager.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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 61d1b05d7..4679be69f 100644 --- a/openlp/plugins/custom/lib/mediaitem.py +++ b/openlp/plugins/custom/lib/mediaitem.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/meta.py b/openlp/plugins/custom/lib/meta.py index 38b0f7206..affa31969 100644 --- a/openlp/plugins/custom/lib/meta.py +++ b/openlp/plugins/custom/lib/meta.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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,4 +35,4 @@ session = None # Global metadata. If you have multiple databases with overlapping table # names, you'll need a metadata for each database -metadata = MetaData() \ No newline at end of file +metadata = MetaData() diff --git a/openlp/plugins/custom/lib/models.py b/openlp/plugins/custom/lib/models.py index 809397031..d75968882 100644 --- a/openlp/plugins/custom/lib/models.py +++ b/openlp/plugins/custom/lib/models.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -36,4 +36,4 @@ def init_models(url): session = scoped_session(sessionmaker(autoflush=True, autocommit=False, bind=engine)) mapper(CustomSlide, custom_slide_table) - return session \ No newline at end of file + return session diff --git a/openlp/plugins/custom/lib/tables.py b/openlp/plugins/custom/lib/tables.py index 13c9de5b9..bb86d9d6d 100644 --- a/openlp/plugins/custom/lib/tables.py +++ b/openlp/plugins/custom/lib/tables.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/__init__.py b/openlp/plugins/images/__init__.py index bc50edda3..1a348a0df 100644 --- a/openlp/plugins/images/__init__.py +++ b/openlp/plugins/images/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -21,4 +21,4 @@ # You should have received a copy of the GNU General Public License along # # with this program; if not, write to the Free Software Foundation, Inc., 59 # # Temple Place, Suite 330, Boston, MA 02111-1307 USA # -############################################################################### \ No newline at end of file +############################################################################### diff --git a/openlp/plugins/images/imageplugin.py b/openlp/plugins/images/imageplugin.py index 37219b5db..ec1a637e1 100644 --- a/openlp/plugins/images/imageplugin.py +++ b/openlp/plugins/images/imageplugin.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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 40123fe65..f5312fd6a 100644 --- a/openlp/plugins/images/lib/__init__.py +++ b/openlp/plugins/images/lib/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -24,4 +24,4 @@ ############################################################################### from mediaitem import ImageMediaItem -from imagetab import ImageTab \ No newline at end of file +from imagetab import ImageTab diff --git a/openlp/plugins/images/lib/imagetab.py b/openlp/plugins/images/lib/imagetab.py index b70006bdb..203b36842 100644 --- a/openlp/plugins/images/lib/imagetab.py +++ b/openlp/plugins/images/lib/imagetab.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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 1542faa1e..7ec031db7 100644 --- a/openlp/plugins/images/lib/mediaitem.py +++ b/openlp/plugins/images/lib/mediaitem.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/__init__.py b/openlp/plugins/media/__init__.py index bc50edda3..1a348a0df 100644 --- a/openlp/plugins/media/__init__.py +++ b/openlp/plugins/media/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -21,4 +21,4 @@ # You should have received a copy of the GNU General Public License along # # with this program; if not, write to the Free Software Foundation, Inc., 59 # # Temple Place, Suite 330, Boston, MA 02111-1307 USA # -############################################################################### \ No newline at end of file +############################################################################### diff --git a/openlp/plugins/media/lib/__init__.py b/openlp/plugins/media/lib/__init__.py index 0ba6b6bf6..a5406d6a8 100644 --- a/openlp/plugins/media/lib/__init__.py +++ b/openlp/plugins/media/lib/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -25,4 +25,4 @@ from mediaitem import MediaMediaItem -__all__ = ['MediaMediaItem'] \ No newline at end of file +__all__ = ['MediaMediaItem'] diff --git a/openlp/plugins/media/lib/mediaitem.py b/openlp/plugins/media/lib/mediaitem.py index c91440c5c..f16ffb5e7 100644 --- a/openlp/plugins/media/lib/mediaitem.py +++ b/openlp/plugins/media/lib/mediaitem.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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 096d53aea..1fb7d7405 100644 --- a/openlp/plugins/media/mediaplugin.py +++ b/openlp/plugins/media/mediaplugin.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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 bc50edda3..1a348a0df 100644 --- a/openlp/plugins/presentations/__init__.py +++ b/openlp/plugins/presentations/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -21,4 +21,4 @@ # You should have received a copy of the GNU General Public License along # # with this program; if not, write to the Free Software Foundation, Inc., 59 # # Temple Place, Suite 330, Boston, MA 02111-1307 USA # -############################################################################### \ No newline at end of file +############################################################################### diff --git a/openlp/plugins/presentations/lib/__init__.py b/openlp/plugins/presentations/lib/__init__.py index 39139fe45..a89b62fbe 100644 --- a/openlp/plugins/presentations/lib/__init__.py +++ b/openlp/plugins/presentations/lib/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -26,4 +26,4 @@ from presentationcontroller import PresentationController from messagelistener import MessageListener from mediaitem import PresentationMediaItem -from presentationtab import PresentationTab \ No newline at end of file +from presentationtab import PresentationTab diff --git a/openlp/plugins/presentations/lib/impresscontroller.py b/openlp/plugins/presentations/lib/impresscontroller.py index 2756f718e..dd0f86840 100644 --- a/openlp/plugins/presentations/lib/impresscontroller.py +++ b/openlp/plugins/presentations/lib/impresscontroller.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -178,7 +178,7 @@ class ImpressDocument(PresentationDocument): self.presentation = None self.control = None self.store_filename(presentation) - + def load_presentation(self): """ Called when a presentation is added to the SlideController. @@ -218,7 +218,7 @@ class ImpressDocument(PresentationDocument): self.presentation.Display = self.controller.plugin.render_manager.screens.current_display + 1 self.control = None self.create_thumbnails() - + def create_thumbnails(self): """ Create thumbnail images for presentation @@ -307,7 +307,7 @@ class ImpressDocument(PresentationDocument): def blank_screen(self): log.debug(u'blank screen OpenOffice') self.control.blankScreen(0) - + def is_blank(self): """ Returns true if screen is blank @@ -384,7 +384,7 @@ class ImpressDocument(PresentationDocument): if shape.supportsService("com.sun.star.drawing.Text"): text += shape.getString() + '\n' return text - + def get_slide_notes(self, slide_no): """ Returns the text on the slide diff --git a/openlp/plugins/presentations/lib/mediaitem.py b/openlp/plugins/presentations/lib/mediaitem.py index 37d50d01c..35ec1721b 100644 --- a/openlp/plugins/presentations/lib/mediaitem.py +++ b/openlp/plugins/presentations/lib/mediaitem.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -58,7 +58,7 @@ class PresentationMediaItem(MediaManagerItem): self.ListViewWithDnD_class = PresentationListView MediaManagerItem.__init__(self, parent, icon, title) self.message_listener = MessageListener(self) - + def initPluginNameVisible(self): self.PluginNameVisible = self.trUtf8('Presentation') diff --git a/openlp/plugins/presentations/lib/messagelistener.py b/openlp/plugins/presentations/lib/messagelistener.py index 08aa7e73a..39717d42d 100644 --- a/openlp/plugins/presentations/lib/messagelistener.py +++ b/openlp/plugins/presentations/lib/messagelistener.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -151,7 +151,7 @@ class Controller(object): #self.timer.stop() def blank(self): - log.debug(u'Live = %s, blank' % self.isLive) + log.debug(u'Live = %s, blank' % self.isLive) if not self.isLive: return if not self.doc.is_loaded(): @@ -161,7 +161,7 @@ class Controller(object): self.doc.blank_screen() def unblank(self): - log.debug(u'Live = %s, unblank' % self.isLive) + log.debug(u'Live = %s, unblank' % self.isLive) if not self.isLive: return self.activate() @@ -218,7 +218,7 @@ class MessageListener(object): self.handler = self.mediaitem.findControllerByType(file) if not self.handler: return - + if isLive: controller = self.liveHandler else: diff --git a/openlp/plugins/presentations/lib/powerpointcontroller.py b/openlp/plugins/presentations/lib/powerpointcontroller.py index 2137496a5..45d040b45 100644 --- a/openlp/plugins/presentations/lib/powerpointcontroller.py +++ b/openlp/plugins/presentations/lib/powerpointcontroller.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -294,7 +294,7 @@ class PowerpointDocument(PresentationDocument): shape = shapes(idx + 1) if shape.HasTextFrame: text += shape.TextFrame.TextRange.Text + '\n' - return text + return text def get_slide_notes(self, slide_no): """ diff --git a/openlp/plugins/presentations/lib/pptviewcontroller.py b/openlp/plugins/presentations/lib/pptviewcontroller.py index 6bec8dbf1..574441850 100644 --- a/openlp/plugins/presentations/lib/pptviewcontroller.py +++ b/openlp/plugins/presentations/lib/pptviewcontroller.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -112,7 +112,7 @@ class PptviewDocument(PresentationDocument): """ Called when a presentation is added to the SlideController. It builds the environment, starts communcations with the background - PptView task started earlier. + PptView task started earlier. ``presentation`` The file name of the presentations to run. diff --git a/openlp/plugins/presentations/lib/pptviewlib/ppttest.py b/openlp/plugins/presentations/lib/pptviewlib/ppttest.py index 7344268b8..b4a82d236 100644 --- a/openlp/plugins/presentations/lib/pptviewlib/ppttest.py +++ b/openlp/plugins/presentations/lib/pptviewlib/ppttest.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -168,4 +168,4 @@ if __name__ == '__main__': app = QtGui.QApplication(sys.argv) qb = PPTViewer() qb.show() - sys.exit(app.exec_()) \ No newline at end of file + sys.exit(app.exec_()) diff --git a/openlp/plugins/presentations/lib/presentationcontroller.py b/openlp/plugins/presentations/lib/presentationcontroller.py index ae41a56b1..382d24b8e 100644 --- a/openlp/plugins/presentations/lib/presentationcontroller.py +++ b/openlp/plugins/presentations/lib/presentationcontroller.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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,12 +144,12 @@ class PresentationController(object): """ log.debug(u'remove_doc Presentation') self.docs.remove(doc) - + class PresentationDocument(object): """ Base class for presentation documents to inherit from. - Loads and closes the presentation as well as triggering the correct + Loads and closes the presentation as well as triggering the correct activities based on the users input **Hook Functions** @@ -235,7 +235,7 @@ class PresentationDocument(object): def get_file_name(self, presentation): return os.path.split(presentation)[1] - + def get_thumbnail_path(self, presentation): return os.path.join(self.controller.thumbnailroot, self.get_file_name(presentation)) @@ -259,7 +259,7 @@ class PresentationDocument(object): self.controller.delete_doc(self) def is_active(self): - """ + """ Returns True if a presentation is currently running """ return False @@ -287,7 +287,7 @@ class PresentationDocument(object): Returns true if screen is blank """ return False - + def stop_presentation(self): """ Stops the presentation, removing it from the output display @@ -368,7 +368,7 @@ class PresentationDocument(object): The slide the text is required for, starting at 1 """ return '' - + def get_slide_notes(self, slide_no): """ Returns the text on the slide diff --git a/openlp/plugins/presentations/lib/presentationtab.py b/openlp/plugins/presentations/lib/presentationtab.py index 0ef7e17d1..cf18359b1 100644 --- a/openlp/plugins/presentations/lib/presentationtab.py +++ b/openlp/plugins/presentations/lib/presentationtab.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/presentationplugin.py b/openlp/plugins/presentations/presentationplugin.py index 3f33090f6..5968f1ad9 100644 --- a/openlp/plugins/presentations/presentationplugin.py +++ b/openlp/plugins/presentations/presentationplugin.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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 bc50edda3..1a348a0df 100644 --- a/openlp/plugins/remotes/__init__.py +++ b/openlp/plugins/remotes/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -21,4 +21,4 @@ # You should have received a copy of the GNU General Public License along # # with this program; if not, write to the Free Software Foundation, Inc., 59 # # Temple Place, Suite 330, Boston, MA 02111-1307 USA # -############################################################################### \ No newline at end of file +############################################################################### diff --git a/openlp/plugins/remotes/lib/__init__.py b/openlp/plugins/remotes/lib/__init__.py index ebd77bdae..bb613fb53 100644 --- a/openlp/plugins/remotes/lib/__init__.py +++ b/openlp/plugins/remotes/lib/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -23,4 +23,4 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -from remotetab import RemoteTab \ No newline at end of file +from remotetab import RemoteTab diff --git a/openlp/plugins/remotes/lib/remotetab.py b/openlp/plugins/remotes/lib/remotetab.py index a1f70ccbf..31af42ff2 100644 --- a/openlp/plugins/remotes/lib/remotetab.py +++ b/openlp/plugins/remotes/lib/remotetab.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -61,4 +61,4 @@ class RemoteTab(SettingsTab): def save(self): self.config.set_config( - u'remote port', unicode(self.RemotePortSpinBox.value())) \ No newline at end of file + u'remote port', unicode(self.RemotePortSpinBox.value())) diff --git a/openlp/plugins/remotes/remoteclient.py b/openlp/plugins/remotes/remoteclient.py index 857a7fc7e..5939b9f26 100755 --- a/openlp/plugins/remotes/remoteclient.py +++ b/openlp/plugins/remotes/remoteclient.py @@ -7,8 +7,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/remoteplugin.py b/openlp/plugins/remotes/remoteplugin.py index acfa6f97d..4e01e43ee 100644 --- a/openlp/plugins/remotes/remoteplugin.py +++ b/openlp/plugins/remotes/remoteplugin.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songs/__init__.py b/openlp/plugins/songs/__init__.py index bc50edda3..1a348a0df 100644 --- a/openlp/plugins/songs/__init__.py +++ b/openlp/plugins/songs/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -21,4 +21,4 @@ # You should have received a copy of the GNU General Public License along # # with this program; if not, write to the Free Software Foundation, Inc., 59 # # Temple Place, Suite 330, Boston, MA 02111-1307 USA # -############################################################################### \ No newline at end of file +############################################################################### diff --git a/openlp/plugins/songs/forms/__init__.py b/openlp/plugins/songs/forms/__init__.py index cc36ff0fa..f850a3adb 100644 --- a/openlp/plugins/songs/forms/__init__.py +++ b/openlp/plugins/songs/forms/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -33,4 +33,4 @@ from songmaintenanceform import SongMaintenanceForm from openlpexportform import OpenLPExportForm from openlpimportform import OpenLPImportForm from opensongexportform import OpenSongExportForm -from opensongimportform import OpenSongImportForm \ No newline at end of file +from opensongimportform import OpenSongImportForm diff --git a/openlp/plugins/songs/forms/authorsdialog.py b/openlp/plugins/songs/forms/authorsdialog.py index 269874011..ca28f461c 100644 --- a/openlp/plugins/songs/forms/authorsdialog.py +++ b/openlp/plugins/songs/forms/authorsdialog.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -76,4 +76,4 @@ class Ui_AuthorsDialog(object): AuthorsDialog.setWindowTitle(self.trUtf8('Author Maintenance')) self.DisplayLabel.setText(self.trUtf8('Display name:')) self.FirstNameLabel.setText(self.trUtf8('First name:')) - self.LastNameLabel.setText(self.trUtf8('Last name:')) \ No newline at end of file + self.LastNameLabel.setText(self.trUtf8('Last name:')) diff --git a/openlp/plugins/songs/forms/authorsform.py b/openlp/plugins/songs/forms/authorsform.py index bbdb724af..d1cb24761 100644 --- a/openlp/plugins/songs/forms/authorsform.py +++ b/openlp/plugins/songs/forms/authorsform.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songs/forms/editsongdialog.py b/openlp/plugins/songs/forms/editsongdialog.py index e0a2ec185..87f7d3601 100644 --- a/openlp/plugins/songs/forms/editsongdialog.py +++ b/openlp/plugins/songs/forms/editsongdialog.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -447,4 +447,4 @@ class Ui_EditSongDialog(object): self.CommentsGroupBox.setTitle(self.trUtf8('Comments')) self.SongTabWidget.setTabText( self.SongTabWidget.indexOf(self.ThemeTab), - self.trUtf8('Theme, Copyright Info && Comments')) \ No newline at end of file + self.trUtf8('Theme, Copyright Info && Comments')) diff --git a/openlp/plugins/songs/forms/editsongform.py b/openlp/plugins/songs/forms/editsongform.py index 183af6a44..f6e0c11f5 100644 --- a/openlp/plugins/songs/forms/editsongform.py +++ b/openlp/plugins/songs/forms/editsongform.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songs/forms/editversedialog.py b/openlp/plugins/songs/forms/editversedialog.py index 89e704c87..7829e2c27 100644 --- a/openlp/plugins/songs/forms/editversedialog.py +++ b/openlp/plugins/songs/forms/editversedialog.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songs/forms/editverseform.py b/openlp/plugins/songs/forms/editverseform.py index 99dfd6d69..7fdea7e8f 100644 --- a/openlp/plugins/songs/forms/editverseform.py +++ b/openlp/plugins/songs/forms/editverseform.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songs/forms/openlpexportdialog.py b/openlp/plugins/songs/forms/openlpexportdialog.py index ca23498f4..ca7a77153 100644 --- a/openlp/plugins/songs/forms/openlpexportdialog.py +++ b/openlp/plugins/songs/forms/openlpexportdialog.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songs/forms/openlpexportform.py b/openlp/plugins/songs/forms/openlpexportform.py index 474034e33..f0f98ad05 100644 --- a/openlp/plugins/songs/forms/openlpexportform.py +++ b/openlp/plugins/songs/forms/openlpexportform.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songs/forms/openlpimportdialog.py b/openlp/plugins/songs/forms/openlpimportdialog.py index 4746c57d2..61732d978 100644 --- a/openlp/plugins/songs/forms/openlpimportdialog.py +++ b/openlp/plugins/songs/forms/openlpimportdialog.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songs/forms/openlpimportform.py b/openlp/plugins/songs/forms/openlpimportform.py index 192ca0a81..e30d13466 100644 --- a/openlp/plugins/songs/forms/openlpimportform.py +++ b/openlp/plugins/songs/forms/openlpimportform.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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,4 +30,4 @@ class OpenLPImportForm(QtGui.QDialog, Ui_OpenLPImportDialog): def __init__(self, parent=None): QtGui.QDialog.__init__(self, parent) - self.setupUi(self) \ No newline at end of file + self.setupUi(self) diff --git a/openlp/plugins/songs/forms/opensongexportdialog.py b/openlp/plugins/songs/forms/opensongexportdialog.py index 967e8110f..c40800dfa 100644 --- a/openlp/plugins/songs/forms/opensongexportdialog.py +++ b/openlp/plugins/songs/forms/opensongexportdialog.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songs/forms/opensongexportform.py b/openlp/plugins/songs/forms/opensongexportform.py index 6d47f360d..75a732bd5 100644 --- a/openlp/plugins/songs/forms/opensongexportform.py +++ b/openlp/plugins/songs/forms/opensongexportform.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songs/forms/opensongimportdialog.py b/openlp/plugins/songs/forms/opensongimportdialog.py index 075110220..e0fd23821 100644 --- a/openlp/plugins/songs/forms/opensongimportdialog.py +++ b/openlp/plugins/songs/forms/opensongimportdialog.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songs/forms/opensongimportform.py b/openlp/plugins/songs/forms/opensongimportform.py index 3c8672c7f..6161e4d61 100644 --- a/openlp/plugins/songs/forms/opensongimportform.py +++ b/openlp/plugins/songs/forms/opensongimportform.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songs/forms/songbookdialog.py b/openlp/plugins/songs/forms/songbookdialog.py index 6897287e5..823e20eba 100644 --- a/openlp/plugins/songs/forms/songbookdialog.py +++ b/openlp/plugins/songs/forms/songbookdialog.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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,4 +67,4 @@ class Ui_SongBookDialog(object): def retranslateUi(self, SongBookDialog): SongBookDialog.setWindowTitle(self.trUtf8('Edit Book')) self.NameLabel.setText(self.trUtf8('Name:')) - self.PublisherLabel.setText(self.trUtf8('Publisher:')) \ No newline at end of file + self.PublisherLabel.setText(self.trUtf8('Publisher:')) diff --git a/openlp/plugins/songs/forms/songbookform.py b/openlp/plugins/songs/forms/songbookform.py index 93a746620..d345a82d7 100644 --- a/openlp/plugins/songs/forms/songbookform.py +++ b/openlp/plugins/songs/forms/songbookform.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songs/forms/songmaintenancedialog.py b/openlp/plugins/songs/forms/songmaintenancedialog.py index 643676ff6..cbd08f34d 100644 --- a/openlp/plugins/songs/forms/songmaintenancedialog.py +++ b/openlp/plugins/songs/forms/songmaintenancedialog.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songs/forms/songmaintenanceform.py b/openlp/plugins/songs/forms/songmaintenanceform.py index d8d6bb5b2..44ad517e1 100644 --- a/openlp/plugins/songs/forms/songmaintenanceform.py +++ b/openlp/plugins/songs/forms/songmaintenanceform.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songs/forms/topicsdialog.py b/openlp/plugins/songs/forms/topicsdialog.py index 777db5a52..122af0455 100644 --- a/openlp/plugins/songs/forms/topicsdialog.py +++ b/openlp/plugins/songs/forms/topicsdialog.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songs/forms/topicsform.py b/openlp/plugins/songs/forms/topicsform.py index 7d2881479..42ef220f4 100644 --- a/openlp/plugins/songs/forms/topicsform.py +++ b/openlp/plugins/songs/forms/topicsform.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songs/lib/__init__.py b/openlp/plugins/songs/lib/__init__.py index 98dbccae4..338a88b91 100644 --- a/openlp/plugins/songs/lib/__init__.py +++ b/openlp/plugins/songs/lib/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -25,4 +25,4 @@ from manager import SongManager from songstab import SongsTab -from mediaitem import SongMediaItem \ No newline at end of file +from mediaitem import SongMediaItem diff --git a/openlp/plugins/songs/lib/classes.py b/openlp/plugins/songs/lib/classes.py index 95e444a62..171bbdc48 100644 --- a/openlp/plugins/songs/lib/classes.py +++ b/openlp/plugins/songs/lib/classes.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -62,4 +62,4 @@ class Topic(BaseModel): """ Topic model """ - pass \ No newline at end of file + pass diff --git a/openlp/plugins/songs/lib/manager.py b/openlp/plugins/songs/lib/manager.py index 0e662dcbc..87f0e6132 100644 --- a/openlp/plugins/songs/lib/manager.py +++ b/openlp/plugins/songs/lib/manager.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index cd440e54f..151dc8118 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songs/lib/meta.py b/openlp/plugins/songs/lib/meta.py index 38b0f7206..affa31969 100644 --- a/openlp/plugins/songs/lib/meta.py +++ b/openlp/plugins/songs/lib/meta.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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,4 +35,4 @@ session = None # Global metadata. If you have multiple databases with overlapping table # names, you'll need a metadata for each database -metadata = MetaData() \ No newline at end of file +metadata = MetaData() diff --git a/openlp/plugins/songs/lib/models.py b/openlp/plugins/songs/lib/models.py index d07c7f9fa..400bd7477 100644 --- a/openlp/plugins/songs/lib/models.py +++ b/openlp/plugins/songs/lib/models.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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,4 +44,4 @@ def init_models(url): 'topics': relation(Topic, backref='songs', secondary=songs_topics_table)}) mapper(Topic, topics_table) - return session \ No newline at end of file + return session diff --git a/openlp/plugins/songs/lib/songstab.py b/openlp/plugins/songs/lib/songstab.py index 7a4feb449..392b15691 100644 --- a/openlp/plugins/songs/lib/songstab.py +++ b/openlp/plugins/songs/lib/songstab.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -89,4 +89,4 @@ class SongsTab(SettingsTab): def save(self): self.config.set_config(u'search as type', unicode(self.song_search)) - self.config.set_config(u'display songbar', unicode(self.song_bar)) \ No newline at end of file + self.config.set_config(u'display songbar', unicode(self.song_bar)) diff --git a/openlp/plugins/songs/lib/songxml.py b/openlp/plugins/songs/lib/songxml.py index f9cef7fce..71506ff2d 100644 --- a/openlp/plugins/songs/lib/songxml.py +++ b/openlp/plugins/songs/lib/songxml.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -669,4 +669,4 @@ class Song(object): return res __all__ = ['SongException', 'SongTitleError', 'SongSlideError', 'SongTypeError', - 'SongFeatureError', 'Song'] \ No newline at end of file + 'SongFeatureError', 'Song'] diff --git a/openlp/plugins/songs/lib/tables.py b/openlp/plugins/songs/lib/tables.py index 817d4c296..24137d7b1 100644 --- a/openlp/plugins/songs/lib/tables.py +++ b/openlp/plugins/songs/lib/tables.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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,4 +96,4 @@ Index(u'authors_songs_song', authors_songs_table.c.song_id, Index(u'topics_song_topic', songs_topics_table.c.topic_id, songs_topics_table.c.song_id) Index(u'topics_song_song', songs_topics_table.c.song_id, - songs_topics_table.c.topic_id) \ No newline at end of file + songs_topics_table.c.topic_id) diff --git a/openlp/plugins/songs/songsplugin.py b/openlp/plugins/songs/songsplugin.py index 9ebaa99b2..152392443 100644 --- a/openlp/plugins/songs/songsplugin.py +++ b/openlp/plugins/songs/songsplugin.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songs/test/test_song_basic.py b/openlp/plugins/songs/test/test_song_basic.py index 4e134cea8..2cbfdd8ff 100644 --- a/openlp/plugins/songs/test/test_song_basic.py +++ b/openlp/plugins/songs/test/test_song_basic.py @@ -1,22 +1,27 @@ # -*- coding: utf-8 -*- # vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 -""" -OpenLP - Open Source Lyrics Projection -Copyright (c) 2008 Raoul Snyman -Portions copyright (c) 2008 Martin Thompson, Tim Bentley, Carsten Tinggaard -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA -""" +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2010 Raoul Snyman # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### import py.test import os diff --git a/openlp/plugins/songs/test/test_song_opensong.py b/openlp/plugins/songs/test/test_song_opensong.py index 8b46b1df9..d0c716d7d 100644 --- a/openlp/plugins/songs/test/test_song_opensong.py +++ b/openlp/plugins/songs/test/test_song_opensong.py @@ -1,22 +1,28 @@ -# -*- coding:iso-8859-1 -*- +# -*- coding: utf-8 -*- # vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 -""" -OpenLP - Open Source Lyrics Projection -Copyright (c) 2008 Raoul Snyman -Portions copyright (c) 2008 Martin Thompson, Tim Bentley, Carsten Tinggaard -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; version 2 of the License. +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2010 Raoul Snyman # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA -""" import os import sys @@ -108,7 +114,7 @@ _sample3 = \ pre-chorus line 1 pre-chorus line 2 pre-chorus line 3 - + [B] bridge line 1 bridge line 2 @@ -118,7 +124,7 @@ _sample3 = \ class Test_OpenSong(object): """Test cases for converting from OpenSong xml format to Song""" - + def test_sample1(self): """OpenSong: handwritten sample1""" s = Song() @@ -126,7 +132,7 @@ class Test_OpenSong(object): l = s.get_lyrics() assert(len(l) == (4*3+3)) assert(s.get_number_of_slides() == 4) - + def test_sample2(self): """OpenSong: handwritten sample2 - with verses and chorus""" s = Song() @@ -134,7 +140,7 @@ class Test_OpenSong(object): l = s.get_lyrics() assert(len(l) == (4*3+3)) assert(s.get_number_of_slides() == 4) - + def test_sample3(self): """OpenSong: handwritten sample3 - with verses, chorus, bridge and pre-chorus""" s = Song() @@ -142,7 +148,7 @@ class Test_OpenSong(object): l = s.get_lyrics() assert(len(l) == (4*3+4+5+4)) assert(s.get_number_of_slides() == 6) - + def test_file1(self): """OpenSong: parse Amazing Grace""" global __ThisDir__ @@ -155,7 +161,7 @@ class Test_OpenSong(object): assert(s.get_author_list(True) == 'John Newton') assert(s.get_verse_order() == '') assert(s.get_number_of_slides() == 4) - + def test_file2(self): """OpenSong: parse The Solid Rock""" s = Song() @@ -167,20 +173,20 @@ class Test_OpenSong(object): assert(s.get_author_list(True) == 'Edward Mote, John B. Dykes') assert(s.get_verse_order() == 'V1 C V2 C V3 C V4 C') assert(s.get_number_of_slides() == 5) - + def test_file3(self): - """OpenSong: parse 'På en fjern ensom høj' (danish)""" + """OpenSong: parse 'PÃ¥ en fjern ensom høj' (danish)""" #FIXME: problem with XML convert and danish characters s = Song() - s.from_opensong_file(u'%s/data_opensong/På en fjern ensom høj'%(__ThisDir__)) - assert(s.get_title() == u'På en fjern ensom høj') + s.from_opensong_file(u'%s/data_opensong/PÃ¥ en fjern ensom høj'%(__ThisDir__)) + assert(s.get_title() == u'PÃ¥ en fjern ensom høj') assert(s.get_copyright() == '') assert(s.get_song_cclino() == '') assert(s.get_category_array(True) == '') assert(s.get_author_list(True) == '') assert(s.get_verse_order() == 'V1 C1 V2 C2 V3 C3 V4 C4') assert(s.get_number_of_slides() == 8) - + if '__main__' == __name__: r = Test_OpenSong() r.test_file3() diff --git a/openlp/plugins/songs/test/test_song_text.py b/openlp/plugins/songs/test/test_song_text.py index 852626592..810428233 100644 --- a/openlp/plugins/songs/test/test_song_text.py +++ b/openlp/plugins/songs/test/test_song_text.py @@ -1,22 +1,28 @@ -# -*- coding:iso-8859-1 -*- +# -*- coding: utf-8 -*- # vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 -""" -OpenLP - Open Source Lyrics Projection -Copyright (c) 2008 Raoul Snyman -Portions copyright (c) 2008 Martin Thompson, Tim Bentley, Carsten Tinggaard -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; version 2 of the License. +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2010 Raoul Snyman # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA -""" import os import sys @@ -30,7 +36,7 @@ from openlp.plugins.songs.lib.songxml import * class Test_Text(object): """Test cases for converting from text format to Song""" - + def test_file1(self): """OpenSong: parse CCLI example""" global __ThisDir__ @@ -41,13 +47,13 @@ class Test_Text(object): assert(s.get_copyright() == '1996 Publisher Info') assert(s.get_song_cclino() == '1234567') assert(s.get_number_of_slides() == 4) - + def test_file2(self): - """OpenSong: parse PåEnFjern (danish)""" + """OpenSong: parse PÃ¥EnFjern (danish)""" global __ThisDir__ s = Song() - s.from_ccli_text_file(u'%s/data_text/PåEnFjern.txt'%(__ThisDir__)) - assert(s.get_title() == 'På en fjern ensom høj') + s.from_ccli_text_file(u'%s/data_text/PÃ¥EnFjern.txt'%(__ThisDir__)) + assert(s.get_title() == 'PÃ¥ en fjern ensom høj') assert(s.get_author_list(True) == 'Georg Bennard') assert(s.get_copyright() == '') assert(s.get_song_cclino() == '') diff --git a/openlp/plugins/songs/test/test_song_verse.py b/openlp/plugins/songs/test/test_song_verse.py index 0eb235076..7467bbb1b 100644 --- a/openlp/plugins/songs/test/test_song_verse.py +++ b/openlp/plugins/songs/test/test_song_verse.py @@ -1,22 +1,27 @@ -# -*- coding:iso-8859-1 -*- +# -*- coding: utf-8 -*- # vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 -""" -OpenLP - Open Source Lyrics Projection -Copyright (c) 2008 Raoul Snyman -Portions copyright (c) 2008 Martin Thompson, Tim Bentley, Carsten Tinggaard -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA -""" +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2010 Raoul Snyman # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### import os import sys @@ -31,7 +36,7 @@ from openlp.plugins.songs.lib.songxml import * class Test_Verse(object): """Class for testing verses for preview and review""" - + def stdSong(self): """Definition of a standard song""" s = Song() @@ -45,7 +50,7 @@ class Test_Verse(object): s.set_author_list(self.author) s.set_song_cclino(self.ccli) return s - + def check_allfields(self, r, isblank = 0): #[theme, title, author, cpright, ccli, lyrics] if isblank == 1 : @@ -64,8 +69,8 @@ class Test_Verse(object): assert(r[4] == '') else : assert(r[4] == self.ccli) - - + + def test_title_show_noshow(self): """Test the show title flag""" s = self.stdSong() @@ -77,7 +82,7 @@ class Test_Verse(object): s.set_show_title(True) r = s.get_render_slide(1) self.check_allfields(r) - + def test_author_show_noshow(self): """Test the show author flag""" s = self.stdSong() @@ -89,7 +94,7 @@ class Test_Verse(object): s.set_show_author_list(True) r = s.get_render_slide(1) self.check_allfields(r) - + def test_copyright_show_noshow(self): """Test the show copyright flag""" s = self.stdSong() @@ -101,7 +106,7 @@ class Test_Verse(object): s.set_show_copyright(True) r = s.get_render_slide(1) self.check_allfields(r) - + def test_ccli_show_noshow(self): """Test the show copyright flag""" s = self.stdSong() @@ -113,31 +118,31 @@ class Test_Verse(object): s.set_show_song_cclino(True) r = s.get_render_slide(1) self.check_allfields(r) - + def test_verse1(self): """Test an empty verse list""" s = Song() s.set_lyrics([]) assert(s.get_number_of_slides() == 0) - + def test_verse2(self): """Test a list with an empty string""" s = Song() s.set_lyrics([""]) assert(s.get_number_of_slides() == 0) - + def test_verse3a(self): """Test a one liner song""" s = Song() s.set_lyrics(["Single verse"]) assert(s.get_number_of_slides() == 1) - + def test_verse3b(self): """Test a one liner song""" s = Song() s.set_lyrics(["", u'Single verse']) assert(s.get_number_of_slides() == 1) - + def test_verse3c(self): """Test a one liner song""" s = Song() diff --git a/openlp/plugins/songusage/__init__.py b/openlp/plugins/songusage/__init__.py index bc50edda3..1a348a0df 100644 --- a/openlp/plugins/songusage/__init__.py +++ b/openlp/plugins/songusage/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -21,4 +21,4 @@ # You should have received a copy of the GNU General Public License along # # with this program; if not, write to the Free Software Foundation, Inc., 59 # # Temple Place, Suite 330, Boston, MA 02111-1307 USA # -############################################################################### \ No newline at end of file +############################################################################### diff --git a/openlp/plugins/songusage/forms/__init__.py b/openlp/plugins/songusage/forms/__init__.py index 68c125317..162d64a14 100644 --- a/openlp/plugins/songusage/forms/__init__.py +++ b/openlp/plugins/songusage/forms/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -24,4 +24,4 @@ ############################################################################### from songusagedeleteform import SongUsageDeleteForm -from songusagedetailform import SongUsageDetailForm \ No newline at end of file +from songusagedetailform import SongUsageDetailForm diff --git a/openlp/plugins/songusage/forms/songusagedeletedialog.py b/openlp/plugins/songusage/forms/songusagedeletedialog.py index e9a9a8603..2cb19f4f5 100644 --- a/openlp/plugins/songusage/forms/songusagedeletedialog.py +++ b/openlp/plugins/songusage/forms/songusagedeletedialog.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songusage/forms/songusagedeleteform.py b/openlp/plugins/songusage/forms/songusagedeleteform.py index 9dda0cafc..207670709 100644 --- a/openlp/plugins/songusage/forms/songusagedeleteform.py +++ b/openlp/plugins/songusage/forms/songusagedeleteform.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songusage/forms/songusagedetaildialog.py b/openlp/plugins/songusage/forms/songusagedetaildialog.py index 411187086..b2f7c0389 100644 --- a/openlp/plugins/songusage/forms/songusagedetaildialog.py +++ b/openlp/plugins/songusage/forms/songusagedetaildialog.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songusage/forms/songusagedetailform.py b/openlp/plugins/songusage/forms/songusagedetailform.py index 28690d85f..4e4f9bb55 100644 --- a/openlp/plugins/songusage/forms/songusagedetailform.py +++ b/openlp/plugins/songusage/forms/songusagedetailform.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -22,6 +22,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., 59 # # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### + import os from PyQt4 import QtCore, QtGui diff --git a/openlp/plugins/songusage/lib/__init__.py b/openlp/plugins/songusage/lib/__init__.py index 9a4d81c56..50bba3ddc 100644 --- a/openlp/plugins/songusage/lib/__init__.py +++ b/openlp/plugins/songusage/lib/__init__.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -23,4 +23,4 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -from manager import SongUsageManager \ No newline at end of file +from manager import SongUsageManager diff --git a/openlp/plugins/songusage/lib/classes.py b/openlp/plugins/songusage/lib/classes.py index 63ffd3e80..a780b57ac 100644 --- a/openlp/plugins/songusage/lib/classes.py +++ b/openlp/plugins/songusage/lib/classes.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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,4 +43,4 @@ class SongUsageItem(BaseModel): """ Audit model """ - pass \ No newline at end of file + pass diff --git a/openlp/plugins/songusage/lib/manager.py b/openlp/plugins/songusage/lib/manager.py index d9f7feb6f..2802570ab 100644 --- a/openlp/plugins/songusage/lib/manager.py +++ b/openlp/plugins/songusage/lib/manager.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/songusage/lib/meta.py b/openlp/plugins/songusage/lib/meta.py index 38b0f7206..affa31969 100644 --- a/openlp/plugins/songusage/lib/meta.py +++ b/openlp/plugins/songusage/lib/meta.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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,4 +35,4 @@ session = None # Global metadata. If you have multiple databases with overlapping table # names, you'll need a metadata for each database -metadata = MetaData() \ No newline at end of file +metadata = MetaData() diff --git a/openlp/plugins/songusage/lib/models.py b/openlp/plugins/songusage/lib/models.py index b2794b5d5..a053ffc34 100644 --- a/openlp/plugins/songusage/lib/models.py +++ b/openlp/plugins/songusage/lib/models.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -36,4 +36,4 @@ def init_models(url): session = scoped_session(sessionmaker(autoflush=True, autocommit=False, bind=engine)) mapper(SongUsageItem, songusage_table) - return session \ No newline at end of file + return session diff --git a/openlp/plugins/songusage/lib/tables.py b/openlp/plugins/songusage/lib/tables.py index e32b1b245..008c722b1 100644 --- a/openlp/plugins/songusage/lib/tables.py +++ b/openlp/plugins/songusage/lib/tables.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -36,4 +36,4 @@ songusage_table = Table(u'songusage_data', metadata, Column(u'authors', types.Unicode(255), nullable=False), Column(u'copyright', types.Unicode(255)), Column(u'ccl_number', types.Unicode(65)) -) \ No newline at end of file +) diff --git a/openlp/plugins/songusage/songusageplugin.py b/openlp/plugins/songusage/songusageplugin.py index d30bd4bea..0763e0675 100644 --- a/openlp/plugins/songusage/songusageplugin.py +++ b/openlp/plugins/songusage/songusageplugin.py @@ -6,8 +6,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/openlpcnv.pyw b/openlpcnv.pyw index 8c3a8bcf5..5619c6f14 100755 --- a/openlpcnv.pyw +++ b/openlpcnv.pyw @@ -7,8 +7,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/resources/i18n/openlp_en.ts b/resources/i18n/openlp_en.ts index 6f9d4a26a..1660428e2 100644 --- a/resources/i18n/openlp_en.ts +++ b/resources/i18n/openlp_en.ts @@ -4,7 +4,7 @@ BibleMediaItem - + Quick @@ -34,10 +34,10 @@ - ServiceManager + Ui_EditSongDialog - - Save Service + + &Remove @@ -74,10 +74,10 @@ - ImportWizardForm + SongMaintenanceForm - - Bible Exists + + Are you sure you want to delete the selected book? @@ -92,7 +92,7 @@ BibleMediaItem - + Bible @@ -100,7 +100,7 @@ ServiceManager - + Save Changes to Service? @@ -137,22 +137,6 @@ - - Ui_SongUsageDeleteDialog - - - Audit Delete - - - - - BibleMediaItem - - - Clear - - - Ui_BibleImportWizard @@ -169,6 +153,14 @@ + + SongMaintenanceForm + + + Couldn't save your author. + + + Ui_ServiceNoteEdit @@ -178,15 +170,12 @@ - SongMaintenanceForm + Ui_customEditDialog - - Couldn't save your author! + + Add new slide at bottom - - - Ui_customEditDialog Clear @@ -201,6 +190,14 @@ + + PresentationPlugin + + + <b>Presentation Plugin</b> <br> Delivers the ability to show presentations using a number of different programs. The choice of available presentation programs is available to the user in a drop down box. + + + SongUsagePlugin @@ -212,7 +209,7 @@ MainWindow - + The Main Display has been blanked out @@ -233,6 +230,14 @@ + + SongMaintenanceForm + + + This author can't be deleted, they are currently assigned to at least one song. + + + Ui_customEditDialog @@ -242,10 +247,18 @@ - SongMaintenanceForm + Ui_EditVerseDialog - - This author can't be deleted, they are currently assigned to at least one song! + + Verse + + + + + Ui_OpenSongImportDialog + + + OpenSong Folder: @@ -260,7 +273,7 @@ Ui_MainWindow - + Open an existing service @@ -268,13 +281,16 @@ SlideController - + Move to previous + + + SongsPlugin - - Edit and re-preview Song + + &Song @@ -287,12 +303,15 @@ - AlertsTab + ImportWizardForm - - pt + + You need to specify a file with books of the Bible to use in the import. + + + AlertsTab Edit History: @@ -300,18 +319,10 @@ - SlideController + Ui_MainWindow - - Delay between slides in seconds - - - - - SongMaintenanceForm - - - Couldn't add your book! + + &File @@ -333,6 +344,11 @@ SongMaintenanceForm + + + Couldn't add your book. + + Error @@ -347,14 +363,6 @@ - - ImportWizardForm - - - You need to specify a file with books of the Bible to use in the import! - - - ThemeManager @@ -379,14 +387,6 @@ - - SongUsageDeleteForm - - - Delete Selected Audit Events? - - - Ui_OpenSongExportDialog @@ -396,17 +396,17 @@ - BibleMediaItem + Ui_AmendThemeDialog - - Search + + Bottom Ui_MainWindow - + List the Plugins @@ -419,6 +419,14 @@ + + SongUsageDeleteForm + + + Delete Selected Song Usage Events? + + + SongUsagePlugin @@ -462,7 +470,7 @@ ServiceManager - + Open Service @@ -486,7 +494,7 @@ EditSongForm - + You need to enter a song title. @@ -499,19 +507,27 @@ + + Ui_SongUsageDeleteDialog + + + Song Usage Delete + + + ImportWizardForm - + Invalid Bible Location - ThemesTab + BibleMediaItem - - Global level + + Book: @@ -526,7 +542,7 @@ Ui_MainWindow - + &Service Manager @@ -547,14 +563,6 @@ - - Ui_BibleImportWizard - - - Books Location: - - - ThemeManager @@ -587,6 +595,14 @@ + + ThemesTab + + + Use the global theme, overriding any themes associated with either the service or the songs. + + + Ui_customEditDialog @@ -598,7 +614,7 @@ ImportWizardForm - + You need to set a copyright for your Bible! Bibles in the Public Domain need to be marked as such. @@ -627,14 +643,6 @@ - - BibleMediaItem - - - To: - - - Ui_AmendThemeDialog @@ -646,16 +654,16 @@ BibleMediaItem - + Text Search - Ui_OpenLPExportDialog + Ui_BibleImportWizard - - openlp.org Song Exporter + + CSV @@ -686,16 +694,16 @@ Ui_MainWindow - + Open Service - SongMediaItem + BibleMediaItem - - Titles + + Find: @@ -710,7 +718,7 @@ BibleMediaItem - + Search Type: @@ -718,23 +726,12 @@ Ui_MainWindow - + Media Manager - - - ImageMediaItem - - Images (*.jpg *jpeg *.gif *.png *.bmp);; All files (*) - - - - - Ui_MainWindow - - + Alt+F4 @@ -754,48 +751,51 @@ CCLI Details + + + BibleMediaItem - - SongSelect Password: + + Bible not fully loaded Ui_MainWindow - + Toggle the visibility of the Preview Panel - SongMaintenanceForm + ImportWizardForm - - Are you sure you want to delete the selected book? + + Bible Exists Ui_MainWindow - + &User Guide - SongUsageDeleteForm + AlertsTab - - Are you sure you want to delete selected Audit Data? + + pt Ui_MainWindow - + Set the interface language to English @@ -811,19 +811,11 @@ ImportWizardForm - + Empty Copyright - - CustomPlugin - - - <b>Custom Plugin</b><br>This plugin allows slides to be displayed on the screen in the same way songs are. This plugin provides greater freedom over the songs plugin.<br> - - - AuthorsForm @@ -883,7 +875,7 @@ PresentationMediaItem - + Presentation @@ -915,7 +907,7 @@ MainWindow - + OpenLP version %s has been updated to version %s You can obtain the latest version from http://openlp.org @@ -933,20 +925,28 @@ You can obtain the latest version from http://openlp.org SlideController - + Go to Verse + + SongMaintenanceForm + + + Couldn't add your topic. + + + Ui_MainWindow - + &Import - + Quit OpenLP @@ -970,7 +970,7 @@ You can obtain the latest version from http://openlp.org ImportWizardForm - + Empty Version Name @@ -978,7 +978,7 @@ You can obtain the latest version from http://openlp.org Ui_MainWindow - + &Preview Panel @@ -986,19 +986,11 @@ You can obtain the latest version from http://openlp.org SlideController - + Start continuous loop - - Ui_AboutDialog - - - License - - - GeneralTab @@ -1018,7 +1010,7 @@ You can obtain the latest version from http://openlp.org Ui_MainWindow - + &New @@ -1031,19 +1023,27 @@ You can obtain the latest version from http://openlp.org + + Ui_EditSongDialog + + + R&emove + + + SlideController - + Live - ImportWizardForm + Ui_AmendThemeDialog - - You need to specify a file of Bible verses to import! + + Font Main @@ -1056,10 +1056,10 @@ You can obtain the latest version from http://openlp.org - Ui_EditVerseDialog + ThemeManager - - Number + + File is not a valid theme. @@ -1088,10 +1088,10 @@ You can obtain the latest version from http://openlp.org - Ui_MainWindow + Ui_AmendThemeDialog - - Ctrl+N + + Other Options @@ -1103,23 +1103,15 @@ You can obtain the latest version from http://openlp.org - - Ui_SongUsageDetailDialog - - - ASelect Date Range - - - Ui_MainWindow - + Default Theme: - + Toggle Preview Panel @@ -1156,6 +1148,22 @@ You can obtain the latest version from http://openlp.org + + Ui_MainWindow + + + &Settings + + + + + EditSongForm + + + Invalid verse entry - values must be Numeric, I,B,C,T,P,E,O + + + Ui_AmendThemeDialog @@ -1213,10 +1221,10 @@ You can obtain the latest version from http://openlp.org - Ui_customEditDialog + Ui_BibleImportWizard - - Save + + Verse Location: @@ -1247,7 +1255,7 @@ You can obtain the latest version from http://openlp.org ImportWizardForm - + Open Books CSV file @@ -1271,7 +1279,7 @@ You can obtain the latest version from http://openlp.org BibleMediaItem - + No matching book could be found in this Bible. @@ -1283,16 +1291,27 @@ You can obtain the latest version from http://openlp.org Server: + + + Ui_EditVerseDialog - - Download Options + + Ending + + + + + CustomTab + + + Display Footer: ImportWizardForm - + Invalid OpenSong Bible @@ -1321,26 +1340,34 @@ You can obtain the latest version from http://openlp.org + + AlertEditForm + + + Please save or clear selected item + + + Ui_MainWindow - + &Live - SongMaintenanceForm + Ui_AmendThemeDialog - - Delete Topic + + <Color2> Ui_MainWindow - + English @@ -1361,6 +1388,14 @@ You can obtain the latest version from http://openlp.org + + Ui_OpenLPExportDialog + + + Select openlp.org export filename: + + + Ui_BibleImportWizard @@ -1378,18 +1413,18 @@ You can obtain the latest version from http://openlp.org - Ui_AmendThemeDialog + Ui_SongUsageDetailDialog - - Opaque + + Song Usage Extraction - SongMaintenanceForm + Ui_AmendThemeDialog - - This book can't be deleted, it is currently assigned to at least one song! + + Opaque @@ -1404,7 +1439,7 @@ You can obtain the latest version from http://openlp.org SlideController - + Start playing media @@ -1417,6 +1452,14 @@ You can obtain the latest version from http://openlp.org + + SongMaintenanceForm + + + This book can't be deleted, it is currently assigned to at least one song. + + + Ui_AboutDialog @@ -1444,7 +1487,7 @@ You can obtain the latest version from http://openlp.org BibleMediaItem - + Dual: @@ -1508,12 +1551,12 @@ You can obtain the latest version from http://openlp.org Ui_MainWindow - + F9 - + F8 @@ -1521,7 +1564,7 @@ You can obtain the latest version from http://openlp.org ServiceManager - + &Change Item Theme @@ -1550,14 +1593,6 @@ You can obtain the latest version from http://openlp.org - - Ui_EditSongDialog - - - &Remove - - - Ui_BibleImportWizard @@ -1566,6 +1601,14 @@ You can obtain the latest version from http://openlp.org + + Ui_EditVerseDialog + + + Number + + + Ui_AmendThemeDialog @@ -1625,7 +1668,7 @@ You can obtain the latest version from http://openlp.org SlideController - + Move to live @@ -1647,17 +1690,25 @@ You can obtain the latest version from http://openlp.org - Ui_EditVerseDialog + ServiceManager - - Verse + + Save Service + + + + + Ui_SongUsageDetailDialog + + + Select Date Range Ui_MainWindow - + Save the current service to disk @@ -1665,16 +1716,13 @@ You can obtain the latest version from http://openlp.org BibleMediaItem - + Chapter: - - - Ui_AmendThemeDialog - - Bottom + + Search @@ -1687,10 +1735,10 @@ You can obtain the latest version from http://openlp.org - ImportWizardForm + Ui_MainWindow - - Open Verses CSV file + + Add &Tool... @@ -1713,7 +1761,7 @@ You can obtain the latest version from http://openlp.org Ui_MainWindow - + &View @@ -1751,10 +1799,10 @@ You can obtain the latest version from http://openlp.org - ServiceManager + SlideController - - &Preview Verse + + Preview @@ -1782,6 +1830,14 @@ You can obtain the latest version from http://openlp.org + + ImportWizardForm + + + You need to specify a file of Bible verses to import. + + + AlertsTab @@ -1801,24 +1857,16 @@ You can obtain the latest version from http://openlp.org EditSongForm - + You need to enter some verses. - BibleMediaItem + Ui_BibleImportWizard - - Bible not fully loaded - - - - - CustomTab - - - Display Footer: + + Download Options @@ -1841,7 +1889,7 @@ You can obtain the latest version from http://openlp.org Ui_MainWindow - + &Export @@ -1897,16 +1945,24 @@ You can obtain the latest version from http://openlp.org EditSongForm - + Invalid verse entry - vX - BibleMediaItem + ServiceManager - - No Book Found + + OpenLP Service Files (*.osz) + + + + + MediaManagerItem + + + Delete the selected item @@ -1929,7 +1985,7 @@ You can obtain the latest version from http://openlp.org BibleMediaItem - + Keep @@ -1953,32 +2009,24 @@ You can obtain the latest version from http://openlp.org Ui_MainWindow - + &Open - PresentationMediaItem + AuthorsForm - - Present using: + + You haven't set a display name for the author, would you like me to combine the first and last names for you? - ServiceManager + AmendThemeForm - - &Live Verse - - - - - Ui_EditVerseDialog - - - Pre-Chorus + + Slide Height is %s rows @@ -2013,6 +2061,14 @@ Testers + + SongMediaItem + + + Titles + + + Ui_OpenLPExportDialog @@ -2022,10 +2078,10 @@ Testers - AuthorsForm + PresentationMediaItem - - You haven't set a display name for the author, would you like me to combine the first and last names for you? + + Present using: @@ -2038,10 +2094,10 @@ Testers - AmendThemeForm + ServiceManager - - Slide Height is %s rows + + &Live Verse @@ -2056,7 +2112,7 @@ Testers Ui_MainWindow - + Toggle Theme Manager @@ -2166,14 +2222,17 @@ Testers - Ui_MainWindow + BiblesTab - - &Settings + + Verse Display + + + Ui_MainWindow - + &Options @@ -2181,7 +2240,7 @@ Testers BibleMediaItem - + Results: @@ -2195,17 +2254,17 @@ Testers - Ui_OpenSongImportDialog + ServiceManager - - OpenSong Folder: + + Move to &top SlideController - + Move to last @@ -2245,7 +2304,7 @@ Testers BibleMediaItem - + Verse Search @@ -2261,7 +2320,7 @@ Testers EditSongForm - + Save && Preview @@ -2339,18 +2398,18 @@ Testers - MediaMediaItem + SongsTab - - Select Media + + Enable search as you type: - PresentationMediaItem + Ui_MainWindow - - Select Presentation(s) + + Ctrl+S @@ -2370,32 +2429,24 @@ Testers - - Ui_MainWindow - - - Save the current service under a new name - - - - - Ctrl+O - - - - - Ui_AmendThemeDialog - - - Other Options - - - SongMaintenanceForm - Couldn't add your author! + Couldn't add your author. + + + + + Ui_MainWindow + + + Ctrl+O + + + + + Ctrl+N @@ -2424,18 +2475,15 @@ Testers - SongsPlugin + SlideController - - &Song + + Edit and re-preview Song - - - Ui_MainWindow - - &File + + Delay between slides in seconds @@ -2461,25 +2509,25 @@ Testers - ThemeManager + ThemesTab - - You are unable to delete the default theme! + + Global level - ThemesTab + ThemeManager - - Use the global theme, overriding any themes associated with either the service or the songs. + + You are unable to delete the default theme. BibleMediaItem - + Version: @@ -2522,14 +2570,6 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr - - ThemeManager - - - File is not a valid theme! - - - Ui_BibleImportWizard @@ -2539,18 +2579,18 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr - ServiceManager + Ui_AboutDialog - - Move down + + License - Ui_EditSongDialog + OpenSongBible - - R&emove + + Importing @@ -2563,10 +2603,10 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr - Ui_BibleImportWizard + Ui_customEditDialog - - Verse Location: + + Save @@ -2581,7 +2621,7 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr BibleMediaItem - + From: @@ -2597,7 +2637,7 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr ServiceManager - + &Notes @@ -2605,7 +2645,7 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr Ui_MainWindow - + E&xit @@ -2621,7 +2661,7 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr MainWindow - + OpenLP Version Updated @@ -2633,11 +2673,6 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr Replace edited slide - - - Add new slide at bottom - - EditCustomForm @@ -2658,11 +2693,19 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr Ui_MainWindow - + &Help + + Ui_EditVerseDialog + + + Bridge + + + Ui_OpenSongExportDialog @@ -2680,15 +2723,10 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr - TestMediaManager + Ui_EditVerseDialog - - Item2 - - - - - Item1 + + Pre-Chorus @@ -2711,11 +2749,19 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr Ui_MainWindow - + Toggle Service Manager + + Ui_EditSongDialog + + + Delete + + + MediaManagerItem @@ -2751,7 +2797,7 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr Ui_MainWindow - + Ctrl+F1 @@ -2760,7 +2806,15 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr SongMaintenanceForm - Couldn't save your topic! + Couldn't save your topic. + + + + + Ui_MainWindow + + + Save the current service under a new name @@ -2796,14 +2850,6 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr - - BiblesTab - - - Bibles - - - SongUsagePlugin @@ -2823,7 +2869,7 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr Ui_MainWindow - + &Web Site @@ -2839,17 +2885,17 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr Ui_MainWindow - + M&ode - + Translate the interface to your language - + Service Manager @@ -2881,7 +2927,7 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr Ui_MainWindow - + &Theme @@ -2897,31 +2943,20 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr Ui_MainWindow - + &Language - - SlideController - - - Verse - - - - - ImportWizardForm - - - You need to specify an OpenSong Bible file to import! - - - ServiceManager - + + Move to end + + + + Your service is unsaved, do you want to save those changes before creating a new one ? @@ -2945,21 +2980,21 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr MainWindow - + Save Changes to Service? - + Your service has changed, do you want to save those changes? - EditSongForm + ServiceManager - - Invalid verse entry - values must be Numeric, I,B,C,T,P,E,O + + &Delete From Service @@ -2974,11 +3009,19 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr Ui_MainWindow - + &About + + ImportWizardForm + + + You need to specify a version name for your Bible. + + + BiblesTab @@ -2987,14 +3030,6 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr - - ImportWizardForm - - - You need to specify a version name for your Bible! - - - Ui_AlertEditDialog @@ -3012,26 +3047,10 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr - RemotesPlugin + ThemesTab - - <b>Remote Plugin</b><br>This plugin provides the ability to send messages to a running version of openlp on a different computer.<br>The Primary use for this would be to send alerts from a creche - - - - - SongMaintenanceForm - - - This topic can't be deleted, it is currently assigned to at least one song! - - - - - BibleMediaItem - - - Find: + + Use the theme from the service, overriding any of the individual songs' themes. If the service doesn't have a theme, then use the global theme. @@ -3059,14 +3078,6 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr - - ImageMediaItem - - - Allow background of live slide to be overridden - - - MediaManagerItem @@ -3083,14 +3094,6 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr - - BibleMediaItem - - - Book: - - - Ui_AmendThemeDialog @@ -3100,10 +3103,10 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr - Ui_OpenLPExportDialog + Ui_OpenLPImportDialog - - Select openlp.org export filename: + + Select openlp.org songfile to import: @@ -3118,8 +3121,8 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr BiblesTab - - Verse Display + + Layout Style: @@ -3134,7 +3137,7 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr SlideController - + Move to next @@ -3142,7 +3145,7 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr Ui_MainWindow - + &Plugin List @@ -3174,21 +3177,32 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr ImportWizardForm - + Open OSIS file + + Ui_AmendThemeDialog + + + Circular + + + + + PresentationMediaItem + + + Automatic + + + SongMaintenanceForm - Couldn't save your book! - - - - - Couldn't add your topic! + Couldn't save your book. @@ -3201,26 +3215,10 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr - Ui_MainWindow + SongMaintenanceForm - - &Add Tool... - - - - - Ui_AmendThemeDialog - - - <Color2> - - - - - ServiceManager - - - Move up + + Delete Topic @@ -3272,14 +3270,6 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr - - ServiceManager - - - Move to bottom - - - Ui_PluginViewDialog @@ -3299,7 +3289,7 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr ImportWizardForm - + This Bible already exists! Please import a different Bible or first delete the existing one. @@ -3307,24 +3297,16 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr Ui_MainWindow - + &Translate - AlertEditForm + BiblesTab - - Please Save or Clear seletced item - - - - - Ui_MainWindow - - - Save Service As + + Bibles @@ -3473,14 +3455,6 @@ Changes don't affect verses already in the service - - Ui_BibleImportWizard - - - Welcome to the Bible Import Wizard - - - Ui_AmendThemeDialog @@ -3516,7 +3490,7 @@ Changes don't affect verses already in the service Ui_MainWindow - + New Service @@ -3524,7 +3498,7 @@ Changes don't affect verses already in the service SlideController - + Move to first @@ -3532,7 +3506,7 @@ Changes don't affect verses already in the service Ui_MainWindow - + &Online Help @@ -3540,7 +3514,7 @@ Changes don't affect verses already in the service SlideController - + Blank Screen @@ -3548,26 +3522,26 @@ Changes don't affect verses already in the service Ui_MainWindow - + Save Service - + Save &As... - + Toggle the visibility of the Media Manager - MediaManagerItem + BibleMediaItem - - Delete the selected item + + No Book Found @@ -3590,7 +3564,7 @@ Changes don't affect verses already in the service BibleMediaItem - + Advanced @@ -3606,38 +3580,38 @@ Changes don't affect verses already in the service Ui_MainWindow - + F11 - + F10 - + F12 - Ui_BibleImportWizard + CustomPlugin - - Select the import format, and where to import from. + + <b>Custom Plugin</b><br>This plugin allows slides to be displayed on the screen in the same way songs are. This plugin provides greater freedom over the songs plugin.<br> Ui_MainWindow - + Alt+F7 - + Add an application to the list of tools @@ -3650,6 +3624,14 @@ Changes don't affect verses already in the service + + ServiceManager + + + Move &down + + + BiblesTab @@ -3669,7 +3651,7 @@ Changes don't affect verses already in the service Ui_MainWindow - + Theme Manager @@ -3709,7 +3691,7 @@ Changes don't affect verses already in the service Ui_MainWindow - + Toggle the visibility of the Theme Manager @@ -3739,10 +3721,10 @@ Changes don't affect verses already in the service - ServiceManager + SlideController - - Move to end + + Verse @@ -3757,7 +3739,7 @@ Changes don't affect verses already in the service Ui_MainWindow - + &Preview Pane @@ -3792,15 +3774,12 @@ Changes don't affect verses already in the service - Ui_BibleImportWizard + Ui_AmendThemeDialog - - Password: + + Preview - - - Ui_AmendThemeDialog Outline Size: @@ -3832,18 +3811,18 @@ Changes don't affect verses already in the service - Ui_MainWindow + Ui_AboutDialog - - &Theme Manager + + Credits - Ui_OpenLPImportDialog + BibleMediaItem - - Select openlp.org songfile to import: + + To: @@ -3855,14 +3834,6 @@ Changes don't affect verses already in the service - - alertsPlugin - - - F7 - - - Ui_OpenLPExportDialog @@ -3887,14 +3858,6 @@ Changes don't affect verses already in the service - - PresentationPlugin - - - <b>Presentation Plugin</b> <br> Delivers the ability to show presentations using a number of different programs. The choice of available presentation programs is available to the user in a drop down box. - - - ImageMediaItem @@ -3904,10 +3867,18 @@ Changes don't affect verses already in the service - SongsTab + BibleMediaItem - - Enable search as you type: + + Clear + + + + + Ui_MainWindow + + + Save Service As @@ -3968,10 +3939,10 @@ Changes don't affect verses already in the service - ThemesTab + RemotesPlugin - - Use the theme from the service, overriding any of the individual songs' themes. If the service doesn't have a theme, then use the global theme. + + <b>Remote Plugin</b><br>This plugin provides the ability to send messages to a running version of openlp on a different computer.<br>The Primary use for this would be to send alerts from a creche @@ -3986,21 +3957,18 @@ Changes don't affect verses already in the service BibleMediaItem - + Verse: - Ui_BibleImportWizard + Ui_OpenLPExportDialog - - CSV + + openlp.org Song Exporter - - - Ui_OpenLPExportDialog Song Export List @@ -4042,7 +4010,7 @@ Changes don't affect verses already in the service Ui_MainWindow - + Toggle the visibility of the Service Manager @@ -4050,11 +4018,27 @@ Changes don't affect verses already in the service PresentationMediaItem - + A presentation with that filename already exists. + + ImageMediaItem + + + Allow the background of live slide to be overridden + + + + + SongUsageDeleteForm + + + Are you sure you want to delete selected Song Usage data? + + + AlertsTab @@ -4066,7 +4050,7 @@ Changes don't affect verses already in the service ImportWizardForm - + Invalid Books File @@ -4103,6 +4087,14 @@ Changes don't affect verses already in the service + + ImportWizardForm + + + Open Verses CSV file + + + Ui_customEditDialog @@ -4114,7 +4106,7 @@ Changes don't affect verses already in the service Ui_MainWindow - + More information about OpenLP @@ -4138,12 +4130,12 @@ Changes don't affect verses already in the service Ui_MainWindow - + &Media Manager - + &Tools @@ -4178,18 +4170,18 @@ Changes don't affect verses already in the service - AlertsTab + SongMaintenanceForm - - s + + This topic can't be deleted, it is currently assigned to at least one song. - ImagePlugin + AlertsTab - - <b>Image Plugin</b><br>Allows images of all types to be displayed. If a number of images are selected together and presented on the live controller it is possible to turn them into a timed loop.<br<br>From the plugin if the <i>Override background</i> is chosen and an image is selected any somgs which are rendered will use the selected image from the background instead of the one provied by the theme.<br> + + s @@ -4226,10 +4218,10 @@ Changes don't affect verses already in the service - Ui_AmendThemeDialog + Ui_BibleImportWizard - - Font Main + + Select the import format, and where to import from. @@ -4252,7 +4244,7 @@ Changes don't affect verses already in the service Ui_MainWindow - + Toggle Media Manager @@ -4282,10 +4274,10 @@ Changes don't affect verses already in the service - ImportWizardForm + ThemeManager - - You need to specify a file to import your Bible from! + + You have not selected a theme. @@ -4298,10 +4290,10 @@ Changes don't affect verses already in the service - ThemeManager + ImportWizardForm - - You have not selected a theme! + + You need to specify a file to import your Bible from. @@ -4324,7 +4316,7 @@ Changes don't affect verses already in the service Ui_MainWindow - + Create a new Service @@ -4338,10 +4330,10 @@ Changes don't affect verses already in the service - SlideController + ServiceManager - - Preview + + &Preview Verse @@ -4352,6 +4344,17 @@ Changes don't affect verses already in the service TextLabel + + + AlertsTab + + + Font Size: + + + + + Ui_PluginViewDialog About: @@ -4408,14 +4411,6 @@ Changes don't affect verses already in the service - - Ui_SongUsageDetailDialog - - - Audit Detail Extraction - - - Ui_OpenLPExportDialog @@ -4424,6 +4419,14 @@ Changes don't affect verses already in the service + + ImageMediaItem + + + Images (*.jpg *.jpeg *.gif *.png *.bmp);; All files (*) + + + EditCustomForm @@ -4459,7 +4462,7 @@ Changes don't affect verses already in the service MainWindow - + OpenLP Main Display Blanked @@ -4473,33 +4476,30 @@ Changes don't affect verses already in the service - OpenSongBible + ServiceManager - - Importing + + Move &up - Ui_EditSongDialog + ImportWizardForm - - Delete - - - - - Ui_MainWindow - - - Ctrl+S + + You need to specify an OpenSong Bible file to import. PresentationMediaItem - + + Select Presentation(s) + + + + File exists @@ -4515,16 +4515,24 @@ Changes don't affect verses already in the service SlideController - + Stop continuous loop - + s + + ImagePlugin + + + <b>Image Plugin</b><br>Allows images of all types to be displayed. If a number of images are selected together and presented on the live controller it is possible to turn them into a timed loop.<br<br>From the plugin if the <i>Override background</i> is chosen and an image is selected any songs which are rendered will use the selected image from the background instead of the one provied by the theme.<br> + + + SongMediaItem @@ -4549,18 +4557,10 @@ Changes don't affect verses already in the service - - BiblesTab - - - Layout Style: - - - ImportWizardForm - + Invalid Verse File @@ -4568,7 +4568,7 @@ Changes don't affect verses already in the service EditSongForm - + Error @@ -4614,10 +4614,10 @@ Changes don't affect verses already in the service - Ui_EditVerseDialog + Ui_BibleImportWizard - - Bridge + + Welcome to the Bible Import Wizard @@ -4630,18 +4630,18 @@ Changes don't affect verses already in the service - Ui_AmendThemeDialog + Ui_BibleImportWizard - - Preview + + Password: - Ui_AboutDialog + Ui_MainWindow - - Credits + + &Theme Manager @@ -4670,10 +4670,10 @@ Changes don't affect verses already in the service - Ui_EditVerseDialog + MediaMediaItem - - Ending + + Select Media @@ -4688,7 +4688,7 @@ Changes don't affect verses already in the service ServiceManager - + &Edit Item @@ -4704,12 +4704,12 @@ Changes don't affect verses already in the service Ui_MainWindow - + &Save - + OpenLP 2.0 @@ -4758,6 +4758,11 @@ Changes don't affect verses already in the service Show Outline: + + + Gradient + + SongBookForm @@ -4770,7 +4775,7 @@ Changes don't affect verses already in the service ImportWizardForm - + Open OpenSong Bible @@ -4778,7 +4783,7 @@ Changes don't affect verses already in the service Ui_MainWindow - + Look && &Feel @@ -4808,18 +4813,18 @@ Changes don't affect verses already in the service - Ui_AmendThemeDialog + ServiceManager - - Gradient + + Move to &bottom - AlertsTab + Ui_BibleImportWizard - - Font Size: + + Books Location: @@ -4832,10 +4837,10 @@ Changes don't affect verses already in the service - Ui_AmendThemeDialog + GeneralTab - - Circular + + SongSelect Password: diff --git a/resources/innosetup/OpenLP-2.0.iss b/resources/innosetup/OpenLP-2.0.iss index 41e9cd84b..b826fa76f 100644 --- a/resources/innosetup/OpenLP-2.0.iss +++ b/resources/innosetup/OpenLP-2.0.iss @@ -22,7 +22,7 @@ DefaultDirName={pf}\{#MyAppName} DefaultGroupName=OpenLP 2.0 AllowNoIcons=true LicenseFile=LICENSE.txt -OutputBaseFilename=OpenLP-1.9.0-bzr737-setup +OutputBaseFilename=OpenLP-1.9.0-bzr739-setup Compression=lzma SolidCompression=true SetupIconFile=C:\Program Files\Inno Setup 5\Examples\Setup.ico diff --git a/resources/pyinstaller/hook-openlp.plugins.presentations.presentationplugin.py b/resources/pyinstaller/hook-openlp.plugins.presentations.presentationplugin.py index 8b7d6b8a2..74a0869be 100644 --- a/resources/pyinstaller/hook-openlp.plugins.presentations.presentationplugin.py +++ b/resources/pyinstaller/hook-openlp.plugins.presentations.presentationplugin.py @@ -1,3 +1,28 @@ -hiddenimports = ['openlp.plugins.presentations.lib.impresscontroller', +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 + +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2010 Raoul Snyman # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### + +hiddenimports = ['openlp.plugins.presentations.lib.impresscontroller', 'openlp.plugins.presentations.lib.powerpointcontroller', - 'openlp.plugins.presentations.lib.pptviewcontroller'] \ No newline at end of file + 'openlp.plugins.presentations.lib.pptviewcontroller'] diff --git a/resources/pyinstaller/hook-openlp.py b/resources/pyinstaller/hook-openlp.py index bd97e4aec..b788749af 100644 --- a/resources/pyinstaller/hook-openlp.py +++ b/resources/pyinstaller/hook-openlp.py @@ -1,9 +1,34 @@ -hiddenimports = ['plugins.songs.songsplugin', - 'plugins.bibles.bibleplugin', - 'plugins.presentations.presentationplugin', - 'plugins.media.mediaplugin', - 'plugins.images.imageplugin', - 'plugins.custom.customplugin', - 'plugins.songusage.songusageplugin', - 'plugins.remotes.remoteplugin', - 'plugins.alerts.alertsplugin'] \ No newline at end of file +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 + +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2010 Raoul Snyman # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### + +hiddenimports = ['plugins.songs.songsplugin', + 'plugins.bibles.bibleplugin', + 'plugins.presentations.presentationplugin', + 'plugins.media.mediaplugin', + 'plugins.images.imageplugin', + 'plugins.custom.customplugin', + 'plugins.songusage.songusageplugin', + 'plugins.remotes.remoteplugin', + 'plugins.alerts.alertsplugin'] diff --git a/scripts/bible-1to2-converter.py b/scripts/bible-1to2-converter.py index b1e9b6897..b1604764f 100755 --- a/scripts/bible-1to2-converter.py +++ b/scripts/bible-1to2-converter.py @@ -7,8 +7,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is 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/scripts/get-strings.py b/scripts/get-strings.py index ed3cdcb41..5fa42a1fc 100755 --- a/scripts/get-strings.py +++ b/scripts/get-strings.py @@ -6,8 +6,9 @@ # OpenLP - Open Source Lyrics Projection # # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # -# Portions copyright (c) 2008-2010 Martin Thompson, Tim Bentley, Carsten # -# Tinggaard, Jon Tibble, Jonathan Corwin, Maikel Stuivenberg, Scott Guerrieri # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -99,6 +100,8 @@ def main(): start_dir = os.path.abspath(u'..') for root, dirs, files in os.walk(start_dir): for file in files: + if file.startswith(u'hook-') or file.startswith(u'test_'): + continue if file.endswith(u'.py'): print u'Parsing "%s"' % file parse_file(start_dir, os.path.join(root, file), strings) diff --git a/scripts/openlp-1to2-converter.py b/scripts/openlp-1to2-converter.py index ba6a7d7d1..3b805a1bd 100755 --- a/scripts/openlp-1to2-converter.py +++ b/scripts/openlp-1to2-converter.py @@ -7,8 +7,8 @@ # --------------------------------------------------------------------------- # # Copyright (c) 2008-2010 Raoul Snyman # # Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -316,4 +316,4 @@ if __name__ == u'__main__': os.unlink(new_db) verbose = options.verbose debug = options.debug - main(old_db, new_db) \ No newline at end of file + main(old_db, new_db) diff --git a/setup.py b/setup.py index d6f4b7503..436c5a987 100755 --- a/setup.py +++ b/setup.py @@ -1,4 +1,28 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 + +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2010 Raoul Snyman # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin # +# Thompson, Jon Tibble, Carsten Tinggaard # +# --------------------------------------------------------------------------- # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the Free # +# Software Foundation; version 2 of the License. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., 59 # +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # +############################################################################### from setuptools import setup, find_packages