openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #00786
[Merge] lp:~trb143/openlp/fixes into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/fixes into lp:openlp.
Requested reviews:
Jon Tibble (meths)
Fix remote song editing generation of error messages
--
https://code.launchpad.net/~trb143/openlp/fixes/+merge/14433
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py 2009-11-03 01:12:35 +0000
+++ openlp/core/lib/mediamanageritem.py 2009-11-04 18:15:24 +0000
@@ -24,7 +24,6 @@
import types
import os
-import uuid
from PyQt4 import QtCore, QtGui
@@ -113,6 +112,7 @@
if title is not None:
self.title = title
self.Toolbar = None
+ self.remoteTriggered = None
self.ServiceItemIconName = None
self.PageLayout = QtGui.QVBoxLayout(self)
self.PageLayout.setSpacing(0)
@@ -358,13 +358,13 @@
u'to be defined by the plugin')
def onPreviewClick(self):
- if not self.ListView.selectedIndexes():
+ if not self.ListView.selectedIndexes() and not self.remoteTriggered:
QtGui.QMessageBox.information(self,
self.trUtf8(u'No items selected...'),
self.trUtf8(u'You must select one or more items'))
log.debug(self.PluginNameShort + u' Preview Requested')
service_item = self.buildServiceItem()
- if service_item is not None:
+ if service_item:
service_item.fromPlugin = True
self.parent.preview_controller.addServiceItem(service_item)
@@ -375,21 +375,20 @@
self.trUtf8(u'You must select one or more items'))
log.debug(self.PluginNameShort + u' Live Requested')
service_item = self.buildServiceItem()
- if service_item is not None:
+ if service_item:
service_item.fromPlugin = True
service_item.uuid = unicode(uuid.uuid1())
self.parent.live_controller.addServiceItem(service_item)
def onAddClick(self):
- if not self.ListView.selectedIndexes():
+ if not self.ListView.selectedIndexes() and not self.remoteTriggered:
QtGui.QMessageBox.information(self,
self.trUtf8(u'No items selected...'),
self.trUtf8(u'You must select one or more items'))
log.debug(self.PluginNameShort + u' Add Requested')
service_item = self.buildServiceItem()
- if service_item is not None:
+ if service_item:
service_item.fromPlugin = False
- service_item.uuid = unicode(uuid.uuid1())
self.parent.service_manager.addServiceItem(service_item)
def buildServiceItem(self):
@@ -397,7 +396,7 @@
Common method for generating a service item
"""
service_item = ServiceItem(self.parent)
- if self.ServiceItemIconName is not None:
+ if self.ServiceItemIconName:
service_item.addIcon(self.ServiceItemIconName)
else:
service_item.addIcon(
=== modified file 'openlp/core/lib/serviceitem.py'
--- openlp/core/lib/serviceitem.py 2009-11-01 16:06:59 +0000
+++ openlp/core/lib/serviceitem.py 2009-11-04 18:15:24 +0000
@@ -25,6 +25,7 @@
import logging
import os
import time
+import uuid
from PyQt4 import QtGui
@@ -73,6 +74,7 @@
self.service_item_type = None
self.editEnabled = False
self.service_frames = []
+ self.uuid = unicode(uuid.uuid1())
def addIcon(self, icon):
"""
=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py 2009-11-03 06:15:35 +0000
+++ openlp/plugins/songs/lib/mediaitem.py 2009-11-04 18:15:24 +0000
@@ -55,7 +55,6 @@
self.parent.songmanager, self)
#Holds information about whether the edit is remotly triggered and which
#Song is required.
- self.remoteTriggered = None
self.remoteSong = -1
def initPluginNameVisible(self):
@@ -180,7 +179,6 @@
def displayResultsSong(self, searchresults):
log.debug(u'display results Song')
self.ListView.clear()
- #log.debug(u'Records returned from search %s", len(searchresults))
for song in searchresults:
author_list = u''
for author in song.authors:
References