forked from openlp/openlp
r1437 + resolved conflict
This commit is contained in:
commit
32240f7bbe
@ -115,7 +115,8 @@ class OpenLP(QtGui.QApplication):
|
|||||||
# make sure Qt really display the splash screen
|
# make sure Qt really display the splash screen
|
||||||
self.processEvents()
|
self.processEvents()
|
||||||
# start the main app window
|
# start the main app window
|
||||||
self.mainWindow = MainWindow(screens, self)
|
self.mainWindow = MainWindow(screens, self.clipboard(),
|
||||||
|
self.arguments())
|
||||||
self.mainWindow.show()
|
self.mainWindow.show()
|
||||||
if show_splash:
|
if show_splash:
|
||||||
# now kill the splashscreen
|
# now kill the splashscreen
|
||||||
|
@ -85,7 +85,12 @@ body {
|
|||||||
}
|
}
|
||||||
/* lyric css */
|
/* lyric css */
|
||||||
%s
|
%s
|
||||||
|
sup {
|
||||||
|
font-size:0.6em;
|
||||||
|
vertical-align:top;
|
||||||
|
position:relative;
|
||||||
|
top:-0.3em;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<script language="javascript">
|
<script language="javascript">
|
||||||
var timer = null;
|
var timer = null;
|
||||||
|
@ -57,6 +57,7 @@ except ImportError:
|
|||||||
from openlp.core.lib import translate, SettingsManager
|
from openlp.core.lib import translate, SettingsManager
|
||||||
from openlp.core.lib.mailto import mailto
|
from openlp.core.lib.mailto import mailto
|
||||||
from openlp.core.lib.ui import UiStrings
|
from openlp.core.lib.ui import UiStrings
|
||||||
|
from openlp.core.utils import get_application_version
|
||||||
|
|
||||||
from exceptiondialog import Ui_ExceptionDialog
|
from exceptiondialog import Ui_ExceptionDialog
|
||||||
|
|
||||||
@ -78,7 +79,7 @@ class ExceptionForm(QtGui.QDialog, Ui_ExceptionDialog):
|
|||||||
return QtGui.QDialog.exec_(self)
|
return QtGui.QDialog.exec_(self)
|
||||||
|
|
||||||
def _createReport(self):
|
def _createReport(self):
|
||||||
openlp_version = self.parent().applicationVersion[u'full']
|
openlp_version = get_application_version()
|
||||||
description = unicode(self.descriptionTextEdit.toPlainText())
|
description = unicode(self.descriptionTextEdit.toPlainText())
|
||||||
traceback = unicode(self.exceptionTextEdit.toPlainText())
|
traceback = unicode(self.exceptionTextEdit.toPlainText())
|
||||||
system = unicode(translate('OpenLP.ExceptionForm',
|
system = unicode(translate('OpenLP.ExceptionForm',
|
||||||
|
@ -466,14 +466,15 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
"""
|
"""
|
||||||
log.info(u'MainWindow loaded')
|
log.info(u'MainWindow loaded')
|
||||||
|
|
||||||
def __init__(self, screens, application):
|
def __init__(self, screens, clipboard, arguments):
|
||||||
"""
|
"""
|
||||||
This constructor sets up the interface, the various managers, and the
|
This constructor sets up the interface, the various managers, and the
|
||||||
plugins.
|
plugins.
|
||||||
"""
|
"""
|
||||||
QtGui.QMainWindow.__init__(self)
|
QtGui.QMainWindow.__init__(self)
|
||||||
self.screens = screens
|
self.screens = screens
|
||||||
self.application = application
|
self.clipboard = clipboard
|
||||||
|
self.arguments = arguments
|
||||||
# Set up settings sections for the main application
|
# Set up settings sections for the main application
|
||||||
# (not for use by plugins)
|
# (not for use by plugins)
|
||||||
self.uiSettingsSection = u'user interface'
|
self.uiSettingsSection = u'user interface'
|
||||||
@ -656,9 +657,13 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
if self.liveController.display.isVisible():
|
if self.liveController.display.isVisible():
|
||||||
self.liveController.display.setFocus()
|
self.liveController.display.setFocus()
|
||||||
self.activateWindow()
|
self.activateWindow()
|
||||||
if len(self.application.arguments()) > 0:
|
# On Windows, arguments contains the entire commandline
|
||||||
|
# So args[0]=='python' args[1]=='openlp.pyw'
|
||||||
|
# Therefore this approach is not going to work
|
||||||
|
# Bypass for now.
|
||||||
|
if len(self.arguments) and os.name != u'nt':
|
||||||
args = []
|
args = []
|
||||||
for a in self.application.arguments():
|
for a in self.arguments:
|
||||||
args.extend([a])
|
args.extend([a])
|
||||||
self.ServiceManagerContents.loadFile(unicode(args[0]))
|
self.ServiceManagerContents.loadFile(unicode(args[0]))
|
||||||
elif QtCore.QSettings().value(
|
elif QtCore.QSettings().value(
|
||||||
|
@ -184,14 +184,14 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog):
|
|||||||
"""
|
"""
|
||||||
Copies the display text to the clipboard as plain text
|
Copies the display text to the clipboard as plain text
|
||||||
"""
|
"""
|
||||||
self.mainWindow.application.clipboard.setText(
|
self.mainWindow.clipboard.setText(
|
||||||
self.document.toPlainText())
|
self.document.toPlainText())
|
||||||
|
|
||||||
def copyHtmlText(self):
|
def copyHtmlText(self):
|
||||||
"""
|
"""
|
||||||
Copies the display text to the clipboard as Html
|
Copies the display text to the clipboard as Html
|
||||||
"""
|
"""
|
||||||
self.mainWindow.application.clipboard.setText(self.document.toHtml())
|
self.mainWindow.clipboard.setText(self.document.toHtml())
|
||||||
|
|
||||||
def printServiceOrder(self):
|
def printServiceOrder(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user