From 9239c0cdf3bdc52137701516c79d01fdbb5f5782 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Sun, 24 Jan 2010 23:16:15 +0000 Subject: [PATCH 01/31] Cleanups --- openlp/core/lib/rendermanager.py | 2 +- openlp/core/ui/__init__.py | 2 +- openlp/core/ui/aboutform.py | 1 - openlp/core/ui/maindisplay.py | 1 - openlp/core/ui/servicemanager.py | 4 ++-- openlp/core/ui/thememanager.py | 4 ++-- openlp/plugins/bibles/forms/importwizardform.py | 1 - openlp/plugins/bibles/lib/bibleOpenSongimpl.py | 4 +--- openlpcnv.pyw | 2 +- 9 files changed, 8 insertions(+), 13 deletions(-) diff --git a/openlp/core/lib/rendermanager.py b/openlp/core/lib/rendermanager.py index 78e99506a..b47eaa313 100644 --- a/openlp/core/lib/rendermanager.py +++ b/openlp/core/lib/rendermanager.py @@ -25,7 +25,7 @@ import logging -from PyQt4 import QtGui, QtCore +from PyQt4 import QtCore from renderer import Renderer from openlp.core.lib import ThemeLevel, resize_image diff --git a/openlp/core/ui/__init__.py b/openlp/core/ui/__init__.py index 42f232638..5d4c798d8 100644 --- a/openlp/core/ui/__init__.py +++ b/openlp/core/ui/__init__.py @@ -42,4 +42,4 @@ from mainwindow import MainWindow __all__ = ['SplashScreen', 'AboutForm', 'SettingsForm', 'MainWindow', 'MainDisplay', 'SlideController', 'ServiceManager', 'ThemeManager', - 'AmendThemeForm', 'MediaDockManager', 'ThemeLevel'] + 'AmendThemeForm', 'MediaDockManager'] diff --git a/openlp/core/ui/aboutform.py b/openlp/core/ui/aboutform.py index d6a97e2c9..c3eb7bdcb 100644 --- a/openlp/core/ui/aboutform.py +++ b/openlp/core/ui/aboutform.py @@ -25,7 +25,6 @@ from PyQt4 import QtCore, QtGui -from openlp.core.lib import build_icon from aboutdialog import Ui_AboutDialog class AboutForm(QtGui.QDialog, Ui_AboutDialog): diff --git a/openlp/core/ui/maindisplay.py b/openlp/core/ui/maindisplay.py index a4ff53567..11b89743d 100644 --- a/openlp/core/ui/maindisplay.py +++ b/openlp/core/ui/maindisplay.py @@ -25,7 +25,6 @@ import logging import os -import time from PyQt4 import QtCore, QtGui from PyQt4.phonon import Phonon diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index 44170e616..514e39077 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -30,8 +30,8 @@ import zipfile from PyQt4 import QtCore, QtGui from openlp.core.lib import PluginConfig, OpenLPToolbar, ServiceItem, \ - ServiceItemType, contextMenuAction, contextMenuSeparator, contextMenu, \ - Receiver, contextMenu, str_to_bool + contextMenuAction, contextMenuSeparator, contextMenu, Receiver, \ + contextMenu, str_to_bool class ServiceManagerList(QtGui.QTreeWidget): diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index b2288f75a..298f5ab23 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -34,8 +34,8 @@ from PyQt4 import QtCore, QtGui from openlp.core.ui import AmendThemeForm from openlp.core.theme import Theme from openlp.core.lib import PluginConfig, OpenLPToolbar, contextMenuAction, \ - ThemeXML, ThemeLevel, str_to_bool, get_text_file_string, build_icon, \ - Receiver, contextMenuSeparator + ThemeXML, str_to_bool, get_text_file_string, build_icon, Receiver, \ + contextMenuSeparator from openlp.core.utils import ConfigHelper class ThemeManager(QtGui.QWidget): diff --git a/openlp/plugins/bibles/forms/importwizardform.py b/openlp/plugins/bibles/forms/importwizardform.py index 7e82b6b7f..da95d968f 100644 --- a/openlp/plugins/bibles/forms/importwizardform.py +++ b/openlp/plugins/bibles/forms/importwizardform.py @@ -26,7 +26,6 @@ import logging import os import os.path -from time import sleep from PyQt4 import QtCore, QtGui diff --git a/openlp/plugins/bibles/lib/bibleOpenSongimpl.py b/openlp/plugins/bibles/lib/bibleOpenSongimpl.py index 4d171d57c..575d1bf0b 100644 --- a/openlp/plugins/bibles/lib/bibleOpenSongimpl.py +++ b/openlp/plugins/bibles/lib/bibleOpenSongimpl.py @@ -23,13 +23,11 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -import os -import os.path import logging import chardet import codecs -from lxml import objectify +from lxml import objectify from PyQt4 import QtCore from openlp.core.lib import Receiver diff --git a/openlpcnv.pyw b/openlpcnv.pyw index 877e74744..8c3a8bcf5 100755 --- a/openlpcnv.pyw +++ b/openlpcnv.pyw @@ -147,4 +147,4 @@ if __name__ == u'__main__': newdb = os.path.join(newpath, u'songs.sqlite') mig.convert_sqlite2_to_3(olddb, newdb) mig.process() - #mig.move_log_file() \ No newline at end of file + #mig.move_log_file() From 33d022704169a4e5f01cce9fdaa9c8a6048c5e89 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Sun, 14 Feb 2010 23:20:13 +0200 Subject: [PATCH 02/31] Working on a "Source Distribution" - aka source tarball --- MANIFEST.in | 11 +++++++++ setup.py | 69 ++++++++++++++++++++++++++++------------------------- 2 files changed, 47 insertions(+), 33 deletions(-) create mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 000000000..0e94db321 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,11 @@ +recursive-include openlp *.py +recursive-include openlp *.sqlite +recursive-include openlp *.csv +recursive-include documentation * +recursive-include resources/forms * +recursive-include resources/i18n * +recursive-include resources/images * +recursive-include scripts *.py +include copyright.txt +include LICENSE +include version.txt diff --git a/setup.py b/setup.py index 8c34238ff..aa7b27a67 100644 --- a/setup.py +++ b/setup.py @@ -1,38 +1,41 @@ -# -*- coding: utf-8 -*- -# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 +from setuptools import setup, find_packages +import sys, os -############################################################################### -# OpenLP - Open Source Lyrics Projection # -# --------------------------------------------------------------------------- # -# 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 # -# --------------------------------------------------------------------------- # -# This program is 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 # -############################################################################### +VERSION_FILE = 'openlp/.version' -from setuptools import setup +try: + from bzrlib.branch import Branch + b = Branch.open_containing('.')[0] + b.lock_read() + try: + revno = b.revno() + # Add the latest tag in here too + finally: + b.unlock() +except: + revno = 0 -APP = ['openlp.pyw'] -OPTIONS = {'argv_emulation': True, 'includes': ['sip', 'PyQt4']} +version = '1.9.1-bzr%s' % revno setup( - name='openlp.org', - version='1.9.0', - url='http://www.openlp.org/', - app=APP, - options={'py2app': OPTIONS}, - setup_requires=['py2app'], -) \ No newline at end of file + name='OpenLP', + version=version, + description="Open source Church presentation and lyrics projection application.", + long_description="""\ +OpenLP (previously openlp.org) is free church presentation software, or lyrics projection software, used to display slides of songs, Bible verses, videos, images, and even presentations (if PowerPoint is installed) for church worship using a computer and a data projector.""", + classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers + keywords='open source church presentation lyrics projection song bible display project', + author='Raoul Snyman', + author_email='raoulsnyman@openlp.org', + url='http://openlp.org/', + license='GNU General Public License', + packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), + include_package_data=True, + zip_safe=False, + install_requires=[ + # -*- Extra requirements: -*- + ], + entry_points=""" + # -*- Entry points: -*- + """ +) From 711bd3cf00fc1e4afeb3d9382992ea797b9f550c Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Wed, 17 Feb 2010 19:13:04 +0000 Subject: [PATCH 03/31] Import fixes and copyright insertion --- openlp/plugins/alerts/alertsplugin.py | 3 +-- openlp/plugins/alerts/forms/alerteditform.py | 2 -- openlp/plugins/alerts/forms/alertform.py | 3 +-- openlp/plugins/alerts/lib/alertsmanager.py | 27 +++++++++++++++++-- .../songusage/forms/songusagedeleteform.py | 2 -- 5 files changed, 27 insertions(+), 10 deletions(-) diff --git a/openlp/plugins/alerts/alertsplugin.py b/openlp/plugins/alerts/alertsplugin.py index 60e718bb3..5bf268394 100644 --- a/openlp/plugins/alerts/alertsplugin.py +++ b/openlp/plugins/alerts/alertsplugin.py @@ -23,12 +23,11 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -from datetime import datetime import logging from PyQt4 import QtCore, QtGui -from openlp.core.lib import Plugin, Receiver, str_to_bool, build_icon, PluginStatus +from openlp.core.lib import Plugin, build_icon, PluginStatus from openlp.plugins.alerts.lib import AlertsManager, DBManager from openlp.plugins.alerts.forms import AlertsTab, AlertForm, AlertEditForm diff --git a/openlp/plugins/alerts/forms/alerteditform.py b/openlp/plugins/alerts/forms/alerteditform.py index fef8a04e5..4abc8a660 100644 --- a/openlp/plugins/alerts/forms/alerteditform.py +++ b/openlp/plugins/alerts/forms/alerteditform.py @@ -23,8 +23,6 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -from datetime import date - from PyQt4 import QtGui, QtCore from openlp.plugins.alerts.lib.models import AlertItem diff --git a/openlp/plugins/alerts/forms/alertform.py b/openlp/plugins/alerts/forms/alertform.py index 26f78e9b2..2d7dd1c21 100644 --- a/openlp/plugins/alerts/forms/alertform.py +++ b/openlp/plugins/alerts/forms/alertform.py @@ -23,9 +23,8 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -from datetime import date - from PyQt4 import QtGui, QtCore + from openlp.plugins.alerts.lib.models import AlertItem from alertdialog import Ui_AlertDialog diff --git a/openlp/plugins/alerts/lib/alertsmanager.py b/openlp/plugins/alerts/lib/alertsmanager.py index 1f4369588..5ed48f939 100644 --- a/openlp/plugins/alerts/lib/alertsmanager.py +++ b/openlp/plugins/alerts/lib/alertsmanager.py @@ -1,10 +1,33 @@ +# -*- 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, 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 from PyQt4 import QtCore, QtGui -from openlp.core.lib import str_to_bool, Receiver -from openlp.core.lib import SettingsTab +from openlp.core.lib import Receiver class AlertsManager(QtCore.QObject): """ diff --git a/openlp/plugins/songusage/forms/songusagedeleteform.py b/openlp/plugins/songusage/forms/songusagedeleteform.py index 26fe2b7e2..56eb1954a 100644 --- a/openlp/plugins/songusage/forms/songusagedeleteform.py +++ b/openlp/plugins/songusage/forms/songusagedeleteform.py @@ -23,8 +23,6 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -from datetime import date - from PyQt4 import QtGui from songusagedeletedialog import Ui_SongUsageDeleteDialog From 516b05e0ad526a5fec72875a327a6fd1e3719cf5 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Wed, 17 Feb 2010 20:17:33 +0000 Subject: [PATCH 04/31] Fix URF8, copyright and alert error --- openlp/core/ui/maindisplay.py | 2 +- openlp/plugins/alerts/lib/alertsmanager.py | 2 + .../songusage/forms/songusagedetaildialog.py | 78 ++++++++++++------- 3 files changed, 53 insertions(+), 29 deletions(-) diff --git a/openlp/core/ui/maindisplay.py b/openlp/core/ui/maindisplay.py index 1ba31ea62..00470c9f6 100644 --- a/openlp/core/ui/maindisplay.py +++ b/openlp/core/ui/maindisplay.py @@ -203,7 +203,7 @@ class MainDisplay(DisplayWidget): if not self.primary: self.setVisible(True) self.showFullScreen() - self.generateAlert() + Receiver.send_message(u'flush_alert') def addImageWithText(self, frame): frame = resize_image(frame, diff --git a/openlp/plugins/alerts/lib/alertsmanager.py b/openlp/plugins/alerts/lib/alertsmanager.py index 1f4369588..759edb12c 100644 --- a/openlp/plugins/alerts/lib/alertsmanager.py +++ b/openlp/plugins/alerts/lib/alertsmanager.py @@ -19,6 +19,8 @@ class AlertsManager(QtCore.QObject): self.parent = parent self.timer_id = 0 self.alertList = [] + QtCore.QObject.connect(Receiver.get_receiver(), + QtCore.SIGNAL(u'flush_alert'), self.generateAlert) QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'alert_text'), self.displayAlert) QtCore.QObject.connect(Receiver.get_receiver(), diff --git a/openlp/plugins/songusage/forms/songusagedetaildialog.py b/openlp/plugins/songusage/forms/songusagedetaildialog.py index 63866d1fd..d6ba2ecfb 100644 --- a/openlp/plugins/songusage/forms/songusagedetaildialog.py +++ b/openlp/plugins/songusage/forms/songusagedetaildialog.py @@ -1,69 +1,91 @@ # -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 -# Form implementation generated from reading ui file 'songusagedetaildialog.ui' -# -# Created: Tue Feb 9 07:34:05 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, 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 class Ui_SongUsageDetailDialog(object): def setupUi(self, AuditDetailDialog): - AuditDetailDialog.setObjectName("AuditDetailDialog") + AuditDetailDialog.setObjectName(u'AuditDetailDialog') AuditDetailDialog.resize(609, 413) self.verticalLayout = QtGui.QVBoxLayout(AuditDetailDialog) - self.verticalLayout.setObjectName("verticalLayout") + self.verticalLayout.setObjectName(u'verticalLayout') self.DateRangeGroupBox = QtGui.QGroupBox(AuditDetailDialog) - self.DateRangeGroupBox.setObjectName("DateRangeGroupBox") + self.DateRangeGroupBox.setObjectName(u'DateRangeGroupBox') self.verticalLayout_2 = QtGui.QVBoxLayout(self.DateRangeGroupBox) - self.verticalLayout_2.setObjectName("verticalLayout_2") + self.verticalLayout_2.setObjectName(u'verticalLayout_2') self.DateHorizontalLayout = QtGui.QHBoxLayout() - self.DateHorizontalLayout.setObjectName("DateHorizontalLayout") + self.DateHorizontalLayout.setObjectName(u'DateHorizontalLayout') self.FromDate = QtGui.QCalendarWidget(self.DateRangeGroupBox) - self.FromDate.setObjectName("FromDate") + self.FromDate.setObjectName(u'FromDate') self.DateHorizontalLayout.addWidget(self.FromDate) self.ToLabel = QtGui.QLabel(self.DateRangeGroupBox) self.ToLabel.setScaledContents(False) self.ToLabel.setAlignment(QtCore.Qt.AlignCenter) - self.ToLabel.setObjectName("ToLabel") + self.ToLabel.setObjectName(u'ToLabel') self.DateHorizontalLayout.addWidget(self.ToLabel) self.ToDate = QtGui.QCalendarWidget(self.DateRangeGroupBox) - self.ToDate.setObjectName("ToDate") + self.ToDate.setObjectName(u'ToDate') self.DateHorizontalLayout.addWidget(self.ToDate) self.verticalLayout_2.addLayout(self.DateHorizontalLayout) self.FileGroupBox = QtGui.QGroupBox(self.DateRangeGroupBox) - self.FileGroupBox.setObjectName("FileGroupBox") + self.FileGroupBox.setObjectName(u'FileGroupBox') self.verticalLayout_4 = QtGui.QVBoxLayout(self.FileGroupBox) - self.verticalLayout_4.setObjectName("verticalLayout_4") + self.verticalLayout_4.setObjectName(u'verticalLayout_4') self.horizontalLayout = QtGui.QHBoxLayout() - self.horizontalLayout.setObjectName("horizontalLayout") + self.horizontalLayout.setObjectName(u'horizontalLayout') self.FileLineEdit = QtGui.QLineEdit(self.FileGroupBox) - self.FileLineEdit.setObjectName("FileLineEdit") + self.FileLineEdit.setObjectName(u'FileLineEdit') self.horizontalLayout.addWidget(self.FileLineEdit) self.SaveFilePushButton = QtGui.QPushButton(self.FileGroupBox) icon = QtGui.QIcon() - icon.addPixmap(QtGui.QPixmap(":/exports/export_load.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + icon.addPixmap(QtGui.QPixmap(u':/exports/export_load.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.SaveFilePushButton.setIcon(icon) - self.SaveFilePushButton.setObjectName("SaveFilePushButton") + self.SaveFilePushButton.setObjectName(u'SaveFilePushButton') self.horizontalLayout.addWidget(self.SaveFilePushButton) self.verticalLayout_4.addLayout(self.horizontalLayout) self.verticalLayout_2.addWidget(self.FileGroupBox) self.verticalLayout.addWidget(self.DateRangeGroupBox) self.buttonBox = QtGui.QDialogButtonBox(AuditDetailDialog) self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok) - self.buttonBox.setObjectName("buttonBox") + self.buttonBox.setObjectName(u'buttonBox') self.verticalLayout.addWidget(self.buttonBox) self.retranslateUi(AuditDetailDialog) - QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), AuditDetailDialog.accept) - QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), AuditDetailDialog.close) - QtCore.QObject.connect(self.SaveFilePushButton, QtCore.SIGNAL("pressed()"), AuditDetailDialog.defineOutputLocation) + QtCore.QObject.connect(self.buttonBox, + QtCore.SIGNAL(u'accepted()'), + AuditDetailDialog.accept) + QtCore.QObject.connect(self.buttonBox, + QtCore.SIGNAL(u'rejected()'), + AuditDetailDialog.close) + QtCore.QObject.connect(self.SaveFilePushButton, + QtCore.SIGNAL(u'pressed()'), + AuditDetailDialog.defineOutputLocation) QtCore.QMetaObject.connectSlotsByName(AuditDetailDialog) def retranslateUi(self, AuditDetailDialog): - AuditDetailDialog.setWindowTitle(QtGui.QApplication.translate("AuditDetailDialog", "Audit Detail Extraction", None, QtGui.QApplication.UnicodeUTF8)) - self.DateRangeGroupBox.setTitle(QtGui.QApplication.translate("AuditDetailDialog", "Select Date Range", None, QtGui.QApplication.UnicodeUTF8)) - self.ToLabel.setText(QtGui.QApplication.translate("AuditDetailDialog", "to", None, QtGui.QApplication.UnicodeUTF8)) - self.FileGroupBox.setTitle(QtGui.QApplication.translate("AuditDetailDialog", "Report Location", None, QtGui.QApplication.UnicodeUTF8)) + AuditDetailDialog.setWindowTitle(self.trUtf8('Audit Detail Extraction')) + self.DateRangeGroupBox.setTitle(self.trUtf8('ASelect Date Range')) + self.ToLabel.setText(self.trUtf8('to')) + self.FileGroupBox.setTitle(self.trUtf8('Report Location')) From 77e55da0d33677f5ad0e2dbac733185df39a19a5 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Fri, 19 Feb 2010 21:14:39 +0200 Subject: [PATCH 05/31] Pulling in the tags and the revision number from bzr. --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index aa7b27a67..457e8a556 100644 --- a/setup.py +++ b/setup.py @@ -10,6 +10,7 @@ try: try: revno = b.revno() # Add the latest tag in here too + verno = b.tags.get_tag_dict().keys()[0] finally: b.unlock() except: From 7efd037024290641e3ca344bf5e0bad68fc0ddd1 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Fri, 19 Feb 2010 21:17:32 +0200 Subject: [PATCH 06/31] Pull the version number from the tag. --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 457e8a556..d891b7bbf 100644 --- a/setup.py +++ b/setup.py @@ -8,15 +8,15 @@ try: b = Branch.open_containing('.')[0] b.lock_read() try: - revno = b.revno() - # Add the latest tag in here too verno = b.tags.get_tag_dict().keys()[0] + revno = b.revno() finally: b.unlock() except: + verno = '1.9.0' revno = 0 -version = '1.9.1-bzr%s' % revno +version = '%s-bzr%s' % (verno, revno) setup( name='OpenLP', From 8182b418b732f8b97dda16d5dd68f000ce40c819 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Fri, 19 Feb 2010 21:39:52 +0200 Subject: [PATCH 07/31] Updated version.txt to the latest revision. bzr-revno: 709 --- version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.txt b/version.txt index 97fc2f582..6fbb27109 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.9.0-707 +1.9.0-709 From 70251a4321ebe8150eb620141d6df026c3e0a2df Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Sun, 21 Feb 2010 08:32:43 +0200 Subject: [PATCH 08/31] - Created independant "get_config_directory" and "get_data_directory" methods. - Moved log file to configuration file location for non-root/administrator users. --- openlp.pyw | 4 +-- openlp/core/utils/__init__.py | 46 ++++++++++++++++++++++++++----- openlp/core/utils/confighelper.py | 33 ++++------------------ 3 files changed, 47 insertions(+), 36 deletions(-) diff --git a/openlp.pyw b/openlp.pyw index d35591a1c..5c18486b6 100755 --- a/openlp.pyw +++ b/openlp.pyw @@ -35,7 +35,7 @@ from PyQt4 import QtCore, QtGui from openlp.core.lib import Receiver, str_to_bool from openlp.core.resources import qInitResources from openlp.core.ui import MainWindow, SplashScreen, ScreenList -from openlp.core.utils import ConfigHelper +from openlp.core.utils import get_config_directory, ConfigHelper log = logging.getLogger() @@ -158,7 +158,7 @@ def main(): parser.add_option("-s", "--style", dest="style", help="Set the Qt4 style (passed directly to Qt4).") # Set up logging - filename = u'openlp.log' + filename = os.path.join(get_config_directory(), u'openlp.log') logfile = FileHandler(filename, u'w') logfile.setFormatter(logging.Formatter( u'%(asctime)s %(name)-15s %(levelname)-8s %(message)s')) diff --git a/openlp/core/utils/__init__.py b/openlp/core/utils/__init__.py index 9504c771e..e85b2d939 100644 --- a/openlp/core/utils/__init__.py +++ b/openlp/core/utils/__init__.py @@ -22,17 +22,12 @@ # 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 logging import urllib2 from datetime import datetime -from registry import Registry -from confighelper import ConfigHelper - -log = logging.getLogger(__name__) - -__all__ = ['Registry', 'ConfigHelper'] - log = logging.getLogger(__name__) def check_latest_version(config, current_version): @@ -54,3 +49,40 @@ def check_latest_version(config, current_version): if hasattr(e, u'reason'): log.exception(u'Reason for failure: %s', e.reason) return version_string + +def get_config_directory(): + path = u'' + if os.name == u'nt': + path = os.path.join(os.getenv(u'APPDATA'), u'openlp') + elif os.name == u'mac': + path = os.path.join(os.getenv(u'HOME'), u'Library', + u'Application Support', u'openlp') + else: + try: + from xdg import BaseDirectory + path = os.path.join(BaseDirectory.xdg_config_home, u'openlp') + except ImportError: + path = os.path.join(os.getenv(u'HOME'), u'.openlp') + return path + +def get_data_directory(): + path = u'' + if os.name == u'nt': + # ask OS for path to application data, set on Windows XP and Vista + path = os.path.join(os.getenv(u'APPDATA'), u'openlp', u'data') + elif os.name == u'mac': + path = os.path.join(os.getenv(u'HOME'), u'Library', + u'Application Support', u'openlp', u'Data') + else: + try: + from xdg import BaseDirectory + path = os.path.join(BaseDirectory.xdg_data_home, u'openlp') + except ImportError: + path = os.path.join(os.getenv(u'HOME'), u'.openlp', u'data') + return path + +from registry import Registry +from confighelper import ConfigHelper + +__all__ = [u'Registry', u'ConfigHelper', u'get_config_directory', + u'get_data_directory', u'check_latest_version'] diff --git a/openlp/core/utils/confighelper.py b/openlp/core/utils/confighelper.py index 112712675..d49157f55 100644 --- a/openlp/core/utils/confighelper.py +++ b/openlp/core/utils/confighelper.py @@ -24,6 +24,8 @@ ############################################################################### import os + +from openlp.core.utils import get_data_directory, get_config_directory from openlp.core.utils.registry import Registry class ConfigHelper(object): @@ -34,20 +36,7 @@ class ConfigHelper(object): @staticmethod def get_data_path(): - if os.name == u'nt': - # ask OS for path to application data, set on Windows XP and Vista - path = os.path.join(os.getenv(u'APPDATA'), u'openlp', u'data') - elif os.name == u'mac': - path = os.path.join(os.getenv(u'HOME'), u'Library', - u'Application Support', u'openlp', u'Data') - else: - try: - from xdg import BaseDirectory - path = os.path.join(BaseDirectory.xdg_data_home, u'openlp') - except ImportError: - path = os.path.join(os.getenv(u'HOME'), u'.openlp', u'data') - #reg = ConfigHelper.get_registry() - #path = ConfigHelper.get_config(u'main', 'data path', path) + path = get_data_directory() if not os.path.exists(path): os.makedirs(path) return path @@ -81,17 +70,7 @@ class ConfigHelper(object): current operating system, and returns an instantiation of that class. """ if ConfigHelper.__registry__ is None: - config_path = u'' - if os.name == u'nt': - config_path = os.path.join(os.getenv(u'APPDATA'), u'openlp') - elif os.name == u'mac': - config_path = os.path.join(os.getenv(u'HOME'), u'Library', - u'Application Support', u'openlp') - else: - try: - from xdg import BaseDirectory - config_path = os.path.join(BaseDirectory.xdg_config_home, u'openlp') - except ImportError: - config_path = os.path.join(os.getenv(u'HOME'), u'.openlp') + config_path = get_config_directory() ConfigHelper.__registry__ = Registry(config_path) - return ConfigHelper.__registry__ \ No newline at end of file + return ConfigHelper.__registry__ + From 985ce73dfd06d0b8e858f08d01cb6cea2bda7791 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sun, 21 Feb 2010 14:06:56 +0000 Subject: [PATCH 09/31] Force regeneration of sevice item on theme change --- openlp/core/ui/servicemanager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index b96e47f97..8e6b1331e 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -570,6 +570,8 @@ class ServiceManager(QtGui.QWidget): self.service_theme = unicode(self.ThemeComboBox.currentText()) self.parent.RenderManager.set_service_theme(self.service_theme) self.config.set_config(u'service theme', self.service_theme) + #force reset of renderer. + self.parent.RenderManager.themesata = None self.regenerateServiceItems() def regenerateServiceItems(self): From 20ab9d1ce2d12642dde9a0ac378393cc543b7539 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sun, 21 Feb 2010 14:12:47 +0000 Subject: [PATCH 10/31] Force regeneration of all changes --- openlp/core/ui/servicemanager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index 8e6b1331e..ded360931 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -570,11 +570,11 @@ class ServiceManager(QtGui.QWidget): self.service_theme = unicode(self.ThemeComboBox.currentText()) self.parent.RenderManager.set_service_theme(self.service_theme) self.config.set_config(u'service theme', self.service_theme) - #force reset of renderer. - self.parent.RenderManager.themesata = None self.regenerateServiceItems() def regenerateServiceItems(self): + #force reset of renderer as theme data has changed + self.parent.RenderManager.themesata = None if len(self.serviceItems) > 0: tempServiceItems = self.serviceItems self.onNewService() From f7d95a8fdb41da2a5f4a878fd9cd8a4c6260770d Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Sun, 21 Feb 2010 21:41:30 +0000 Subject: [PATCH 11/31] Remove debug prints --- openlp/core/ui/thememanager.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index 18744187f..9e2a8ecce 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -237,8 +237,6 @@ class ThemeManager(QtGui.QWidget): if len(files) > 0: for file in files: self.config.set_last_dir(unicode(file)) - print file - print self.path self.unzipTheme(file, self.path) self.loadThemes() From 962f1364e47b61ef1777927fd6aee0631f2f00c1 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Sun, 21 Feb 2010 23:05:03 +0000 Subject: [PATCH 12/31] Fix v2 theme importing --- openlp/core/ui/thememanager.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index 9e2a8ecce..a0168324f 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -314,6 +314,7 @@ class ThemeManager(QtGui.QWidget): themename = None for file in zip.namelist(): osfile = unicode(QtCore.QDir.toNativeSeparators(file)) + theme_dir = None if osfile.endswith(os.path.sep): theme_dir = os.path.join(dir, osfile) if not os.path.exists(theme_dir): @@ -325,6 +326,10 @@ class ThemeManager(QtGui.QWidget): # not preview file if themename is None: themename = names[0] + if theme_dir is None: + theme_dir = os.path.join(dir, names[0]) + if not os.path.exists(theme_dir): + os.mkdir(os.path.join(dir, names[0])) xml_data = zip.read(file) if os.path.splitext(file)[1].lower() in [u'.xml']: if self.checkVersion1(xml_data): From 45c7fad1d6f6f71ef0cc85c21a7b0f30b93aa9aa Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Sun, 21 Feb 2010 23:40:16 +0000 Subject: [PATCH 13/31] Fix theme import colours --- openlp/core/theme/theme.py | 2 +- openlp/core/ui/thememanager.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/openlp/core/theme/theme.py b/openlp/core/theme/theme.py index 92ffbfed2..0295912fa 100644 --- a/openlp/core/theme/theme.py +++ b/openlp/core/theme/theme.py @@ -136,7 +136,7 @@ class Theme(object): if (element.tag.find(u'Color') > 0 or (element.tag.find(u'BackgroundParameter') == 0 and type(val) == type(0))): # convert to a wx.Colour - val = QtGui.QColor((val>>16) & 0xFF, (val>>8)&0xFF, val&0xFF) + val = QtGui.QColor(val&0xFF, (val>>8)&0xFF, (val>>16)&0xFF) setattr(self, element.tag, val) def __str__(self): diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index a0168324f..dff0723c7 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -390,7 +390,6 @@ class ThemeManager(QtGui.QWidget): unicode(theme.BackgroundParameter2.name()), direction) else: newtheme.add_background_image(unicode(theme.BackgroundParameter1)) - newtheme.add_font(unicode(theme.FontName), unicode(theme.FontColor.name()), unicode(theme.FontProportion * 3), u'False') From 60dd3b36cf34d28207054975d48935d496217d75 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Mon, 22 Feb 2010 06:14:44 +0000 Subject: [PATCH 14/31] Fix presentation tab and repaint service item --- openlp/core/ui/servicemanager.py | 7 +++++-- .../plugins/presentations/lib/presentationtab.py | 15 ++++----------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index ded360931..a51bdc1d0 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -579,9 +579,9 @@ class ServiceManager(QtGui.QWidget): tempServiceItems = self.serviceItems self.onNewService() for item in tempServiceItems: - self.addServiceItem(item[u'service_item']) + self.addServiceItem(item[u'service_item'], True) - def addServiceItem(self, item): + def addServiceItem(self, item, rebuild=False): """ Add a Service item to the list @@ -608,6 +608,9 @@ class ServiceManager(QtGui.QWidget): u'order': len(self.serviceItems)+1, u'expanded':True}) self.repaintServiceList(sitem + 1, 0) + #if rebuilding list make sure live is fixed. + if rebuild: + self.parent.LiveController.replaceServiceManagerItem(item) self.parent.serviceChanged(False, self.serviceName) def makePreview(self): diff --git a/openlp/plugins/presentations/lib/presentationtab.py b/openlp/plugins/presentations/lib/presentationtab.py index 40ab15e69..e7d16eb47 100644 --- a/openlp/plugins/presentations/lib/presentationtab.py +++ b/openlp/plugins/presentations/lib/presentationtab.py @@ -51,17 +51,10 @@ class PresentationTab(SettingsTab): self.PresentationLeftLayout.setMargin(0) self.VerseDisplayGroupBox = QtGui.QGroupBox(self) self.VerseDisplayGroupBox.setObjectName(u'VerseDisplayGroupBox') - self.VerseDisplayLayout = QtGui.QGridLayout(self.VerseDisplayGroupBox) + self.VerseDisplayLayout = QtGui.QVBoxLayout(self.VerseDisplayGroupBox) self.VerseDisplayLayout.setMargin(8) self.VerseDisplayLayout.setObjectName(u'VerseDisplayLayout') - self.VerseTypeWidget = QtGui.QWidget(self.VerseDisplayGroupBox) - self.VerseTypeWidget.setObjectName(u'VerseTypeWidget') - self.VerseTypeLayout = QtGui.QHBoxLayout(self.VerseTypeWidget) - self.VerseTypeLayout.setSpacing(8) - self.VerseTypeLayout.setMargin(0) - self.VerseTypeLayout.setObjectName(u'VerseTypeLayout') self.PresenterCheckboxes = {} - index = 0 for key in self.controllers: controller = self.controllers[key] checkbox = QtGui.QCheckBox(self.VerseDisplayGroupBox) @@ -69,8 +62,7 @@ class PresentationTab(SettingsTab): checkbox.setEnabled(controller.available) checkbox.setObjectName(controller.name + u'CheckBox') self.PresenterCheckboxes[controller.name] = checkbox - index = index + 1 - self.VerseDisplayLayout.addWidget(checkbox, index, 0, 1, 1) + self.VerseDisplayLayout.addWidget(checkbox) self.PresentationThemeWidget = QtGui.QWidget(self.VerseDisplayGroupBox) self.PresentationThemeWidget.setObjectName(u'PresentationThemeWidget') self.PresentationThemeLayout = QtGui.QHBoxLayout( @@ -96,6 +88,7 @@ class PresentationTab(SettingsTab): self.PresentationLayout.addWidget(self.PresentationRightWidget) def retranslateUi(self): + self.VerseDisplayGroupBox.setTitle(self.trUtf8('Avaliable Controllers')) for key in self.controllers: controller = self.controllers[key] checkbox = self.PresenterCheckboxes[controller.name] @@ -115,4 +108,4 @@ class PresentationTab(SettingsTab): controller = self.controllers[key] checkbox = self.PresenterCheckboxes[controller.name] self.config.set_config( - controller.name, unicode(checkbox.checkState())) \ No newline at end of file + controller.name, unicode(checkbox.checkState())) From 03371279854059a22add6c554463c42da060bac5 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Mon, 22 Feb 2010 15:53:23 +0000 Subject: [PATCH 15/31] Fix theme import alignment --- openlp/core/ui/thememanager.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index dff0723c7..630b1a485 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -402,9 +402,14 @@ class ThemeManager(QtGui.QWidget): shadow = True if theme.Outline == 1: outline = True + vAlignCorrection = 0 + if theme.VerticalAlign == 2: + vAlignCorrection = 1 + elif theme.VerticalAlign == 1: + vAlignCorrection = 2 newtheme.add_display(unicode(shadow), unicode(theme.ShadowColor.name()), unicode(outline), unicode(theme.OutlineColor.name()), - unicode(theme.HorizontalAlign), unicode(theme.VerticalAlign), + unicode(theme.HorizontalAlign), unicode(vAlignCorrection), unicode(theme.WrapStyle), unicode(0)) return newtheme.extract_xml() From 61c7b6479fed352d8853dc6159447e4ff24942cd Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Mon, 22 Feb 2010 16:42:10 +0000 Subject: [PATCH 16/31] Fix theme import font colours --- openlp/core/theme/theme.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/openlp/core/theme/theme.py b/openlp/core/theme/theme.py index 0295912fa..27969c9d9 100644 --- a/openlp/core/theme/theme.py +++ b/openlp/core/theme/theme.py @@ -30,7 +30,7 @@ from PyQt4 import QtGui DelphiColors={"clRed":0xFF0000, "clBlue":0x0000FF, - "clYellow":0x0FFFF00, + "clYellow":0xFFFF00, "clBlack":0x000000, "clWhite":0xFFFFFF} @@ -113,6 +113,7 @@ class Theme(object): root = ElementTree(element=XML(xml)) iter = root.getiterator() for element in iter: + delphiColorChange = False if element.tag != u'Theme': t = element.text val = 0 @@ -128,6 +129,7 @@ class Theme(object): pass elif DelphiColors.has_key(t): val = DelphiColors[t] + delphiColorChange = True else: try: val = int(t) @@ -136,7 +138,10 @@ class Theme(object): if (element.tag.find(u'Color') > 0 or (element.tag.find(u'BackgroundParameter') == 0 and type(val) == type(0))): # convert to a wx.Colour - val = QtGui.QColor(val&0xFF, (val>>8)&0xFF, (val>>16)&0xFF) + if not delphiColorChange: + val = QtGui.QColor(val&0xFF, (val>>8)&0xFF, (val>>16)&0xFF) + else: + val = QtGui.QColor((val>>16)&0xFF, (val>>8)&0xFF, val&0xFF) setattr(self, element.tag, val) def __str__(self): From d02fc68a721bf8b1996e2c8f19ccce4d72ae8522 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Mon, 22 Feb 2010 16:57:08 +0000 Subject: [PATCH 17/31] Fix unzipping theme files --- openlp/core/ui/thememanager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index 630b1a485..577021418 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -341,7 +341,7 @@ class ThemeManager(QtGui.QWidget): outfile = open(fullpath, u'w') outfile.write(filexml) else: - outfile = open(fullpath, u'w') + outfile = open(fullpath, u'wb') outfile.write(zip.read(file)) self.generateAndSaveImage(dir, themename, filexml) except: From b80bfb5a80ab9fe302bc43ee2187004d58959319 Mon Sep 17 00:00:00 2001 From: Michael Gorven Date: Tue, 23 Feb 2010 17:42:17 +0200 Subject: [PATCH 18/31] Add menu entry from old branch. --- resources/openlp.desktop | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 resources/openlp.desktop diff --git a/resources/openlp.desktop b/resources/openlp.desktop new file mode 100644 index 000000000..8791c2d8f --- /dev/null +++ b/resources/openlp.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=OpenLP +GenericName=Church lyrics projection +Exec=openlp +Icon=openlp +StartupNotify=true +Terminal=False +Type=Application +Categories=AudioVideo From a0e56c0d8509dbfad52348406ddcdf2c5027265c Mon Sep 17 00:00:00 2001 From: Michael Gorven Date: Tue, 23 Feb 2010 17:45:06 +0200 Subject: [PATCH 19/31] Include proper vesion file in tarball and fix reading thereof. --- MANIFEST.in | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 0e94db321..3b76a706c 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -8,4 +8,4 @@ recursive-include resources/images * recursive-include scripts *.py include copyright.txt include LICENSE -include version.txt +include openlp/.version diff --git a/setup.py b/setup.py index 29db13c4b..ccdbd09af 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ try: finally: b.unlock() except: - ver_file = open(VERSION_FILE, u'w') + ver_file = open(VERSION_FILE, u'r') version = ver_file.read().strip() ver_file.close() From 3b0970d7735942ca2edf2c9d424bc6f07528ef25 Mon Sep 17 00:00:00 2001 From: Michael Gorven Date: Tue, 23 Feb 2010 17:45:26 +0200 Subject: [PATCH 20/31] Make setup.py executable. --- setup.py | 2 ++ 1 file changed, 2 insertions(+) mode change 100644 => 100755 setup.py diff --git a/setup.py b/setup.py old mode 100644 new mode 100755 index ccdbd09af..975de929d --- a/setup.py +++ b/setup.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + from setuptools import setup, find_packages import sys, os From 03ae1781c4130d17e9cc6e4dfa9631948dbd7899 Mon Sep 17 00:00:00 2001 From: Michael Gorven Date: Tue, 23 Feb 2010 17:45:55 +0200 Subject: [PATCH 21/31] Install menu entry. --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index 3b76a706c..73ff3c545 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -6,6 +6,7 @@ recursive-include resources/forms * recursive-include resources/i18n * recursive-include resources/images * recursive-include scripts *.py +include resources/*.desktop include copyright.txt include LICENSE include openlp/.version From 7f8c6b6fdd8b0cc4baf9f33709273e9f58152ef6 Mon Sep 17 00:00:00 2001 From: Michael Gorven Date: Tue, 23 Feb 2010 17:49:39 +0200 Subject: [PATCH 22/31] Install scripts as scripts. --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 975de929d..2429f0d73 100755 --- a/setup.py +++ b/setup.py @@ -45,6 +45,7 @@ OpenLP (previously openlp.org) is free church presentation software, or lyrics p url='http://openlp.org/', license='GNU General Public License', packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), + scripts=['openlp.pyw', 'openlp-1to2-converter.py', 'bible-1to2-converter.py'], include_package_data=True, zip_safe=False, install_requires=[ From 57f685cc60827e6e1e27d8bdf9c20f489aa757b2 Mon Sep 17 00:00:00 2001 From: Michael Gorven Date: Tue, 23 Feb 2010 17:52:38 +0200 Subject: [PATCH 23/31] Specify correct directory. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 2429f0d73..73cecd97a 100755 --- a/setup.py +++ b/setup.py @@ -45,7 +45,7 @@ OpenLP (previously openlp.org) is free church presentation software, or lyrics p url='http://openlp.org/', license='GNU General Public License', packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), - scripts=['openlp.pyw', 'openlp-1to2-converter.py', 'bible-1to2-converter.py'], + scripts=['openlp.pyw', 'scripts/openlp-1to2-converter.py', 'scripts/bible-1to2-converter.py'], include_package_data=True, zip_safe=False, install_requires=[ From 8e2efcb18391e2289370874b2dcba3a006e1edd4 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Tue, 23 Feb 2010 19:19:06 +0000 Subject: [PATCH 24/31] Fix spelllling --- openlp/plugins/presentations/lib/presentationtab.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/plugins/presentations/lib/presentationtab.py b/openlp/plugins/presentations/lib/presentationtab.py index e7d16eb47..0ef7e17d1 100644 --- a/openlp/plugins/presentations/lib/presentationtab.py +++ b/openlp/plugins/presentations/lib/presentationtab.py @@ -88,7 +88,7 @@ class PresentationTab(SettingsTab): self.PresentationLayout.addWidget(self.PresentationRightWidget) def retranslateUi(self): - self.VerseDisplayGroupBox.setTitle(self.trUtf8('Avaliable Controllers')) + self.VerseDisplayGroupBox.setTitle(self.trUtf8('Available Controllers')) for key in self.controllers: controller = self.controllers[key] checkbox = self.PresenterCheckboxes[controller.name] From 3cf8b491eacc8e57bac434b9880c622daa3c37f4 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Tue, 23 Feb 2010 19:37:07 +0000 Subject: [PATCH 25/31] Fix field name --- openlp/core/ui/servicemanager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index d0307b860..5ee248a3b 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -574,7 +574,7 @@ class ServiceManager(QtGui.QWidget): def regenerateServiceItems(self): #force reset of renderer as theme data has changed - self.parent.RenderManager.themesata = None + self.parent.RenderManager.themedata = None if len(self.serviceItems) > 0: tempServiceItems = self.serviceItems self.onNewService() From 6012641a538213823c01b00e59b972a79ef7b5d4 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Wed, 24 Feb 2010 20:37:33 +0200 Subject: [PATCH 26/31] Trying to set a tag on trunk. bzr-revno: 715 --- version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.txt b/version.txt index f5e7e4e33..34d78cfd2 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.9.0-713 +1.9.0-715 From 38a8575989c65eb545353aee3e784039372dc3ed Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Thu, 25 Feb 2010 21:09:27 +0000 Subject: [PATCH 27/31] Sort out startup http gets. --- openlp/core/ui/mainwindow.py | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index df66d5e97..96a089df1 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -52,12 +52,17 @@ media_manager_style = """ } """ class versionThread(QtCore.QThread): - def __init__(self, parent): + def __init__(self, parent, app_version, generalConfig): QtCore.QThread.__init__(self, parent) self.parent = parent + self.app_version = app_version + self.generalConfig = generalConfig def run (self): time.sleep(2) - Receiver.send_message(u'version_check') + version = check_latest_version(self.generalConfig, self.app_version) + #new version has arrived + if version != self.app_version: + Receiver.send_message(u'version_check', u'%s' % version) class Ui_MainWindow(object): @@ -536,20 +541,18 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): log.info(u'Load data from Settings') self.settingsForm.postSetUp() - def versionCheck(self): + def versionCheck(self, version): """ Checks the version of the Application called from openlp.pyw """ app_version = self.applicationVersion[u'full'] - version = check_latest_version(self.generalConfig, app_version) - if app_version != version: - version_text = unicode(self.trUtf8('OpenLP version %s has been updated ' - 'to version %s\n\nYou can obtain the latest version from http://openlp.org')) - QtGui.QMessageBox.question(self, - self.trUtf8('OpenLP Version Updated'), - version_text % (app_version, version), - QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok), - QtGui.QMessageBox.Ok) + version_text = unicode(self.trUtf8('OpenLP version %s has been updated ' + 'to version %s\n\nYou can obtain the latest version from http://openlp.org')) + QtGui.QMessageBox.question(self, + self.trUtf8('OpenLP Version Updated'), + version_text % (app_version, version), + QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok), + QtGui.QMessageBox.Ok) def getMonitorNumber(self): """ @@ -584,7 +587,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): QtGui.QMessageBox.Ok) def versionThread(self): - vT = versionThread(self) + app_version = self.applicationVersion[u'full'] + vT = versionThread(self, app_version, self.generalConfig) vT.start() def onHelpAboutItemClicked(self): From d47fc53b7815fd4e7ada91dab5958eca5243717a Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sat, 27 Feb 2010 07:39:47 +0000 Subject: [PATCH 28/31] Add Alternate rows to slide controller --- openlp/core/ui/slidecontroller.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py index e88699b71..515fb2d3c 100644 --- a/openlp/core/ui/slidecontroller.py +++ b/openlp/core/ui/slidecontroller.py @@ -144,6 +144,7 @@ class SlideController(QtGui.QWidget): self.PreviewListWidget.setEditTriggers( QtGui.QAbstractItemView.NoEditTriggers) self.PreviewListWidget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) + self.PreviewListWidget.setAlternatingRowColors(True) self.ControllerLayout.addWidget(self.PreviewListWidget) # Build the full toolbar self.Toolbar = OpenLPToolbar(self) From 4a83e572e96de9afd75021b2a914e073cec6cd8e Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sat, 27 Feb 2010 09:18:26 +0000 Subject: [PATCH 29/31] Fix bugs in last merge and fix comments --- openlp/plugins/bibles/lib/common.py | 2 -- openlp/plugins/bibles/lib/db.py | 2 +- openlp/plugins/bibles/lib/http.py | 10 +++++----- openlp/plugins/bibles/lib/mediaitem.py | 7 +++---- openlp/plugins/custom/lib/mediaitem.py | 2 +- openlp/plugins/images/lib/mediaitem.py | 2 +- openlp/plugins/media/mediaplugin.py | 1 + 7 files changed, 12 insertions(+), 14 deletions(-) diff --git a/openlp/plugins/bibles/lib/common.py b/openlp/plugins/bibles/lib/common.py index cd9b5cf35..4ba985842 100644 --- a/openlp/plugins/bibles/lib/common.py +++ b/openlp/plugins/bibles/lib/common.py @@ -166,8 +166,6 @@ class BibleCommon(object): """ A common ancestor for bible download sites. """ - global log - log = logging.getLogger(u'BibleCommon') log.info(u'BibleCommon') def _get_web_text(self, urlstring, proxyurl): diff --git a/openlp/plugins/bibles/lib/db.py b/openlp/plugins/bibles/lib/db.py index 67c71ca10..be4112a54 100644 --- a/openlp/plugins/bibles/lib/db.py +++ b/openlp/plugins/bibles/lib/db.py @@ -59,7 +59,7 @@ class BibleDB(QtCore.QObject): ``config`` The configuration object, passed in from the plugin. """ - log.info(u'BibleDBimpl loaded') + log.info(u'BibleDB loaded') QtCore.QObject.__init__(self) if u'path' not in kwargs: raise KeyError(u'Missing keyword argument "path".') diff --git a/openlp/plugins/bibles/lib/http.py b/openlp/plugins/bibles/lib/http.py index 1cf92e4d2..d00c1f88a 100644 --- a/openlp/plugins/bibles/lib/http.py +++ b/openlp/plugins/bibles/lib/http.py @@ -35,6 +35,8 @@ from common import BibleCommon, SearchResults from db import BibleDB from openlp.plugins.bibles.lib.models import Book +log = logging.getLogger(__name__) + class HTTPBooks(object): cursor = None @@ -119,9 +121,7 @@ class HTTPBooks(object): class BGExtract(BibleCommon): - global log - log = logging.getLogger(u'BibleHTTPMgr(BG_extract)') - log.info(u'BG_extract loaded') + log.info(u'%s BGExtract loaded', __name__) def __init__(self, proxyurl=None): log.debug(u'init %s', proxyurl) @@ -184,7 +184,7 @@ class BGExtract(BibleCommon): return SearchResults(bookname, chapter, bible) class CWExtract(BibleCommon): - log.info(u'%s loaded', __name__) + log.info(u'%s CWExtract loaded', __name__) def __init__(self, proxyurl=None): log.debug(u'init %s', proxyurl) @@ -229,7 +229,7 @@ class CWExtract(BibleCommon): class HTTPBible(BibleDB): - log.info(u'%s loaded', __name__) + log.info(u'%s HTTPBible loaded' , __name__) def __init__(self, parent, **kwargs): """ diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index 44d37c4c4..c0a3bde35 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -43,7 +43,6 @@ 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. @@ -435,7 +434,7 @@ class BibleMediaItem(MediaManagerItem): raw_slides = [] raw_footer = [] bible_text = u'' - self.service_item.autoPreviewAllowed = True + service_item.autoPreviewAllowed = True #If we want to use a 2nd translation / version bible2 = u'' if self.SearchTabWidget.currentIndex() == 0: @@ -471,12 +470,12 @@ class BibleMediaItem(MediaManagerItem): verse_text = self.formatVerse(old_chapter, chapter, verse, u'', u'') old_chapter = chapter footer = u'%s (%s %s)' % (book, version, copyright) - #If not found throws and error so add.s + #If not found add to footer if footer not in raw_footer: raw_footer.append(footer) if bible2: footer = u'%s (%s %s)' % (book, version, copyright) - #If not found throws and error so add.s + #If not found add to footer if footer not in raw_footer: raw_footer.append(footer) bible_text = u'%s %s \n\n %s %s' % \ diff --git a/openlp/plugins/custom/lib/mediaitem.py b/openlp/plugins/custom/lib/mediaitem.py index 0750a467e..c4b9ef16a 100644 --- a/openlp/plugins/custom/lib/mediaitem.py +++ b/openlp/plugins/custom/lib/mediaitem.py @@ -144,7 +144,7 @@ class CustomMediaItem(MediaManagerItem): item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0] else: item_id = self.remoteCustom - self.service_item.autoPreviewAllowed = True + service_item.autoPreviewAllowed = True customSlide = self.parent.custommanager.get_custom(item_id) title = customSlide.title credit = customSlide.credits diff --git a/openlp/plugins/images/lib/mediaitem.py b/openlp/plugins/images/lib/mediaitem.py index d538c70af..e418ee44e 100644 --- a/openlp/plugins/images/lib/mediaitem.py +++ b/openlp/plugins/images/lib/mediaitem.py @@ -144,7 +144,7 @@ class ImageMediaItem(MediaManagerItem): items = self.ListView.selectedIndexes() if items: service_item.title = self.trUtf8('Image(s)') - self.service_item.autoPreviewAllowed = True + service_item.autoPreviewAllowed = True for item in items: bitem = self.ListView.item(item.row()) filename = unicode((bitem.data(QtCore.Qt.UserRole)).toString()) diff --git a/openlp/plugins/media/mediaplugin.py b/openlp/plugins/media/mediaplugin.py index 640de1cb3..532a50410 100644 --- a/openlp/plugins/media/mediaplugin.py +++ b/openlp/plugins/media/mediaplugin.py @@ -27,6 +27,7 @@ import logging from openlp.core.lib import Plugin, build_icon, PluginStatus from openlp.plugins.media.lib import MediaMediaItem +from PyQt4.phonon import Phonon class MediaPlugin(Plugin): global log From 1979f2450249251620c5f1d1d6acc1b2b9d3004d Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sat, 27 Feb 2010 09:55:44 +0000 Subject: [PATCH 30/31] Fix song editing where text is lost --- openlp/plugins/media/lib/mediaitem.py | 6 +++--- openlp/plugins/media/mediaplugin.py | 9 ++++++--- openlp/plugins/songs/forms/editsongform.py | 6 +++--- openlp/plugins/songs/forms/editverseform.py | 9 +++++++-- 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/openlp/plugins/media/lib/mediaitem.py b/openlp/plugins/media/lib/mediaitem.py index 46b059c01..67f1024a9 100644 --- a/openlp/plugins/media/lib/mediaitem.py +++ b/openlp/plugins/media/lib/mediaitem.py @@ -30,6 +30,8 @@ from PyQt4 import QtCore, QtGui from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon +log = logging.getLogger(__name__) + class MediaListView(BaseListWithDnD): def __init__(self, parent=None): self.PluginName = u'Media' @@ -39,9 +41,7 @@ class MediaMediaItem(MediaManagerItem): """ This is the custom media manager item for Media Slides. """ - global log - log = logging.getLogger(u'MediaMediaItem') - log.info(u'Media Media Item loaded') + log.info(u'%s MediaMediaItem loaded', __name__) def __init__(self, parent, icon, title): self.PluginNameShort = u'Media' diff --git a/openlp/plugins/media/mediaplugin.py b/openlp/plugins/media/mediaplugin.py index 532a50410..b403ab0de 100644 --- a/openlp/plugins/media/mediaplugin.py +++ b/openlp/plugins/media/mediaplugin.py @@ -29,10 +29,10 @@ from openlp.core.lib import Plugin, build_icon, PluginStatus from openlp.plugins.media.lib import MediaMediaItem from PyQt4.phonon import Phonon +log = logging.getLogger(__name__) + class MediaPlugin(Plugin): - global log - log = logging.getLogger(u'MediaPlugin') - log.info(u'Media Plugin loaded') + log.info(u'%s MediaPlugin loaded', __name__) def __init__(self, plugin_helpers): Plugin.__init__(self, u'Media', u'1.9.1', plugin_helpers) @@ -41,6 +41,9 @@ class MediaPlugin(Plugin): # passed with drag and drop messages self.dnd_id = u'Media' self.status = PluginStatus.Active +# print Phonon.BackendCapabilities.availableMimeTypes() +# for mimetype in Phonon.BackendCapabilities.availableMimeTypes(): +# print mimetype def initialise(self): log.info(u'Plugin Initialising') diff --git a/openlp/plugins/songs/forms/editsongform.py b/openlp/plugins/songs/forms/editsongform.py index 477910108..dd3af03c3 100644 --- a/openlp/plugins/songs/forms/editsongform.py +++ b/openlp/plugins/songs/forms/editsongform.py @@ -33,13 +33,13 @@ from openlp.plugins.songs.forms import EditVerseForm from openlp.plugins.songs.lib.models import Song from editsongdialog import Ui_EditSongDialog +log = logging.getLogger(__name__) + class EditSongForm(QtGui.QDialog, Ui_EditSongDialog): """ Class to manage the editing of a song """ - global log - log = logging.getLogger(u'EditSongForm') - log.info(u'Song Editor loaded') + log.info(u'%s EditSongForm loaded', __name__) def __init__(self, songmanager, parent=None): """ diff --git a/openlp/plugins/songs/forms/editverseform.py b/openlp/plugins/songs/forms/editverseform.py index 148fd164a..756d2a102 100644 --- a/openlp/plugins/songs/forms/editverseform.py +++ b/openlp/plugins/songs/forms/editverseform.py @@ -77,6 +77,8 @@ class EditVerseForm(QtGui.QDialog, Ui_EditVerseDialog): def setVerse(self, text, verseCount=0, single=False, tag=u'Verse:1'): posVerse = 0 posSub = 0 + if len(text) == 0: + text = u'---[Verse:1]---' if single: id = tag.split(u':') posVerse = self.VerseListComboBox.findText(id[0], QtCore.Qt.MatchExactly) @@ -119,11 +121,14 @@ class EditVerseForm(QtGui.QDialog, Ui_EditVerseDialog): unicode(self.SubVerseListComboBox.currentText()) def getVerseAll(self): - return self.VerseTextEdit.toPlainText() + text = self.VerseTextEdit.toPlainText() + if not text.startsWith(u'---['): + text = u'---[Verse:1]---\n%s' % text + return text def onVerseComboChanged(self, id): if unicode(self.VerseListComboBox.currentText()) == u'Verse': self.SubVerseListComboBox.setEnabled(True) else: self.SubVerseListComboBox.setEnabled(False) - self.SubVerseListComboBox.setCurrentIndex(0) \ No newline at end of file + self.SubVerseListComboBox.setCurrentIndex(0) From 86e03f0c116f58810ee02a1ae918104739cea8bf Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sat, 27 Feb 2010 10:10:03 +0000 Subject: [PATCH 31/31] Move editing to line 2 --- openlp/plugins/songs/forms/editverseform.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openlp/plugins/songs/forms/editverseform.py b/openlp/plugins/songs/forms/editverseform.py index 756d2a102..cee84aae5 100644 --- a/openlp/plugins/songs/forms/editverseform.py +++ b/openlp/plugins/songs/forms/editverseform.py @@ -78,7 +78,7 @@ class EditVerseForm(QtGui.QDialog, Ui_EditVerseDialog): posVerse = 0 posSub = 0 if len(text) == 0: - text = u'---[Verse:1]---' + text = u'---[Verse:1]---\n' if single: id = tag.split(u':') posVerse = self.VerseListComboBox.findText(id[0], QtCore.Qt.MatchExactly) @@ -114,6 +114,7 @@ class EditVerseForm(QtGui.QDialog, Ui_EditVerseDialog): self.VerseTextEdit.setPlainText(text) self.VerseTextEdit.setFocus(QtCore.Qt.OtherFocusReason) self.onVerseComboChanged(0) + self.VerseTextEdit.moveCursor(QtGui.QTextCursor.Down) def getVerse(self): return self.VerseTextEdit.toPlainText(), \