openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #10694
[Merge] lp:~smpettit/openlp/loop-icons into lp:openlp
Stevan Pettit has proposed merging lp:~smpettit/openlp/loop-icons into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~smpettit/openlp/loop-icons/+merge/67219
Modified slidecontroller to change loop button icons and captions when user select a loop to run.
Lines 1060-1061 and 1081-1082 cover the case if the user uses the dropdown to change the loop type (continuous or once)
Added the translated button captions to ui.py
--
https://code.launchpad.net/~smpettit/openlp/loop-icons/+merge/67219
Your team OpenLP Core is requested to review the proposed merge of lp:~smpettit/openlp/loop-icons into lp:openlp.
=== modified file 'openlp/core/lib/ui.py'
--- openlp/core/lib/ui.py 2011-06-29 06:53:15 +0000
+++ openlp/core/lib/ui.py 2011-07-07 16:27:47 +0000
@@ -103,6 +103,8 @@
self.OpenLPStart = translate('OpenLP.Ui', 'OpenLP is already running. '
'Do you wish to continue?')
self.OpenService = translate('OpenLP.Ui', 'Open service.')
+ self.PlaySlidesInLoop = translate('OpenLP.Ui','Play Slides in Loop')
+ self.PlaySlidesToEnd = translate('OpenLP.Ui','Play Slides to End')
self.Preview = translate('OpenLP.Ui', 'Preview')
self.PrintService = translate('OpenLP.Ui', 'Print Service')
self.ReplaceBG = translate('OpenLP.Ui', 'Replace Background')
@@ -124,6 +126,8 @@
self.SplitToolTip = translate('OpenLP.Ui', 'Split a slide into two '
'only if it does not fit on the screen as one slide.')
self.StartTimeCode = unicode(translate('OpenLP.Ui', 'Start %s'))
+ self.StopPlaySlidesInLoop = translate('OpenLP.Ui','Stop Play Slides in Loop')
+ self.StopPlaySlidesToEnd = translate('OpenLP.Ui','Stop Play Slides to End')
self.Theme = translate('OpenLP.Ui', 'Theme', 'Singular')
self.Themes = translate('OpenLP.Ui', 'Themes', 'Plural')
self.Tools = translate('OpenLP.Ui', 'Tools')
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py 2011-06-24 06:53:56 +0000
+++ openlp/core/ui/slidecontroller.py 2011-07-07 16:27:47 +0000
@@ -193,13 +193,11 @@
self.playSlidesLoop = shortcut_action(self.playSlidesMenu,
u'playSlidesLoop', [], self.onPlaySlidesLoop,
u':/media/media_time.png', False, UiStrings().LiveToolbar)
- self.playSlidesLoop.setText(
- translate('OpenLP.SlideController', 'Play Slides in Loop'))
+ self.playSlidesLoop.setText(UiStrings().PlaySlidesInLoop)
self.playSlidesOnce = shortcut_action(self.playSlidesMenu,
u'playSlidesOnce', [], self.onPlaySlidesOnce,
u':/media/media_time.png', False, UiStrings().LiveToolbar)
- self.playSlidesOnce.setText(
- translate('OpenLP.SlideController', 'Play Slides to End'))
+ self.playSlidesOnce.setText(UiStrings().PlaySlidesToEnd)
if QtCore.QSettings().value(self.parent().generalSettingsSection +
u'/enable slide loop', QtCore.QVariant(True)).toBool():
self.playSlidesMenu.setDefaultAction(self.playSlidesLoop)
@@ -1056,6 +1054,14 @@
else:
self.playSlidesLoop.setChecked(checked)
log.debug(u'onPlaySlidesLoop %s' % checked)
+ if checked:
+ self.playSlidesLoop.setIcon(QtGui.QIcon(u':/media/media_stop.png'))
+ self.playSlidesLoop.setText(UiStrings().StopPlaySlidesInLoop)
+ self.playSlidesOnce.setIcon(QtGui.QIcon(u':/media/media_time.png'))
+ self.playSlidesOnce.setText(UiStrings().PlaySlidesToEnd)
+ else:
+ self.playSlidesLoop.setIcon(QtGui.QIcon(u':/media/media_time.png'))
+ self.playSlidesLoop.setText(UiStrings().PlaySlidesInLoop)
self.playSlidesMenu.setDefaultAction(self.playSlidesLoop)
self.playSlidesOnce.setChecked(False)
self.onToggleLoop()
@@ -1069,6 +1075,14 @@
else:
self.playSlidesOnce.setChecked(checked)
log.debug(u'onPlaySlidesOnce %s' % checked)
+ if checked:
+ self.playSlidesOnce.setIcon(QtGui.QIcon(u':/media/media_stop.png'))
+ self.playSlidesOnce.setText(UiStrings().StopPlaySlidesToEnd)
+ self.playSlidesLoop.setIcon(QtGui.QIcon(u':/media/media_time.png'))
+ self.playSlidesLoop.setText(UiStrings().PlaySlidesInLoop)
+ else:
+ self.playSlidesOnce.setIcon(QtGui.QIcon(u':/media/media_time'))
+ self.playSlidesOnce.setText(UiStrings().PlaySlidesToEnd)
self.playSlidesMenu.setDefaultAction(self.playSlidesOnce)
self.playSlidesLoop.setChecked(False)
self.onToggleLoop()
Follow ups