forked from openlp/openlp
r2007
This commit is contained in:
commit
978045a845
@ -27,6 +27,7 @@
|
|||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
import sys
|
||||||
from openlp.core import main
|
from openlp.core import main
|
||||||
|
|
||||||
|
|
||||||
@ -34,4 +35,10 @@ if __name__ == u'__main__':
|
|||||||
"""
|
"""
|
||||||
Instantiate and run the application.
|
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()
|
main()
|
||||||
|
@ -330,7 +330,24 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog):
|
|||||||
Copies the display text to the clipboard as plain text
|
Copies the display text to the clipboard as plain text
|
||||||
"""
|
"""
|
||||||
self.update_song_usage()
|
self.update_song_usage()
|
||||||
self.mainWindow.clipboard.setText(self.document.toPlainText())
|
cursor = QtGui.QTextCursor(self.document)
|
||||||
|
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
|
||||||
|
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):
|
def copyHtmlText(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user