From e33bf7254369b81537e4674171df270bec0cfed5 Mon Sep 17 00:00:00 2001 From: Martin Zibricky Date: Wed, 27 Jun 2012 23:32:43 +0200 Subject: [PATCH 1/8] fixed 1018442 (-psn_XXX argument passed to OSX build) --- openlp.pyw | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openlp.pyw b/openlp.pyw index 3e5d18f16..c67d54e41 100755 --- a/openlp.pyw +++ b/openlp.pyw @@ -27,6 +27,7 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### +import sys from openlp.core import main @@ -34,4 +35,10 @@ if __name__ == u'__main__': """ Instantiate and run the application. """ + # Mac OS X passes arguments like '-psn_XXXX' to gui application. + # This argument is process serial number. However, this causes + # conflict with other OpenLP arguments. Since we do not use this + # argument we can delete it to avoid any potential conflicts. + if sys.platform.startswith('darwin'): + sys.argv = filter(lambda x: not x.startswith('-psn'), sys.argv) main() From c73a57afd3f02602f7007353d97a9acae0e135f9 Mon Sep 17 00:00:00 2001 From: Martin Barrett Date: Fri, 29 Jun 2012 00:17:17 +0100 Subject: [PATCH 2/8] fixed bug #986688 'PrintService copy not separating verses Fixes: https://launchpad.net/bugs/986688 --- openlp/core/ui/printserviceform.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openlp/core/ui/printserviceform.py b/openlp/core/ui/printserviceform.py index 674aab1b9..ec0993a50 100644 --- a/openlp/core/ui/printserviceform.py +++ b/openlp/core/ui/printserviceform.py @@ -60,7 +60,7 @@ http://doc.trolltech.com/4.7/richtext-html-subset.html#css-properties } .itemText { - margin-top: 10px; + margin-top: 5px; } .itemFooter { @@ -218,6 +218,7 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog): if not verse_def or verse_def != slide[u'verseTag']: text_div = self._addElement(u'div', parent=div, classId=u'itemText') + self._addElement(u'br', parent=text_div) else: self._addElement(u'br', parent=text_div) self._addElement(u'span', slide[u'html'], text_div) From d86a94b3c02d7aa4f9972bd399076e13672afe0c Mon Sep 17 00:00:00 2001 From: Martin Barrett Date: Sat, 30 Jun 2012 17:11:49 +0100 Subject: [PATCH 3/8] fixes bug #986699: Print Service not separating verses --- openlp/core/ui/printserviceform.py | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/openlp/core/ui/printserviceform.py b/openlp/core/ui/printserviceform.py index ec0993a50..833b68801 100644 --- a/openlp/core/ui/printserviceform.py +++ b/openlp/core/ui/printserviceform.py @@ -60,7 +60,7 @@ http://doc.trolltech.com/4.7/richtext-html-subset.html#css-properties } .itemText { - margin-top: 5px; + margin-top: 10px; } .itemFooter { @@ -218,7 +218,6 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog): if not verse_def or verse_def != slide[u'verseTag']: text_div = self._addElement(u'div', parent=div, classId=u'itemText') - self._addElement(u'br', parent=text_div) else: self._addElement(u'br', parent=text_div) self._addElement(u'span', slide[u'html'], text_div) @@ -331,7 +330,24 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog): Copies the display text to the clipboard as plain text """ self.update_song_usage() - self.mainWindow.clipboard.setText(self.document.toPlainText()) + cursor = QtGui.QTextCursor(self.document) + cursor.select(3) + clipboard_text = cursor.selectedText () + # We now have the unprocessed unicode service text in the cursor + # So we replace u2029 with \n and u2029 with \n\n and a few others + clipboard_text = clipboard_text.replace(u'\u2028', u'\n') + clipboard_text = clipboard_text.replace(u'\u2029', u'\n\n') + clipboard_text = clipboard_text.replace(u'\u2018', u'\'') + clipboard_text = clipboard_text.replace(u'\u2019', u'\'') + clipboard_text = clipboard_text.replace(u'\u201c', u'"') + clipboard_text = clipboard_text.replace(u'\u201d', u'"') + clipboard_text = clipboard_text.replace(u'\u2026', u'...') + clipboard_text = clipboard_text.replace(u'\u2013', u'-') + clipboard_text = clipboard_text.replace(u'\u2014', u'-') + # remove the icon from the text + clipboard_text = clipboard_text.replace(u'\ufffc\xa0', u'') + # and put it all on the clipboard + self.mainWindow.clipboard.setText(clipboard_text) def copyHtmlText(self): """ From ac769b96f96135278a01b02b71a4cf60514500eb Mon Sep 17 00:00:00 2001 From: Martin Barrett Date: Sat, 30 Jun 2012 17:15:42 +0100 Subject: [PATCH 4/8] fixes bug #986699: Print Service not separating verses --- openlp/core/ui/printserviceform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/core/ui/printserviceform.py b/openlp/core/ui/printserviceform.py index 833b68801..4e96dc77d 100644 --- a/openlp/core/ui/printserviceform.py +++ b/openlp/core/ui/printserviceform.py @@ -334,7 +334,7 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog): cursor.select(3) clipboard_text = cursor.selectedText () # We now have the unprocessed unicode service text in the cursor - # So we replace u2029 with \n and u2029 with \n\n and a few others + # So we replace u2028 with \n and u2029 with \n\n and a few others clipboard_text = clipboard_text.replace(u'\u2028', u'\n') clipboard_text = clipboard_text.replace(u'\u2029', u'\n\n') clipboard_text = clipboard_text.replace(u'\u2018', u'\'') From 620b8d519b46e8cf80f2f5530db81039bb5879ab Mon Sep 17 00:00:00 2001 From: Martin Barrett Date: Sat, 30 Jun 2012 18:16:26 +0100 Subject: [PATCH 5/8] fixes bug #986699: Print Service not separating verses --- openlp/core/ui/printserviceform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/core/ui/printserviceform.py b/openlp/core/ui/printserviceform.py index 4e96dc77d..f1e46c4b9 100644 --- a/openlp/core/ui/printserviceform.py +++ b/openlp/core/ui/printserviceform.py @@ -347,7 +347,7 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog): # remove the icon from the text clipboard_text = clipboard_text.replace(u'\ufffc\xa0', u'') # and put it all on the clipboard - self.mainWindow.clipboard.setText(clipboard_text) + xrange.mainWindow.clipboard.setText(clipboard_text) def copyHtmlText(self): """ From d9037de8f244305e6c792dc13fe7dd439f06dbdd Mon Sep 17 00:00:00 2001 From: Martin Barrett Date: Sat, 30 Jun 2012 18:16:44 +0100 Subject: [PATCH 6/8] fixes bug #986699: Print Service not separating verses --- openlp/core/ui/printserviceform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/core/ui/printserviceform.py b/openlp/core/ui/printserviceform.py index f1e46c4b9..4e96dc77d 100644 --- a/openlp/core/ui/printserviceform.py +++ b/openlp/core/ui/printserviceform.py @@ -347,7 +347,7 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog): # remove the icon from the text clipboard_text = clipboard_text.replace(u'\ufffc\xa0', u'') # and put it all on the clipboard - xrange.mainWindow.clipboard.setText(clipboard_text) + self.mainWindow.clipboard.setText(clipboard_text) def copyHtmlText(self): """ From 30e760dbe3cc5060e96932d47aca2489feb75492 Mon Sep 17 00:00:00 2001 From: Martin Barrett Date: Sat, 30 Jun 2012 18:25:49 +0100 Subject: [PATCH 7/8] fixes bug #986699: Print Service not separating verses --- openlp/core/ui/printserviceform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/core/ui/printserviceform.py b/openlp/core/ui/printserviceform.py index 4e96dc77d..a6c32cbc1 100644 --- a/openlp/core/ui/printserviceform.py +++ b/openlp/core/ui/printserviceform.py @@ -332,7 +332,7 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog): self.update_song_usage() cursor = QtGui.QTextCursor(self.document) cursor.select(3) - clipboard_text = cursor.selectedText () + clipboard_text = cursor.selectedText() # We now have the unprocessed unicode service text in the cursor # So we replace u2028 with \n and u2029 with \n\n and a few others clipboard_text = clipboard_text.replace(u'\u2028', u'\n') From d2d129deb3500598665660135c8f95ad0f4d1919 Mon Sep 17 00:00:00 2001 From: Martin Barrett Date: Sat, 30 Jun 2012 19:51:53 +0100 Subject: [PATCH 8/8] fixes bug #986699: Print Service not separating verses --- openlp/core/ui/printserviceform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/core/ui/printserviceform.py b/openlp/core/ui/printserviceform.py index a6c32cbc1..78a84f3fb 100644 --- a/openlp/core/ui/printserviceform.py +++ b/openlp/core/ui/printserviceform.py @@ -331,7 +331,7 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog): """ self.update_song_usage() cursor = QtGui.QTextCursor(self.document) - cursor.select(3) + cursor.select(QtGui.QTextCursor.Document) clipboard_text = cursor.selectedText() # We now have the unprocessed unicode service text in the cursor # So we replace u2028 with \n and u2029 with \n\n and a few others