openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #04334
[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/39557
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/bugs into lp:openlp.
=== modified file 'openlp/core/lib/__init__.py'
--- openlp/core/lib/__init__.py 2010-10-26 19:11:26 +0000
+++ openlp/core/lib/__init__.py 2010-10-28 17:56:06 +0000
@@ -263,8 +263,9 @@
# and move it to the centre of the preview space
new_image = QtGui.QImage(width, height,
QtGui.QImage.Format_ARGB32_Premultiplied)
+ new_image.fill(background)
painter = QtGui.QPainter(new_image)
- painter.fillRect(new_image.rect(), background)
+ #painter.fillRect(new_image.rect(), background)
painter.drawImage((width - realw) / 2, (height - realh) / 2, preview)
return new_image
=== 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-28 17:56:06 +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/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-28 17:56:06 +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