openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #04577
[Merge] lp:~googol-hush/openlp/fixes into lp:openlp
Andreas Preikschat has proposed merging lp:~googol-hush/openlp/fixes into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
- docs
- disable "edit" and "delete" button when loading a song or creating a new one (*)
(*) To reproduce this, edit/create a song, select a verse and click "Cancel". When you edit/create another song, the "edit" and "delete" buttons are enabled.
--
https://code.launchpad.net/~googol-hush/openlp/fixes/+merge/42046
Your team OpenLP Core is requested to review the proposed merge of lp:~googol-hush/openlp/fixes into lp:openlp.
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py 2010-11-03 18:18:44 +0000
+++ openlp/plugins/songs/forms/editsongform.py 2010-11-28 15:20:17 +0000
@@ -152,6 +152,7 @@
def newSong(self):
log.debug(u'New Song')
+ self.initialise()
self.SongTabWidget.setCurrentIndex(0)
self.TitleEditItem.setText(u'')
self.AlternativeEdit.setText(u'')
@@ -170,8 +171,18 @@
# it's a new song to preview is not possible
self.previewButton.setVisible(False)
- def loadSong(self, id, preview):
+ def loadSong(self, id, preview=False):
+ """
+ Loads a song.
+
+ ``id``
+ The song id (int).
+
+ ``preview``
+ Should be ``True`` if the song is also previewed (boolean).
+ """
log.debug(u'Load Song')
+ self.initialise()
self.SongTabWidget.setCurrentIndex(0)
self.loadAuthors()
self.loadTopics()
@@ -594,6 +605,9 @@
"""
Save and Preview button pressed.
The Song is valid so as the plugin to add it to preview to see.
+
+ ``button``
+ A button (QPushButton).
"""
log.debug(u'onPreview')
if unicode(button.objectName()) == u'previewButton' and \
@@ -631,7 +645,7 @@
database.
``preview``
- Should be True if song is also previewed.
+ Should be ``True`` if the song is also previewed (boolean).
"""
self.song.title = unicode(self.TitleEditItem.text())
self.song.alternate_title = unicode(self.AlternativeEdit.text())
Follow ups