← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~googol/openlp/songs into lp:openlp

 

Andreas Preikschat has proposed merging lp:~googol/openlp/songs into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~googol/openlp/songs/+merge/100490

Hello,

Just a few trivial clean ups
-- 
https://code.launchpad.net/~googol/openlp/songs/+merge/100490
Your team OpenLP Core is requested to review the proposed merge of lp:~googol/openlp/songs into lp:openlp.
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py	2012-03-31 09:58:34 +0000
+++ openlp/plugins/songs/forms/editsongform.py	2012-04-02 18:13:26 +0000
@@ -233,10 +233,8 @@
         self.loadMediaFiles()
         self.song = self.manager.get_object(Song, id)
         self.titleEdit.setText(self.song.title)
-        if self.song.alternate_title:
-            self.alternativeEdit.setText(self.song.alternate_title)
-        else:
-            self.alternativeEdit.setText(u'')
+        self.alternativeEdit.setText(
+            self.song.alternate_title if self.song.alternate_title else u'')
         if self.song.song_book_id != 0:
             book_name = self.manager.get_object(Book, self.song.song_book_id)
             find_and_set_in_combo_box(
@@ -244,24 +242,16 @@
         if self.song.theme_name:
             find_and_set_in_combo_box(
                 self.themeComboBox, unicode(self.song.theme_name))
-        if self.song.copyright:
-            self.copyrightEdit.setText(self.song.copyright)
-        else:
-            self.copyrightEdit.setText(u'')
+        self.copyrightEdit.setText(
+            self.song.copyright if self.song.copyright else u'')
         self.verseListWidget.clear()
         self.verseListWidget.setRowCount(0)
-        if self.song.comments:
-            self.commentsEdit.setPlainText(self.song.comments)
-        else:
-            self.commentsEdit.setPlainText(u'')
-        if self.song.ccli_number:
-            self.CCLNumberEdit.setText(self.song.ccli_number)
-        else:
-            self.CCLNumberEdit.setText(u'')
-        if self.song.song_number:
-            self.songBookNumberEdit.setText(self.song.song_number)
-        else:
-            self.songBookNumberEdit.setText(u'')
+        self.commentsEdit.setPlainText(
+            self.song.comments if self.song.comments else u'')
+        self.CCLNumberEdit.setText(
+            self.song.ccli_number if self.song.ccli_number else u'')
+        self.songBookNumberEdit.setText(
+            self.song.song_number if self.song.song_number else u'')
         # lazy xml migration for now
         self.verseListWidget.clear()
         self.verseListWidget.setRowCount(0)


Follow ups