Some fixes for autoplay

This commit is contained in:
Dmitriy Marmyshev 2012-11-13 12:11:49 +04:00
parent d5a4cbd900
commit 4af902e74d

View File

@ -315,11 +315,11 @@ class ServiceManager(QtGui.QWidget):
translate('OpenLP.ServiceManager', '&Auto play slides')) translate('OpenLP.ServiceManager', '&Auto play slides'))
self.menu.addMenu(self.AutoPlaySlidesGroup) self.menu.addMenu(self.AutoPlaySlidesGroup)
self.AutoPlaySlidesLoop = create_widget_action(self.AutoPlaySlidesGroup, self.AutoPlaySlidesLoop = create_widget_action(self.AutoPlaySlidesGroup,
text=translate('OpenLP.ServiceManager', '&Auto play slides Loop'), text=translate('OpenLP.ServiceManager', 'Auto play slides &Loop'),
checked=False, checked=False,
triggers=self.toggleAutoPlaySlidesLoop) triggers=self.toggleAutoPlaySlidesLoop)
self.AutoPlaySlidesOnce = create_widget_action(self.AutoPlaySlidesGroup, self.AutoPlaySlidesOnce = create_widget_action(self.AutoPlaySlidesGroup,
text=translate('OpenLP.ServiceManager', '&Auto play slides once'), text=translate('OpenLP.ServiceManager', 'Auto play slides &Once'),
checked=False, checked=False,
triggers=self.toggleAutoPlaySlidesOnce) triggers=self.toggleAutoPlaySlidesOnce)
self.AutoPlaySlidesGroup.addSeparator() self.AutoPlaySlidesGroup.addSeparator()
@ -795,7 +795,7 @@ class ServiceManager(QtGui.QWidget):
.setChecked(serviceItem[u'service_item'].TimedSlideInterval > 0) .setChecked(serviceItem[u'service_item'].TimedSlideInterval > 0)
if serviceItem[u'service_item'].TimedSlideInterval > 0: if serviceItem[u'service_item'].TimedSlideInterval > 0:
DelaySuffix = u' ' DelaySuffix = u' '
DelaySuffix += str(serviceItem[u'service_item'].TimedSlideInterval) DelaySuffix += unicode(serviceItem[u'service_item'].TimedSlideInterval)
DelaySuffix += u' s' DelaySuffix += u' s'
else: else:
DelaySuffix = u' ...' DelaySuffix = u' ...'
@ -886,9 +886,9 @@ class ServiceManager(QtGui.QWidget):
else: else:
TimedSlideInterval = service_item.TimedSlideInterval TimedSlideInterval = service_item.TimedSlideInterval
TimedSlideInterval, ok = QtGui.QInputDialog.getInteger(self, TimedSlideInterval, ok = QtGui.QInputDialog.getInteger(self,
self.tr(translate('OpenLP.ServiceManager', 'Inpunt delay')), translate('OpenLP.ServiceManager', 'Input delay'),
self.tr(translate('OpenLP.ServiceManager', translate('OpenLP.ServiceManager',
'Delay between slides in seconds.')), TimedSlideInterval, 0, 180, 1) 'Delay between slides in seconds.'), TimedSlideInterval, 0, 180, 1)
if ok: if ok:
service_item.TimedSlideInterval = TimedSlideInterval service_item.TimedSlideInterval = TimedSlideInterval
if service_item.TimedSlideInterval <> 0\ if service_item.TimedSlideInterval <> 0\
@ -1406,7 +1406,6 @@ class ServiceManager(QtGui.QWidget):
NextItem = self.serviceManagerList.topLevelItem(item) NextItem = self.serviceManagerList.topLevelItem(item)
self.serviceManagerList.setCurrentItem(NextItem) self.serviceManagerList.setCurrentItem(NextItem)
self.mainwindow.liveController.previewListWidget.setFocus() self.mainwindow.liveController.previewListWidget.setFocus()
self.mainwindow.liveController.onToggleLoop()
else: else:
critical_error_message_box( critical_error_message_box(
translate('OpenLP.ServiceManager', 'Missing Display Handler'), translate('OpenLP.ServiceManager', 'Missing Display Handler'),