forked from openlp/openlp
1. Override <sup> so it doesn't adjust the line-spacing for Bible verses
2. Fix problem on Windows where it wasn't exiting properly due to QApplication reference being passed/stored on the mainwindow 3. Disable command-line loading of service files on Windows, since OpenLP isn't able to open executables bzr-revno: 1436 Fixes: https://launchpad.net/bugs/744463
This commit is contained in:
commit
8d39cc69d6
@ -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;
|
||||||
|
@ -469,15 +469,15 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
|
|
||||||
actionList = ActionList()
|
actionList = ActionList()
|
||||||
|
|
||||||
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.clipboard = clipboard
|
||||||
self.application = application
|
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'
|
||||||
@ -661,9 +661,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