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:
Jonathan Corwin 2011-03-29 14:29:42 +02:00 committed by Raoul Snyman
commit 8d39cc69d6
4 changed files with 19 additions and 9 deletions

View File

@ -115,7 +115,8 @@ class OpenLP(QtGui.QApplication):
# make sure Qt really display the splash screen
self.processEvents()
# start the main app window
self.mainWindow = MainWindow(screens, self)
self.mainWindow = MainWindow(screens, self.clipboard(),
self.arguments())
self.mainWindow.show()
if show_splash:
# now kill the splashscreen

View File

@ -85,7 +85,12 @@ body {
}
/* lyric css */
%s
sup {
font-size:0.6em;
vertical-align:top;
position:relative;
top:-0.3em;
}
</style>
<script language="javascript">
var timer = null;

View File

@ -469,15 +469,15 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
actionList = ActionList()
def __init__(self, screens, application):
def __init__(self, screens, clipboard, arguments):
"""
This constructor sets up the interface, the various managers, and the
plugins.
"""
QtGui.QMainWindow.__init__(self)
self.screens = screens
self.application = application
self.clipboard = clipboard
self.arguments = arguments
# Set up settings sections for the main application
# (not for use by plugins)
self.uiSettingsSection = u'user interface'
@ -661,9 +661,13 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
if self.liveController.display.isVisible():
self.liveController.display.setFocus()
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 = []
for a in self.application.arguments():
for a in self.arguments:
args.extend([a])
self.ServiceManagerContents.loadFile(unicode(args[0]))
elif QtCore.QSettings().value(

View File

@ -184,14 +184,14 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog):
"""
Copies the display text to the clipboard as plain text
"""
self.mainWindow.application.clipboard.setText(
self.mainWindow.clipboard.setText(
self.document.toPlainText())
def copyHtmlText(self):
"""
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):
"""