forked from openlp/openlp
Only trivial changes:
- only allow to select one slide in the slidecontrollers - make curosr busy when merging authors/topics/books - cosmetic code change (saves 4 spaces all over the methods) bzr-revno: 1251
This commit is contained in:
commit
8c81afd9ec
@ -119,6 +119,8 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.previewListWidget.isLive = self.isLive
|
self.previewListWidget.isLive = self.isLive
|
||||||
self.previewListWidget.setObjectName(u'PreviewListWidget')
|
self.previewListWidget.setObjectName(u'PreviewListWidget')
|
||||||
self.previewListWidget.setSelectionBehavior(1)
|
self.previewListWidget.setSelectionBehavior(1)
|
||||||
|
self.previewListWidget.setSelectionMode(
|
||||||
|
QtGui.QAbstractItemView.SingleSelection)
|
||||||
self.previewListWidget.setEditTriggers(
|
self.previewListWidget.setEditTriggers(
|
||||||
QtGui.QAbstractItemView.NoEditTriggers)
|
QtGui.QAbstractItemView.NoEditTriggers)
|
||||||
self.previewListWidget.setHorizontalScrollBarPolicy(
|
self.previewListWidget.setHorizontalScrollBarPolicy(
|
||||||
|
@ -278,7 +278,8 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
|
|
||||||
def onAuthorEditButtonClick(self):
|
def onAuthorEditButtonClick(self):
|
||||||
author_id = self._getCurrentItemId(self.authorsListWidget)
|
author_id = self._getCurrentItemId(self.authorsListWidget)
|
||||||
if author_id != -1:
|
if author_id == -1:
|
||||||
|
return
|
||||||
author = self.manager.get_object(Author, author_id)
|
author = self.manager.get_object(Author, author_id)
|
||||||
self.authorform.setAutoDisplayName(False)
|
self.authorform.setAutoDisplayName(False)
|
||||||
self.authorform.firstNameEdit.setText(author.first_name)
|
self.authorform.firstNameEdit.setText(author.first_name)
|
||||||
@ -309,9 +310,12 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
'the existing author %s?')) % (author.display_name,
|
'the existing author %s?')) % (author.display_name,
|
||||||
temp_display_name, author.display_name),
|
temp_display_name, author.display_name),
|
||||||
parent=self, question=True) == QtGui.QMessageBox.Yes:
|
parent=self, question=True) == QtGui.QMessageBox.Yes:
|
||||||
|
Receiver.send_message(u'cursor_busy')
|
||||||
|
Receiver.send_message(u'openlp_process_events')
|
||||||
self.mergeAuthors(author)
|
self.mergeAuthors(author)
|
||||||
self.resetAuthors()
|
self.resetAuthors()
|
||||||
Receiver.send_message(u'songs_load_list')
|
Receiver.send_message(u'songs_load_list')
|
||||||
|
Receiver.send_message(u'cursor_normal')
|
||||||
else:
|
else:
|
||||||
# We restore the author's old first and last name as well as
|
# We restore the author's old first and last name as well as
|
||||||
# his display name.
|
# his display name.
|
||||||
@ -325,7 +329,8 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
|
|
||||||
def onTopicEditButtonClick(self):
|
def onTopicEditButtonClick(self):
|
||||||
topic_id = self._getCurrentItemId(self.topicsListWidget)
|
topic_id = self._getCurrentItemId(self.topicsListWidget)
|
||||||
if topic_id != -1:
|
if topic_id == -1:
|
||||||
|
return
|
||||||
topic = self.manager.get_object(Topic, topic_id)
|
topic = self.manager.get_object(Topic, topic_id)
|
||||||
self.topicform.nameEdit.setText(topic.name)
|
self.topicform.nameEdit.setText(topic.name)
|
||||||
# Save the topic's name for the case that he has to be restored.
|
# Save the topic's name for the case that he has to be restored.
|
||||||
@ -345,8 +350,11 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
'with topic %s use the existing topic %s?')) % (topic.name,
|
'with topic %s use the existing topic %s?')) % (topic.name,
|
||||||
temp_name, topic.name),
|
temp_name, topic.name),
|
||||||
parent=self, question=True) == QtGui.QMessageBox.Yes:
|
parent=self, question=True) == QtGui.QMessageBox.Yes:
|
||||||
|
Receiver.send_message(u'cursor_busy')
|
||||||
|
Receiver.send_message(u'openlp_process_events')
|
||||||
self.mergeTopics(topic)
|
self.mergeTopics(topic)
|
||||||
self.resetTopics()
|
self.resetTopics()
|
||||||
|
Receiver.send_message(u'cursor_normal')
|
||||||
else:
|
else:
|
||||||
# We restore the topics's old name.
|
# We restore the topics's old name.
|
||||||
topic.name = temp_name
|
topic.name = temp_name
|
||||||
@ -357,7 +365,8 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
|
|
||||||
def onBookEditButtonClick(self):
|
def onBookEditButtonClick(self):
|
||||||
book_id = self._getCurrentItemId(self.booksListWidget)
|
book_id = self._getCurrentItemId(self.booksListWidget)
|
||||||
if book_id != -1:
|
if book_id == -1:
|
||||||
|
return
|
||||||
book = self.manager.get_object(Book, book_id)
|
book = self.manager.get_object(Book, book_id)
|
||||||
if book.publisher is None:
|
if book.publisher is None:
|
||||||
book.publisher = u''
|
book.publisher = u''
|
||||||
@ -383,8 +392,11 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
'with book %s use the existing book %s?')) % (book.name,
|
'with book %s use the existing book %s?')) % (book.name,
|
||||||
temp_name, book.name),
|
temp_name, book.name),
|
||||||
parent=self, question=True) == QtGui.QMessageBox.Yes:
|
parent=self, question=True) == QtGui.QMessageBox.Yes:
|
||||||
|
Receiver.send_message(u'cursor_busy')
|
||||||
|
Receiver.send_message(u'openlp_process_events')
|
||||||
self.mergeBooks(book)
|
self.mergeBooks(book)
|
||||||
self.resetBooks()
|
self.resetBooks()
|
||||||
|
Receiver.send_message(u'cursor_normal')
|
||||||
else:
|
else:
|
||||||
# We restore the book's old name and publisher.
|
# We restore the book's old name and publisher.
|
||||||
book.name = temp_name
|
book.name = temp_name
|
||||||
|
Loading…
Reference in New Issue
Block a user