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