forked from openlp/openlp
Minor fixes and copyright
bzr-revno: 649
This commit is contained in:
commit
29119c91a4
@ -35,6 +35,10 @@ class DisplayLabel(QtGui.QWidget):
|
||||
Customised version of QTableWidget which can respond to keyboard
|
||||
events.
|
||||
"""
|
||||
global log
|
||||
log = logging.getLogger(u'MainDisplay')
|
||||
log.info(u'MainDisplay loaded')
|
||||
|
||||
def __init__(self, parent=None, name=None):
|
||||
QQtGui.QWidget.__init__(self, parent)
|
||||
self.parent = parent
|
||||
@ -250,6 +254,8 @@ class MainDisplay(DisplayLabel):
|
||||
self.timer_id = 0
|
||||
|
||||
def onMediaQueue(self, message):
|
||||
log.debug(u'Queue new media message %s' % message)
|
||||
self.display.close()
|
||||
file = os.path.join(message[1], message[2])
|
||||
if self.firstTime:
|
||||
self.mediaObject.setCurrentSource(Phonon.MediaSource(file))
|
||||
@ -259,6 +265,7 @@ class MainDisplay(DisplayLabel):
|
||||
self.onMediaPlay()
|
||||
|
||||
def onMediaPlay(self):
|
||||
log.debug(u'Play the new media')
|
||||
if not self.mediaLoaded and not self.displayBlank:
|
||||
self.blankDisplay()
|
||||
self.firstTime = True
|
||||
@ -268,6 +275,7 @@ class MainDisplay(DisplayLabel):
|
||||
self.setVisible(True)
|
||||
|
||||
def onMediaPaws(self):
|
||||
log.debug(u'Pause the new media')
|
||||
self.mediaObject.pause()
|
||||
|
||||
def onMediaStop(self):
|
||||
@ -275,6 +283,11 @@ class MainDisplay(DisplayLabel):
|
||||
self.display.show()
|
||||
|
||||
def onMediaFinish(self):
|
||||
<<<<<<< TREE
|
||||
log.debug(u'Finish playing media')
|
||||
self.setVisible(False)
|
||||
=======
|
||||
>>>>>>> MERGE-SOURCE
|
||||
self.mediaObject.stop()
|
||||
self.mediaObject.clearQueue()
|
||||
self.mediaLoaded = False
|
||||
|
@ -85,35 +85,9 @@ class MediaMediaItem(MediaManagerItem):
|
||||
filename = unicode((bitem.data(QtCore.Qt.UserRole)).toString())
|
||||
frame = u':/media/media_video.png'
|
||||
(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)
|
||||
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):
|
||||
self.ListView.setSelectionMode(
|
||||
QtGui.QAbstractItemView.ExtendedSelection)
|
||||
|
@ -469,7 +469,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
||||
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'')
|
||||
|
@ -1 +1 @@
|
||||
1.9.0-646
|
||||
1.9.0-649
|
||||
|
Loading…
Reference in New Issue
Block a user