renaming varables

This commit is contained in:
Dmitriy Marmyshev 2013-01-16 02:17:55 +04:00
parent daf1887ab9
commit 0c18fcad88

View File

@ -257,16 +257,16 @@ class ServiceManager(QtGui.QWidget):
icon=u':/general/general_edit.png', triggers=self.create_custom) icon=u':/general/general_edit.png', triggers=self.create_custom)
self.menu.addSeparator() self.menu.addSeparator()
# Add AutoPlay menu actions # Add AutoPlay menu actions
self.AutoPlaySlidesGroup = QtGui.QMenu(translate('OpenLP.ServiceManager', '&Auto play slides')) self.autoPlaySlidesGroup = QtGui.QMenu(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, triggers=self.toggleAutoPlaySlidesLoop) checked=False, 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, triggers=self.toggleAutoPlaySlidesOnce) checked=False, triggers=self.toggleAutoPlaySlidesOnce)
self.AutoPlaySlidesGroup.addSeparator() self.autoPlaySlidesGroup.addSeparator()
self.TimedSlideInterval = create_widget_action(self.AutoPlaySlidesGroup, self.TimedSlideInterval = create_widget_action(self.autoPlaySlidesGroup,
text=translate('OpenLP.ServiceManager', '&Delay between slides'), text=translate('OpenLP.ServiceManager', '&Delay between slides'),
checked=False, triggers=self.onTimedSlideInterval) checked=False, triggers=self.onTimedSlideInterval)
self.menu.addSeparator() self.menu.addSeparator()
@ -781,20 +781,20 @@ class ServiceManager(QtGui.QWidget):
self.notesAction.setVisible(True) self.notesAction.setVisible(True)
if serviceItem[u'service_item'].is_capable(ItemCapabilities.CanLoop) and \ if serviceItem[u'service_item'].is_capable(ItemCapabilities.CanLoop) and \
len(serviceItem[u'service_item'].get_frames()) > 1: len(serviceItem[u'service_item'].get_frames()) > 1:
self.AutoPlaySlidesGroup.menuAction().setVisible(True) self.autoPlaySlidesGroup.menuAction().setVisible(True)
self.AutoPlaySlidesOnce.setChecked(serviceItem[u'service_item'].auto_play_slides_once) self.autoPlaySlidesOnce.setChecked(serviceItem[u'service_item'].auto_play_slides_once)
self.AutoPlaySlidesLoop.setChecked(serviceItem[u'service_item'].auto_play_slides_loop) self.autoPlaySlidesLoop.setChecked(serviceItem[u'service_item'].auto_play_slides_loop)
self.TimedSlideInterval.setChecked(serviceItem[u'service_item'].timed_slide_interval > 0) self.timedSlideInterval.setChecked(serviceItem[u'service_item'].timed_slide_interval > 0)
if serviceItem[u'service_item'].timed_slide_interval > 0: if serviceItem[u'service_item'].timed_slide_interval > 0:
delay_suffix = u' ' delay_suffix = u' '
delay_suffix += unicode(serviceItem[u'service_item'].timed_slide_interval) delay_suffix += unicode(serviceItem[u'service_item'].timed_slide_interval)
delay_suffix += u' s' delay_suffix += u' s'
else: else:
delay_suffix = u' ...' delay_suffix = u' ...'
self.TimedSlideInterval.setText(translate('OpenLP.ServiceManager', '&Delay between slides') + delay_suffix) self.timedSlideInterval.setText(translate('OpenLP.ServiceManager', '&Delay between slides') + delay_suffix)
# TODO for future: make group explains itself more visually # TODO for future: make group explains itself more visually
else: else:
self.AutoPlaySlidesGroup.menuAction().setVisible(False) self.autoPlaySlidesGroup.menuAction().setVisible(False)
if serviceItem[u'service_item'].is_capable(ItemCapabilities.HasVariableStartTime): if serviceItem[u'service_item'].is_capable(ItemCapabilities.HasVariableStartTime):
self.timeAction.setVisible(True) self.timeAction.setVisible(True)
if serviceItem[u'service_item'].is_capable(ItemCapabilities.CanAutoStartForLive): if serviceItem[u'service_item'].is_capable(ItemCapabilities.CanAutoStartForLive):
@ -850,7 +850,7 @@ class ServiceManager(QtGui.QWidget):
service_item.auto_play_slides_once = not service_item.auto_play_slides_once service_item.auto_play_slides_once = not service_item.auto_play_slides_once
if service_item.auto_play_slides_once: if service_item.auto_play_slides_once:
service_item.auto_play_slides_loop = False service_item.auto_play_slides_loop = False
self.AutoPlaySlidesLoop.setChecked(False) self.autoPlaySlidesLoop.setChecked(False)
if service_item.auto_play_slides_once and service_item.timed_slide_interval == 0: if service_item.auto_play_slides_once and service_item.timed_slide_interval == 0:
service_item.timed_slide_interval = Settings().value(u'loop delay', 5) service_item.timed_slide_interval = Settings().value(u'loop delay', 5)
self.setModified() self.setModified()
@ -864,7 +864,7 @@ class ServiceManager(QtGui.QWidget):
service_item.auto_play_slides_loop = not service_item.auto_play_slides_loop service_item.auto_play_slides_loop = not service_item.auto_play_slides_loop
if service_item.auto_play_slides_loop: if service_item.auto_play_slides_loop:
service_item.auto_play_slides_once = False service_item.auto_play_slides_once = False
self.AutoPlaySlidesOnce.setChecked(False) self.autoPlaySlidesOnce.setChecked(False)
if service_item.auto_play_slides_loop and service_item.timed_slide_interval == 0: if service_item.auto_play_slides_loop and service_item.timed_slide_interval == 0:
service_item.timed_slide_interval = Settings().value(u'loop delay', 5) service_item.timed_slide_interval = Settings().value(u'loop delay', 5)
self.setModified() self.setModified()