forked from openlp/openlp
inform the user, that he has to restart openlp if he wants changes to the monitor set up to be available
This commit is contained in:
parent
f71b1e0286
commit
b12a37b986
15
openlp.pyw
15
openlp.pyw
@ -34,7 +34,8 @@ from subprocess import Popen, PIPE
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import Receiver, check_directory_exists
|
from openlp.core.lib import Receiver, translate, check_directory_exists
|
||||||
|
from openlp.core.lib.ui import information_message_box
|
||||||
from openlp.core.resources import qInitResources
|
from openlp.core.resources import qInitResources
|
||||||
from openlp.core.ui.mainwindow import MainWindow
|
from openlp.core.ui.mainwindow import MainWindow
|
||||||
from openlp.core.ui.exceptionform import ExceptionForm
|
from openlp.core.ui.exceptionform import ExceptionForm
|
||||||
@ -166,6 +167,9 @@ class OpenLP(QtGui.QApplication):
|
|||||||
QtCore.SIGNAL(u'cursor_busy'), self.setBusyCursor)
|
QtCore.SIGNAL(u'cursor_busy'), self.setBusyCursor)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'cursor_normal'), self.setNormalCursor)
|
QtCore.SIGNAL(u'cursor_normal'), self.setNormalCursor)
|
||||||
|
QtCore.QObject.connect(self.desktop(),
|
||||||
|
QtCore.SIGNAL(u'screenCountChanged(int)'),
|
||||||
|
self.onScreenCountChanged)
|
||||||
self.setOrganizationName(u'OpenLP')
|
self.setOrganizationName(u'OpenLP')
|
||||||
self.setOrganizationDomain(u'openlp.org')
|
self.setOrganizationDomain(u'openlp.org')
|
||||||
self.setApplicationName(u'OpenLP')
|
self.setApplicationName(u'OpenLP')
|
||||||
@ -225,6 +229,15 @@ class OpenLP(QtGui.QApplication):
|
|||||||
"""
|
"""
|
||||||
self.restoreOverrideCursor()
|
self.restoreOverrideCursor()
|
||||||
|
|
||||||
|
def onScreenCountChanged(self):
|
||||||
|
"""
|
||||||
|
Called when the user changes the monitor set up.
|
||||||
|
"""
|
||||||
|
information_message_box(
|
||||||
|
message=translate('OpenLP','You have changed the monitor set up. '
|
||||||
|
'You have to restart OpenLP in order to change the live display '
|
||||||
|
'monitor.'))
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
"""
|
"""
|
||||||
The main function which parses command line options and then runs
|
The main function which parses command line options and then runs
|
||||||
|
@ -58,6 +58,7 @@ class UiStrings(object):
|
|||||||
'Abbreviated font pointsize unit')
|
'Abbreviated font pointsize unit')
|
||||||
Image = translate('OpenLP.Ui', 'Image')
|
Image = translate('OpenLP.Ui', 'Image')
|
||||||
Import = translate('OpenLP.Ui', 'Import')
|
Import = translate('OpenLP.Ui', 'Import')
|
||||||
|
Information = translate('OpenLP.Ui', 'Information')
|
||||||
LengthTime = unicode(translate('OpenLP.Ui', 'Length %s'))
|
LengthTime = unicode(translate('OpenLP.Ui', 'Length %s'))
|
||||||
Live = translate('OpenLP.Ui', 'Live')
|
Live = translate('OpenLP.Ui', 'Live')
|
||||||
LiveBGError = translate('OpenLP.Ui', 'Live Background Error')
|
LiveBGError = translate('OpenLP.Ui', 'Live Background Error')
|
||||||
@ -173,6 +174,32 @@ def critical_error_message_box(title=None, message=None, parent=None,
|
|||||||
data[u'title'] = title if title else UiStrings.Error
|
data[u'title'] = title if title else UiStrings.Error
|
||||||
return Receiver.send_message(u'openlp_error_message', data)
|
return Receiver.send_message(u'openlp_error_message', data)
|
||||||
|
|
||||||
|
def information_message_box(title=None, message=None, parent=None,
|
||||||
|
question=False):
|
||||||
|
"""
|
||||||
|
Provides a standard information message box for notes that OpenLP displays
|
||||||
|
to users.
|
||||||
|
|
||||||
|
``title``
|
||||||
|
The title for the message box.
|
||||||
|
|
||||||
|
``message``
|
||||||
|
The message to display to the user.
|
||||||
|
|
||||||
|
``parent``
|
||||||
|
The parent UI element to attach the dialog to.
|
||||||
|
|
||||||
|
``question``
|
||||||
|
Should this message box question the user.
|
||||||
|
"""
|
||||||
|
if question:
|
||||||
|
return QtGui.QMessageBox.critical(parent, UiStrings.Information,
|
||||||
|
message, QtGui.QMessageBox.StandardButtons(
|
||||||
|
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No))
|
||||||
|
data = {u'message': message}
|
||||||
|
data[u'title'] = title if title else UiStrings.Information
|
||||||
|
return Receiver.send_message(u'openlp_information_message', data)
|
||||||
|
|
||||||
def media_item_combo_box(parent, name):
|
def media_item_combo_box(parent, name):
|
||||||
"""
|
"""
|
||||||
Provide a standard combo box for media items.
|
Provide a standard combo box for media items.
|
||||||
|
Loading…
Reference in New Issue
Block a user