forked from openlp/openlp
r1790
This commit is contained in:
commit
e856fa9aed
@ -610,24 +610,3 @@ def build_footer_css(item, height):
|
|||||||
theme.font_footer_size, theme.font_footer_color)
|
theme.font_footer_size, theme.font_footer_color)
|
||||||
return lyrics_html
|
return lyrics_html
|
||||||
|
|
||||||
def build_alert_css(alertTab, width):
|
|
||||||
"""
|
|
||||||
Build the display of the footer
|
|
||||||
|
|
||||||
``alertTab``
|
|
||||||
Details from the Alert tab for fonts etc
|
|
||||||
"""
|
|
||||||
style = u"""
|
|
||||||
width: %spx;
|
|
||||||
vertical-align: %s;
|
|
||||||
font-family: %s;
|
|
||||||
font-size: %spt;
|
|
||||||
color: %s;
|
|
||||||
background-color: %s;
|
|
||||||
"""
|
|
||||||
if not alertTab:
|
|
||||||
return u''
|
|
||||||
align = VerticalType.Names[alertTab.location]
|
|
||||||
alert = style % (width, align, alertTab.font_face, alertTab.font_size,
|
|
||||||
alertTab.font_color, alertTab.bg_color)
|
|
||||||
return alert
|
|
||||||
|
@ -52,6 +52,24 @@ class HideMode(object):
|
|||||||
Theme = 2
|
Theme = 2
|
||||||
Screen = 3
|
Screen = 3
|
||||||
|
|
||||||
|
class AlertLocation(object):
|
||||||
|
"""
|
||||||
|
This is an enumeration class which controls where Alerts are placed on the
|
||||||
|
screen.
|
||||||
|
|
||||||
|
``Top``
|
||||||
|
Place the text at the top of the screen.
|
||||||
|
|
||||||
|
``Middle``
|
||||||
|
Place the text in the middle of the screen.
|
||||||
|
|
||||||
|
``Bottom``
|
||||||
|
Place the text at the bottom of the screen.
|
||||||
|
"""
|
||||||
|
Top = 0
|
||||||
|
Middle = 1
|
||||||
|
Bottom = 2
|
||||||
|
|
||||||
from firsttimeform import FirstTimeForm
|
from firsttimeform import FirstTimeForm
|
||||||
from firsttimelanguageform import FirstTimeLanguageForm
|
from firsttimelanguageform import FirstTimeLanguageForm
|
||||||
from themelayoutform import ThemeLayoutForm
|
from themelayoutform import ThemeLayoutForm
|
||||||
|
@ -178,6 +178,8 @@ class ExceptionForm(QtGui.QDialog, Ui_ExceptionDialog):
|
|||||||
'Please add the information that bug reports are favoured written '
|
'Please add the information that bug reports are favoured written '
|
||||||
'in English.'))
|
'in English.'))
|
||||||
content = self._createReport()
|
content = self._createReport()
|
||||||
|
source = u''
|
||||||
|
exception = u''
|
||||||
for line in content[2].split(u'\n'):
|
for line in content[2].split(u'\n'):
|
||||||
if re.search(r'[/\\]openlp[/\\]', line):
|
if re.search(r'[/\\]openlp[/\\]', line):
|
||||||
source = re.sub(r'.*[/\\]openlp[/\\](.*)".*', r'\1', line)
|
source = re.sub(r'.*[/\\]openlp[/\\](.*)".*', r'\1', line)
|
||||||
|
@ -37,7 +37,7 @@ from PyQt4.phonon import Phonon
|
|||||||
from openlp.core.lib import Receiver, build_html, ServiceItem, image_to_byte, \
|
from openlp.core.lib import Receiver, build_html, ServiceItem, image_to_byte, \
|
||||||
translate, PluginManager
|
translate, PluginManager
|
||||||
|
|
||||||
from openlp.core.ui import HideMode, ScreenList
|
from openlp.core.ui import HideMode, ScreenList, AlertLocation
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ class MainDisplay(QtGui.QGraphicsView):
|
|||||||
self.frame.evaluateJavaScript(u'show_text("%s")' %
|
self.frame.evaluateJavaScript(u'show_text("%s")' %
|
||||||
slide.replace(u'\\', u'\\\\').replace(u'\"', u'\\\"'))
|
slide.replace(u'\\', u'\\\\').replace(u'\"', u'\\\"'))
|
||||||
|
|
||||||
def alert(self, text):
|
def alert(self, text, location):
|
||||||
"""
|
"""
|
||||||
Display an alert.
|
Display an alert.
|
||||||
|
|
||||||
@ -241,10 +241,10 @@ class MainDisplay(QtGui.QGraphicsView):
|
|||||||
alert_height = int(height.toString())
|
alert_height = int(height.toString())
|
||||||
shrinkItem.resize(self.width(), alert_height)
|
shrinkItem.resize(self.width(), alert_height)
|
||||||
shrinkItem.setVisible(True)
|
shrinkItem.setVisible(True)
|
||||||
if self.alertTab.location == 1:
|
if location == AlertLocation.Middle:
|
||||||
shrinkItem.move(self.screen[u'size'].left(),
|
shrinkItem.move(self.screen[u'size'].left(),
|
||||||
(self.screen[u'size'].height() - alert_height) / 2)
|
(self.screen[u'size'].height() - alert_height) / 2)
|
||||||
elif self.alertTab.location == 2:
|
elif location == AlertLocation.Bottom:
|
||||||
shrinkItem.move(self.screen[u'size'].left(),
|
shrinkItem.move(self.screen[u'size'].left(),
|
||||||
self.screen[u'size'].height() - alert_height)
|
self.screen[u'size'].height() - alert_height)
|
||||||
else:
|
else:
|
||||||
|
@ -71,11 +71,24 @@ JAVASCRIPT = """
|
|||||||
|
|
||||||
function update_css(align, font, size, color, bgcolor){
|
function update_css(align, font, size, color, bgcolor){
|
||||||
var text = document.getElementById('alert');
|
var text = document.getElementById('alert');
|
||||||
text.style.verticalAlign = align;
|
|
||||||
text.style.fontSize = size + "pt";
|
text.style.fontSize = size + "pt";
|
||||||
text.style.fontFamily = font;
|
text.style.fontFamily = font;
|
||||||
text.style.color = color;
|
text.style.color = color;
|
||||||
text.style.backgroundColor = bgcolor;
|
text.style.backgroundColor = bgcolor;
|
||||||
|
switch(align)
|
||||||
|
{
|
||||||
|
case 'top':
|
||||||
|
text.style.top = '0px';
|
||||||
|
break;
|
||||||
|
case 'middle':
|
||||||
|
text.style.top = ((window.innerHeight - text.clientHeight) / 2)
|
||||||
|
+ 'px';
|
||||||
|
break;
|
||||||
|
case 'bottom':
|
||||||
|
text.style.top = (window.innerHeight - text.clientHeight)
|
||||||
|
+ 'px';
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
CSS = """
|
CSS = """
|
||||||
|
@ -85,7 +85,7 @@ class AlertsManager(QtCore.QObject):
|
|||||||
return
|
return
|
||||||
text = self.alertList.pop(0)
|
text = self.alertList.pop(0)
|
||||||
alertTab = self.parent().settings_tab
|
alertTab = self.parent().settings_tab
|
||||||
self.parent().liveController.display.alert(text)
|
self.parent().liveController.display.alert(text, alertTab.location)
|
||||||
# Check to see if we have a timer running.
|
# Check to see if we have a timer running.
|
||||||
if self.timer_id == 0:
|
if self.timer_id == 0:
|
||||||
self.timer_id = self.startTimer(int(alertTab.timeout) * 1000)
|
self.timer_id = self.startTimer(int(alertTab.timeout) * 1000)
|
||||||
@ -100,7 +100,8 @@ class AlertsManager(QtCore.QObject):
|
|||||||
"""
|
"""
|
||||||
log.debug(u'timer event')
|
log.debug(u'timer event')
|
||||||
if event.timerId() == self.timer_id:
|
if event.timerId() == self.timer_id:
|
||||||
self.parent().liveController.display.alert(u'')
|
alertTab = self.parent().settings_tab
|
||||||
|
self.parent().liveController.display.alert(u'', alertTab.location)
|
||||||
self.killTimer(self.timer_id)
|
self.killTimer(self.timer_id)
|
||||||
self.timer_id = 0
|
self.timer_id = 0
|
||||||
self.generateAlert()
|
self.generateAlert()
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import SettingsTab, translate, Receiver
|
from openlp.core.lib import SettingsTab, translate, Receiver
|
||||||
|
from openlp.core.ui import AlertLocation
|
||||||
from openlp.core.lib.ui import UiStrings, create_valign_combo
|
from openlp.core.lib.ui import UiStrings, create_valign_combo
|
||||||
|
|
||||||
class AlertsTab(SettingsTab):
|
class AlertsTab(SettingsTab):
|
||||||
@ -159,7 +160,7 @@ class AlertsTab(SettingsTab):
|
|||||||
self.font_face = unicode(settings.value(
|
self.font_face = unicode(settings.value(
|
||||||
u'font face', QtCore.QVariant(QtGui.QFont().family())).toString())
|
u'font face', QtCore.QVariant(QtGui.QFont().family())).toString())
|
||||||
self.location = settings.value(
|
self.location = settings.value(
|
||||||
u'location', QtCore.QVariant(1)).toInt()[0]
|
u'location', QtCore.QVariant(AlertLocation.Bottom)).toInt()[0]
|
||||||
settings.endGroup()
|
settings.endGroup()
|
||||||
self.fontSizeSpinBox.setValue(self.font_size)
|
self.fontSizeSpinBox.setValue(self.font_size)
|
||||||
self.timeoutSpinBox.setValue(self.timeout)
|
self.timeoutSpinBox.setValue(self.timeout)
|
||||||
|
@ -65,7 +65,7 @@ class OooImport(SongImport):
|
|||||||
if not isinstance(self.importSource, list):
|
if not isinstance(self.importSource, list):
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
self.start_ooo()
|
self.startOoo()
|
||||||
except NoConnectException as exc:
|
except NoConnectException as exc:
|
||||||
self.logError(
|
self.logError(
|
||||||
self.importSource[0],
|
self.importSource[0],
|
||||||
@ -145,7 +145,7 @@ class OooImport(SongImport):
|
|||||||
process.waitForStarted()
|
process.waitForStarted()
|
||||||
self.processStarted = True
|
self.processStarted = True
|
||||||
except:
|
except:
|
||||||
log.exception("start_ooo_process failed")
|
log.exception("startOooProcess failed")
|
||||||
|
|
||||||
def openOooFile(self, filepath):
|
def openOooFile(self, filepath):
|
||||||
"""
|
"""
|
||||||
@ -171,7 +171,7 @@ class OooImport(SongImport):
|
|||||||
self.importWizard.incrementProgressBar(
|
self.importWizard.incrementProgressBar(
|
||||||
u'Processing file ' + filepath, 0)
|
u'Processing file ' + filepath, 0)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
log.exception("open_ooo_file failed: %s", url)
|
log.exception("openOooFile failed: %s", url)
|
||||||
return
|
return
|
||||||
|
|
||||||
def closeOooFile(self):
|
def closeOooFile(self):
|
||||||
|
@ -73,6 +73,7 @@ MODULES = [
|
|||||||
'BeautifulSoup',
|
'BeautifulSoup',
|
||||||
'mako',
|
'mako',
|
||||||
'migrate',
|
'migrate',
|
||||||
|
'uno',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,10 +48,10 @@ Inno Setup 5
|
|||||||
|
|
||||||
Sphinx
|
Sphinx
|
||||||
This is used to build the documentation. The documentation trunk must be at
|
This is used to build the documentation. The documentation trunk must be at
|
||||||
the same directory level as Openlp trunk and named "documentation"
|
the same directory level as Openlp trunk and named "documentation".
|
||||||
|
|
||||||
HTML Help Workshop
|
HTML Help Workshop
|
||||||
This is used to create the help file
|
This is used to create the help file.
|
||||||
|
|
||||||
PyInstaller
|
PyInstaller
|
||||||
PyInstaller should be a checkout of revision 1470 of trunk, and in a
|
PyInstaller should be a checkout of revision 1470 of trunk, and in a
|
||||||
@ -65,10 +65,6 @@ PyInstaller
|
|||||||
|
|
||||||
http://svn.pyinstaller.org/trunk
|
http://svn.pyinstaller.org/trunk
|
||||||
|
|
||||||
Then you need to copy the two hook-*.py files from the "pyinstaller"
|
|
||||||
subdirectory in OpenLP's "resources" directory into PyInstaller's
|
|
||||||
"PyInstaller/hooks" directory.
|
|
||||||
|
|
||||||
Bazaar
|
Bazaar
|
||||||
You need the command line "bzr" client installed.
|
You need the command line "bzr" client installed.
|
||||||
|
|
||||||
@ -79,7 +75,7 @@ OpenLP
|
|||||||
|
|
||||||
Visual C++ 2008 Express Edition
|
Visual C++ 2008 Express Edition
|
||||||
This is to build pptviewlib.dll, the library for controlling the
|
This is to build pptviewlib.dll, the library for controlling the
|
||||||
PowerPointViewer
|
PowerPointViewer.
|
||||||
|
|
||||||
windows-builder.py
|
windows-builder.py
|
||||||
This script, of course. It should be in the "scripts" directory of OpenLP.
|
This script, of course. It should be in the "scripts" directory of OpenLP.
|
||||||
@ -88,14 +84,24 @@ psvince.dll
|
|||||||
This dll is used during the actual install of OpenLP to check if OpenLP is
|
This dll is used during the actual install of OpenLP to check if OpenLP is
|
||||||
running on the users machine prior to the setup. If OpenLP is running,
|
running on the users machine prior to the setup. If OpenLP is running,
|
||||||
the install will fail. The dll can be obtained from here:
|
the install will fail. The dll can be obtained from here:
|
||||||
http://www.vincenzo.net/isxkb/index.php?title=PSVince)
|
|
||||||
|
http://www.vincenzo.net/isxkb/index.php?title=PSVince)
|
||||||
|
|
||||||
|
The dll is presently included in .\\resources\\windows
|
||||||
|
|
||||||
Mako
|
Mako
|
||||||
Mako Templates for Python. This package is required for building the
|
Mako Templates for Python. This package is required for building the
|
||||||
remote plugin. It can be installed by going to your
|
remote plugin. It can be installed by going to your
|
||||||
python_directory\scripts\.. and running "easy_install Mako". If you do not
|
python_directory\scripts\.. and running "easy_install Mako". If you do not
|
||||||
have easy_install, the Mako package can be obtained here:
|
have easy_install, the Mako package can be obtained here:
|
||||||
http://www.makotemplates.org/download.html
|
|
||||||
|
http://www.makotemplates.org/download.html
|
||||||
|
|
||||||
|
Sqlalchemy Migrate
|
||||||
|
Required for the data-bases used in OpenLP. The package can be
|
||||||
|
obtained here:
|
||||||
|
|
||||||
|
http://code.google.com/p/sqlalchemy-migrate/
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -149,6 +155,7 @@ build_path = os.path.join(branch_path, u'build')
|
|||||||
dist_path = os.path.join(branch_path, u'dist', u'OpenLP')
|
dist_path = os.path.join(branch_path, u'dist', u'OpenLP')
|
||||||
pptviewlib_path = os.path.join(source_path, u'plugins', u'presentations',
|
pptviewlib_path = os.path.join(source_path, u'plugins', u'presentations',
|
||||||
u'lib', u'pptviewlib')
|
u'lib', u'pptviewlib')
|
||||||
|
hooks_path = os.path.join(branch_path , u'resources', u'pyinstaller')
|
||||||
|
|
||||||
def update_code():
|
def update_code():
|
||||||
os.chdir(branch_path)
|
os.chdir(branch_path)
|
||||||
@ -174,6 +181,7 @@ def run_pyinstaller():
|
|||||||
u'--noconfirm',
|
u'--noconfirm',
|
||||||
u'--windowed',
|
u'--windowed',
|
||||||
u'--noupx',
|
u'--noupx',
|
||||||
|
u'--additional-hooks-dir', hooks_path,
|
||||||
u'-o', branch_path,
|
u'-o', branch_path,
|
||||||
u'-i', win32_icon,
|
u'-i', win32_icon,
|
||||||
u'-p', branch_path,
|
u'-p', branch_path,
|
||||||
|
Loading…
Reference in New Issue
Block a user