forked from openlp/openlp
Fix disply settings again - alerts coded
This commit is contained in:
parent
047e8efe1f
commit
6787a41eae
@ -47,6 +47,11 @@ HTMLSRC = u"""
|
||||
var t = null;
|
||||
var transition = %s;
|
||||
|
||||
function displayAlert(alert){
|
||||
var text1 = document.getElementById('alertmain');
|
||||
text1.innerHTML = newtext;
|
||||
}
|
||||
|
||||
function startfade(newtext){
|
||||
var text1 = document.getElementById('lyricsmain');
|
||||
var texto1 = document.getElementById('lyricsoutline');
|
||||
@ -159,7 +164,7 @@ def build_html(item, screen, alert):
|
||||
build_image(width, height),
|
||||
build_lyrics(item),
|
||||
build_footer(item),
|
||||
build_alert(width, alert),
|
||||
build_alert(width, height, alert),
|
||||
build_image(width, height),
|
||||
build_blank(width, height),
|
||||
"true" if theme and theme.display_slideTransition else "false",
|
||||
@ -282,7 +287,6 @@ def build_lyrics(item):
|
||||
else:
|
||||
if theme.display_shadow:
|
||||
shadow = u'color: %s;' % (theme.display_shadow_color)
|
||||
|
||||
lyrics_html = style % (lyricscommon, lyricstable, outlinetable,
|
||||
shadowtable, lyrics, outline, shadow)
|
||||
print lyrics_html
|
||||
@ -319,9 +323,9 @@ def build_footer(item):
|
||||
return lyrics_html
|
||||
|
||||
|
||||
def build_alert(width, alertTab):#
|
||||
def build_alert(width, height, alertTab):#
|
||||
style = """
|
||||
.alertcommon { position: absolute; %s }
|
||||
.alertcommon { position: absolute; %s }
|
||||
.alerttable { z-index:8; %s }
|
||||
.alert { %s }
|
||||
table {border=0; margin=0; padding=0; }
|
||||
@ -332,7 +336,7 @@ def build_alert(width, alertTab):#
|
||||
if alertTab:
|
||||
alertcommon = u'width: %spx; height: %spx; ' \
|
||||
u'font-family %s; font-size: %spx; color: %s; ' % \
|
||||
(width, 70, alertTab.font_face, alertTab.font_size,
|
||||
(width, height, alertTab.font_face, alertTab.font_size,
|
||||
alertTab.bg_color)
|
||||
alerttable = u'left: %spx; top: %spx;' % (0, 0)
|
||||
if alertTab.location == 2:
|
||||
|
@ -38,7 +38,8 @@ class GeneralTab(SettingsTab):
|
||||
"""
|
||||
self.screens = screens
|
||||
self.monitorNumber = 0
|
||||
self.overrideChanged = False
|
||||
# Set to true to allow PostSetUp to work first time
|
||||
self.overrideChanged = True
|
||||
SettingsTab.__init__(self, u'General')
|
||||
|
||||
def preLoad(self):
|
||||
@ -414,7 +415,6 @@ class GeneralTab(SettingsTab):
|
||||
self.customYValueEdit.setEnabled(self.overrideCheckBox.isChecked())
|
||||
self.customHeightValueEdit.setEnabled(self.overrideCheckBox.isChecked())
|
||||
self.customWidthValueEdit.setEnabled(self.overrideCheckBox.isChecked())
|
||||
self.overrideChanged = False
|
||||
|
||||
def save(self):
|
||||
"""
|
||||
@ -436,10 +436,10 @@ class GeneralTab(SettingsTab):
|
||||
QtCore.QVariant(self.saveCheckServiceCheckBox.isChecked()))
|
||||
settings.setValue(u'auto preview',
|
||||
QtCore.QVariant(self.autoPreviewCheckBox.isChecked()))
|
||||
settings.setValue(u'loop delay',
|
||||
settings.setValue(u'loop delay',
|
||||
QtCore.QVariant(self.timeoutSpinBox.value()))
|
||||
Receiver.send_message(u'slidecontroller_live_spin_delay',
|
||||
self.timeoutSpinBox.value())
|
||||
self.timeoutSpinBox.value())
|
||||
settings.setValue(u'ccli number',
|
||||
QtCore.QVariant(self.numberEdit.displayText()))
|
||||
settings.setValue(u'songselect username',
|
||||
@ -458,7 +458,7 @@ class GeneralTab(SettingsTab):
|
||||
QtCore.QVariant(self.overrideCheckBox.isChecked()))
|
||||
settings.endGroup()
|
||||
self.screens.display = self.displayOnMonitorCheck.isChecked()
|
||||
#Monitor Number has changed.
|
||||
# Monitor Number has changed.
|
||||
if self.screens.monitor_number != self.monitorNumber:
|
||||
self.screens.monitor_number = self.monitorNumber
|
||||
self.screens.set_current_display(self.monitorNumber)
|
||||
@ -466,6 +466,7 @@ class GeneralTab(SettingsTab):
|
||||
Receiver.send_message(u'config_updated')
|
||||
# On save update the screens as well
|
||||
self.postSetUp()
|
||||
self.overrideChanged = False
|
||||
|
||||
def postSetUp(self):
|
||||
"""
|
||||
|
@ -175,7 +175,8 @@ class MainDisplay(DisplayWidget):
|
||||
The slide text to be displayed
|
||||
"""
|
||||
log.debug(u'alert')
|
||||
self.frame.findFirstElement('td#alertmain').setInnerXml(text)
|
||||
self.frame.evaluateJavaScript("displayAlert('" +
|
||||
text.replace("\\", "\\\\").replace("\'", "\\\'") + "')")
|
||||
|
||||
def image(self, image):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user