fixed formattigtagsform/dialog

This commit is contained in:
Andreas Preikschat 2013-03-06 23:27:22 +01:00
parent 8bb4c7e131
commit 1660fbf2f8
6 changed files with 134 additions and 134 deletions

View File

@ -39,106 +39,106 @@ class Ui_FormattingTagDialog(object):
"""
The UI widgets for the formatting tags window.
"""
def setupUi(self, formattingTagDialog):
def setupUi(self, formatting_tag_dialog):
"""
Set up the UI
"""
formattingTagDialog.setObjectName(u'formattingTagDialog')
formattingTagDialog.resize(725, 548)
self.listdataGridLayout = QtGui.QGridLayout(formattingTagDialog)
self.listdataGridLayout.setMargin(8)
self.listdataGridLayout.setObjectName(u'listdataGridLayout')
self.tagTableWidget = QtGui.QTableWidget(formattingTagDialog)
self.tagTableWidget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.tagTableWidget.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
self.tagTableWidget.setAlternatingRowColors(True)
self.tagTableWidget.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
self.tagTableWidget.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
self.tagTableWidget.setCornerButtonEnabled(False)
self.tagTableWidget.setObjectName(u'tagTableWidget')
self.tagTableWidget.setColumnCount(4)
self.tagTableWidget.setRowCount(0)
self.tagTableWidget.horizontalHeader().setStretchLastSection(True)
formatting_tag_dialog.setObjectName(u'formatting_tag_dialog')
formatting_tag_dialog.resize(725, 548)
self.list_data_grid_layout = QtGui.QGridLayout(formatting_tag_dialog)
self.list_data_grid_layout.setMargin(8)
self.list_data_grid_layout.setObjectName(u'list_data_grid_layout')
self.tag_table_widget = QtGui.QTableWidget(formatting_tag_dialog)
self.tag_table_widget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.tag_table_widget.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
self.tag_table_widget.setAlternatingRowColors(True)
self.tag_table_widget.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
self.tag_table_widget.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
self.tag_table_widget.setCornerButtonEnabled(False)
self.tag_table_widget.setObjectName(u'tag_table_widget')
self.tag_table_widget.setColumnCount(4)
self.tag_table_widget.setRowCount(0)
self.tag_table_widget.horizontalHeader().setStretchLastSection(True)
item = QtGui.QTableWidgetItem()
self.tagTableWidget.setHorizontalHeaderItem(0, item)
self.tag_table_widget.setHorizontalHeaderItem(0, item)
item = QtGui.QTableWidgetItem()
self.tagTableWidget.setHorizontalHeaderItem(1, item)
self.tag_table_widget.setHorizontalHeaderItem(1, item)
item = QtGui.QTableWidgetItem()
self.tagTableWidget.setHorizontalHeaderItem(2, item)
self.tag_table_widget.setHorizontalHeaderItem(2, item)
item = QtGui.QTableWidgetItem()
self.tagTableWidget.setHorizontalHeaderItem(3, item)
self.listdataGridLayout.addWidget(self.tagTableWidget, 0, 0, 1, 1)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName(u'horizontalLayout')
spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem)
self.deletePushButton = QtGui.QPushButton(formattingTagDialog)
self.deletePushButton.setObjectName(u'deletePushButton')
self.horizontalLayout.addWidget(self.deletePushButton)
self.listdataGridLayout.addLayout(self.horizontalLayout, 1, 0, 1, 1)
self.editGroupBox = QtGui.QGroupBox(formattingTagDialog)
self.editGroupBox.setObjectName(u'editGroupBox')
self.dataGridLayout = QtGui.QGridLayout(self.editGroupBox)
self.dataGridLayout.setObjectName(u'dataGridLayout')
self.descriptionLabel = QtGui.QLabel(self.editGroupBox)
self.descriptionLabel.setAlignment(QtCore.Qt.AlignCenter)
self.descriptionLabel.setObjectName(u'descriptionLabel')
self.dataGridLayout.addWidget(self.descriptionLabel, 0, 0, 1, 1)
self.descriptionLineEdit = QtGui.QLineEdit(self.editGroupBox)
self.descriptionLineEdit.setObjectName(u'descriptionLineEdit')
self.dataGridLayout.addWidget(self.descriptionLineEdit, 0, 1, 2, 1)
self.newPushButton = QtGui.QPushButton(self.editGroupBox)
self.newPushButton.setObjectName(u'newPushButton')
self.dataGridLayout.addWidget(self.newPushButton, 0, 2, 2, 1)
self.tagLabel = QtGui.QLabel(self.editGroupBox)
self.tagLabel.setAlignment(QtCore.Qt.AlignCenter)
self.tagLabel.setObjectName(u'tagLabel')
self.dataGridLayout.addWidget(self.tagLabel, 2, 0, 1, 1)
self.tagLineEdit = QtGui.QLineEdit(self.editGroupBox)
self.tag_table_widget.setHorizontalHeaderItem(3, item)
self.list_data_grid_layout.addWidget(self.tag_table_widget, 0, 0, 1, 1)
self.horizontal_layout = QtGui.QHBoxLayout()
self.horizontal_layout.setObjectName(u'horizontal_layout')
spacer_item = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontal_layout.addItem(spacer_item)
self.delete_push_button = QtGui.QPushButton(formatting_tag_dialog)
self.delete_push_button.setObjectName(u'delete_push_button')
self.horizontal_layout.addWidget(self.delete_push_button)
self.list_data_grid_layout.addLayout(self.horizontal_layout, 1, 0, 1, 1)
self.edit_group_box = QtGui.QGroupBox(formatting_tag_dialog)
self.edit_group_box.setObjectName(u'edit_group_box')
self.data_grid_layout = QtGui.QGridLayout(self.edit_group_box)
self.data_grid_layout.setObjectName(u'data_grid_layout')
self.description_label = QtGui.QLabel(self.edit_group_box)
self.description_label.setAlignment(QtCore.Qt.AlignCenter)
self.description_label.setObjectName(u'description_label')
self.data_grid_layout.addWidget(self.description_label, 0, 0, 1, 1)
self.description_line_edit = QtGui.QLineEdit(self.edit_group_box)
self.description_line_edit.setObjectName(u'description_line_edit')
self.data_grid_layout.addWidget(self.description_line_edit, 0, 1, 2, 1)
self.new_push_button = QtGui.QPushButton(self.edit_group_box)
self.new_push_button.setObjectName(u'new_push_button')
self.data_grid_layout.addWidget(self.new_push_button, 0, 2, 2, 1)
self.tag_label = QtGui.QLabel(self.edit_group_box)
self.tag_label.setAlignment(QtCore.Qt.AlignCenter)
self.tag_label.setObjectName(u'tag_label')
self.data_grid_layout.addWidget(self.tag_label, 2, 0, 1, 1)
self.tagLineEdit = QtGui.QLineEdit(self.edit_group_box)
self.tagLineEdit.setMaximumSize(QtCore.QSize(50, 16777215))
self.tagLineEdit.setMaxLength(5)
self.tagLineEdit.setObjectName(u'tagLineEdit')
self.dataGridLayout.addWidget(self.tagLineEdit, 2, 1, 1, 1)
self.startTagLabel = QtGui.QLabel(self.editGroupBox)
self.startTagLabel.setAlignment(QtCore.Qt.AlignCenter)
self.startTagLabel.setObjectName(u'startTagLabel')
self.dataGridLayout.addWidget(self.startTagLabel, 3, 0, 1, 1)
self.startTagLineEdit = QtGui.QLineEdit(self.editGroupBox)
self.data_grid_layout.addWidget(self.tagLineEdit, 2, 1, 1, 1)
self.start_tag_label = QtGui.QLabel(self.edit_group_box)
self.start_tag_label.setAlignment(QtCore.Qt.AlignCenter)
self.start_tag_label.setObjectName(u'start_tag_label')
self.data_grid_layout.addWidget(self.start_tag_label, 3, 0, 1, 1)
self.startTagLineEdit = QtGui.QLineEdit(self.edit_group_box)
self.startTagLineEdit.setObjectName(u'startTagLineEdit')
self.dataGridLayout.addWidget(self.startTagLineEdit, 3, 1, 1, 1)
self.endTagLabel = QtGui.QLabel(self.editGroupBox)
self.endTagLabel.setAlignment(QtCore.Qt.AlignCenter)
self.endTagLabel.setObjectName(u'endTagLabel')
self.dataGridLayout.addWidget(self.endTagLabel, 4, 0, 1, 1)
self.endTagLineEdit = QtGui.QLineEdit(self.editGroupBox)
self.endTagLineEdit.setObjectName(u'endTagLineEdit')
self.dataGridLayout.addWidget(self.endTagLineEdit, 4, 1, 1, 1)
self.savePushButton = QtGui.QPushButton(self.editGroupBox)
self.savePushButton.setObjectName(u'savePushButton')
self.dataGridLayout.addWidget(self.savePushButton, 4, 2, 1, 1)
self.listdataGridLayout.addWidget(self.editGroupBox, 2, 0, 1, 1)
self.button_box = create_button_box(formattingTagDialog, u'button_box', [u'close'])
self.listdataGridLayout.addWidget(self.button_box, 3, 0, 1, 1)
self.data_grid_layout.addWidget(self.startTagLineEdit, 3, 1, 1, 1)
self.end_tag_label = QtGui.QLabel(self.edit_group_box)
self.end_tag_label.setAlignment(QtCore.Qt.AlignCenter)
self.end_tag_label.setObjectName(u'end_tag_label')
self.data_grid_layout.addWidget(self.end_tag_label, 4, 0, 1, 1)
self.end_tag_line_edit = QtGui.QLineEdit(self.edit_group_box)
self.end_tag_line_edit.setObjectName(u'end_tag_line_edit')
self.data_grid_layout.addWidget(self.end_tag_line_edit, 4, 1, 1, 1)
self.save_push_button = QtGui.QPushButton(self.edit_group_box)
self.save_push_button.setObjectName(u'save_push_button')
self.data_grid_layout.addWidget(self.save_push_button, 4, 2, 1, 1)
self.list_data_grid_layout.addWidget(self.edit_group_box, 2, 0, 1, 1)
self.button_box = create_button_box(formatting_tag_dialog, u'button_box', [u'close'])
self.list_data_grid_layout.addWidget(self.button_box, 3, 0, 1, 1)
self.retranslateUi(formattingTagDialog)
self.retranslateUi(formatting_tag_dialog)
def retranslateUi(self, formattingTagDialog):
def retranslateUi(self, formatting_tag_dialog):
"""
Translate the UI on the fly
"""
formattingTagDialog.setWindowTitle(translate('OpenLP.FormattingTagDialog', 'Configure Formatting Tags'))
self.editGroupBox.setTitle(translate('OpenLP.FormattingTagDialog', 'Edit Selection'))
self.savePushButton.setText(translate('OpenLP.FormattingTagDialog', 'Save'))
self.descriptionLabel.setText(translate('OpenLP.FormattingTagDialog', 'Description'))
self.tagLabel.setText(translate('OpenLP.FormattingTagDialog', 'Tag'))
self.startTagLabel.setText(translate('OpenLP.FormattingTagDialog', 'Start HTML'))
self.endTagLabel.setText(translate('OpenLP.FormattingTagDialog', 'End HTML'))
self.deletePushButton.setText(UiStrings().Delete)
self.newPushButton.setText(UiStrings().New)
self.tagTableWidget.horizontalHeaderItem(0).setText(translate('OpenLP.FormattingTagDialog', 'Description'))
self.tagTableWidget.horizontalHeaderItem(1).setText(translate('OpenLP.FormattingTagDialog', 'Tag'))
self.tagTableWidget.horizontalHeaderItem(2).setText(translate('OpenLP.FormattingTagDialog', 'Start HTML'))
self.tagTableWidget.horizontalHeaderItem(3).setText(translate('OpenLP.FormattingTagDialog', 'End HTML'))
self.tagTableWidget.setColumnWidth(0, 120)
self.tagTableWidget.setColumnWidth(1, 80)
self.tagTableWidget.setColumnWidth(2, 330)
formatting_tag_dialog.setWindowTitle(translate('OpenLP.FormattingTagDialog', 'Configure Formatting Tags'))
self.edit_group_box.setTitle(translate('OpenLP.FormattingTagDialog', 'Edit Selection'))
self.save_push_button.setText(translate('OpenLP.FormattingTagDialog', 'Save'))
self.description_label.setText(translate('OpenLP.FormattingTagDialog', 'Description'))
self.tag_label.setText(translate('OpenLP.FormattingTagDialog', 'Tag'))
self.start_tag_label.setText(translate('OpenLP.FormattingTagDialog', 'Start HTML'))
self.end_tag_label.setText(translate('OpenLP.FormattingTagDialog', 'End HTML'))
self.delete_push_button.setText(UiStrings().Delete)
self.new_push_button.setText(UiStrings().New)
self.tag_table_widget.horizontalHeaderItem(0).setText(translate('OpenLP.FormattingTagDialog', 'Description'))
self.tag_table_widget.horizontalHeaderItem(1).setText(translate('OpenLP.FormattingTagDialog', 'Tag'))
self.tag_table_widget.horizontalHeaderItem(2).setText(translate('OpenLP.FormattingTagDialog', 'Start HTML'))
self.tag_table_widget.horizontalHeaderItem(3).setText(translate('OpenLP.FormattingTagDialog', 'End HTML'))
self.tag_table_widget.setColumnWidth(0, 120)
self.tag_table_widget.setColumnWidth(1, 80)
self.tag_table_widget.setColumnWidth(2, 330)

View File

@ -48,15 +48,15 @@ class FormattingTagForm(QtGui.QDialog, Ui_FormattingTagDialog):
"""
QtGui.QDialog.__init__(self, parent)
self.setupUi(self)
QtCore.QObject.connect(self.tagTableWidget, QtCore.SIGNAL(u'itemSelectionChanged()'), self.onRowSelected)
QtCore.QObject.connect(self.newPushButton, QtCore.SIGNAL(u'clicked()'), self.onNewClicked)
QtCore.QObject.connect(self.savePushButton, QtCore.SIGNAL(u'clicked()'), self.onSavedClicked)
QtCore.QObject.connect(self.deletePushButton, QtCore.SIGNAL(u'clicked()'), self.onDeleteClicked)
QtCore.QObject.connect(self.tag_table_widget, QtCore.SIGNAL(u'itemSelectionChanged()'), self.onRowSelected)
QtCore.QObject.connect(self.new_push_button, QtCore.SIGNAL(u'clicked()'), self.onNewClicked)
QtCore.QObject.connect(self.save_push_button, QtCore.SIGNAL(u'clicked()'), self.onSavedClicked)
QtCore.QObject.connect(self.delete_push_button, QtCore.SIGNAL(u'clicked()'), self.onDeleteClicked)
QtCore.QObject.connect(self.button_box, QtCore.SIGNAL(u'rejected()'), self.close)
QtCore.QObject.connect(self.descriptionLineEdit, QtCore.SIGNAL(u'textEdited(QString)'), self.onTextEdited)
QtCore.QObject.connect(self.description_line_edit, QtCore.SIGNAL(u'textEdited(QString)'), self.onTextEdited)
QtCore.QObject.connect(self.tagLineEdit, QtCore.SIGNAL(u'textEdited(QString)'), self.onTextEdited)
QtCore.QObject.connect(self.startTagLineEdit, QtCore.SIGNAL(u'textEdited(QString)'), self.onTextEdited)
QtCore.QObject.connect(self.endTagLineEdit, QtCore.SIGNAL(u'textEdited(QString)'), self.onTextEdited)
QtCore.QObject.connect(self.end_tag_line_edit, QtCore.SIGNAL(u'textEdited(QString)'), self.onTextEdited)
# Forces reloading of tags from openlp configuration.
FormattingTags.load_tags()
@ -73,32 +73,32 @@ class FormattingTagForm(QtGui.QDialog, Ui_FormattingTagDialog):
"""
Table Row selected so display items and set field state.
"""
self.savePushButton.setEnabled(False)
self.selected = self.tagTableWidget.currentRow()
self.save_push_button.setEnabled(False)
self.selected = self.tag_table_widget.currentRow()
html = FormattingTags.get_html_tags()[self.selected]
self.descriptionLineEdit.setText(html[u'desc'])
self.description_line_edit.setText(html[u'desc'])
self.tagLineEdit.setText(self._strip(html[u'start tag']))
self.startTagLineEdit.setText(html[u'start html'])
self.endTagLineEdit.setText(html[u'end html'])
self.end_tag_line_edit.setText(html[u'end html'])
if html[u'protected']:
self.descriptionLineEdit.setEnabled(False)
self.description_line_edit.setEnabled(False)
self.tagLineEdit.setEnabled(False)
self.startTagLineEdit.setEnabled(False)
self.endTagLineEdit.setEnabled(False)
self.deletePushButton.setEnabled(False)
self.end_tag_line_edit.setEnabled(False)
self.delete_push_button.setEnabled(False)
else:
self.descriptionLineEdit.setEnabled(True)
self.description_line_edit.setEnabled(True)
self.tagLineEdit.setEnabled(True)
self.startTagLineEdit.setEnabled(True)
self.endTagLineEdit.setEnabled(True)
self.deletePushButton.setEnabled(True)
self.end_tag_line_edit.setEnabled(True)
self.delete_push_button.setEnabled(True)
def onTextEdited(self, text):
"""
Enable the ``savePushButton`` when any of the selected tag's properties
Enable the ``save_push_button`` when any of the selected tag's properties
has been changed.
"""
self.savePushButton.setEnabled(True)
self.save_push_button.setEnabled(True)
def onNewClicked(self):
"""
@ -124,9 +124,9 @@ class FormattingTagForm(QtGui.QDialog, Ui_FormattingTagDialog):
FormattingTags.save_html_tags()
self._reloadTable()
# Highlight new row
self.tagTableWidget.selectRow(self.tagTableWidget.rowCount() - 1)
self.tag_table_widget.selectRow(self.tag_table_widget.rowCount() - 1)
self.onRowSelected()
self.tagTableWidget.scrollToBottom()
self.tag_table_widget.scrollToBottom()
def onDeleteClicked(self):
"""
@ -136,7 +136,7 @@ class FormattingTagForm(QtGui.QDialog, Ui_FormattingTagDialog):
FormattingTags.remove_html_tag(self.selected)
# As the first items are protected we should not have to take care
# of negative indexes causing tracebacks.
self.tagTableWidget.selectRow(self.selected - 1)
self.tag_table_widget.selectRow(self.selected - 1)
self.selected = -1
FormattingTags.save_html_tags()
self._reloadTable()
@ -155,9 +155,9 @@ class FormattingTagForm(QtGui.QDialog, Ui_FormattingTagDialog):
translate('OpenLP.FormattingTagForm', 'Update Error'),
translate('OpenLP.FormattingTagForm', 'Tag %s already defined.') % tag)
return
html[u'desc'] = self.descriptionLineEdit.text()
html[u'desc'] = self.description_line_edit.text()
html[u'start html'] = self.startTagLineEdit.text()
html[u'end html'] = self.endTagLineEdit.text()
html[u'end html'] = self.end_tag_line_edit.text()
html[u'start tag'] = u'{%s}' % tag
html[u'end tag'] = u'{/%s}' % tag
# Keep temporary tags when the user changes one.
@ -170,29 +170,29 @@ class FormattingTagForm(QtGui.QDialog, Ui_FormattingTagDialog):
"""
Reset List for loading.
"""
self.tagTableWidget.clearContents()
self.tagTableWidget.setRowCount(0)
self.newPushButton.setEnabled(True)
self.savePushButton.setEnabled(False)
self.deletePushButton.setEnabled(False)
self.tag_table_widget.clearContents()
self.tag_table_widget.setRowCount(0)
self.new_push_button.setEnabled(True)
self.save_push_button.setEnabled(False)
self.delete_push_button.setEnabled(False)
for linenumber, html in enumerate(FormattingTags.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.tag_table_widget.setRowCount(self.tag_table_widget.rowCount() + 1)
self.tag_table_widget.setItem(linenumber, 0, QtGui.QTableWidgetItem(html[u'desc']))
self.tag_table_widget.setItem(linenumber, 1, QtGui.QTableWidgetItem(self._strip(html[u'start tag'])))
self.tag_table_widget.setItem(linenumber, 2, QtGui.QTableWidgetItem(html[u'start html']))
self.tag_table_widget.setItem(linenumber, 3, QtGui.QTableWidgetItem(html[u'end html']))
# Permanent (persistent) tags do not have this key.
if u'temporary' not in html:
html[u'temporary'] = False
self.tagTableWidget.resizeRowsToContents()
self.descriptionLineEdit.setText(u'')
self.tag_table_widget.resizeRowsToContents()
self.description_line_edit.setText(u'')
self.tagLineEdit.setText(u'')
self.startTagLineEdit.setText(u'')
self.endTagLineEdit.setText(u'')
self.descriptionLineEdit.setEnabled(False)
self.end_tag_line_edit.setText(u'')
self.description_line_edit.setEnabled(False)
self.tagLineEdit.setEnabled(False)
self.startTagLineEdit.setEnabled(False)
self.endTagLineEdit.setEnabled(False)
self.end_tag_line_edit.setEnabled(False)
def _strip(self, tag):
"""

View File

@ -69,7 +69,7 @@ class Ui_ShortcutListDialog(object):
self.shortcutListLayout = QtGui.QVBoxLayout(shortcutListDialog)
self.shortcutListLayout.setObjectName(u'shortcutListLayout')
self.descriptionLabel = QtGui.QLabel(shortcutListDialog)
self.descriptionLabel.setObjectName(u'descriptionLabel')
self.descriptionLabel.setObjectName(u'description_label')
self.descriptionLabel.setWordWrap(True)
self.shortcutListLayout.addWidget(self.descriptionLabel)
self.treeWidget = QtGui.QTreeWidget(shortcutListDialog)

View File

@ -224,8 +224,8 @@ class BibleUpgradeForm(OpenLPWizard):
self.checkBox[number].setText(bible.get_name())
self.checkBox[number].setCheckState(QtCore.Qt.Checked)
self.formLayout.addWidget(self.checkBox[number])
self.spacerItem = QtGui.QSpacerItem(20, 5, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.formLayout.addItem(self.spacerItem)
self.spacer_item = QtGui.QSpacerItem(20, 5, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.formLayout.addItem(self.spacer_item)
self.scrollArea.setWidget(self.scrollAreaContents)
def clearScrollArea(self):
@ -235,7 +235,7 @@ class BibleUpgradeForm(OpenLPWizard):
for number, filename in enumerate(self.files):
self.formLayout.removeWidget(self.checkBox[number])
self.checkBox[number].setParent(None)
self.formLayout.removeItem(self.spacerItem)
self.formLayout.removeItem(self.spacer_item)
def retranslateUi(self):
"""

View File

@ -110,15 +110,15 @@ class SongExportForm(OpenLPWizard):
self.availableListWidget.setObjectName(u'availableListWidget')
self.verticalLayout.addWidget(self.availableListWidget)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName(u'horizontalLayout')
self.horizontalLayout.setObjectName(u'horizontal_layout')
self.searchLabel = QtGui.QLabel(self.availableSongsPage)
self.searchLabel.setObjectName(u'searchLabel')
self.horizontalLayout.addWidget(self.searchLabel)
self.searchLineEdit = QtGui.QLineEdit(self.availableSongsPage)
self.searchLineEdit.setObjectName(u'searchLineEdit')
self.horizontalLayout.addWidget(self.searchLineEdit)
spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem)
spacer_item = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacer_item)
self.uncheckButton = QtGui.QPushButton(self.availableSongsPage)
self.uncheckButton.setObjectName(u'uncheckButton')
self.horizontalLayout.addWidget(self.uncheckButton)
@ -139,7 +139,7 @@ class SongExportForm(OpenLPWizard):
self.selectedListWidget.setObjectName(u'selectedListWidget')
self.gridLayout.addWidget(self.selectedListWidget, 1, 0, 1, 1)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName(u'horizontalLayout')
self.horizontalLayout.setObjectName(u'horizontal_layout')
self.directoryLabel = QtGui.QLabel(self.exportSongPage)
self.directoryLabel.setObjectName(u'directoryLabel')
self.horizontalLayout.addWidget(self.directoryLabel)

View File

@ -157,7 +157,7 @@ class SongImportForm(OpenLPWizard):
combo_box_text = (custom_combo_text if custom_combo_text else format_name)
self.formatComboBox.setItemText(format, combo_box_text)
if description_text is not None:
self.formatWidgets[format][u'descriptionLabel'].setText(description_text)
self.formatWidgets[format][u'description_label'].setText(description_text)
if select_mode == SongFormatSelect.MultipleFiles:
self.formatWidgets[format][u'addButton'].setText(
translate('SongsPlugin.ImportWizardForm', 'Add Files...'))