← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~trb143/openlp/working into lp:openlp

 

Tim Bentley has proposed merging lp:~trb143/openlp/working into lp:openlp.

    Requested reviews:
    Raoul Snyman (raoul-snyman)

-- 
https://code.launchpad.net/~trb143/openlp/working/+merge/18913
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/plugins/presentations/lib/mediaitem.py'
--- openlp/plugins/presentations/lib/mediaitem.py	2010-01-29 11:59:13 +0000
+++ openlp/plugins/presentations/lib/mediaitem.py	2010-02-09 11:30:30 +0000
@@ -68,7 +68,7 @@
             if self.controllers[controller].enabled:
                 for type in self.controllers[controller].supports:
                     if fileType.find(type) == -1:
-                        fileType += type + u' '
+                        fileType += u'*%s ' % type
         self.OnNewFileMasks = self.trUtf8('Presentations (%s)' % fileType)
 
     def requiredIcons(self):

=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py	2009-12-31 12:52:01 +0000
+++ openlp/plugins/songs/forms/editsongform.py	2010-02-09 11:30:30 +0000
@@ -316,13 +316,13 @@
 
     def onVerseAddButtonClicked(self):
         self.verse_form.setVerse(u'', self.VerseListWidget.count() + 1, True)
-        self.verse_form.exec_()
-        afterText, verse, subVerse = self.verse_form.getVerse()
-        data = u'%s:%s' %(verse, subVerse)
-        item = QtGui.QListWidgetItem(afterText)
-        item.setData(QtCore.Qt.UserRole, QtCore.QVariant(data))
-        item.setText(afterText)
-        self.VerseListWidget.addItem(item)
+        if self.verse_form.exec_():
+            afterText, verse, subVerse = self.verse_form.getVerse()
+            data = u'%s:%s' %(verse, subVerse)
+            item = QtGui.QListWidgetItem(afterText)
+            item.setData(QtCore.Qt.UserRole, QtCore.QVariant(data))
+            item.setText(afterText)
+            self.VerseListWidget.addItem(item)
 
     def onVerseEditButtonClicked(self):
         item = self.VerseListWidget.currentItem()
@@ -331,25 +331,25 @@
             verseId = unicode((item.data(QtCore.Qt.UserRole)).toString())
             self.verse_form.setVerse(tempText, \
                 self.VerseListWidget.count(), True, verseId)
-            self.verse_form.exec_()
-            afterText, verse, subVerse = self.verse_form.getVerse()
-            data = u'%s:%s' %(verse, subVerse)
-            item.setData(QtCore.Qt.UserRole, QtCore.QVariant(data))
-            item.setText(afterText)
-            #number of lines has change so repaint the list moving the data
-            if len(tempText.split(u'\n')) != len(afterText.split(u'\n')):
-                tempList = {}
-                tempId = {}
-                for row in range(0, self.VerseListWidget.count()):
-                    tempList[row] = self.VerseListWidget.item(row).text()
-                    tempId[row] = self.VerseListWidget.item(row).\
-                        data(QtCore.Qt.UserRole)
-                self.VerseListWidget.clear()
-                for row in range (0, len(tempList)):
-                    item = QtGui.QListWidgetItem(tempList[row])
-                    item.setData(QtCore.Qt.UserRole, tempId[row])
-                    self.VerseListWidget.addItem(item)
-                self.VerseListWidget.repaint()
+            if self.verse_form.exec_():
+                afterText, verse, subVerse = self.verse_form.getVerse()
+                data = u'%s:%s' %(verse, subVerse)
+                item.setData(QtCore.Qt.UserRole, QtCore.QVariant(data))
+                item.setText(afterText)
+                #number of lines has change so repaint the list moving the data
+                if len(tempText.split(u'\n')) != len(afterText.split(u'\n')):
+                    tempList = {}
+                    tempId = {}
+                    for row in range(0, self.VerseListWidget.count()):
+                        tempList[row] = self.VerseListWidget.item(row).text()
+                        tempId[row] = self.VerseListWidget.item(row).\
+                            data(QtCore.Qt.UserRole)
+                    self.VerseListWidget.clear()
+                    for row in range (0, len(tempList)):
+                        item = QtGui.QListWidgetItem(tempList[row])
+                        item.setData(QtCore.Qt.UserRole, tempId[row])
+                        self.VerseListWidget.addItem(item)
+                    self.VerseListWidget.repaint()
         self.VerseEditButton.setEnabled(False)
         self.VerseDeleteButton.setEnabled(False)
 
@@ -533,4 +533,4 @@
         self.song.search_title = self.song.search_title.replace(u'{', u'')
         self.song.search_title = self.song.search_title.replace(u'}', u'')
         self.song.search_title = self.song.search_title.replace(u'?', u'')
-        self.song.search_title = unicode(self.song.search_title)
\ No newline at end of file
+        self.song.search_title = unicode(self.song.search_title)


Follow ups