From 1e973c6c8db25ed36fb9c71f82425fd759ed1985 Mon Sep 17 00:00:00 2001 From: Jonathan Corwin Date: Sun, 27 Mar 2011 23:28:20 +0100 Subject: [PATCH 1/6] Attempt superscript without affecting line spacing --- openlp/core/lib/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index ddb1ae9b1..a9e8e86f1 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -65,8 +65,9 @@ base_html_expands.append({u'desc': u'White', u'start tag': u'{w}', u'start html': u'', u'end tag': u'{/w}', u'end html': u'', u'protected': True}) base_html_expands.append({u'desc': u'Superscript', u'start tag': u'{su}', - u'start html': u'', u'end tag': u'{/su}', u'end html': u'', - u'protected': True}) + u'start html': u'', u'end tag': u'{/su}', + u'end html': u'', u'protected': True}) base_html_expands.append({u'desc': u'Subscript', u'start tag': u'{sb}', u'start html': u'', u'end tag': u'{/sb}', u'end html': u'', u'protected': True}) From 3aaaa8895b5102a3054cfd0f04a915b10db0c96a Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Mon, 28 Mar 2011 19:29:25 +0200 Subject: [PATCH 2/6] fixed a bug in the exception form --- openlp/core/ui/exceptionform.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openlp/core/ui/exceptionform.py b/openlp/core/ui/exceptionform.py index 50cf597ea..0ae9497c9 100644 --- a/openlp/core/ui/exceptionform.py +++ b/openlp/core/ui/exceptionform.py @@ -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', From 2cce748d20b9fd458add0f4f4ece1f3b54a61e7a Mon Sep 17 00:00:00 2001 From: Jonathan Corwin Date: Mon, 28 Mar 2011 21:18:55 +0100 Subject: [PATCH 3/6] Change superscript so it still works in print. Fix problem with openlp not closing --- openlp.pyw | 16 +++++++++------- openlp/core/lib/__init__.py | 5 ++--- openlp/core/lib/htmlbuilder.py | 7 ++++++- openlp/core/ui/mainwindow.py | 10 ++++++---- openlp/core/ui/printserviceform.py | 4 ++-- 5 files changed, 25 insertions(+), 17 deletions(-) diff --git a/openlp.pyw b/openlp.pyw index b8c16c585..c9c5294b5 100755 --- a/openlp.pyw +++ b/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 diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index a9e8e86f1..ddb1ae9b1 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -65,9 +65,8 @@ base_html_expands.append({u'desc': u'White', u'start tag': u'{w}', u'start html': u'', u'end tag': u'{/w}', u'end html': u'', u'protected': True}) base_html_expands.append({u'desc': u'Superscript', u'start tag': u'{su}', - u'start html': u'', u'end tag': u'{/su}', - u'end html': u'', u'protected': True}) + u'start html': u'', u'end tag': u'{/su}', u'end html': u'', + u'protected': True}) base_html_expands.append({u'desc': u'Subscript', u'start tag': u'{sb}', u'start html': u'', u'end tag': u'{/sb}', u'end html': u'', u'protected': True}) diff --git a/openlp/core/lib/htmlbuilder.py b/openlp/core/lib/htmlbuilder.py index 67a05c6a1..c4361a421 100644 --- a/openlp/core/lib/htmlbuilder.py +++ b/openlp/core/lib/htmlbuilder.py @@ -85,7 +85,12 @@ body { } /* lyric css */ %s - +sup { + font-size:0.6em; + vertical-align:top; + position:relative; + top:-0.3em; +}