forked from openlp/openlp
Merge changes from trunk
This commit is contained in:
commit
f80eb74e62
@ -32,7 +32,7 @@ import os
|
||||
|
||||
from PyQt4 import QtCore
|
||||
from sqlalchemy import create_engine, MetaData
|
||||
from sqlalchemy.exceptions import InvalidRequestError
|
||||
from sqlalchemy.exc import InvalidRequestError
|
||||
from sqlalchemy.orm import scoped_session, sessionmaker
|
||||
|
||||
from openlp.core.utils import AppLocation, delete_file
|
||||
|
@ -140,14 +140,14 @@ class SlideController(QtGui.QWidget):
|
||||
self.previousItem = self.toolbar.addToolbarButton(
|
||||
translate('OpenLP.SlideController', 'Previous Slide'),
|
||||
u':/slides/slide_previous.png',
|
||||
translate('OpenLP.SlideController', 'Move to previous'),
|
||||
translate('OpenLP.SlideController', 'Move to previous.'),
|
||||
self.onSlideSelectedPrevious,
|
||||
shortcuts=[QtCore.Qt.Key_Up, QtCore.Qt.Key_PageUp],
|
||||
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
||||
self.nextItem = self.toolbar.addToolbarButton(
|
||||
translate('OpenLP.SlideController', 'Next Slide'),
|
||||
u':/slides/slide_next.png',
|
||||
translate('OpenLP.SlideController', 'Move to next'),
|
||||
translate('OpenLP.SlideController', 'Move to next.'),
|
||||
self.onSlideSelectedNext,
|
||||
shortcuts=[QtCore.Qt.Key_Down, QtCore.Qt.Key_PageDown],
|
||||
context=QtCore.Qt.WidgetWithChildrenShortcut)
|
||||
@ -214,39 +214,39 @@ class SlideController(QtGui.QWidget):
|
||||
self.toolbar.addToolbarWidget(u'Image SpinBox', self.delaySpinBox)
|
||||
self.delaySpinBox.setSuffix(UiStrings().Seconds)
|
||||
self.delaySpinBox.setToolTip(translate('OpenLP.SlideController',
|
||||
'Delay between slides in seconds'))
|
||||
'Delay between slides in seconds.'))
|
||||
else:
|
||||
self.toolbar.addToolbarButton(
|
||||
# Does not need translating - control string.
|
||||
u'Go Live', u':/general/general_live.png',
|
||||
translate('OpenLP.SlideController', 'Move to live'),
|
||||
translate('OpenLP.SlideController', 'Move to live.'),
|
||||
self.onGoLive)
|
||||
self.toolbar.addToolbarButton(
|
||||
# Does not need translating - control string.
|
||||
u'Add to Service', u':/general/general_add.png',
|
||||
translate('OpenLP.SlideController', 'Add to Service'),
|
||||
translate('OpenLP.SlideController', 'Add to Service.'),
|
||||
self.onPreviewAddToService)
|
||||
self.toolbar.addToolbarSeparator(u'Close Separator')
|
||||
self.toolbar.addToolbarButton(
|
||||
# Does not need translating - control string.
|
||||
u'Edit Song', u':/general/general_edit.png',
|
||||
translate('OpenLP.SlideController',
|
||||
'Edit and reload song preview'),
|
||||
'Edit and reload song preview.'),
|
||||
self.onEditSong)
|
||||
self.controllerLayout.addWidget(self.toolbar)
|
||||
# Build a Media ToolBar
|
||||
self.mediabar = OpenLPToolbar(self)
|
||||
self.mediabar.addToolbarButton(
|
||||
u'Media Start', u':/slides/media_playback_start.png',
|
||||
translate('OpenLP.SlideController', 'Start playing media'),
|
||||
translate('OpenLP.SlideController', 'Start playing media.'),
|
||||
self.onMediaPlay)
|
||||
self.mediabar.addToolbarButton(
|
||||
u'Media Pause', u':/slides/media_playback_pause.png',
|
||||
translate('OpenLP.SlideController', 'Start playing media'),
|
||||
translate('OpenLP.SlideController', 'Start playing media.'),
|
||||
self.onMediaPause)
|
||||
self.mediabar.addToolbarButton(
|
||||
u'Media Stop', u':/slides/media_playback_stop.png',
|
||||
translate('OpenLP.SlideController', 'Start playing media'),
|
||||
translate('OpenLP.SlideController', 'Start playing media.'),
|
||||
self.onMediaStop)
|
||||
if self.isLive:
|
||||
# Build the Song Toolbar
|
||||
@ -841,6 +841,11 @@ class SlideController(QtGui.QWidget):
|
||||
Receiver.send_message(u'%s_unblank'
|
||||
% self.serviceItem.name.lower(),
|
||||
[self.serviceItem, self.isLive])
|
||||
else:
|
||||
if hide_mode:
|
||||
Receiver.send_message(u'maindisplay_hide', hide_mode)
|
||||
else:
|
||||
Receiver.send_message(u'maindisplay_show')
|
||||
|
||||
def hidePlugin(self, hide):
|
||||
"""
|
||||
@ -859,6 +864,11 @@ class SlideController(QtGui.QWidget):
|
||||
Receiver.send_message(u'%s_unblank'
|
||||
% self.serviceItem.name.lower(),
|
||||
[self.serviceItem, self.isLive])
|
||||
else:
|
||||
if hide:
|
||||
Receiver.send_message(u'maindisplay_hide', HideMode.Screen)
|
||||
else:
|
||||
Receiver.send_message(u'maindisplay_show')
|
||||
|
||||
def onSlideSelected(self, start=False):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user