forked from openlp/openlp
Merged from trunk.
Fixed a conflict.
This commit is contained in:
commit
2766081522
@ -10,3 +10,5 @@ openlp.org 2.0.e4*
|
||||
documentation/build/html
|
||||
documentation/build/doctrees
|
||||
*.log*
|
||||
dist
|
||||
OpenLP.egg-info
|
||||
|
12
MANIFEST.in
Normal file
12
MANIFEST.in
Normal file
@ -0,0 +1,12 @@
|
||||
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 resources/*.desktop
|
||||
include copyright.txt
|
||||
include LICENSE
|
||||
include openlp/.version
|
@ -25,10 +25,10 @@
|
||||
|
||||
import logging
|
||||
|
||||
from PyQt4 import QtGui, QtCore
|
||||
from PyQt4 import QtCore
|
||||
|
||||
from renderer import Renderer
|
||||
from openlp.core.lib import ThemeLevel, resize_image
|
||||
from openlp.core.lib import ThemeLevel
|
||||
|
||||
class RenderManager(object):
|
||||
"""
|
||||
|
@ -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>>16) & 0xFF, (val>>8)&0xFF, val&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):
|
||||
|
@ -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):
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from PyQt4.phonon import Phonon
|
||||
|
@ -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):
|
||||
|
||||
@ -573,13 +573,15 @@ class ServiceManager(QtGui.QWidget):
|
||||
self.regenerateServiceItems()
|
||||
|
||||
def regenerateServiceItems(self):
|
||||
#force reset of renderer as theme data has changed
|
||||
self.parent.RenderManager.themedata = None
|
||||
if len(self.serviceItems) > 0:
|
||||
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
|
||||
|
||||
@ -606,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):
|
||||
|
@ -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):
|
||||
@ -313,17 +313,23 @@ class ThemeManager(QtGui.QWidget):
|
||||
filexml = None
|
||||
themename = None
|
||||
for file in zip.namelist():
|
||||
if file.endswith(os.path.sep):
|
||||
theme_dir = os.path.join(dir, file)
|
||||
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):
|
||||
os.mkdir(os.path.join(dir, file))
|
||||
os.mkdir(os.path.join(dir, osfile))
|
||||
else:
|
||||
fullpath = os.path.join(dir, file)
|
||||
names = file.split(os.path.sep)
|
||||
fullpath = os.path.join(dir, osfile)
|
||||
names = osfile.split(os.path.sep)
|
||||
if len(names) > 1:
|
||||
# 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):
|
||||
@ -335,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:
|
||||
@ -384,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')
|
||||
@ -397,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()
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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):
|
||||
"""
|
||||
|
@ -23,11 +23,10 @@
|
||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
###############################################################################
|
||||
|
||||
import csv
|
||||
import logging
|
||||
import os
|
||||
import os.path
|
||||
from time import sleep
|
||||
import csv
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
@ -46,8 +45,8 @@ class DownloadLocation(object):
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def get_name(class_, id):
|
||||
return class_.Names[id]
|
||||
def get_name(cls, id):
|
||||
return cls.Names[id]
|
||||
|
||||
|
||||
class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
|
@ -26,7 +26,6 @@
|
||||
import urllib2
|
||||
import logging
|
||||
import re
|
||||
import sqlite3
|
||||
import chardet
|
||||
|
||||
only_verses = re.compile(r'([\w .]+)[ ]+([0-9]+)[ ]*[:|v|V][ ]*([0-9]+)'
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
import logging
|
||||
import os
|
||||
import csv
|
||||
|
||||
from common import parse_reference
|
||||
from opensong import OpenSongBible
|
||||
|
@ -31,8 +31,6 @@ from PyQt4 import QtCore, QtGui
|
||||
from openlp.core.lib import MediaManagerItem, Receiver, str_to_bool, \
|
||||
BaseListWithDnD
|
||||
from openlp.plugins.bibles.forms import ImportWizardForm
|
||||
from openlp.plugins.bibles.lib.manager import BibleMode
|
||||
from openlp.plugins.bibles.lib.common import parse_reference
|
||||
|
||||
class BibleListView(BaseListWithDnD):
|
||||
"""
|
||||
|
@ -23,13 +23,9 @@
|
||||
# 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
|
||||
|
@ -30,8 +30,6 @@ import chardet
|
||||
import codecs
|
||||
import re
|
||||
|
||||
from PyQt4 import QtCore
|
||||
|
||||
from openlp.core.lib import Receiver
|
||||
from db import BibleDB
|
||||
|
||||
|
@ -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('Available Controllers'))
|
||||
for key in self.controllers:
|
||||
controller = self.controllers[key]
|
||||
checkbox = self.PresenterCheckboxes[controller.name]
|
||||
|
@ -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
|
||||
|
10
resources/openlp.desktop
Normal file
10
resources/openlp.desktop
Normal file
@ -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
|
@ -28,7 +28,7 @@ import sys
|
||||
import os
|
||||
import sqlite
|
||||
import sqlite3
|
||||
import re
|
||||
|
||||
from optparse import OptionParser
|
||||
from traceback import format_tb as get_traceback
|
||||
|
||||
|
83
setup.py
Normal file → Executable file
83
setup.py
Normal file → Executable file
@ -1,38 +1,57 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||
#!/usr/bin/env python
|
||||
|
||||
###############################################################################
|
||||
# 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 setuptools import setup, find_packages
|
||||
import sys, os
|
||||
|
||||
from setuptools import setup
|
||||
VERSION_FILE = 'openlp/.version'
|
||||
|
||||
try:
|
||||
from bzrlib.branch import Branch
|
||||
b = Branch.open_containing('.')[0]
|
||||
b.lock_read()
|
||||
try:
|
||||
# Get the branch's latest revision number.
|
||||
revno = b.revno()
|
||||
# Convert said revision number into a bzr revision id.
|
||||
revision_id = b.dotted_revno_to_revision_id((revno,))
|
||||
# Get a dict of tags, with the revision id as the key.
|
||||
tags = b.tags.get_reverse_tag_dict()
|
||||
# Check if the latest
|
||||
if revision_id in tags:
|
||||
version = u'%s' % tags[revision_id][0]
|
||||
else:
|
||||
version = '%s-bzr%s' % (sorted(b.tags.get_tag_dict().keys())[-1], revno)
|
||||
ver_file = open(VERSION_FILE, u'w')
|
||||
ver_file.write(version)
|
||||
ver_file.close()
|
||||
finally:
|
||||
b.unlock()
|
||||
except:
|
||||
ver_file = open(VERSION_FILE, u'r')
|
||||
version = ver_file.read().strip()
|
||||
ver_file.close()
|
||||
|
||||
APP = ['openlp.pyw']
|
||||
OPTIONS = {'argv_emulation': True, 'includes': ['sip', 'PyQt4']}
|
||||
|
||||
setup(
|
||||
name='openlp.org',
|
||||
version='1.9.0',
|
||||
url='http://www.openlp.org/',
|
||||
app=APP,
|
||||
options={'py2app': OPTIONS},
|
||||
setup_requires=['py2app'],
|
||||
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']),
|
||||
scripts=['openlp.pyw', 'scripts/openlp-1to2-converter.py', 'scripts/bible-1to2-converter.py'],
|
||||
include_package_data=True,
|
||||
zip_safe=False,
|
||||
install_requires=[
|
||||
# -*- Extra requirements: -*-
|
||||
],
|
||||
entry_points="""
|
||||
# -*- Entry points: -*-
|
||||
"""
|
||||
)
|
@ -1 +1 @@
|
||||
1.9.0-709
|
||||
1.9.0-715
|
||||
|
Loading…
Reference in New Issue
Block a user