openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #09064
[Merge] lp:~trb143/openlp/beta1 into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/beta1 into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #742636 in OpenLP: "Leading spaces in song titles are stripped"
https://bugs.launchpad.net/openlp/+bug/742636
Bug #775534 in OpenLP: "Display window is initially the same size as the primary screen, despite being on the secondary screen"
https://bugs.launchpad.net/openlp/+bug/775534
For more details, see:
https://code.launchpad.net/~trb143/openlp/beta1/+merge/61894
Add buttons to song and custom to add the virtual split's
Tidied up button names.
Insert inserts a new slide, Split adds a virtual split.
--
https://code.launchpad.net/~trb143/openlp/beta1/+merge/61894
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/beta1 into lp:openlp.
=== modified file 'openlp/plugins/custom/forms/editcustomslidedialog.py'
--- openlp/plugins/custom/forms/editcustomslidedialog.py 2011-03-24 19:04:02 +0000
+++ openlp/plugins/custom/forms/editcustomslidedialog.py 2011-05-22 13:12:38 +0000
@@ -26,7 +26,7 @@
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import translate, SpellTextEdit
+from openlp.core.lib import translate, SpellTextEdit, build_icon
from openlp.core.lib.ui import create_accept_reject_button_box
class Ui_CustomSlideEditDialog(object):
@@ -39,9 +39,15 @@
self.dialogLayout.addWidget(self.slideTextEdit)
self.buttonBox = create_accept_reject_button_box(customSlideEditDialog)
self.splitButton = QtGui.QPushButton(customSlideEditDialog)
+ self.splitButton.setIcon(build_icon(u':/general/general_add.png'))
self.splitButton.setObjectName(u'splitButton')
self.buttonBox.addButton(self.splitButton,
QtGui.QDialogButtonBox.ActionRole)
+ self.insertButton = QtGui.QPushButton(customSlideEditDialog)
+ self.insertButton.setIcon(build_icon(u':/general/general_add.png'))
+ self.insertButton.setObjectName(u'insertButton')
+ self.buttonBox.addButton(self.insertButton,
+ QtGui.QDialogButtonBox.ActionRole)
self.dialogLayout.addWidget(self.buttonBox)
self.retranslateUi(customSlideEditDialog)
QtCore.QMetaObject.connectSlotsByName(customSlideEditDialog)
@@ -51,4 +57,9 @@
translate('CustomPlugin.EditCustomForm', 'Split Slide'))
self.splitButton.setToolTip(
translate('CustomPlugin.EditCustomForm', 'Split a slide into two '
+ 'only if it does not fit on the screen as one slide.'))
+ self.insertButton.setText(
+ translate('CustomPlugin.EditCustomForm', 'Insert Slide'))
+ self.insertButton.setToolTip(
+ translate('CustomPlugin.EditCustomForm', 'Split a slide into two '
'by inserting a slide splitter.'))
=== modified file 'openlp/plugins/custom/forms/editcustomslideform.py'
--- openlp/plugins/custom/forms/editcustomslideform.py 2011-03-29 20:38:10 +0000
+++ openlp/plugins/custom/forms/editcustomslideform.py 2011-05-22 13:12:38 +0000
@@ -44,6 +44,8 @@
QtGui.QDialog.__init__(self, parent)
self.setupUi(self)
# Connecting signals and slots
+ QtCore.QObject.connect(self.insertButton,
+ QtCore.SIGNAL(u'clicked()'), self.onInsertButtonPressed)
QtCore.QObject.connect(self.splitButton,
QtCore.SIGNAL(u'clicked()'), self.onSplitButtonPressed)
@@ -65,7 +67,7 @@
"""
return self.slideTextEdit.toPlainText().split(u'\n[===]\n')
- def onSplitButtonPressed(self):
+ def onInsertButtonPressed(self):
"""
Adds a slide split at the cursor.
"""
@@ -73,3 +75,12 @@
self.slideTextEdit.insertPlainText(u'\n')
self.slideTextEdit.insertPlainText(u'[===]\n')
self.slideTextEdit.setFocus()
+
+ def onSplitButtonPressed(self):
+ """
+ Adds a virtual split at cursor.
+ """
+ if self.slideTextEdit.textCursor().columnNumber() != 0:
+ self.slideTextEdit.insertPlainText(u'\n')
+ self.slideTextEdit.insertPlainText(u'[---]')
+ self.slideTextEdit.setFocus()
=== modified file 'openlp/plugins/songs/forms/editversedialog.py'
--- openlp/plugins/songs/forms/editversedialog.py 2011-03-24 19:04:02 +0000
+++ openlp/plugins/songs/forms/editversedialog.py 2011-05-22 13:12:38 +0000
@@ -42,6 +42,10 @@
self.dialogLayout.addWidget(self.verseTextEdit)
self.verseTypeLayout = QtGui.QHBoxLayout()
self.verseTypeLayout.setObjectName(u'verseTypeLayout')
+ self.splitButton = QtGui.QPushButton(editVerseDialog)
+ self.splitButton.setIcon(build_icon(u':/general/general_add.png'))
+ self.splitButton.setObjectName(u'splitButton')
+ self.verseTypeLayout.addWidget(self.splitButton)
self.verseTypeLabel = QtGui.QLabel(editVerseDialog)
self.verseTypeLabel.setObjectName(u'verseTypeLabel')
self.verseTypeLayout.addWidget(self.verseTypeLabel)
@@ -84,5 +88,7 @@
VerseType.TranslatedNames[VerseType.Ending])
self.verseTypeComboBox.setItemText(VerseType.Other,
VerseType.TranslatedNames[VerseType.Other])
+ self.splitButton.setText(
+ translate('SongsPlugin.EditVerseForm', '&Split'))
self.insertButton.setText(
translate('SongsPlugin.EditVerseForm', '&Insert'))
=== modified file 'openlp/plugins/songs/forms/editverseform.py'
--- openlp/plugins/songs/forms/editverseform.py 2011-03-24 19:04:02 +0000
+++ openlp/plugins/songs/forms/editverseform.py 2011-05-22 13:12:38 +0000
@@ -51,6 +51,8 @@
self.contextMenu)
QtCore.QObject.connect(self.insertButton, QtCore.SIGNAL(u'clicked()'),
self.onInsertButtonClicked)
+ QtCore.QObject.connect(self.splitButton, QtCore.SIGNAL(u'clicked()'),
+ self.onSplitButtonClicked)
QtCore.QObject.connect(self.verseTextEdit,
QtCore.SIGNAL(u'cursorPositionChanged()'),
self.onCursorPositionChanged)
@@ -70,6 +72,13 @@
(verse_tag, verse_num))
self.verseTextEdit.setFocus()
+ def onSplitButtonClicked(self):
+ verse_type_index = self.verseTypeComboBox.currentIndex()
+ if self.verseTextEdit.textCursor().columnNumber() != 0:
+ self.verseTextEdit.insertPlainText(u'\n')
+ self.verseTextEdit.insertPlainText(u'[---]')
+ self.verseTextEdit.setFocus()
+
def onInsertButtonClicked(self):
verse_type_index = self.verseTypeComboBox.currentIndex()
self.insertVerse(VerseType.Tags[verse_type_index],
Follow ups