forked from openlp/openlp
Fixes from last few merges
This commit is contained in:
parent
e96f54758d
commit
8751433da8
@ -35,6 +35,10 @@ class DisplayLabel(QtGui.QWidget):
|
|||||||
Customised version of QTableWidget which can respond to keyboard
|
Customised version of QTableWidget which can respond to keyboard
|
||||||
events.
|
events.
|
||||||
"""
|
"""
|
||||||
|
global log
|
||||||
|
log = logging.getLogger(u'MainDisplay')
|
||||||
|
log.info(u'MainDisplay loaded')
|
||||||
|
|
||||||
def __init__(self, parent=None, name=None):
|
def __init__(self, parent=None, name=None):
|
||||||
QQtGui.QWidget.__init__(self, parent)
|
QQtGui.QWidget.__init__(self, parent)
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
@ -245,6 +249,7 @@ class MainDisplay(DisplayLabel):
|
|||||||
self.timer_id = 0
|
self.timer_id = 0
|
||||||
|
|
||||||
def onMediaQueue(self, message):
|
def onMediaQueue(self, message):
|
||||||
|
log.debug(u'Queue new media message %s' % message)
|
||||||
self.display.close()
|
self.display.close()
|
||||||
file = os.path.join(message[1], message[2])
|
file = os.path.join(message[1], message[2])
|
||||||
if self.firstTime:
|
if self.firstTime:
|
||||||
@ -255,14 +260,17 @@ class MainDisplay(DisplayLabel):
|
|||||||
self.onMediaPlay()
|
self.onMediaPlay()
|
||||||
|
|
||||||
def onMediaPlay(self):
|
def onMediaPlay(self):
|
||||||
|
log.debug(u'Play the new media')
|
||||||
self.display.hide()
|
self.display.hide()
|
||||||
self.mediaObject.play()
|
self.mediaObject.play()
|
||||||
self.setVisible(True)
|
self.setVisible(True)
|
||||||
|
|
||||||
def onMediaPaws(self):
|
def onMediaPaws(self):
|
||||||
|
log.debug(u'Pause the new media')
|
||||||
self.mediaObject.pause()
|
self.mediaObject.pause()
|
||||||
|
|
||||||
def onMediaFinish(self):
|
def onMediaFinish(self):
|
||||||
|
log.debug(u'Finish playing media')
|
||||||
self.setVisible(False)
|
self.setVisible(False)
|
||||||
self.mediaObject.stop()
|
self.mediaObject.stop()
|
||||||
self.mediaObject.clearQueue()
|
self.mediaObject.clearQueue()
|
||||||
|
@ -88,35 +88,9 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
filename = unicode((bitem.data(QtCore.Qt.UserRole)).toString())
|
filename = unicode((bitem.data(QtCore.Qt.UserRole)).toString())
|
||||||
frame = u':/media/media_video.png'
|
frame = u':/media/media_video.png'
|
||||||
(path, name) = os.path.split(filename)
|
(path, name) = os.path.split(filename)
|
||||||
#service_item.add_from_image(path, name, frame)
|
|
||||||
print path
|
|
||||||
print name
|
|
||||||
service_item.add_from_command(path, name, frame)
|
service_item.add_from_command(path, name, frame)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# def onPreviewClick(self):
|
|
||||||
# log.debug(u'Media Preview Button pressed')
|
|
||||||
# items = self.ListView.selectedIndexes()
|
|
||||||
# for item in items:
|
|
||||||
# baseItem = self.ListView.item(item.row())
|
|
||||||
# itemText = unicode(baseItem.data(QtCore.Qt.UserRole).toString())
|
|
||||||
# print itemText
|
|
||||||
#
|
|
||||||
# def onLiveClick(self):
|
|
||||||
# log.debug(u'Media Live Button pressed')
|
|
||||||
# items = self.ListView.selectedIndexes()
|
|
||||||
# if len(items) > 0:
|
|
||||||
# firstPass = True
|
|
||||||
# for item in items:
|
|
||||||
# baseItem = self.ListView.item(item.row())
|
|
||||||
# filename = unicode(baseItem.data(QtCore.Qt.UserRole).toString())
|
|
||||||
# if firstPass:
|
|
||||||
# self.MainDisplay.queueMedia(filename, firstPass)
|
|
||||||
# firstPass = False
|
|
||||||
# else:
|
|
||||||
# self.MainDisplay.queueMedia(filename, firstPass)
|
|
||||||
# self.MainDisplay.playMedia()
|
|
||||||
|
|
||||||
def initialise(self):
|
def initialise(self):
|
||||||
self.ListView.setSelectionMode(
|
self.ListView.setSelectionMode(
|
||||||
QtGui.QAbstractItemView.ExtendedSelection)
|
QtGui.QAbstractItemView.ExtendedSelection)
|
||||||
|
@ -469,7 +469,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
log.debug(u'processTitle')
|
log.debug(u'processTitle')
|
||||||
self.song.search_title = self.song.search_title.replace(u'\'', u'')
|
self.song.search_title = self.song.search_title.replace(u'\'', u'')
|
||||||
self.song.search_title = self.song.search_title.replace(u'\"', u'')
|
self.song.search_title = self.song.search_title.replace(u'\"', u'')
|
||||||
self.song.search_title = self.song.search_title.replace(u'\`', u'')
|
self.song.search_title = self.song.search_title.replace(u'`', u'')
|
||||||
self.song.search_title = self.song.search_title.replace(u',', u'')
|
self.song.search_title = self.song.search_title.replace(u',', u'')
|
||||||
self.song.search_title = self.song.search_title.replace(u';', u'')
|
self.song.search_title = self.song.search_title.replace(u';', u'')
|
||||||
self.song.search_title = self.song.search_title.replace(u':', u'')
|
self.song.search_title = self.song.search_title.replace(u':', u'')
|
||||||
|
Loading…
Reference in New Issue
Block a user