← Back to team overview

openlp-core team mailing list archive

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

 

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

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  #693150 Custom Slide Display footer option
  https://bugs.launchpad.net/bugs/693150
  #693202 delete theme
  https://bugs.launchpad.net/bugs/693202
  #696313 "Open Last Service" incorrectly opens the most recent service
  https://bugs.launchpad.net/bugs/696313
  #696362 Songbook number left from previously opened song edit dialog
  https://bugs.launchpad.net/bugs/696362

For more details, see:
https://code.launchpad.net/~trb143/openlp/bugs/+merge/45000

Two fields needed to be cleaned on New Song
Fix service auto loading
-- 
https://code.launchpad.net/~trb143/openlp/bugs/+merge/45000
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/bugs into lp:openlp.
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py	2011-01-01 12:50:49 +0000
+++ openlp/core/ui/mainwindow.py	2011-01-02 14:04:00 +0000
@@ -701,7 +701,6 @@
         if QtCore.QSettings().value(
             self.generalSettingsSection + u'/auto open',
             QtCore.QVariant(False)).toBool():
-            #self.ServiceManagerContents.onLoadService(True)
             self.ServiceManagerContents.loadLastFile()
         view_mode = QtCore.QSettings().value(u'%s/view mode' % \
             self.generalSettingsSection, u'default')

=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py	2011-01-01 12:40:33 +0000
+++ openlp/core/ui/servicemanager.py	2011-01-02 14:04:00 +0000
@@ -109,12 +109,12 @@
         self.suffixes = []
         self.dropPosition = 0
         self.expandTabs = False
-        #is a new service and has not been saved
+        # is a new service and has not been saved
         self._modified = False
         self._fileName = u''
         self.serviceNoteForm = ServiceNoteForm(self.parent)
         self.serviceItemEditForm = ServiceItemEditForm(self.parent)
-        #start with the layout
+        # start with the layout
         self.layout = QtGui.QVBoxLayout(self)
         self.layout.setSpacing(0)
         self.layout.setMargin(0)
@@ -305,6 +305,8 @@
         """
         self._fileName = unicode(fileName)
         self.parent.setServiceModified(self.isModified, self.shortFileName())
+        QtCore.QSettings(). \
+            setValue(u'service/last file',QtCore.QVariant(fileName))
 
     def fileName(self):
         """
@@ -390,6 +392,8 @@
         self.serviceItems = []
         self.setFileName(u'')
         self.setModified(False)
+        QtCore.QSettings(). \
+            setValue(u'service/last file',QtCore.QVariant(u''))
 
     def saveFile(self):
         """
@@ -530,13 +534,21 @@
         self.setFileName(fileName)
         self.parent.addRecentFile(fileName)
         self.setModified(False)
+        QtCore.QSettings(). \
+            setValue(u'service/last file',QtCore.QVariant(fileName))
         # Refresh Plugin lists
         Receiver.send_message(u'plugin_list_refresh')
 
     def loadLastFile(self):
-        if not self.parent.recentFiles:
-            return
-        self.loadFile(self.parent.recentFiles[0])
+        """
+        Load the last service item from the service manager when the
+        service was last closed. Can be blank if there was no service
+        present.
+        """
+        fileName = QtCore.QSettings(). \
+            value(u'service/last file',QtCore.QVariant(u'')).toString()
+        if fileName:
+            self.loadFile(fileName)
 
     def contextMenu(self, point):
         item = self.serviceManagerList.itemAt(point)

=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py	2010-12-26 11:04:47 +0000
+++ openlp/plugins/songs/forms/editsongform.py	2011-01-02 14:04:00 +0000
@@ -186,9 +186,11 @@
         self.AuthorsListView.clear()
         self.TopicsListView.clear()
         self.TitleEditItem.setFocus(QtCore.Qt.OtherFocusReason)
+        self.songBookNumberEdit.setText(u'')
         self.loadAuthors()
         self.loadTopics()
         self.loadBooks()
+        self.ThemeSelectionComboItem.setCurrentIndex(0)
         # it's a new song to preview is not possible
         self.previewButton.setVisible(False)
 
@@ -753,4 +755,4 @@
     def processTitle(self):
         log.debug(u'processTitle')
         self.song.search_title = re.sub(r'[\'"`,;:(){}?]+', u'',
-            unicode(self.song.search_title)).lower()
\ No newline at end of file
+            unicode(self.song.search_title)).lower()


Follow ups