Make button action clearer

Fixes: https://launchpad.net/bugs/1673113
This commit is contained in:
Phill 2019-07-31 21:12:11 +01:00
parent 5fb9eb70af
commit 6b9e36e7af
3 changed files with 5 additions and 0 deletions

View File

@ -425,6 +425,7 @@ class UiStrings(metaclass=Singleton):
self.ResetLiveBG = translate('OpenLP.Ui', 'Reset live background.')
self.RequiredShowInFooter = translate('OpenLP.Ui', 'Required, this will be displayed in footer.')
self.Seconds = translate('OpenLP.Ui', 's', 'The abbreviated unit for seconds')
self.SaveAndClose = translate('OpenLP.ui', translate('SongsPlugin.EditSongForm', '&Save && Close'))
self.SaveAndPreview = translate('OpenLP.Ui', 'Save && Preview')
self.Search = translate('OpenLP.Ui', 'Search')
self.SearchThemes = translate('OpenLP.Ui', 'Search Themes...', 'Search bar place holder text ')

View File

@ -97,6 +97,7 @@ class Ui_CustomEditDialog(object):
self.preview_button = QtWidgets.QPushButton()
self.button_box = create_button_box(custom_edit_dialog, 'button_box', ['cancel', 'save'],
[self.preview_button])
self.save_button = self.button_box.button(QtWidgets.QDialogButtonBox.Save)
self.dialog_layout.addWidget(self.button_box)
self.retranslate_ui(custom_edit_dialog)
@ -112,3 +113,4 @@ class Ui_CustomEditDialog(object):
self.theme_label.setText(translate('CustomPlugin.EditCustomForm', 'The&me:'))
self.credit_label.setText(translate('CustomPlugin.EditCustomForm', '&Credits:'))
self.preview_button.setText(UiStrings().SaveAndPreview)
self.save_button.setText(UiStrings().SaveAndClose)

View File

@ -291,6 +291,7 @@ class Ui_EditSongDialog(object):
self.warning_label.setObjectName('warning_label')
self.bottom_layout.addWidget(self.warning_label)
self.button_box = create_button_box(edit_song_dialog, 'button_box', ['cancel', 'save'])
self.save_button = self.button_box.button(QtWidgets.QDialogButtonBox.Save)
self.bottom_layout.addWidget(self.button_box)
self.dialog_layout.addLayout(self.bottom_layout)
self.retranslate_ui(edit_song_dialog)
@ -341,6 +342,7 @@ class Ui_EditSongDialog(object):
translate('SongsPlugin.EditSongForm', '<strong>Warning:</strong> Not all of the verses are in use.')
self.no_verse_order_entered_warning = \
translate('SongsPlugin.EditSongForm', '<strong>Warning:</strong> You have not entered a verse order.')
self.save_button.setText(UiStrings().SaveAndPreview)
def create_combo_box(parent, name, editable=True):