r1437 + resolved conflict

This commit is contained in:
Andreas Preikschat 2011-03-29 16:14:05 +02:00
commit 32240f7bbe
5 changed files with 21 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

@ -57,6 +57,7 @@ except ImportError:
from openlp.core.lib import translate, SettingsManager
from openlp.core.lib.mailto import mailto
from openlp.core.lib.ui import UiStrings
from openlp.core.utils import get_application_version
from exceptiondialog import Ui_ExceptionDialog
@ -78,7 +79,7 @@ class ExceptionForm(QtGui.QDialog, Ui_ExceptionDialog):
return QtGui.QDialog.exec_(self)
def _createReport(self):
openlp_version = self.parent().applicationVersion[u'full']
openlp_version = get_application_version()
description = unicode(self.descriptionTextEdit.toPlainText())
traceback = unicode(self.exceptionTextEdit.toPlainText())
system = unicode(translate('OpenLP.ExceptionForm',

View File

@ -466,14 +466,15 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
"""
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
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'
@ -656,9 +657,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):
"""