Plugin Clean up for trying to display non selected items 2

This commit is contained in:
Tim Bentley 2009-09-01 06:17:32 +01:00
parent 3ba22197dd
commit 20303b1812
4 changed files with 3 additions and 24 deletions

View File

@ -33,7 +33,7 @@ filename=u'openlp.log'
log = logging.getLogger()
log.setLevel(logging.INFO)
logfile = logging.handlers.TimedRotatingFileHandler(filename , 'midnight', 1, backupCount=5)
logfile = logging.handlers.RotatingFileHandler(filename ,maxBytes=200000, backupCount=5)
logfile.setLevel(logging.DEBUG)
logfile.setFormatter(logging.Formatter(u'%(asctime)s %(name)-15s %(levelname)-8s %(message)s'))

View File

@ -341,7 +341,7 @@ class BibleMediaItem(MediaManagerItem):
def generateSlideData(self, service_item):
log.debug(u'generating slide data')
items = self.ListView.selectedIndexes()
if len(items) > 1:
if len(items) ==0:
return False
old_chapter = u''
raw_slides = []

View File

@ -143,27 +143,6 @@ class CustomMediaItem(MediaManagerItem):
row = self.ListView.row(item)
self.ListView.takeItem(row)
# def onCustomPreviewClick(self):
# log.debug(u'Custom Preview Requested')
# service_item = ServiceItem(self.parent)
# service_item.addIcon(u':/media/media_song.png')
# self.generateSlideData(service_item)
# self.parent.preview_controller.addServiceItem(service_item)
#
# def onCustomLiveClick(self):
# log.debug(u'Custom Live Requested')
# service_item = ServiceItem(self.parent)
# service_item.addIcon(u':/media/media_song.png')
# self.generateSlideData(service_item)
# self.parent.live_controller.addServiceItem(service_item)
#
# def onCustomAddClick(self):
# log.debug(u'Custom Add Requested')
# service_item = ServiceItem(self.parent)
# service_item.addIcon(u':/media/media_song.png')
# self.generateSlideData(service_item)
# self.parent.service_manager.addServiceItem(service_item)
def generateSlideData(self, service_item):
raw_slides =[]
raw_footer = []

View File

@ -95,7 +95,7 @@ class ImageMediaItem(MediaManagerItem):
def generateSlideData(self, service_item):
items = self.ListView.selectedIndexes()
if len(items) > 1:
if len(items) == 0:
return False
service_item.title = u'Image(s)'
for item in items: