forked from openlp/openlp
Change superscript so it still works in print. Fix problem with openlp not closing
This commit is contained in:
parent
1e973c6c8d
commit
2cce748d20
16
openlp.pyw
16
openlp.pyw
@ -78,12 +78,13 @@ class OpenLP(QtGui.QApplication):
|
||||
class in order to provide the core of the application.
|
||||
"""
|
||||
|
||||
def exec_(self):
|
||||
"""
|
||||
Override exec method to allow the shared memory to be released on exit
|
||||
"""
|
||||
QtGui.QApplication.exec_()
|
||||
self.sharedMemory.detach()
|
||||
#def exec_(self):
|
||||
#"""
|
||||
#Override exec method to allow the shared memory to be released on exit
|
||||
#"""
|
||||
#return QtGui.QApplication.exec_()
|
||||
#self.sharedMemory.detach()
|
||||
#return i
|
||||
|
||||
def run(self):
|
||||
"""
|
||||
@ -115,7 +116,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
|
||||
|
@ -65,9 +65,8 @@ base_html_expands.append({u'desc': u'White', u'start tag': u'{w}',
|
||||
u'start html': u'<span style="-webkit-text-fill-color:white">',
|
||||
u'end tag': u'{/w}', u'end html': u'</span>', u'protected': True})
|
||||
base_html_expands.append({u'desc': u'Superscript', u'start tag': u'{su}',
|
||||
u'start html': u'<span style=" font-size:0.6em; vertical-align:top;'
|
||||
+ u' position:relative; top:-0.3em;">', u'end tag': u'{/su}',
|
||||
u'end html': u'</span>', u'protected': True})
|
||||
u'start html': u'<sup>', u'end tag': u'{/su}', u'end html': u'</sup>',
|
||||
u'protected': True})
|
||||
base_html_expands.append({u'desc': u'Subscript', u'start tag': u'{sb}',
|
||||
u'start html': u'<sub>', u'end tag': u'{/sb}', u'end html': u'</sub>',
|
||||
u'protected': True})
|
||||
|
@ -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;
|
||||
|
@ -469,7 +469,7 @@ 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.
|
||||
@ -477,7 +477,9 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
QtGui.QMainWindow.__init__(self)
|
||||
self.screens = screens
|
||||
|
||||
self.application = application
|
||||
#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 +663,9 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
if self.liveController.display.isVisible():
|
||||
self.liveController.display.setFocus()
|
||||
self.activateWindow()
|
||||
if len(self.application.arguments()) > 0:
|
||||
if len(self.arguments) > 0:
|
||||
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(
|
||||
|
@ -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):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user