← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~sam92/openlp/verse-order-warning into lp:openlp

 

Samuel Mehrbrodt has proposed merging lp:~sam92/openlp/verse-order-warning into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  Bug #1072478 in OpenLP: "Don't warn about unused verses if explicit order is missing"
  https://bugs.launchpad.net/openlp/+bug/1072478

For more details, see:
https://code.launchpad.net/~sam92/openlp/verse-order-warning/+merge/175261
-- 
https://code.launchpad.net/~sam92/openlp/verse-order-warning/+merge/175261
Your team OpenLP Core is requested to review the proposed merge of lp:~sam92/openlp/verse-order-warning into lp:openlp.
=== modified file 'openlp/plugins/songs/forms/editsongdialog.py'
--- openlp/plugins/songs/forms/editsongdialog.py	2013-06-16 17:28:44 +0000
+++ openlp/plugins/songs/forms/editsongdialog.py	2013-07-17 11:54:26 +0000
@@ -324,9 +324,6 @@
         self.audio_remove_all_button.setText(translate('SongsPlugin.EditSongForm', 'Remove &All'))
         self.not_all_verses_used_warning = \
             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.')
-
 
 def create_combo_box(parent, name):
     """

=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py	2013-06-21 18:13:59 +0000
+++ openlp/plugins/songs/forms/editsongform.py	2013-07-17 11:54:26 +0000
@@ -688,9 +688,9 @@
 
     def on_verse_order_text_changed(self, text):
         """
-        Checks if the verse order is complete or missing. Shows a error message according to the state of the verse
-        order.
-
+        Checks if the verse order is complete or missing.
+        Shows a warning message if a verse is missing.
+        
         ``text``
             The text of the verse order edit (ignored).
         """
@@ -703,15 +703,11 @@
             verse = verse.data(QtCore.Qt.UserRole)
             if verse not in verses_in_order:
                 verses_not_used.append(verse)
-        # Set the label text.
-        label_text = u''
-        # No verse order was entered.
-        if not verses_in_order:
-            label_text = self.no_verse_order_entered_warning
         # The verse order does not contain all verses.
-        elif verses_not_used:
-            label_text = self.not_all_verses_used_warning
-        self.warning_label.setText(label_text)
+        if verses_in_order and verses_not_used:
+            self.warning_label.setText(self.not_all_verses_used_warning)
+        else:
+            self.warning_label.setText(u"")
 
     def on_copyright_insert_button_triggered(self):
         text = self.copyright_edit.text()

=== modified file 'resources/forms/mainwindow.ui'
--- resources/forms/mainwindow.ui	2010-09-14 18:18:47 +0000
+++ resources/forms/mainwindow.ui	2013-07-17 11:54:26 +0000
@@ -38,6 +38,12 @@
        <enum>Qt::Horizontal</enum>
       </property>
       <widget class="QWidget" native="1" name="PreviewPane" >
+       <property name="minimumSize">
+        <size>
+         <width>150</width>
+         <height>0</height>
+        </size>
+       </property>
        <layout class="QVBoxLayout" name="PreviewPaneLayout" >
         <property name="spacing" >
          <number>0</number>
@@ -78,6 +84,12 @@
        </layout>
       </widget>
       <widget class="QWidget" native="1" name="LivePane" >
+       <property name="minimumSize">
+        <size>
+         <width>150</width>
+         <height>0</height>
+        </size>
+       </property>
        <layout class="QVBoxLayout" name="LivePaneLayout" >
         <property name="spacing" >
          <number>0</number>


Follow ups