forked from openlp/openlp
Song sequence, alert position and make OOo not invisible anymore
This commit is contained in:
parent
69478231e0
commit
f04964e073
@ -181,6 +181,7 @@ class MainDisplay(DisplayWidget):
|
|||||||
# Wait for the webview to update before displaying text.
|
# Wait for the webview to update before displaying text.
|
||||||
while not self.webLoaded:
|
while not self.webLoaded:
|
||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
|
self.setGeometry(self.screen[u'size'])
|
||||||
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'\\\"'))
|
||||||
return self.preview()
|
return self.preview()
|
||||||
@ -192,7 +193,7 @@ class MainDisplay(DisplayWidget):
|
|||||||
`slide`
|
`slide`
|
||||||
The slide text to be displayed
|
The slide text to be displayed
|
||||||
"""
|
"""
|
||||||
log.debug(u'alert to display')
|
log.debug(u'alert to display')
|
||||||
if self.height() != self.screen[u'size'].height() \
|
if self.height() != self.screen[u'size'].height() \
|
||||||
or not self.isVisible() or self.videoWidget.isVisible():
|
or not self.isVisible() or self.videoWidget.isVisible():
|
||||||
shrink = True
|
shrink = True
|
||||||
@ -208,12 +209,18 @@ class MainDisplay(DisplayWidget):
|
|||||||
else:
|
else:
|
||||||
shrinkItem = self
|
shrinkItem = self
|
||||||
if text:
|
if text:
|
||||||
shrinkItem.resize(self.width(), int(height.toString()))
|
alert_height = int(height.toString())
|
||||||
|
shrinkItem.resize(self.width(), alert_height)
|
||||||
shrinkItem.setVisible(True)
|
shrinkItem.setVisible(True)
|
||||||
|
if self.alertTab.location == 1:
|
||||||
|
shrinkItem.move(self.screen[u'size'].left(),
|
||||||
|
(self.screen[u'size'].height() - alert_height) / 2)
|
||||||
|
elif self.alertTab.location == 2:
|
||||||
|
shrinkItem.move(self.screen[u'size'].left(),
|
||||||
|
self.screen[u'size'].height() - alert_height)
|
||||||
else:
|
else:
|
||||||
shrinkItem.setVisible(False)
|
shrinkItem.setVisible(False)
|
||||||
shrinkItem.resize(self.screen[u'size'].width(),
|
self.setGeometry(self.screen[u'size'])
|
||||||
self.screen[u'size'].height())
|
|
||||||
|
|
||||||
def directImage(self, name, path):
|
def directImage(self, name, path):
|
||||||
"""
|
"""
|
||||||
@ -243,6 +250,7 @@ class MainDisplay(DisplayWidget):
|
|||||||
"""
|
"""
|
||||||
Display an image, as is.
|
Display an image, as is.
|
||||||
"""
|
"""
|
||||||
|
self.setGeometry(self.screen[u'size'])
|
||||||
if image:
|
if image:
|
||||||
js = u'show_image("data:image/png;base64,%s");' % image
|
js = u'show_image("data:image/png;base64,%s");' % image
|
||||||
else:
|
else:
|
||||||
@ -336,6 +344,7 @@ class MainDisplay(DisplayWidget):
|
|||||||
"""
|
"""
|
||||||
log.debug(u'video')
|
log.debug(u'video')
|
||||||
self.webLoaded = True
|
self.webLoaded = True
|
||||||
|
self.setGeometry(self.screen[u'size'])
|
||||||
# We are running a background theme
|
# We are running a background theme
|
||||||
self.override[u'theme'] = u''
|
self.override[u'theme'] = u''
|
||||||
self.override[u'video'] = True
|
self.override[u'video'] = True
|
||||||
|
@ -384,7 +384,7 @@ def get_uno_command():
|
|||||||
Returns the UNO command to launch an openoffice.org instance.
|
Returns the UNO command to launch an openoffice.org instance.
|
||||||
"""
|
"""
|
||||||
COMMAND = u'soffice'
|
COMMAND = u'soffice'
|
||||||
OPTIONS = u'-nologo -norestore -minimized -invisible -nofirststartwizard'
|
OPTIONS = u'-nologo -norestore -minimized -nofirststartwizard'
|
||||||
if UNO_CONNECTION_TYPE == u'pipe':
|
if UNO_CONNECTION_TYPE == u'pipe':
|
||||||
CONNECTION = u'"-accept=pipe,name=openlp_pipe;urp;"'
|
CONNECTION = u'"-accept=pipe,name=openlp_pipe;urp;"'
|
||||||
else:
|
else:
|
||||||
|
@ -166,20 +166,18 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
or_(Song.search_title.like(u'%' + self.whitespace.sub(u' ',
|
or_(Song.search_title.like(u'%' + self.whitespace.sub(u' ',
|
||||||
search_keywords.lower()) + u'%'),
|
search_keywords.lower()) + u'%'),
|
||||||
Song.search_lyrics.like(u'%' + search_keywords.lower() + u'%'),
|
Song.search_lyrics.like(u'%' + search_keywords.lower() + u'%'),
|
||||||
Song.comments.like(u'%' + search_keywords.lower() + u'%')),
|
Song.comments.like(u'%' + search_keywords.lower() + u'%')))
|
||||||
Song.search_title.asc())
|
|
||||||
self.displayResultsSong(search_results)
|
self.displayResultsSong(search_results)
|
||||||
elif search_type == SongSearch.Titles:
|
elif search_type == SongSearch.Titles:
|
||||||
log.debug(u'Titles Search')
|
log.debug(u'Titles Search')
|
||||||
search_results = self.parent.manager.get_all_objects(Song,
|
search_results = self.parent.manager.get_all_objects(Song,
|
||||||
Song.search_title.like(u'%' + self.whitespace.sub(u' ',
|
Song.search_title.like(u'%' + self.whitespace.sub(u' ',
|
||||||
search_keywords.lower()) + u'%'), Song.search_title.asc())
|
search_keywords.lower()) + u'%'))
|
||||||
self.displayResultsSong(search_results)
|
self.displayResultsSong(search_results)
|
||||||
elif search_type == SongSearch.Lyrics:
|
elif search_type == SongSearch.Lyrics:
|
||||||
log.debug(u'Lyrics Search')
|
log.debug(u'Lyrics Search')
|
||||||
search_results = self.parent.manager.get_all_objects(Song,
|
search_results = self.parent.manager.get_all_objects(Song,
|
||||||
Song.search_lyrics.like(u'%' + search_keywords.lower() + u'%'),
|
Song.search_lyrics.like(u'%' + search_keywords.lower() + u'%'))
|
||||||
Song.search_lyrics.asc())
|
|
||||||
self.displayResultsSong(search_results)
|
self.displayResultsSong(search_results)
|
||||||
elif search_type == SongSearch.Authors:
|
elif search_type == SongSearch.Authors:
|
||||||
log.debug(u'Authors Search')
|
log.debug(u'Authors Search')
|
||||||
@ -190,7 +188,7 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
elif search_type == SongSearch.Themes:
|
elif search_type == SongSearch.Themes:
|
||||||
log.debug(u'Theme Search')
|
log.debug(u'Theme Search')
|
||||||
search_results = self.parent.manager.get_all_objects(Song,
|
search_results = self.parent.manager.get_all_objects(Song,
|
||||||
Song.theme_name == search_keywords, Song.search_lyrics.asc())
|
Song.theme_name == search_keywords)
|
||||||
self.displayResultsSong(search_results)
|
self.displayResultsSong(search_results)
|
||||||
|
|
||||||
def onSongListLoad(self):
|
def onSongListLoad(self):
|
||||||
@ -461,4 +459,5 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
"""
|
"""
|
||||||
Locale aware collation of song titles
|
Locale aware collation of song titles
|
||||||
"""
|
"""
|
||||||
return locale.strcoll(unicode(song_1.title), unicode(song_2.title))
|
return locale.strcoll(unicode(song_1.title.lower()),
|
||||||
|
unicode(song_2.title.lower()))
|
||||||
|
Loading…
Reference in New Issue
Block a user