openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #04297
[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:
#636835 songs.sqlite will not be downsized when deleting songs
https://bugs.launchpad.net/bugs/636835
#657307 When working with a saved order of service, saving brings up the save new window instead.
https://bugs.launchpad.net/bugs/657307
Bug fixes for
Bug #636835: songs.sqlite will not be downsized when deleting songs
Bug #657307: When working with a saved order of service, saving brings up the save new window instead.
Also renamed Fedora to fedora.
--
https://code.launchpad.net/~trb143/openlp/bugs/+merge/39454
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/bugs into lp:openlp.
=== modified file 'openlp/core/lib/db.py'
--- openlp/core/lib/db.py 2010-09-14 18:18:47 +0000
+++ openlp/core/lib/db.py 2010-10-27 15:41:46 +0000
@@ -246,3 +246,10 @@
self.session.rollback()
log.exception(u'Failed to delete %s records', object_class.__name__)
return False
+
+ def finalise(self):
+ """
+ VACUUM the database on exit.
+ """
+ engine = create_engine(self.db_url)
+ engine.execute("vacuum")
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2010-09-27 18:34:40 +0000
+++ openlp/core/ui/mainwindow.py 2010-10-27 15:41:46 +0000
@@ -781,7 +781,7 @@
QtGui.QMessageBox.Save),
QtGui.QMessageBox.Save)
if ret == QtGui.QMessageBox.Save:
- self.ServiceManagerContents.onSaveService()
+ self.ServiceManagerContents.onSaveService(TRUE)
self.cleanUp()
event.accept()
elif ret == QtGui.QMessageBox.Discard:
=== modified file 'openlp/plugins/alerts/alertsplugin.py'
--- openlp/plugins/alerts/alertsplugin.py 2010-10-15 14:43:42 +0000
+++ openlp/plugins/alerts/alertsplugin.py 2010-10-27 15:41:46 +0000
@@ -117,3 +117,11 @@
self.textStrings[StringContent.VisibleName] = {
u'title': translate('AlertsPlugin', 'Alerts')
}
+
+ def finalise(self):
+ """
+ Time to tidy up on exit
+ """
+ log.info(u'Alerts Finalising')
+ self.manager.finalise()
+ Plugin.finalise(self)
=== modified file 'openlp/plugins/bibles/bibleplugin.py'
--- openlp/plugins/bibles/bibleplugin.py 2010-10-05 16:09:48 +0000
+++ openlp/plugins/bibles/bibleplugin.py 2010-10-27 15:41:46 +0000
@@ -133,42 +133,50 @@
## Import Button ##
self.textStrings[StringContent.Import] = {
u'title': translate('BiblesPlugin', 'Import'),
- u'tooltip': translate('BiblesPlugin',
+ u'tooltip': translate('BiblesPlugin',
'Import a Bible')
}
## New Button ##
self.textStrings[StringContent.New] = {
u'title': translate('BiblesPlugin', 'Add'),
- u'tooltip': translate('BiblesPlugin',
+ u'tooltip': translate('BiblesPlugin',
'Add a new Bible')
}
## Edit Button ##
self.textStrings[StringContent.Edit] = {
u'title': translate('BiblesPlugin', 'Edit'),
- u'tooltip': translate('BiblesPlugin',
+ u'tooltip': translate('BiblesPlugin',
'Edit the selected Bible')
}
## Delete Button ##
self.textStrings[StringContent.Delete] = {
u'title': translate('BiblesPlugin', 'Delete'),
- u'tooltip': translate('BiblesPlugin',
+ u'tooltip': translate('BiblesPlugin',
'Delete the selected Bible')
}
## Preview ##
self.textStrings[StringContent.Preview] = {
u'title': translate('BiblesPlugin', 'Preview'),
- u'tooltip': translate('BiblesPlugin',
+ u'tooltip': translate('BiblesPlugin',
'Preview the selected Bible')
}
## Live Button ##
self.textStrings[StringContent.Live] = {
u'title': translate('BiblesPlugin', 'Live'),
- u'tooltip': translate('BiblesPlugin',
+ u'tooltip': translate('BiblesPlugin',
'Send the selected Bible live')
}
## Add to service Button ##
self.textStrings[StringContent.Service] = {
u'title': translate('BiblesPlugin', 'Service'),
- u'tooltip': translate('BiblesPlugin',
+ u'tooltip': translate('BiblesPlugin',
'Add the selected Bible to the service')
- }
\ No newline at end of file
+ }
+
+ def finalise(self):
+ """
+ Time to tidy up on exit
+ """
+ log.info(u'Bible Finalising')
+ self.manager.finalise()
+ Plugin.finalise(self)
=== modified file 'openlp/plugins/bibles/lib/manager.py'
--- openlp/plugins/bibles/lib/manager.py 2010-10-09 19:36:05 +0000
+++ openlp/plugins/bibles/lib/manager.py 2010-10-27 15:41:46 +0000
@@ -310,3 +310,11 @@
if bible == name:
return True
return False
+
+ def finalise(self):
+ """
+ Loop through the databases to VACUUM them.
+ """
+ for bible in self.db_cache:
+ self.db_cache[bible].finalise
+
=== modified file 'openlp/plugins/custom/customplugin.py'
--- openlp/plugins/custom/customplugin.py 2010-10-05 16:09:48 +0000
+++ openlp/plugins/custom/customplugin.py 2010-10-27 15:41:46 +0000
@@ -49,8 +49,8 @@
def __init__(self, plugin_helpers):
Plugin.__init__(self, u'Custom', u'1.9.3', plugin_helpers)
self.weight = -5
- self.custommanager = Manager(u'custom', init_schema)
- self.edit_custom_form = EditCustomForm(self.custommanager)
+ self.manager = Manager(u'custom', init_schema)
+ self.edit_custom_form = EditCustomForm(self.manager)
self.icon_path = u':/plugins/plugin_custom.png'
self.icon = build_icon(self.icon_path)
@@ -115,48 +115,56 @@
## Import Button ##
self.textStrings[StringContent.Import] = {
u'title': translate('CustomsPlugin', 'Import'),
- u'tooltip': translate('CustomsPlugin',
+ u'tooltip': translate('CustomsPlugin',
'Import a Custom')
}
## Load Button ##
self.textStrings[StringContent.Load] = {
u'title': translate('CustomsPlugin', 'Load'),
- u'tooltip': translate('CustomsPlugin',
+ u'tooltip': translate('CustomsPlugin',
'Load a new Custom')
}
## New Button ##
self.textStrings[StringContent.New] = {
u'title': translate('CustomsPlugin', 'Add'),
- u'tooltip': translate('CustomsPlugin',
+ u'tooltip': translate('CustomsPlugin',
'Add a new Custom')
}
## Edit Button ##
self.textStrings[StringContent.Edit] = {
u'title': translate('CustomsPlugin', 'Edit'),
- u'tooltip': translate('CustomsPlugin',
+ u'tooltip': translate('CustomsPlugin',
'Edit the selected Custom')
}
## Delete Button ##
self.textStrings[StringContent.Delete] = {
u'title': translate('CustomsPlugin', 'Delete'),
- u'tooltip': translate('CustomsPlugin',
+ u'tooltip': translate('CustomsPlugin',
'Delete the selected Custom')
}
## Preview ##
self.textStrings[StringContent.Preview] = {
u'title': translate('CustomsPlugin', 'Preview'),
- u'tooltip': translate('CustomsPlugin',
+ u'tooltip': translate('CustomsPlugin',
'Preview the selected Custom')
}
## Live Button ##
self.textStrings[StringContent.Live] = {
u'title': translate('CustomsPlugin', 'Live'),
- u'tooltip': translate('CustomsPlugin',
+ u'tooltip': translate('CustomsPlugin',
'Send the selected Custom live')
}
## Add to service Button ##
self.textStrings[StringContent.Service] = {
u'title': translate('CustomsPlugin', 'Service'),
- u'tooltip': translate('CustomsPlugin',
+ u'tooltip': translate('CustomsPlugin',
'Add the selected Custom to the service')
- }
\ No newline at end of file
+ }
+
+ def finalise(self):
+ """
+ Time to tidy up on exit
+ """
+ log.info(u'Custom Finalising')
+ self.manager.finalise()
+ Plugin.finalise(self)
=== modified file 'openlp/plugins/custom/forms/editcustomform.py'
--- openlp/plugins/custom/forms/editcustomform.py 2010-10-10 15:59:11 +0000
+++ openlp/plugins/custom/forms/editcustomform.py 2010-10-27 15:41:46 +0000
@@ -41,7 +41,7 @@
Class documentation goes here.
"""
log.info(u'Custom Editor loaded')
- def __init__(self, custommanager, parent=None):
+ def __init__(self, manager, parent=None):
"""
Constructor
"""
@@ -74,7 +74,7 @@
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'theme_update_list'), self.loadThemes)
# Create other objects and forms.
- self.custommanager = custommanager
+ self.manager = manager
self.editSlideForm = EditCustomSlideForm(self)
self.initialise()
@@ -115,7 +115,7 @@
self.customSlide = CustomSlide()
self.initialise()
if id != 0:
- self.customSlide = self.custommanager.get_object(CustomSlide, id)
+ self.customSlide = self.manager.get_object(CustomSlide, id)
self.titleEdit.setText(self.customSlide.title)
self.creditEdit.setText(self.customSlide.credits)
customXML = CustomXMLParser(self.customSlide.text)
@@ -168,7 +168,7 @@
u'utf-8')
self.customSlide.theme_name = unicode(self.themeComboBox.currentText(),
u'utf-8')
- return self.custommanager.save_object(self.customSlide)
+ return self.manager.save_object(self.customSlide)
def onUpButtonPressed(self):
selectedRow = self.slideListView.currentRow()
=== modified file 'openlp/plugins/custom/lib/mediaitem.py'
--- openlp/plugins/custom/lib/mediaitem.py 2010-09-27 18:15:55 +0000
+++ openlp/plugins/custom/lib/mediaitem.py 2010-10-27 15:41:46 +0000
@@ -56,6 +56,7 @@
# Holds information about whether the edit is remotly triggered and
# which Custom is required.
self.remoteCustom = -1
+ self.manager = parent.manager
def addEndHeaderBar(self):
QtCore.QObject.connect(Receiver.get_receiver(),
@@ -71,7 +72,7 @@
MediaManagerItem.requiredIcons(self)
def initialise(self):
- self.loadCustomListView(self.parent.custommanager.get_all_objects(
+ self.loadCustomListView(self.manager.get_all_objects(
CustomSlide, order_by_ref=CustomSlide.title))
#Called to redisplay the song list screen edith from a search
#or from the exit of the Song edit dialog. If remote editing is active
@@ -106,7 +107,7 @@
type of display is required.
"""
fields = customid.split(u':')
- valid = self.parent.custommanager.get_object(CustomSlide, fields[1])
+ valid = self.manager.get_object(CustomSlide, fields[1])
if valid:
self.remoteCustom = fields[1]
self.remoteTriggered = fields[0]
=== modified file 'openlp/plugins/songs/songsplugin.py'
--- openlp/plugins/songs/songsplugin.py 2010-10-05 16:09:48 +0000
+++ openlp/plugins/songs/songsplugin.py 2010-10-27 15:41:46 +0000
@@ -166,36 +166,44 @@
## New Button ##
self.textStrings[StringContent.New] = {
u'title': translate('SongsPlugin', 'Add'),
- u'tooltip': translate('SongsPlugin',
+ u'tooltip': translate('SongsPlugin',
'Add a new Song')
}
## Edit Button ##
self.textStrings[StringContent.Edit] = {
u'title': translate('SongsPlugin', 'Edit'),
- u'tooltip': translate('SongsPlugin',
+ u'tooltip': translate('SongsPlugin',
'Edit the selected Song')
}
## Delete Button ##
self.textStrings[StringContent.Delete] = {
u'title': translate('SongsPlugin', 'Delete'),
- u'tooltip': translate('SongsPlugin',
+ u'tooltip': translate('SongsPlugin',
'Delete the selected Song')
}
## Preview ##
self.textStrings[StringContent.Preview] = {
u'title': translate('SongsPlugin', 'Preview'),
- u'tooltip': translate('SongsPlugin',
+ u'tooltip': translate('SongsPlugin',
'Preview the selected Song')
}
## Live Button ##
self.textStrings[StringContent.Live] = {
u'title': translate('SongsPlugin', 'Live'),
- u'tooltip': translate('SongsPlugin',
+ u'tooltip': translate('SongsPlugin',
'Send the selected Song live')
}
## Add to service Button ##
self.textStrings[StringContent.Service] = {
u'title': translate('SongsPlugin', 'Service'),
- u'tooltip': translate('SongsPlugin',
+ u'tooltip': translate('SongsPlugin',
'Add the selected Song to the service')
- }
\ No newline at end of file
+ }
+
+ def finalise(self):
+ """
+ Time to tidy up on exit
+ """
+ log.info(u'Songs Finalising')
+ self.manager.finalise()
+ Plugin.finalise(self)
=== modified file 'openlp/plugins/songusage/songusageplugin.py'
--- openlp/plugins/songusage/songusageplugin.py 2010-10-05 16:09:48 +0000
+++ openlp/plugins/songusage/songusageplugin.py 2010-10-27 15:41:46 +0000
@@ -175,4 +175,12 @@
## Name for MediaDockManager, SettingsManager ##
self.textStrings[StringContent.VisibleName] = {
u'title': translate('SongUsagePlugin', 'SongUsage')
- }
\ No newline at end of file
+ }
+
+ def finalise(self):
+ """
+ Time to tidy up on exit
+ """
+ log.info(u'SongUsage Finalising')
+ self.manager.finalise()
+ Plugin.finalise(self)
=== renamed directory 'resources/Fedora' => 'resources/fedora'
Follow ups