forked from openlp/openlp
Fix song editing error messages
bzr-revno: 654
This commit is contained in:
commit
4e9aa7f142
@ -24,7 +24,6 @@
|
|||||||
|
|
||||||
import types
|
import types
|
||||||
import os
|
import os
|
||||||
import uuid
|
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
@ -113,6 +112,7 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
if title is not None:
|
if title is not None:
|
||||||
self.title = title
|
self.title = title
|
||||||
self.Toolbar = None
|
self.Toolbar = None
|
||||||
|
self.remoteTriggered = None
|
||||||
self.ServiceItemIconName = None
|
self.ServiceItemIconName = None
|
||||||
self.PageLayout = QtGui.QVBoxLayout(self)
|
self.PageLayout = QtGui.QVBoxLayout(self)
|
||||||
self.PageLayout.setSpacing(0)
|
self.PageLayout.setSpacing(0)
|
||||||
@ -358,13 +358,13 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
u'to be defined by the plugin')
|
u'to be defined by the plugin')
|
||||||
|
|
||||||
def onPreviewClick(self):
|
def onPreviewClick(self):
|
||||||
if not self.ListView.selectedIndexes():
|
if not self.ListView.selectedIndexes() and not self.remoteTriggered:
|
||||||
QtGui.QMessageBox.information(self,
|
QtGui.QMessageBox.information(self,
|
||||||
self.trUtf8(u'No items selected...'),
|
self.trUtf8(u'No items selected...'),
|
||||||
self.trUtf8(u'You must select one or more items'))
|
self.trUtf8(u'You must select one or more items'))
|
||||||
log.debug(self.PluginNameShort + u' Preview Requested')
|
log.debug(self.PluginNameShort + u' Preview Requested')
|
||||||
service_item = self.buildServiceItem()
|
service_item = self.buildServiceItem()
|
||||||
if service_item is not None:
|
if service_item:
|
||||||
service_item.fromPlugin = True
|
service_item.fromPlugin = True
|
||||||
self.parent.preview_controller.addServiceItem(service_item)
|
self.parent.preview_controller.addServiceItem(service_item)
|
||||||
|
|
||||||
@ -375,21 +375,20 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
self.trUtf8(u'You must select one or more items'))
|
self.trUtf8(u'You must select one or more items'))
|
||||||
log.debug(self.PluginNameShort + u' Live Requested')
|
log.debug(self.PluginNameShort + u' Live Requested')
|
||||||
service_item = self.buildServiceItem()
|
service_item = self.buildServiceItem()
|
||||||
if service_item is not None:
|
if service_item:
|
||||||
service_item.fromPlugin = True
|
service_item.fromPlugin = True
|
||||||
service_item.uuid = unicode(uuid.uuid1())
|
service_item.uuid = unicode(uuid.uuid1())
|
||||||
self.parent.live_controller.addServiceItem(service_item)
|
self.parent.live_controller.addServiceItem(service_item)
|
||||||
|
|
||||||
def onAddClick(self):
|
def onAddClick(self):
|
||||||
if not self.ListView.selectedIndexes():
|
if not self.ListView.selectedIndexes() and not self.remoteTriggered:
|
||||||
QtGui.QMessageBox.information(self,
|
QtGui.QMessageBox.information(self,
|
||||||
self.trUtf8(u'No items selected...'),
|
self.trUtf8(u'No items selected...'),
|
||||||
self.trUtf8(u'You must select one or more items'))
|
self.trUtf8(u'You must select one or more items'))
|
||||||
log.debug(self.PluginNameShort + u' Add Requested')
|
log.debug(self.PluginNameShort + u' Add Requested')
|
||||||
service_item = self.buildServiceItem()
|
service_item = self.buildServiceItem()
|
||||||
if service_item is not None:
|
if service_item:
|
||||||
service_item.fromPlugin = False
|
service_item.fromPlugin = False
|
||||||
service_item.uuid = unicode(uuid.uuid1())
|
|
||||||
self.parent.service_manager.addServiceItem(service_item)
|
self.parent.service_manager.addServiceItem(service_item)
|
||||||
|
|
||||||
def buildServiceItem(self):
|
def buildServiceItem(self):
|
||||||
@ -397,7 +396,7 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
Common method for generating a service item
|
Common method for generating a service item
|
||||||
"""
|
"""
|
||||||
service_item = ServiceItem(self.parent)
|
service_item = ServiceItem(self.parent)
|
||||||
if self.ServiceItemIconName is not None:
|
if self.ServiceItemIconName:
|
||||||
service_item.addIcon(self.ServiceItemIconName)
|
service_item.addIcon(self.ServiceItemIconName)
|
||||||
else:
|
else:
|
||||||
service_item.addIcon(
|
service_item.addIcon(
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
import uuid
|
||||||
|
|
||||||
from PyQt4 import QtGui
|
from PyQt4 import QtGui
|
||||||
|
|
||||||
@ -73,6 +74,7 @@ class ServiceItem(object):
|
|||||||
self.service_item_type = None
|
self.service_item_type = None
|
||||||
self.editEnabled = False
|
self.editEnabled = False
|
||||||
self.service_frames = []
|
self.service_frames = []
|
||||||
|
self.uuid = unicode(uuid.uuid1())
|
||||||
|
|
||||||
def addIcon(self, icon):
|
def addIcon(self, icon):
|
||||||
"""
|
"""
|
||||||
|
@ -55,7 +55,6 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
self.parent.songmanager, self)
|
self.parent.songmanager, self)
|
||||||
#Holds information about whether the edit is remotly triggered and which
|
#Holds information about whether the edit is remotly triggered and which
|
||||||
#Song is required.
|
#Song is required.
|
||||||
self.remoteTriggered = None
|
|
||||||
self.remoteSong = -1
|
self.remoteSong = -1
|
||||||
|
|
||||||
def initPluginNameVisible(self):
|
def initPluginNameVisible(self):
|
||||||
@ -180,7 +179,6 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
def displayResultsSong(self, searchresults):
|
def displayResultsSong(self, searchresults):
|
||||||
log.debug(u'display results Song')
|
log.debug(u'display results Song')
|
||||||
self.ListView.clear()
|
self.ListView.clear()
|
||||||
#log.debug(u'Records returned from search %s", len(searchresults))
|
|
||||||
for song in searchresults:
|
for song in searchresults:
|
||||||
author_list = u''
|
author_list = u''
|
||||||
for author in song.authors:
|
for author in song.authors:
|
||||||
|
@ -1 +1 @@
|
|||||||
1.9.0-653
|
1.9.0-654
|
||||||
|
Loading…
Reference in New Issue
Block a user