openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #06453
[Merge] lp:~trb143/openlp/bugs into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/bugs into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
#693150 Custom Slide Display footer option
https://bugs.launchpad.net/bugs/693150
#693202 delete theme
https://bugs.launchpad.net/bugs/693202
For more details, see:
https://code.launchpad.net/~trb143/openlp/bugs/+merge/50653
Fix breakages from last merge.
Remove old import file.
Set up variables correctly.
Correct the Translation tags.
--
https://code.launchpad.net/~trb143/openlp/bugs/+merge/50653
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/bugs into lp:openlp.
=== modified file 'openlp/core/ui/__init__.py'
--- openlp/core/ui/__init__.py 2011-02-20 15:35:52 +0000
+++ openlp/core/ui/__init__.py 2011-02-21 20:13:15 +0000
@@ -63,7 +63,6 @@
from generaltab import GeneralTab
from themestab import ThemesTab
from advancedtab import AdvancedTab
-from displaytagtab import DisplayTagTab
from aboutform import AboutForm
from pluginform import PluginForm
from settingsform import SettingsForm
=== modified file 'openlp/core/ui/displaytagdialog.py'
--- openlp/core/ui/displaytagdialog.py 2011-02-21 17:12:36 +0000
+++ openlp/core/ui/displaytagdialog.py 2011-02-21 20:13:15 +0000
@@ -123,30 +123,30 @@
QtCore.QMetaObject.connectSlotsByName(displayTagDialog)
def retranslateUi(self, displayTagDialog):
- displayTagDialog.setWindowTitle(translate('OpenLP.displayTagForm',
+ displayTagDialog.setWindowTitle(translate('OpenLP.displayTagDialog',
'Configure Display Tags'))
self.editGroupBox.setTitle(
- translate('OpenLP.DisplayTagTab', 'Edit Selection'))
+ translate('OpenLP.DisplayTagDialog', 'Edit Selection'))
self.updatePushButton.setText(
- translate('OpenLP.DisplayTagTab', 'Update'))
+ translate('OpenLP.DisplayTagDialog', 'Update'))
self.descriptionLabel.setText(
- translate('OpenLP.DisplayTagTab', 'Description'))
- self.tagLabel.setText(translate('OpenLP.DisplayTagTab', 'Tag'))
+ translate('OpenLP.DisplayTagDialog', 'Description'))
+ self.tagLabel.setText(translate('OpenLP.DisplayTagDialog', 'Tag'))
self.startTagLabel.setText(
- translate('OpenLP.DisplayTagTab', 'Start tag'))
- self.endTagLabel.setText(translate('OpenLP.DisplayTagTab', 'End tag'))
+ translate('OpenLP.DisplayTagDialog', 'Start tag'))
+ self.endTagLabel.setText(translate('OpenLP.DisplayTagDialog', 'End tag'))
self.deletePushButton.setText(UiStrings.Delete)
self.defaultPushButton.setText(
- translate('OpenLP.DisplayTagTab', 'Default'))
+ translate('OpenLP.DisplayTagDialog', 'Default'))
self.newPushButton.setText(UiStrings.New)
self.tagTableWidget.horizontalHeaderItem(0).setText(
- translate('OpenLP.DisplayTagTab', 'Description'))
+ translate('OpenLP.DisplayTagDialog', 'Description'))
self.tagTableWidget.horizontalHeaderItem(1).setText(
- translate('OpenLP.DisplayTagTab', 'Tag id'))
+ translate('OpenLP.DisplayTagDialog', 'Tag id'))
self.tagTableWidget.horizontalHeaderItem(2).setText(
- translate('OpenLP.DisplayTagTab', 'Start Html'))
+ translate('OpenLP.DisplayTagDialog', 'Start Html'))
self.tagTableWidget.horizontalHeaderItem(3).setText(
- translate('OpenLP.DisplayTagTab', 'End Html'))
+ translate('OpenLP.DisplayTagDialog', 'End Html'))
self.tagTableWidget.setColumnWidth(0, 120)
self.tagTableWidget.setColumnWidth(1, 40)
self.tagTableWidget.setColumnWidth(2, 240)
=== modified file 'openlp/core/ui/displaytagform.py'
--- openlp/core/ui/displaytagform.py 2011-02-21 17:12:36 +0000
+++ openlp/core/ui/displaytagform.py 2011-02-21 20:13:15 +0000
@@ -47,6 +47,7 @@
"""
QtGui.QDialog.__init__(self, parent)
self.setupUi(self)
+ self.preLoad()
QtCore.QObject.connect(self.tagTableWidget,
QtCore.SIGNAL(u'clicked(QModelIndex)'), self.onRowSelected)
QtCore.QObject.connect(self.defaultPushButton,
@@ -63,7 +64,18 @@
Load Display and set field state.
"""
# Create initial copy from master
+ self.preLoad()
self._resetTable()
+ self.selected = -1
+ return QtGui.QDialog.exec_(self)
+
+ def preLoad(self):
+ """
+ Load the Tags from store so can be used in the system or used to
+ update the display. If Cancel was selected this is needed to reset the
+ dsiplay to the correct version.
+ """
+ # Initial Load of the Tags
DisplayTags.reset_html_tags()
user_expands = QtCore.QSettings().value(u'displayTags/html_tags',
QtCore.QVariant(u'')).toString()
@@ -74,37 +86,6 @@
# If we have some user ones added them as well
for t in user_tags:
DisplayTags.add_html_tag(t)
- self.selected = -1
- self.load()
- return QtGui.QDialog.exec_(self)
-
- def load(self):
- """
- Load the form with data and set the initial state of the buttons
- """
- self.newPushButton.setEnabled(True)
- self.updatePushButton.setEnabled(False)
- self.deletePushButton.setEnabled(False)
- for linenumber, html in enumerate(DisplayTags.get_html_tags()):
- self.tagTableWidget.setRowCount(
- self.tagTableWidget.rowCount() + 1)
- self.tagTableWidget.setItem(linenumber, 0,
- QtGui.QTableWidgetItem(html[u'desc']))
- self.tagTableWidget.setItem(linenumber, 1,
- QtGui.QTableWidgetItem(self._strip(html[u'start tag'])))
- self.tagTableWidget.setItem(linenumber, 2,
- QtGui.QTableWidgetItem(html[u'start html']))
- self.tagTableWidget.setItem(linenumber, 3,
- QtGui.QTableWidgetItem(html[u'end html']))
- self.tagTableWidget.resizeRowsToContents()
- self.descriptionLineEdit.setText(u'')
- self.tagLineEdit.setText(u'')
- self.startTagLineEdit.setText(u'')
- self.endTagLineEdit.setText(u'')
- self.descriptionLineEdit.setEnabled(False)
- self.tagLineEdit.setEnabled(False)
- self.startTagLineEdit.setEnabled(False)
- self.endTagLineEdit.setEnabled(False)
def accept(self):
"""
@@ -223,6 +204,29 @@
"""
self.tagTableWidget.clearContents()
self.tagTableWidget.setRowCount(0)
+ self.newPushButton.setEnabled(True)
+ self.updatePushButton.setEnabled(False)
+ self.deletePushButton.setEnabled(False)
+ for linenumber, html in enumerate(DisplayTags.get_html_tags()):
+ self.tagTableWidget.setRowCount(
+ self.tagTableWidget.rowCount() + 1)
+ self.tagTableWidget.setItem(linenumber, 0,
+ QtGui.QTableWidgetItem(html[u'desc']))
+ self.tagTableWidget.setItem(linenumber, 1,
+ QtGui.QTableWidgetItem(self._strip(html[u'start tag'])))
+ self.tagTableWidget.setItem(linenumber, 2,
+ QtGui.QTableWidgetItem(html[u'start html']))
+ self.tagTableWidget.setItem(linenumber, 3,
+ QtGui.QTableWidgetItem(html[u'end html']))
+ self.tagTableWidget.resizeRowsToContents()
+ self.descriptionLineEdit.setText(u'')
+ self.tagLineEdit.setText(u'')
+ self.startTagLineEdit.setText(u'')
+ self.endTagLineEdit.setText(u'')
+ self.descriptionLineEdit.setEnabled(False)
+ self.tagLineEdit.setEnabled(False)
+ self.startTagLineEdit.setEnabled(False)
+ self.endTagLineEdit.setEnabled(False)
def _strip(self, tag):
"""
Follow ups