forked from openlp/openlp
name standardisation + reloads song list after author(s) have been edited/merged
This commit is contained in:
parent
c7f32e280c
commit
d0e914a681
@ -430,7 +430,7 @@ class Ui_EditSongDialog(object):
|
||||
self.AuthorRemoveButton.setText(
|
||||
translate('SongsPlugin.EditSongForm', '&Remove'))
|
||||
self.MaintenanceButton.setText(translate('SongsPlugin.EditSongForm',
|
||||
'&Manage Authors, Topics, Books'))
|
||||
'&Manage Authors, Topics, Song Books'))
|
||||
self.TopicGroupBox.setTitle(
|
||||
translate('SongsPlugin.EditSongForm', 'Topic'))
|
||||
self.TopicAddButton.setText(
|
||||
@ -441,7 +441,7 @@ class Ui_EditSongDialog(object):
|
||||
translate('SongsPlugin.EditSongForm', 'Song Book'))
|
||||
self.SongTabWidget.setTabText(
|
||||
self.SongTabWidget.indexOf(self.AuthorsTab),
|
||||
translate('SongsPlugin.EditSongForm', 'Authors, Topics && Book'))
|
||||
translate('SongsPlugin.EditSongForm', 'Authors, Topics && Song Book'))
|
||||
self.ThemeGroupBox.setTitle(
|
||||
translate('SongsPlugin.EditSongForm', 'Theme'))
|
||||
self.ThemeAddButton.setText(
|
||||
|
@ -68,7 +68,7 @@ class Ui_SongBookDialog(object):
|
||||
|
||||
def retranslateUi(self, SongBookDialog):
|
||||
SongBookDialog.setWindowTitle(
|
||||
translate('SongsPlugin.SongBookForm', 'Edit Book'))
|
||||
translate('SongsPlugin.SongBookForm', 'Song Book Maintenance'))
|
||||
self.NameLabel.setText(translate('SongsPlugin.SongBookForm', '&Name:'))
|
||||
self.PublisherLabel.setText(
|
||||
translate('SongsPlugin.SongBookForm', '&Publisher:'))
|
||||
|
@ -217,7 +217,7 @@ class Ui_SongMaintenanceDialog(object):
|
||||
self.TypeListWidget.item(1).setText(
|
||||
translate('SongsPlugin.SongMaintenanceForm', 'Topics'))
|
||||
self.TypeListWidget.item(2).setText(
|
||||
translate('SongsPlugin.SongMaintenanceForm', 'Books/Hymnals'))
|
||||
translate('SongsPlugin.SongMaintenanceForm', 'Song Books'))
|
||||
self.AuthorAddButton.setText(
|
||||
translate('SongsPlugin.SongMaintenanceForm', '&Add'))
|
||||
self.AuthorEditButton.setText(
|
||||
|
@ -26,7 +26,7 @@
|
||||
from PyQt4 import QtGui, QtCore
|
||||
from sqlalchemy.sql import and_
|
||||
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib import Receiver, translate
|
||||
from openlp.plugins.songs.forms import AuthorsForm, TopicsForm, SongBookForm
|
||||
from openlp.plugins.songs.lib.db import Author, Book, Topic, Song, \
|
||||
SongsTopics, AuthorsSongs
|
||||
@ -278,9 +278,11 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
||||
if self.checkAuthor(author, True):
|
||||
if self.songmanager.save_object(author):
|
||||
self.resetAuthors()
|
||||
Receiver.send_message(u'songs_load_list')
|
||||
else:
|
||||
QtGui.QMessageBox.critical(self,
|
||||
translate('SongsPlugin.SongMaintenanceForm', 'Error'),
|
||||
translate('SongsPlugin.SongMaintenanceForm',
|
||||
'Error'),
|
||||
translate('SongsPlugin.SongMaintenanceForm',
|
||||
'Could not save your changes.'))
|
||||
elif QtGui.QMessageBox.critical(self,
|
||||
@ -293,6 +295,7 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
||||
QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.Yes:
|
||||
self.mergeAuthors(author)
|
||||
self.resetAuthors()
|
||||
Receiver.send_message(u'songs_load_list')
|
||||
else:
|
||||
# We restore the author's old first and last name as well as
|
||||
# his display name.
|
||||
@ -319,7 +322,8 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
||||
self.resetTopics()
|
||||
else:
|
||||
QtGui.QMessageBox.critical(self,
|
||||
translate('SongsPlugin.SongMaintenanceForm', 'Error'),
|
||||
translate('SongsPlugin.SongMaintenanceForm',
|
||||
'Error'),
|
||||
translate('SongsPlugin.SongMaintenanceForm',
|
||||
'Could not save your changes.'))
|
||||
elif QtGui.QMessageBox.critical(self,
|
||||
|
Loading…
Reference in New Issue
Block a user