openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #04335
[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:
#667837 Revision 1102 broke themes
https://bugs.launchpad.net/bugs/667837
Fix missing media Icon
Speed up Vacuum code.
Revert 1002 for now.
--
https://code.launchpad.net/~trb143/openlp/bugs/+merge/39599
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-10-27 15:30:30 +0000
+++ openlp/core/lib/db.py 2010-10-29 06:46:47 +0000
@@ -117,6 +117,7 @@
settings = QtCore.QSettings()
settings.beginGroup(plugin_name)
self.db_url = u''
+ self.is_dirty = False
db_type = unicode(
settings.value(u'db type', QtCore.QVariant(u'sqlite')).toString())
if db_type == u'sqlite':
@@ -150,6 +151,7 @@
self.session.add(object_instance)
if commit:
self.session.commit()
+ self.is_dirty = True
return True
except InvalidRequestError:
self.session.rollback()
@@ -220,6 +222,7 @@
try:
self.session.delete(object_instance)
self.session.commit()
+ self.is_dirty = True
return True
except InvalidRequestError:
self.session.rollback()
@@ -241,6 +244,7 @@
query = query.filter(filter_clause)
query.delete(synchronize_session=False)
self.session.commit()
+ self.is_dirty = True
return True
except InvalidRequestError:
self.session.rollback()
@@ -251,5 +255,6 @@
"""
VACUUM the database on exit.
"""
- engine = create_engine(self.db_url)
- engine.execute("vacuum")
+ if self.is_dirty:
+ engine = create_engine(self.db_url)
+ engine.execute("vacuum")
=== modified file 'openlp/core/lib/theme.py'
--- openlp/core/lib/theme.py 2010-10-21 15:31:22 +0000
+++ openlp/core/lib/theme.py 2010-10-29 06:46:47 +0000
@@ -408,6 +408,9 @@
elif field in integer_list:
setattr(self, master + field, int(value))
else:
+ # None means an empty string so lets have one.
+ if value == u'None':
+ value = u''
setattr(self, master + field, unicode(value))
def __str__(self):
=== modified file 'openlp/plugins/media/lib/mediaitem.py'
--- openlp/plugins/media/lib/mediaitem.py 2010-10-07 21:49:25 +0000
+++ openlp/plugins/media/lib/mediaitem.py 2010-10-29 06:46:47 +0000
@@ -56,7 +56,7 @@
u':/media/media_video.png').toImage()
MediaManagerItem.__init__(self, parent, self, icon)
self.singleServiceItem = False
- self.serviceItemIconName = u':/media/media_video.png'
+ self.serviceItemIconName = u':/media/image_clapperboard.png'
def retranslateUi(self):
self.OnNewPrompt = translate('MediaPlugin.MediaItem', 'Select Media')
Follow ups