From 25919a34b26934a109903facc298053c184a1f7a Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Thu, 7 Mar 2013 18:58:15 +0100 Subject: [PATCH] fixed objectNames --- openlp/core/ui/filerenamedialog.py | 8 +++--- openlp/core/ui/firsttimewizard.py | 8 +++--- openlp/core/ui/wizard.py | 2 +- openlp/plugins/songs/forms/editsongdialog.py | 10 +++---- openlp/plugins/songs/forms/songexportform.py | 5 ++-- openlp/plugins/songs/forms/songimportform.py | 30 ++++++++++---------- 6 files changed, 32 insertions(+), 31 deletions(-) diff --git a/openlp/core/ui/filerenamedialog.py b/openlp/core/ui/filerenamedialog.py index 71c7cf8fb..9241ba761 100644 --- a/openlp/core/ui/filerenamedialog.py +++ b/openlp/core/ui/filerenamedialog.py @@ -43,16 +43,16 @@ class Ui_FileRenameDialog(object): """ Set up the UI """ - file_rename_dialog.setObjectName(u'fileRenameDialog') + file_rename_dialog.setObjectName(u'file_rename_dialog') file_rename_dialog.resize(300, 10) self.dialog_layout = QtGui.QGridLayout(file_rename_dialog) - self.dialog_layout.setObjectName(u'dialogLayout') + self.dialog_layout.setObjectName(u'dialog_layout') self.file_name_label = QtGui.QLabel(file_rename_dialog) - self.file_name_label.setObjectName(u'fileNameLabel') + self.file_name_label.setObjectName(u'file_name_label') self.dialog_layout.addWidget(self.file_name_label, 0, 0) self.file_name_edit = QtGui.QLineEdit(file_rename_dialog) self.file_name_edit.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp(r'[^/\\?*|<>\[\]":+%]+'), self)) - self.file_name_edit.setObjectName(u'fileNameEdit') + self.file_name_edit.setObjectName(u'file_name_edit') self.dialog_layout.addWidget(self.file_name_edit, 0, 1) self.button_box = create_button_box(file_rename_dialog, u'button_box', [u'cancel', u'ok']) self.dialog_layout.addWidget(self.button_box, 1, 0, 1, 2) diff --git a/openlp/core/ui/firsttimewizard.py b/openlp/core/ui/firsttimewizard.py index db725be4e..3a96873f5 100644 --- a/openlp/core/ui/firsttimewizard.py +++ b/openlp/core/ui/firsttimewizard.py @@ -191,15 +191,15 @@ class Ui_FirstTimeWizard(object): FirstTimeWizard.setPage(FirstTimePage.Defaults, self.defaultsPage) # Progress page self.progressPage = QtGui.QWizardPage() - self.progressPage.setObjectName(u'progress_page') + self.progressPage.setObjectName(u'progressPage') self.progressLayout = QtGui.QVBoxLayout(self.progressPage) self.progressLayout.setMargin(48) - self.progressLayout.setObjectName(u'progress_layout') + self.progressLayout.setObjectName(u'progressLayout') self.progressLabel = QtGui.QLabel(self.progressPage) - self.progressLabel.setObjectName(u'progress_label') + self.progressLabel.setObjectName(u'progressLabel') self.progressLayout.addWidget(self.progressLabel) self.progressBar = QtGui.QProgressBar(self.progressPage) - self.progressBar.setObjectName(u'progress_bar') + self.progressBar.setObjectName(u'progressBar') self.progressLayout.addWidget(self.progressBar) FirstTimeWizard.setPage(FirstTimePage.Progress, self.progressPage) self.retranslateUi(FirstTimeWizard) diff --git a/openlp/core/ui/wizard.py b/openlp/core/ui/wizard.py index dc3024632..23ce68a3f 100644 --- a/openlp/core/ui/wizard.py +++ b/openlp/core/ui/wizard.py @@ -136,7 +136,7 @@ class OpenLPWizard(QtGui.QWizard): # Add a QTextEdit and a copy to file and copy to clipboard button to be # able to provide feedback to the user. Hidden by default. self.error_report_text_edit = QtGui.QTextEdit(self.progress_page) - self.error_report_text_edit.setObjectName(u'progresserrorReportTextEdit') + self.error_report_text_edit.setObjectName(u'error_report_text_edit') self.error_report_text_edit.setHidden(True) self.error_report_text_edit.setReadOnly(True) self.progress_layout.addWidget(self.error_report_text_edit) diff --git a/openlp/plugins/songs/forms/editsongdialog.py b/openlp/plugins/songs/forms/editsongdialog.py index 2c579c90e..4ea75d700 100644 --- a/openlp/plugins/songs/forms/editsongdialog.py +++ b/openlp/plugins/songs/forms/editsongdialog.py @@ -57,12 +57,12 @@ class Ui_EditSongDialog(object): self.titleEdit.setObjectName(u'titleEdit') self.title_label.setBuddy(self.titleEdit) self.lyricsTabLayout.addWidget(self.titleEdit, 0, 1, 1, 2) - self.alternativetitle_label = QtGui.QLabel(self.lyricsTab) - self.alternativetitle_label.setObjectName(u'alternativetitle_label') - self.lyricsTabLayout.addWidget(self.alternativetitle_label, 1, 0) + self.alternative_title_label = QtGui.QLabel(self.lyricsTab) + self.alternative_title_label.setObjectName(u'alternative_title_label') + self.lyricsTabLayout.addWidget(self.alternative_title_label, 1, 0) self.alternativeEdit = QtGui.QLineEdit(self.lyricsTab) self.alternativeEdit.setObjectName(u'alternativeEdit') - self.alternativetitle_label.setBuddy(self.alternativeEdit) + self.alternative_title_label.setBuddy(self.alternativeEdit) self.lyricsTabLayout.addWidget(self.alternativeEdit, 1, 1, 1, 2) self.lyricsLabel = QtGui.QLabel(self.lyricsTab) self.lyricsLabel.setFixedHeight(self.titleEdit.sizeHint().height()) @@ -280,7 +280,7 @@ class Ui_EditSongDialog(object): def retranslateUi(self, editSongDialog): editSongDialog.setWindowTitle(translate('SongsPlugin.EditSongForm', 'Song Editor')) self.title_label.setText(translate('SongsPlugin.EditSongForm', '&Title:')) - self.alternativetitle_label.setText(translate('SongsPlugin.EditSongForm', 'Alt&ernate title:')) + self.alternative_title_label.setText(translate('SongsPlugin.EditSongForm', 'Alt&ernate title:')) self.lyricsLabel.setText(translate('SongsPlugin.EditSongForm', '&Lyrics:')) self.verseOrderLabel.setText(translate('SongsPlugin.EditSongForm', '&Verse order:')) self.verseAddButton.setText(UiStrings().Add) diff --git a/openlp/plugins/songs/forms/songexportform.py b/openlp/plugins/songs/forms/songexportform.py index 65f813dba..78b00a00b 100644 --- a/openlp/plugins/songs/forms/songexportform.py +++ b/openlp/plugins/songs/forms/songexportform.py @@ -108,7 +108,7 @@ class SongExportForm(OpenLPWizard): self.availableListWidget.setObjectName(u'availableListWidget') self.verticalLayout.addWidget(self.availableListWidget) self.horizontalLayout = QtGui.QHBoxLayout() - self.horizontalLayout.setObjectName(u'horizontal_layout') + self.horizontalLayout.setObjectName(u'horizontalLayout') self.searchLabel = QtGui.QLabel(self.availableSongsPage) self.searchLabel.setObjectName(u'searchLabel') self.horizontalLayout.addWidget(self.searchLabel) @@ -136,8 +136,9 @@ class SongExportForm(OpenLPWizard): self.selectedListWidget = QtGui.QListWidget(self.exportSongPage) self.selectedListWidget.setObjectName(u'selectedListWidget') self.gridLayout.addWidget(self.selectedListWidget, 1, 0, 1, 1) + # FIXME: self.horizontalLayout is already defined above?!?!? self.horizontalLayout = QtGui.QHBoxLayout() - self.horizontalLayout.setObjectName(u'horizontal_layout') + self.horizontalLayout.setObjectName(u'horizontalLayout') self.directoryLabel = QtGui.QLabel(self.exportSongPage) self.directoryLabel.setObjectName(u'directoryLabel') self.horizontalLayout.addWidget(self.directoryLabel) diff --git a/openlp/plugins/songs/forms/songimportform.py b/openlp/plugins/songs/forms/songimportform.py index 8b5bcb82a..f956e13a7 100644 --- a/openlp/plugins/songs/forms/songimportform.py +++ b/openlp/plugins/songs/forms/songimportform.py @@ -109,15 +109,15 @@ class SongImportForm(OpenLPWizard): """ # Source Page self.source_page = SongImportSourcePage() - self.source_page.setObjectName(u'SourcePage') + self.source_page.setObjectName(u'source_page') self.source_layout = QtGui.QVBoxLayout(self.source_page) - self.source_layout.setObjectName(u'SourceLayout') + self.source_layout.setObjectName(u'source_layout') self.format_layout = QtGui.QFormLayout() - self.format_layout.setObjectName(u'FormatLayout') + self.format_layout.setObjectName(u'format_layout') self.format_label = QtGui.QLabel(self.source_page) - self.format_label.setObjectName(u'FormatLabel') + self.format_label.setObjectName(u'format_label') self.format_combo_box = QtGui.QComboBox(self.source_page) - self.format_combo_box.setObjectName(u'FormatComboBox') + self.format_combo_box.setObjectName(u'format_combo_box') self.format_layout.addRow(self.format_label, self.format_combo_box) self.format_spacer = QtGui.QSpacerItem(10, 0, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum) self.format_layout.setItem(1, QtGui.QFormLayout.LabelRole, self.format_spacer) @@ -127,7 +127,7 @@ class SongImportForm(OpenLPWizard): self.format_layout.setVerticalSpacing(0) self.stack_spacer = QtGui.QSpacerItem(10, 0, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Expanding) self.format_stack = QtGui.QStackedLayout() - self.format_stack.setObjectName(u'FormatStack') + self.format_stack.setObjectName(u'format_stack') self.disablable_formats = [] for self.current_format in SongFormat.get_format_list(): self.addFileSelectItem() @@ -395,14 +395,14 @@ class SongImportForm(OpenLPWizard): description_label = QtGui.QLabel(importWidget) description_label.setWordWrap(True) description_label.setOpenExternalLinks(True) - description_label.setObjectName(prefix + u'DescriptionLabel') + description_label.setObjectName(prefix + u'_description_label') descriptionLayout.addWidget(description_label) importLayout.addLayout(descriptionLayout) self.format_widgets[this_format][u'description_label'] = description_label self.format_widgets[this_format][u'descriptionSpacer'] = descriptionSpacer if select_mode == SongFormatSelect.SingleFile or select_mode == SongFormatSelect.SingleFolder: file_path_layout = QtGui.QHBoxLayout() - file_path_layout.setObjectName(prefix + u'FilepathLayout') + file_path_layout.setObjectName(prefix + u'_file_path_layout') file_path_layout.setContentsMargins(0, self.format_v_spacing, 0, 0) filepathLabel = QtGui.QLabel(importWidget) filepathLabel.setObjectName(prefix + u'FilepathLabel') @@ -410,7 +410,7 @@ class SongImportForm(OpenLPWizard): filepathSpacer = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) file_path_layout.addSpacerItem(filepathSpacer) file_path_edit = QtGui.QLineEdit(importWidget) - file_path_edit.setObjectName(prefix + u'FilepathEdit') + file_path_edit.setObjectName(prefix + u'_file_path_edit') file_path_layout.addWidget(file_path_edit) browseButton = QtGui.QToolButton(importWidget) browseButton.setIcon(self.open_icon) @@ -429,7 +429,7 @@ class SongImportForm(OpenLPWizard): fileListWidget.setObjectName(prefix + u'FileListWidget') importLayout.addWidget(fileListWidget) button_layout = QtGui.QHBoxLayout() - button_layout.setObjectName(prefix + u'ButtonLayout') + button_layout.setObjectName(prefix + u'_button_layout') addButton = QtGui.QPushButton(importWidget) addButton.setIcon(self.open_icon) addButton.setObjectName(prefix + u'AddButton') @@ -458,21 +458,21 @@ class SongImportForm(OpenLPWizard): layout = QtGui.QVBoxLayout(page) layout.setMargin(0) layout.setSpacing(0) - layout.setObjectName(prefix + u'Layout') + layout.setObjectName(prefix + u'_layout') disabled_widget = QtGui.QWidget(page) disabled_widget.setVisible(False) - disabled_widget.setObjectName(prefix + u'DisabledWidget') + disabled_widget.setObjectName(prefix + u'_disabled_widget') disabled_layout = QtGui.QVBoxLayout(disabled_widget) disabled_layout.setMargin(0) - disabled_layout.setObjectName(prefix + u'DisabledLayout') + disabled_layout.setObjectName(prefix + u'_disabled_layout') disabled_label = QtGui.QLabel(disabled_widget) disabled_label.setWordWrap(True) - disabled_label.setObjectName(prefix + u'DisabledLabel') + disabled_label.setObjectName(prefix + u'_disabled_label') disabled_layout.addWidget(disabled_label) disabled_layout.addSpacerItem(self.stack_spacer) layout.addWidget(disabled_widget) import_widget = QtGui.QWidget(page) - import_widget.setObjectName(prefix + u'ImportWidget') + import_widget.setObjectName(prefix + u'_import_widget') layout.addWidget(import_widget) self.format_widgets[this_format][u'layout'] = layout self.format_widgets[this_format][u'disabled_widget'] = disabled_widget