openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #00171
[Merge] lp:~trb143/openlp/bugfixes into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/bugfixes into lp:openlp.
Requested reviews:
openlp.org Core (openlp-core)
Fixed song editing bugs
moved the Author / Topic / Book editing to the toolbar with some icons.
Fixed up the song migration code a bit to stop duplicate authors
Wrote noddy script to regenerate database for 1.x version
Fixed Alerts so the work and are preserved over song slide change and song change.
--
https://code.launchpad.net/~trb143/openlp/bugfixes/+merge/9022
Your team openlp.org Core is subscribed to branch lp:openlp.
=== modified file 'cnvdb.py' (properties changed: -x to +x)
--- cnvdb.py 2009-07-08 06:55:08 +0000
+++ cnvdb.py 2009-07-19 06:31:08 +0000
@@ -21,7 +21,7 @@
import codecs
import sys
-def convert_file(self, inname, outname):
+def convert_file(inname, outname):
"""
Convert a file from another encoding into UTF-8.
@@ -35,7 +35,8 @@
writefile = codecs.open(outname, 'w', encoding='utf-8')
for line in infile:
#replace the quotes with quotes
- line = line.replace(u'\'\'', u'\'')
+ #TODO fix double quotes
+ #line = line.replace(u'\'\'', u'@')
writefile.write(line)
infile.close()
writefile.close()
=== modified file 'openlp/core/lib/plugin.py'
--- openlp/core/lib/plugin.py 2009-07-10 13:16:15 +0000
+++ openlp/core/lib/plugin.py 2009-07-18 05:43:50 +0000
@@ -243,3 +243,9 @@
"""
pass
+ def shutdown(self):
+ """
+ Called by the plugin Manager to cleanup things
+ """
+ pass
+
=== modified file 'openlp/core/lib/pluginmanager.py'
--- openlp/core/lib/pluginmanager.py 2009-07-10 13:16:15 +0000
+++ openlp/core/lib/pluginmanager.py 2009-07-18 05:43:50 +0000
@@ -174,3 +174,10 @@
for plugin in self.plugins:
plugin.initialise()
+ def cleanup_plugins(self):
+ """
+ Loop through all the plugins and give them an opportunity to
+ clean themselves up
+ """
+ for plugin in self.plugins:
+ plugin.cleanup()
=== modified file 'openlp/core/resources.py'
--- openlp/core/resources.py 2009-07-03 19:08:21 +0000
+++ openlp/core/resources.py 2009-07-18 05:43:50 +0000
@@ -2,7 +2,7 @@
# Resource object code
#
-# Created: Fri Jul 3 19:41:53 2009
+# Created: Sat Jul 18 06:20:33 2009
# by: The Resource Compiler for PyQt (Qt v4.5.0)
#
# WARNING! All changes made in this file will be lost!
@@ -52405,6 +52405,48 @@
\x1f\x00\xf7\xed\xe4\x0a\x00\x92\x24\x02\x70\x1c\xc7\x3f\xb4\x2c\
\x21\xd5\x80\x04\x87\x89\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\
\x60\x82\
+\x00\x00\x02\x7c\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\x10\x00\x00\x00\x10\x08\x06\x00\x00\x00\x1f\xf3\xff\x61\
+\x00\x00\x00\x04\x73\x42\x49\x54\x08\x08\x08\x08\x7c\x08\x64\x88\
+\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x01\xbb\x00\x00\x01\xbb\
+\x01\x3a\xec\xe3\xe2\x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\
+\x74\x77\x61\x72\x65\x00\x77\x77\x77\x2e\x69\x6e\x6b\x73\x63\x61\
+\x70\x65\x2e\x6f\x72\x67\x9b\xee\x3c\x1a\x00\x00\x01\xf9\x49\x44\
+\x41\x54\x78\xda\x8d\x92\x4d\x6b\x13\x41\x18\xc7\x9f\x79\xd9\x97\
+\xec\xa6\xbb\xcd\xdb\x46\x52\x2b\x6d\x4a\x40\x41\xaa\xd6\x82\x07\
+\x11\xf2\x05\x04\x11\x85\x7e\x82\xa2\x07\x3d\x79\x11\xbc\xf4\xe2\
+\xc1\x8b\x9f\xc0\xb3\x62\x11\xfd\x06\x42\x41\x04\x7b\x10\xa5\x15\
+\x84\x46\x0d\x6a\x68\x0c\xd8\xa4\x6c\xb7\x99\x9d\x9d\x19\xc7\x15\
+\x2a\x94\x4d\x9b\x1f\x3c\x0c\x3c\x03\xbf\x79\xe6\x3f\x83\x94\x52\
+\x30\x8a\xf5\x17\x8f\x97\x28\x21\xdd\x0b\xd7\xee\xbe\x86\x11\x64\
+\x0a\xde\x3c\x7d\x74\x66\x38\x64\xef\xc2\x30\xca\x97\xaa\x35\x70\
+\x1c\x67\x97\xa8\xf8\xd4\xb9\xab\xb7\x07\x70\x08\x0c\x19\x48\x09\
+\xcf\x13\xa9\xf2\x12\x14\x60\xc3\x04\x2f\xa8\x79\xc4\xb4\x5f\x41\
+\x06\x14\x32\xc8\xb9\xee\xd4\xf9\xc5\x45\x40\x4e\x19\x84\xfa\x67\
+\xfc\xfc\xf3\x5b\x63\x2c\xc1\x8f\xb7\xab\xb9\x4a\xb9\x30\x40\x86\
+\x55\xa0\xa6\x0d\xa6\x61\xa5\xfd\xda\x4c\xfd\x3b\x68\x8e\xbd\xc2\
+\x16\xab\x70\xcf\x73\x3b\x80\x30\x20\x04\x1a\x05\x4a\x49\x98\xf0\
+\x26\x5a\x63\x09\x9a\xcd\x66\xa2\x12\x7e\x1f\x12\x06\x20\x19\x28\
+\x1e\xe9\x25\x4a\x08\x52\xf7\xb2\x05\x19\x14\x17\x6e\xac\xb5\xbf\
+\xb6\x12\x11\xf5\x41\xc5\x11\x6c\x7c\x5c\x67\xf9\xfa\xe5\xed\xb1\
+\x43\x4c\xb1\x0b\xfd\xcd\x4f\x1b\xe5\x98\x09\xc8\x4f\x06\xe9\xf8\
+\x63\x4f\x90\x24\x12\x9d\x9c\x3b\x5b\x68\xcc\x5f\x01\xcb\xf5\x21\
+\x98\x9e\xad\xeb\x1e\x3e\x56\xd0\x19\x88\x6a\xaf\xb7\xf7\xf0\x77\
+\x3f\xdc\x1e\xd2\x8a\xe4\xd4\x87\xe2\xf4\xbc\x32\x4a\x0d\x22\xa5\
+\x6c\x31\xc6\x1f\x70\x2e\x82\xcc\x9f\xd8\xed\x0e\x6e\x62\x4c\x9e\
+\x39\x2e\xc5\x04\x93\x34\x7d\x8c\xf1\xa1\x0f\xa6\x40\x08\x11\x1b\
+\x06\x5d\x32\x4d\xfa\xf2\x40\x30\x64\x9c\x6c\xb5\x7f\xed\x4f\x55\
+\x7d\xc3\xb6\x4c\x40\x08\xc1\x28\xf4\x04\x20\xa4\xda\xcd\xd9\x46\
+\x60\x99\x94\xa5\x47\x7c\xe9\xf4\xee\x14\x7d\xd7\xd0\x3e\xd0\xc2\
+\x23\x4b\xfe\x2d\x29\xbc\x9d\x70\xef\xfa\xc1\x2b\xec\xf4\xc2\xaa\
+\x59\x25\x52\x6f\x61\x4a\x31\x10\x9c\x99\x57\x2a\x60\x2c\x86\x30\
+\x62\x52\xe7\x34\x77\xa2\xe8\xff\xcf\x60\x65\x65\xd5\x0c\x66\x4a\
+\xcd\x4b\x0b\xb3\xb7\x72\xb6\x7d\x5a\x2a\xe1\x4a\x01\xb6\x54\x12\
+\x00\xa1\x08\xe9\xb1\xf7\x59\xbc\xf9\xfe\x43\xfb\x09\xe6\x93\x6b\
+\xcb\xcb\x17\x39\x68\xfe\x00\x58\x95\xf6\xff\x16\xb1\xc6\xc2\x00\
+\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
\x00\x00\x02\x43\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
@@ -52488,6 +52530,44 @@
\x9c\x62\xb1\x98\x2b\x97\xcb\x93\x00\x42\x25\x11\x09\xec\x46\xd1\
\xd9\x1b\x95\x91\x88\xea\x2f\xfb\x5c\xf8\xbd\xf0\xc1\x4d\x21\x00\
\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
+\x00\x00\x02\x31\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\x10\x00\x00\x00\x10\x08\x06\x00\x00\x00\x1f\xf3\xff\x61\
+\x00\x00\x00\x04\x73\x42\x49\x54\x08\x08\x08\x08\x7c\x08\x64\x88\
+\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x01\xbb\x00\x00\x01\xbb\
+\x01\x3a\xec\xe3\xe2\x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\
+\x74\x77\x61\x72\x65\x00\x77\x77\x77\x2e\x69\x6e\x6b\x73\x63\x61\
+\x70\x65\x2e\x6f\x72\x67\x9b\xee\x3c\x1a\x00\x00\x01\xae\x49\x44\
+\x41\x54\x78\xda\x8d\x90\xbb\x8e\xd3\x40\x14\x40\xcf\x78\x1e\xb6\
+\x43\xd8\x6c\xc4\xa6\x58\x68\xa1\x03\x21\xf1\x05\x20\xa8\x68\xa0\
+\xa1\x82\x8e\x6f\x80\x0a\xd1\xd2\xf0\x09\x14\xf0\x1f\x34\xfb\x07\
+\x34\x80\x28\x58\x21\x2d\xac\x28\x48\xd8\x0d\x4b\xec\xf8\x31\x97\
+\x31\x96\x23\xa2\x18\x96\xd3\xcd\xbd\xd6\xf1\x99\x51\x22\x82\x9a\
+\x5c\x79\x71\xde\xcd\x1e\x66\x59\xc6\xf7\xf4\x12\x5c\xbe\xcf\xa9\
+\xe4\xf3\x47\xb2\xf7\xe4\xb9\x69\x4f\xfe\xe2\xf5\x9b\xb7\x78\xfc\
+\xf4\x19\xff\xc3\xab\xbd\xcf\xbc\x7c\xbd\x7f\x17\x68\x05\x7c\x7b\
+\x77\xf4\xf6\xfd\x88\x7b\xb7\x6f\x50\x4f\xae\x31\xb8\xfa\x80\xb2\
+\xf6\x14\x95\xd0\xe1\x4c\x14\xce\x9e\x86\xba\x2a\xb1\xe5\x62\x17\
+\xc0\xd0\xf2\x66\x7b\x67\xf7\xce\xc1\x74\xc9\x56\x3c\x26\x1d\x4d\
+\xb8\x30\xb4\x7c\x99\x2d\xe9\x50\x0a\x46\x36\x62\x51\xb4\x92\x1f\
+\xd3\xc3\x83\x4e\xb0\xc2\x57\x15\x3a\x8a\xf0\xd2\xfc\x0d\xce\x9d\
+\x8d\x39\xc9\x6b\x3a\x6c\xa8\x88\xa5\x15\x58\x6b\xd9\x14\xf8\x1a\
+\xad\x35\x2e\x2c\xf3\x0a\xb6\x12\x4d\xe9\x23\x44\xa0\x41\x80\x41\
+\x98\x55\x35\x18\xeb\x36\x05\x22\x82\x09\x05\xb1\x6d\xc7\x45\x0d\
+\x3b\xa1\x62\x9e\xad\x2a\xc2\x5e\x85\x4a\x09\x35\x3d\x02\x90\x50\
+\x10\x35\x05\x7f\x4c\x60\x98\xe8\x20\x13\x3a\x12\x03\xa6\xef\x0a\
+\x11\x60\x8c\x0e\x99\x6e\x4d\x1b\x1b\x85\xf3\x82\xf7\xdd\x83\x2a\
+\xac\x8b\x7b\x04\xbf\xf3\x1d\xc3\x34\x59\x13\x28\x25\x24\x4a\x21\
+\x1e\x7c\x73\x06\xdc\xa6\xa0\xcd\xda\x1e\x8f\x39\x93\xb6\xcb\x35\
+\x79\x10\x40\xa8\x10\x01\x54\x10\xf4\xbc\x81\xd5\x86\x34\x49\x18\
+\xc4\x31\x7d\x68\xd5\x08\x42\x09\x82\xb5\x7d\x05\xc6\x10\x89\x90\
+\xc6\x8e\x1e\x56\xd7\x21\x48\x6c\x5f\x81\x36\x9a\x3c\x5f\x34\x0f\
+\xf9\x77\xc1\xea\x5b\xbb\x29\x40\x45\xe4\xcb\x9c\x65\x51\x72\x1a\
+\x4a\xe9\x35\xc1\xa7\x93\xf9\x11\xd9\xcf\x63\xa6\xb3\x63\x3e\x7c\
+\xdc\xe7\x5f\x14\x75\xc5\x22\xcb\xbe\x02\xfc\x02\xce\x8e\x94\x0e\
+\x4b\x04\xe7\x86\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
+\
\x00\x00\x02\x7e\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
@@ -52530,6 +52610,60 @@
\x2d\x7f\x6b\xac\x3a\x6f\x91\x45\x04\x05\x3c\x58\x29\xdf\x95\x98\
\x70\x35\xf3\x6f\x89\x5a\x6e\xe0\x0f\xd5\xf2\x24\x09\x1c\xd8\x9f\
\xe3\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
+\x00\x00\x03\x3e\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\x10\x00\x00\x00\x10\x08\x03\x00\x00\x00\x28\x2d\x0f\x53\
+\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13\
+\x01\x00\x9a\x9c\x18\x00\x00\x00\x04\x67\x41\x4d\x41\x00\x00\xb1\
+\x8e\x7c\xfb\x51\x93\x00\x00\x00\x20\x63\x48\x52\x4d\x00\x00\x7a\
+\x25\x00\x00\x80\x83\x00\x00\xf9\xff\x00\x00\x80\xe9\x00\x00\x75\
+\x30\x00\x00\xea\x60\x00\x00\x3a\x98\x00\x00\x17\x6f\x92\x5f\xc5\
+\x46\x00\x00\x01\xb0\x50\x4c\x54\x45\x00\x00\x00\xff\xff\xff\xdf\
+\x98\x00\xe6\xa0\x0c\xe7\xa3\x10\xdf\x98\x00\xe6\xa2\x0e\xe7\xa2\
+\x10\xdf\x98\x00\xe5\xa0\x0d\xe3\x9d\x08\xe1\x9e\x01\xe1\x9f\x00\
+\xe1\x9f\x01\xe1\x9f\x0d\xe1\x9f\x12\xe3\xa1\x11\xe5\xa5\x1a\x00\
+\x56\xff\x10\x60\xef\x10\x60\xf2\x20\x99\xdd\x30\x80\xce\x50\x8b\
+\xb1\x50\xb2\xad\x8e\xb2\xa2\x8f\xad\x72\x8f\xb2\x9e\x9f\xbb\x66\
+\xc3\x4d\x02\xc4\x4f\x01\xcc\x5d\x03\xd4\x69\x02\xdc\x84\x0c\xdc\
+\x8d\x05\xe1\x90\x09\xe3\x9b\x0b\xe5\x99\x0a\xe5\xa8\x01\xe7\x9d\
+\x09\xe7\xad\x02\xe7\xae\x01\xe7\xaf\x01\xe7\xb0\x01\xe7\xb0\x03\
+\xe7\xb0\x09\xe7\xb0\x10\xe7\xb1\x1c\xe7\xb1\x1f\xe7\xb1\x33\xe7\
+\xb2\x38\xe7\xb2\x40\xe9\xb4\x43\xeb\xb6\x04\xeb\xb8\x45\xeb\xbb\
+\x20\xeb\xbc\x2d\xec\xb9\x48\xef\xbd\x3a\xef\xc4\x65\xf3\xb9\x17\
+\xf4\xb8\x14\xf5\xba\x13\xf7\xcd\x0e\xf7\xcf\x0d\xf7\xd1\x0f\xf7\
+\xd7\x18\xf7\xdc\x61\xf7\xe4\x91\xf7\xe6\xa5\xf8\xce\x11\xf8\xe7\
+\xbf\xfb\xc8\x1d\xfb\xca\x1b\xfb\xd8\x10\xfc\xcd\x1a\xfc\xfd\xac\
+\xfd\xd2\x17\xfd\xfa\x60\xfd\xfb\x7c\xfd\xfc\x7e\xfd\xfc\x84\xfd\
+\xfe\xd2\xfe\xf8\x20\xfe\xf8\x24\xfe\xf9\x37\xfe\xf9\x3b\xfe\xfa\
+\x47\xfe\xfa\x4f\xfe\xfc\x9c\xfe\xfc\xa3\xfe\xfe\xd9\xff\xd0\x1f\
+\xff\xd1\x1e\xff\xd2\x1d\xff\xd3\x1d\xff\xd4\x1c\xff\xd5\x1b\xff\
+\xd6\x1a\xff\xd6\x1b\xff\xd9\x18\xff\xda\x17\xff\xda\x22\xff\xda\
+\x24\xff\xdb\x19\xff\xdc\x16\xff\xdf\x19\xff\xdf\x41\xff\xe0\x12\
+\xff\xe2\x3c\xff\xe3\x10\xff\xe4\x19\xff\xe5\x0e\xff\xe6\x0e\xff\
+\xe7\x0d\xff\xe7\x61\xff\xe9\x20\xff\xea\x0a\xff\xea\x1a\xff\xeb\
+\x0a\xff\xed\x08\xff\xed\x67\xff\xef\x06\xff\xf0\x06\xff\xf1\x04\
+\xff\xf2\x5d\xff\xf2\x7c\xff\xf4\x53\xff\xf4\x82\xff\xf5\x03\xff\
+\xf6\x05\xff\xf7\x07\xff\xf8\x16\xff\xf8\x17\xff\xf8\x6c\xff\xf8\
+\x87\xff\xf9\x30\xff\xfa\x78\xff\xfb\x7d\xff\xfd\xaf\xff\xfd\xc0\
+\xff\xfe\xe1\xff\xff\xf2\xff\xff\xf5\xc6\x84\xb0\x01\x00\x00\x00\
+\x12\x74\x52\x4e\x53\x00\x00\x20\x20\x20\x60\x60\x60\x8f\x8f\x9f\
+\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xb4\xb2\xe3\xac\x00\x00\x00\xda\x49\
+\x44\x41\x54\x18\x95\x63\x60\x44\x03\x0c\x8c\x0c\x0c\x0c\x2c\x9c\
+\x82\x26\xc6\xfc\x1c\x4c\x40\x26\x58\x80\xdd\xd2\xbd\x3f\x3a\xaa\
+\xdb\xc5\x90\x15\x22\xc0\x66\xdd\x17\xe4\x13\x10\x11\xd2\x54\x6f\
+\xc1\x0a\x12\x60\x36\xeb\x8d\x0c\xf4\xf7\x0b\x6b\x6d\xac\x28\xd3\
+\x63\x02\x0a\x70\xb9\x76\x85\x4b\x4a\x87\x05\xcb\x48\x95\xe6\x39\
+\x71\x00\x05\x04\x7a\x3a\x42\x85\x44\x5a\x9a\x85\x85\x4a\x72\xf2\
+\x79\x81\x02\x46\xed\x6d\x9d\x62\x12\x8d\x35\xe2\xa2\x95\xc5\x19\
+\x3a\x40\x01\xc3\x86\x5a\xfd\xea\xaa\x8a\xf2\x22\x2f\xab\xec\x34\
+\x6d\xa0\x00\x5f\x5d\x81\x9c\x52\x51\x61\x5e\x8e\x8a\xac\x4d\x26\
+\x0f\x50\x80\xc3\x39\xcb\x4d\x55\x41\x5d\x59\x5e\xd1\xd3\xc3\x01\
+\x64\x28\x93\x41\x6e\x4a\x8a\xaf\x9d\xad\x77\x5c\x4c\x92\x1a\xc8\
+\x5a\x06\x56\xf3\xf4\xf8\xf8\xb8\xd8\x98\x98\x64\x53\x56\x88\xd3\
+\x59\x75\x1d\x33\x13\x13\x52\xed\x35\xa0\x4e\x67\x60\x60\xe2\xe0\
+\xd1\xd2\xe4\x86\x79\x0e\x0d\x00\x00\x00\x82\x2d\xeb\x05\xb0\x41\
+\x76\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
\x00\x00\x02\x9a\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
@@ -53680,6 +53814,11 @@
\x03\x8c\x2f\x27\
\x00\x69\
\x00\x6d\x00\x61\x00\x67\x00\x65\x00\x5f\x00\x6c\x00\x6f\x00\x61\x00\x64\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x14\
+\x07\xde\x82\x27\
+\x00\x73\
+\x00\x6f\x00\x6e\x00\x67\x00\x5f\x00\x61\x00\x75\x00\x74\x00\x68\x00\x6f\x00\x72\x00\x5f\x00\x65\x00\x64\x00\x69\x00\x74\x00\x2e\
+\x00\x70\x00\x6e\x00\x67\
\x00\x0c\
\x0b\x86\xcd\x87\
\x00\x73\
@@ -53688,10 +53827,20 @@
\x0f\xce\xfd\xc7\
\x00\x73\
\x00\x6f\x00\x6e\x00\x67\x00\x5f\x00\x65\x00\x64\x00\x69\x00\x74\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x12\
+\x07\x52\x49\x67\
+\x00\x73\
+\x00\x6f\x00\x6e\x00\x67\x00\x5f\x00\x62\x00\x6f\x00\x6f\x00\x6b\x00\x5f\x00\x65\x00\x64\x00\x69\x00\x74\x00\x2e\x00\x70\x00\x6e\
+\x00\x67\
\x00\x0f\
\x0f\x3d\x20\x27\
\x00\x73\
\x00\x6f\x00\x6e\x00\x67\x00\x5f\x00\x65\x00\x78\x00\x70\x00\x6f\x00\x72\x00\x74\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x13\
+\x0e\x4b\x25\x27\
+\x00\x73\
+\x00\x6f\x00\x6e\x00\x67\x00\x5f\x00\x74\x00\x6f\x00\x70\x00\x69\x00\x63\x00\x5f\x00\x65\x00\x64\x00\x69\x00\x74\x00\x2e\x00\x70\
+\x00\x6e\x00\x67\
\x00\x0f\
\x05\x0e\x96\x87\
\x00\x73\
@@ -53780,10 +53929,10 @@
qt_resource_struct = "\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x11\x00\x00\x00\x01\
-\x00\x00\x00\xa6\x00\x02\x00\x00\x00\x06\x00\x00\x00\x56\
-\x00\x00\x00\x38\x00\x02\x00\x00\x00\x04\x00\x00\x00\x52\
-\x00\x00\x01\x02\x00\x02\x00\x00\x00\x08\x00\x00\x00\x4a\
-\x00\x00\x00\x5c\x00\x02\x00\x00\x00\x04\x00\x00\x00\x46\
+\x00\x00\x00\xa6\x00\x02\x00\x00\x00\x06\x00\x00\x00\x59\
+\x00\x00\x00\x38\x00\x02\x00\x00\x00\x04\x00\x00\x00\x55\
+\x00\x00\x01\x02\x00\x02\x00\x00\x00\x08\x00\x00\x00\x4d\
+\x00\x00\x00\x5c\x00\x02\x00\x00\x00\x07\x00\x00\x00\x46\
\x00\x00\x00\x4c\x00\x02\x00\x00\x00\x02\x00\x00\x00\x44\
\x00\x00\x01\x12\x00\x02\x00\x00\x00\x02\x00\x00\x00\x42\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x3f\
@@ -53798,10 +53947,10 @@
\x00\x00\x00\x24\x00\x02\x00\x00\x00\x04\x00\x00\x00\x13\
\x00\x00\x00\xc6\x00\x02\x00\x00\x00\x01\x00\x00\x00\x12\
\x00\x00\x06\x58\x00\x00\x00\x00\x00\x01\x00\x00\x55\x3f\
-\x00\x00\x0b\x5a\x00\x00\x00\x00\x00\x01\x00\x0c\xde\x36\
-\x00\x00\x0b\x8e\x00\x00\x00\x00\x00\x01\x00\x0c\xe1\x98\
-\x00\x00\x0b\xb6\x00\x00\x00\x00\x00\x01\x00\x0c\xe4\x36\
-\x00\x00\x0b\xe4\x00\x00\x00\x00\x00\x01\x00\x0c\xe7\x4a\
+\x00\x00\x0b\xde\x00\x00\x00\x00\x00\x01\x00\x0c\xe6\x2d\
+\x00\x00\x0c\x12\x00\x00\x00\x00\x00\x01\x00\x0c\xe9\x8f\
+\x00\x00\x0c\x3a\x00\x00\x00\x00\x00\x01\x00\x0c\xec\x2d\
+\x00\x00\x0c\x68\x00\x00\x00\x00\x00\x01\x00\x0c\xef\x41\
\x00\x00\x05\xbc\x00\x00\x00\x00\x00\x01\x00\x00\x4a\xfb\
\x00\x00\x05\xe2\x00\x00\x00\x00\x00\x01\x00\x00\x4d\x32\
\x00\x00\x06\x2e\x00\x00\x00\x00\x00\x01\x00\x00\x52\x74\
@@ -53835,24 +53984,27 @@
\x00\x00\x06\xd0\x00\x00\x00\x00\x00\x01\x00\x02\xfc\x9c\
\x00\x00\x06\xf6\x00\x00\x00\x00\x00\x01\x00\x02\xff\x14\
\x00\x00\x06\x8a\x00\x00\x00\x00\x00\x01\x00\x02\xf6\x21\
-\x00\x00\x0c\x94\x00\x00\x00\x00\x00\x01\x00\x0c\xf3\xd4\
-\x00\x00\x0c\x2a\x00\x00\x00\x00\x00\x01\x00\x0c\xeb\xff\
-\x00\x00\x0c\x4e\x00\x00\x00\x00\x00\x01\x00\x0c\xee\x90\
-\x00\x00\x0c\x70\x00\x00\x00\x00\x00\x01\x00\x0c\xf0\xa3\
-\x00\x00\x0c\x08\x00\x00\x00\x00\x00\x01\x00\x0c\xe9\x61\
+\x00\x00\x0d\x18\x00\x00\x00\x00\x00\x01\x00\x0c\xfb\xcb\
+\x00\x00\x0c\xae\x00\x00\x00\x00\x00\x01\x00\x0c\xf3\xf6\
+\x00\x00\x0c\xd2\x00\x00\x00\x00\x00\x01\x00\x0c\xf6\x87\
+\x00\x00\x0c\xf4\x00\x00\x00\x00\x00\x01\x00\x0c\xf8\x9a\
+\x00\x00\x0c\x8c\x00\x00\x00\x00\x00\x01\x00\x0c\xf1\x58\
\x00\x00\x09\xc0\x00\x00\x00\x00\x00\x01\x00\x0c\xc1\x6c\
\x00\x00\x09\x9a\x00\x00\x00\x00\x00\x01\x00\x0c\xbe\xce\
-\x00\x00\x0c\xe2\x00\x00\x00\x00\x00\x01\x00\x0c\xf8\x78\
-\x00\x00\x0d\x0a\x00\x00\x00\x00\x00\x01\x00\x0c\xfb\x16\
-\x00\x00\x0c\xbe\x00\x00\x00\x00\x00\x01\x00\x0c\xf5\xd8\
+\x00\x00\x0d\x66\x00\x00\x00\x00\x00\x01\x00\x0d\x00\x6f\
+\x00\x00\x0d\x8e\x00\x00\x00\x00\x00\x01\x00\x0d\x03\x0d\
+\x00\x00\x0d\x42\x00\x00\x00\x00\x00\x01\x00\x0c\xfd\xcf\
\x00\x00\x01\xde\x00\x00\x00\x00\x00\x01\x00\x00\x09\x05\
\x00\x00\x02\x12\x00\x00\x00\x00\x00\x01\x00\x00\x0b\xa3\
-\x00\x00\x0a\x68\x00\x00\x00\x00\x00\x01\x00\x0c\xcd\x8a\
-\x00\x00\x0a\x8c\x00\x00\x00\x00\x00\x01\x00\x0c\xd0\x88\
-\x00\x00\x0a\x44\x00\x00\x00\x00\x00\x01\x00\x0c\xca\xec\
+\x00\x00\x0a\xec\x00\x00\x00\x00\x00\x01\x00\x0c\xd5\x81\
+\x00\x00\x0b\x10\x00\x00\x00\x00\x00\x01\x00\x0c\xd8\x7f\
+\x00\x00\x0a\xc8\x00\x00\x00\x00\x00\x01\x00\x0c\xd2\xe3\
+\x00\x00\x0a\x4e\x00\x00\x00\x00\x00\x01\x00\x0c\xca\xea\
\x00\x00\x09\xe2\x00\x00\x00\x00\x00\x01\x00\x0c\xc3\x83\
-\x00\x00\x0a\x20\x00\x00\x00\x00\x00\x01\x00\x0c\xc8\x6a\
-\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x01\x00\x0c\xc5\xca\
+\x00\x00\x0a\x10\x00\x00\x00\x00\x00\x01\x00\x0c\xc6\x03\
+\x00\x00\x0a\x9c\x00\x00\x00\x00\x00\x01\x00\x0c\xcf\xa1\
+\x00\x00\x0a\x78\x00\x00\x00\x00\x00\x01\x00\x0c\xcd\x1f\
+\x00\x00\x0a\x2e\x00\x00\x00\x00\x00\x01\x00\x0c\xc8\x4a\
\x00\x00\x02\x66\x00\x00\x00\x00\x00\x01\x00\x00\x10\x0c\
\x00\x00\x02\xd2\x00\x00\x00\x00\x00\x01\x00\x00\x17\xff\
\x00\x00\x03\x04\x00\x00\x00\x00\x00\x01\x00\x00\x1a\x2a\
@@ -53861,10 +54013,10 @@
\x00\x00\x03\x4a\x00\x00\x00\x00\x00\x01\x00\x00\x20\x24\
\x00\x00\x02\x42\x00\x00\x00\x00\x00\x01\x00\x00\x0d\xba\
\x00\x00\x03\x26\x00\x00\x00\x00\x00\x01\x00\x00\x1c\x8d\
-\x00\x00\x0a\xac\x00\x00\x00\x00\x00\x01\x00\x0c\xd3\x0b\
-\x00\x00\x0b\x0e\x00\x00\x00\x00\x00\x01\x00\x0c\xd9\x81\
-\x00\x00\x0a\xe0\x00\x00\x00\x00\x00\x01\x00\x0c\xd6\x6d\
-\x00\x00\x0b\x36\x00\x00\x00\x00\x00\x01\x00\x0c\xdc\x1f\
+\x00\x00\x0b\x30\x00\x00\x00\x00\x00\x01\x00\x0c\xdb\x02\
+\x00\x00\x0b\x92\x00\x00\x00\x00\x00\x01\x00\x0c\xe1\x78\
+\x00\x00\x0b\x64\x00\x00\x00\x00\x00\x01\x00\x0c\xde\x64\
+\x00\x00\x0b\xba\x00\x00\x00\x00\x00\x01\x00\x0c\xe4\x16\
\x00\x00\x07\xce\x00\x00\x00\x00\x00\x01\x00\x03\x3e\xa4\
\x00\x00\x07\x6e\x00\x00\x00\x00\x00\x01\x00\x03\x0f\x64\
\x00\x00\x07\x3e\x00\x00\x00\x00\x00\x01\x00\x03\x04\xd0\
=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py 2009-07-03 19:08:21 +0000
+++ openlp/core/ui/maindisplay.py 2009-07-19 07:40:31 +0000
@@ -18,7 +18,7 @@
Place, Suite 330, Boston, MA 02111-1307 USA
"""
-from PyQt4 import QtCore, QtGui, QtTest
+from PyQt4 import QtCore, QtGui
from time import sleep
from openlp.core.lib import translate
@@ -41,6 +41,7 @@
self.alertactive = False
self.alerttext = u''
self.alertTab = None
+ self.timer_id = 0
def setup(self, screenNumber):
"""
@@ -69,11 +70,18 @@
self.frameView(self.blankFrame)
def frameView(self, frame):
+ """
+ Called from a slide controller to display a frame
+ if the alert is in progress the alert is added on top
+ ``frame``
+ Image frame to be rendered
+ """
+
self.frame = frame
- if not self.displayBlank:
+ if self.timer_id != 0 :
+ self.displayAlert()
+ elif not self.displayBlank:
self.display.setPixmap(QtGui.QPixmap.fromImage(frame))
- elif self.alertactive:
- self.displayAlert()
def blankDisplay(self):
if not self.displayBlank:
@@ -85,17 +93,17 @@
def alert(self, alertTab, text):
"""
- Called from the Alert Tab
- alertTab = details from AlertTab
- text = display text
- screen = screen number to be displayed on.
+ Called from the Alert Tab to display an alert
+ ``alertTab``
+ details from AlertTab
+
+ ``text``
+ display text
"""
self.alerttext = text
self.alertTab = alertTab
if len(text) > 0:
- self.alertactive = True
self.displayAlert()
- self.alertactive = False
def displayAlert(self):
alertframe = QtGui.QPixmap.fromImage(self.frame)
@@ -113,5 +121,12 @@
painter.drawText(x, y+metrics.height()-metrics.descent()-1, self.alerttext)
painter.end()
self.display.setPixmap(alertframe)
- QtTest.QTest.qWait(self.alertTab.timeout*1000)
- self.display.setPixmap(QtGui.QPixmap.fromImage(self.frame))
+ # check to see if we have a timer running
+ if self.timer_id == 0:
+ self.timer_id = self.startTimer(int(self.alertTab.timeout) * 1000)
+
+ def timerEvent(self, event):
+ if event.timerId() == self.timer_id:
+ self.display.setPixmap(QtGui.QPixmap.fromImage(self.frame))
+ self.killTimer(self.timer_id)
+ self.timer_id = 0
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2009-07-09 05:15:26 +0000
+++ openlp/core/ui/mainwindow.py 2009-07-18 05:43:50 +0000
@@ -139,16 +139,24 @@
if ret == QtGui.QMessageBox.Save:
self.ServiceManagerContents.onSaveService()
self.mainDisplay.close()
+ self.cleanUp()
event.accept()
elif ret == QtGui.QMessageBox.Discard:
self.mainDisplay.close()
+ self.cleanUp()
event.accept()
else:
event.ignore()
else:
self.mainDisplay.close()
+ self.cleanUp()
event.accept()
+ def cleanUp(self):
+ # Call the cleanup method to shutdown plugins.
+ log.info(u'cleanup plugins')
+ self.plugin_manager.initialise_plugins()
+
def OosChanged(self, reset = False, oosName = None):
"""
Hook to change the title if the OOS has been changed
=== modified file 'openlp/migration/migratesongs.py'
--- openlp/migration/migratesongs.py 2009-07-14 18:38:33 +0000
+++ openlp/migration/migratesongs.py 2009-07-18 07:30:26 +0000
@@ -137,8 +137,7 @@
self.db_url = u'sqlite:///' + self.data_path + u'/songs.sqlite'
print self.db_url
self.session = init_models(self.db_url)
- if not songs_table.exists():
- metadata.create_all()
+ metadata.create_all(checkfirst=True)
results = self.session.query(TSong).order_by(TSong.songid).all()
for songs_temp in results:
song = Song()
@@ -151,18 +150,21 @@
aa = self.session.execute(u'select * from songauthors_temp where songid =' + unicode(songs_temp.songid) )
for row in aa:
a = row['authorid']
- author = Author()
authors_temp = self.session.query(TAuthor).get(a)
- author.display_name = authors_temp.authorname
- author.first_name = u''
- author.last_name = u''
+ bb = self.session.execute(u'select * from authors where display_name = \"%s\"' % unicode(authors_temp.authorname) ).fetchone()
+ if bb is None:
+ author = Author()
+ author.display_name = authors_temp.authorname
+ else:
+ id = int(bb[0])
+ author = self.session.query(Author).get(bb[0])
song.authors.append(author)
- try:
- self.session.add(song)
- self.session.commit()
- except:
- self.session.rollback()
- print u'Errow thrown = ', sys.exc_info()[1]
+ try:
+ self.session.add(song)
+ self.session.commit()
+ except:
+ self.session.rollback()
+ print u'Errow thrown = ', sys.exc_info()[1]
def _v1_9_0_cleanup(self, database):
self.display.sub_output(u'Update Internal Data ' + database)
@@ -184,5 +186,4 @@
conn.execute(u'drop table songauthors_temp;')
conn.commit()
conn.execute(u'drop table settings;')
-
conn.commit()
=== modified file 'openlp/plugins/bibles/lib/bibleDBimpl.py'
--- openlp/plugins/bibles/lib/bibleDBimpl.py 2009-07-14 19:44:15 +0000
+++ openlp/plugins/bibles/lib/bibleDBimpl.py 2009-07-18 05:43:50 +0000
@@ -58,7 +58,6 @@
def add_verse(self, bookid, chap, vse, text):
#log.debug(u'add_verse %s,%s,%s", bookid, chap, vse)
- #metadata.bind.echo = False
verse = Verse()
verse.book_id = bookid
verse.chapter = chap
@@ -69,8 +68,6 @@
def create_chapter(self, bookid, chap, textlist):
log.debug(u'create_chapter %s,%s', bookid, chap)
- #log.debug(u'Text %s ", textlist)
- #metadata.bind.echo = False
#text list has book and chapter as first to elements of the array
for verse_number, verse_text in textlist.iteritems():
verse = Verse()
@@ -83,7 +80,6 @@
def create_book(self, bookname, bookabbrev, testament=1):
log.debug(u'create_book %s,%s', bookname, bookabbrev)
- #metadata.bind.echo = False
book = Book()
book.testament_id = testament
book.name = bookname
@@ -94,7 +90,6 @@
def save_meta(self, key, value):
log.debug(u'save_meta %s/%s', key, value)
- #metadata.bind.echo = False
bmeta = BibleMeta()
bmeta.key = key
bmeta.value = value
@@ -116,7 +111,6 @@
def _load_testament(self, testament):
log.debug(u'load_testaments %s', testament)
- #metadata.bind.echo = False
test = ONTestament()
test.name = testament
self.session.add(test)
@@ -128,17 +122,11 @@
def get_max_bible_book_verses(self, bookname, chapter):
log.debug(u'get_max_bible_book_verses %s, %s', bookname, chapter)
- #metadata.bind.echo = False
- #s = text (u'select max(verse.verse) from verse,book where chapter = :c and book_id = book.id and book.name = :b ')
- #return self.db.execute(s, c=chapter, b=bookname).fetchone()
verse = self.session.query(Verse).join(Book).filter(Book.name==bookname).filter(Verse.chapter==chapter).order_by(Verse.verse.desc()).first()
return verse.verse
def get_max_bible_book_chapter(self, bookname):
log.debug(u'get_max_bible_book_chapter %s', bookname)
- #metadata.bind.echo = False
- #s = text (u'select max(verse.chapter) from verse,book where book_id = book.id and book.name = :b')
- #return self.db.execute(s, b=bookname).fetchone()
verse = self.session.query(Verse).join(Book).filter(Book.name==bookname).order_by(Verse.chapter.desc()).first()
return verse.chapter
@@ -151,34 +139,24 @@
def get_bible_chapter(self, id, chapter):
log.debug(u'get_bible_chapter %s, %s', id, chapter)
- #metadata.bind.echo = False
return self.session.query(Verse).filter_by(chapter=chapter).filter_by(book_id=id).first()
def get_bible_text(self, bookname, chapter, sverse, everse):
log.debug(u'get_bible_text %s, %s, %s, %s', bookname, chapter, sverse, everse)
- #metadata.bind.echo = False
- #bookname = bookname + u"%"
- #s = text (u'select name,chapter,verse.verse, verse.text FROM verse , book where verse.book_id == book.id AND verse.chapter == :c AND (verse.verse between :v1 and :v2) and (book.name like :b)')
- #return self.db.execute(s, c=chapter, v1=sverse , v2=everse, b=bookname).fetchall()
verses = self.session.query(Verse).join(Book).filter(Book.name==bookname).filter(Verse.chapter==chapter).filter(Verse.verse>=sverse).filter(Verse.verse<=everse).order_by(Verse.verse).all()
return verses
def get_verses_from_text(self, versetext):
log.debug(u'get_verses_from_text %s',versetext)
- #metadata.bind.echo = False
versetext = u'%%%s%%' % versetext
- #s = text (u'select book.name, verse.chapter, verse.verse, verse.text FROM verse , book where verse.book_id == book.id and verse.text like :t')
- #return self.db.execute(s, t=versetext).fetchall()
verses = self.session.query(Verse).filter(Verse.text.like(versetext)).all()
return verses
def dump_bible(self):
log.debug( u'.........Dumping Bible Database')
log.debug( '...............................Books ')
- #s = text (u'select * FROM book ')
books = self.session.query(Book).all()
log.debug(books)
log.debug( u'...............................Verses ')
- #s = text (u'select * FROM verse ')
verses = self.session.query(Verse).all()
log.debug(verses)
=== modified file 'openlp/plugins/bibles/lib/manager.py'
--- openlp/plugins/bibles/lib/manager.py 2009-07-13 20:08:43 +0000
+++ openlp/plugins/bibles/lib/manager.py 2009-07-18 05:43:50 +0000
@@ -29,8 +29,8 @@
from bibleDBimpl import BibleDBImpl
from bibleHTTPimpl import BibleHTTPImpl
-from openlp.plugins.bibles.lib.tables import *
-from openlp.plugins.bibles.lib.classes import *
+#from openlp.plugins.bibles.lib.tables import *
+#from openlp.plugins.bibles.lib.classes import *
class BibleMode(object):
Full = 1
=== modified file 'openlp/plugins/bibles/lib/models.py'
--- openlp/plugins/bibles/lib/models.py 2009-07-14 19:44:15 +0000
+++ openlp/plugins/bibles/lib/models.py 2009-07-18 05:43:50 +0000
@@ -68,19 +68,14 @@
"""
pass
-
def init_models(db_url):
engine = create_engine(db_url)
metadata.bind = engine
session = scoped_session(sessionmaker(autoflush=True,
autocommit=False,
bind=engine))
- # Don't think this is needed...
- #metadata.bind.echo = False
- #Define the tables and indexes
return metadata, session
-
metadata = MetaData()
meta_table = Table(u'metadata', metadata,
Column(u'key', types.Unicode(255), primary_key=True, index=True),
=== modified file 'openlp/plugins/songs/forms/authorsform.py'
--- openlp/plugins/songs/forms/authorsform.py 2009-07-14 18:38:33 +0000
+++ openlp/plugins/songs/forms/authorsform.py 2009-07-18 05:43:50 +0000
@@ -51,7 +51,8 @@
Refresh the screen and rest fields
"""
self.AuthorListWidget.clear()
- self.onClearButtonClick() # tidy up screen
+ # tidy up screen
+ self.onClearButtonClick()
authors = self.songmanager.get_authors()
for author in authors:
author_name = QtGui.QListWidgetItem(author.display_name)
@@ -127,6 +128,9 @@
self.DisplayEdit.setFocus()
def _validate_form(self):
+ """
+ Validate the form and set if Add button if valid.
+ """
# We need at lease a display name
if len(self.DisplayEdit.displayText()) == 0:
self.AddUpdateButton.setEnabled(False)
=== modified file 'openlp/plugins/songs/forms/editsongdialog.py'
--- openlp/plugins/songs/forms/editsongdialog.py 2009-06-14 13:50:56 +0000
+++ openlp/plugins/songs/forms/editsongdialog.py 2009-07-18 05:43:50 +0000
@@ -178,9 +178,9 @@
self.AuthorRemoveItem = QtGui.QPushButton(self.AuthorRemoveWidget)
self.AuthorRemoveItem.setObjectName(u'AuthorRemoveItem')
self.AuthorRemoveLayout.addWidget(self.AuthorRemoveItem)
- self.AddAuthorsButton = QtGui.QPushButton(self.AuthorRemoveWidget)
- self.AddAuthorsButton.setObjectName(u'AddAuthorsButton')
- self.AuthorRemoveLayout.addWidget(self.AddAuthorsButton)
+# self.AddAuthorsButton = QtGui.QPushButton(self.AuthorRemoveWidget)
+# self.AddAuthorsButton.setObjectName(u'AddAuthorsButton')
+# self.AuthorRemoveLayout.addWidget(self.AddAuthorsButton)
self.AuthorsLayout.addWidget(self.AuthorRemoveWidget)
self.AdditionalLayout.addWidget(self.AuthorsGroupBox)
self.SongBookGroup = QtGui.QGroupBox(self.AdditionalWidget)
@@ -197,14 +197,14 @@
self.SongbookCombo.setSizePolicy(sizePolicy)
self.SongbookCombo.setObjectName(u'SongbookCombo')
self.SongbookLayout.addWidget(self.SongbookCombo, 0, 0, 1, 1)
- self.AddSongBookButton = QtGui.QPushButton(self.SongBookGroup)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.AddSongBookButton.sizePolicy().hasHeightForWidth())
- self.AddSongBookButton.setSizePolicy(sizePolicy)
- self.AddSongBookButton.setObjectName(u'AddSongBookButton')
- self.SongbookLayout.addWidget(self.AddSongBookButton, 0, 1, 1, 1)
+# self.AddSongBookButton = QtGui.QPushButton(self.SongBookGroup)
+# sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
+# sizePolicy.setHorizontalStretch(0)
+# sizePolicy.setVerticalStretch(0)
+# sizePolicy.setHeightForWidth(self.AddSongBookButton.sizePolicy().hasHeightForWidth())
+# self.AddSongBookButton.setSizePolicy(sizePolicy)
+# self.AddSongBookButton.setObjectName(u'AddSongBookButton')
+# self.SongbookLayout.addWidget(self.AddSongBookButton, 0, 1, 1, 1)
self.AdditionalLayout.addWidget(self.SongBookGroup)
self.TopicGroupBox = QtGui.QGroupBox(self.AdditionalWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
@@ -255,9 +255,9 @@
self.TopicRemoveItem = QtGui.QPushButton(self.TopicRemoveWidget)
self.TopicRemoveItem.setObjectName(u'TopicRemoveItem')
self.TopicRemoveLayout.addWidget(self.TopicRemoveItem)
- self.AddTopicButton = QtGui.QPushButton(self.TopicRemoveWidget)
- self.AddTopicButton.setObjectName(u'AddTopicButton')
- self.TopicRemoveLayout.addWidget(self.AddTopicButton)
+# self.AddTopicButton = QtGui.QPushButton(self.TopicRemoveWidget)
+# self.AddTopicButton.setObjectName(u'AddTopicButton')
+# self.TopicRemoveLayout.addWidget(self.AddTopicButton)
self.TopicLayout.addWidget(self.TopicRemoveWidget)
self.AdditionalLayout.addWidget(self.TopicGroupBox)
self.CopyrightgroupBox = QtGui.QGroupBox(self.AdditionalWidget)
@@ -313,8 +313,9 @@
EditSongDialog.setTabOrder(self.AuthorAddtoSongItem, self.AuthorsListView)
EditSongDialog.setTabOrder(self.AuthorsListView, self.AuthorRemoveItem)
EditSongDialog.setTabOrder(self.AuthorRemoveItem, self.SongbookCombo)
- EditSongDialog.setTabOrder(self.SongbookCombo, self.AddSongBookButton)
- EditSongDialog.setTabOrder(self.AddSongBookButton, self.SongTopicCombo)
+ #EditSongDialog.setTabOrder(self.SongbookCombo, self.AddSongBookButton)
+ #EditSongDialog.setTabOrder(self.AddSongBookButton, self.SongTopicCombo)
+ EditSongDialog.setTabOrder(self.SongbookCombo, self.SongTopicCombo)
EditSongDialog.setTabOrder(self.SongTopicCombo, self.TopicsListView)
EditSongDialog.setTabOrder(self.TopicsListView, self.TopicRemoveItem)
EditSongDialog.setTabOrder(self.TopicRemoveItem, self.CopyrightEditItem)
@@ -336,13 +337,13 @@
self.AuthorsGroupBox.setTitle(translate(u'EditSongDialog', u'Authors'))
self.AuthorAddtoSongItem.setText(translate(u'EditSongDialog', u'Add to Song'))
self.AuthorRemoveItem.setText(translate(u'EditSongDialog', u'Remove'))
- self.AddAuthorsButton.setText(translate(u'EditSongDialog', u'Manage Authors'))
+ #self.AddAuthorsButton.setText(translate(u'EditSongDialog', u'Manage Authors'))
self.SongBookGroup.setTitle(translate(u'EditSongDialog', u'Song Book'))
- self.AddSongBookButton.setText(translate(u'EditSongDialog', u'Manage Song Books'))
+ #self.AddSongBookButton.setText(translate(u'EditSongDialog', u'Manage Song Books'))
self.TopicGroupBox.setTitle(translate(u'EditSongDialog', u'Topic'))
self.AddTopicsToSongButton.setText(translate(u'EditSongDialog', u'Add to Song'))
self.TopicRemoveItem.setText(translate(u'EditSongDialog', u'Remove'))
- self.AddTopicButton.setText(translate(u'EditSongDialog', u'Manage Topics'))
+ #self.AddTopicButton.setText(translate(u'EditSongDialog', u'Manage Topics'))
self.CopyrightgroupBox.setTitle(translate(u'EditSongDialog', u'Copyright Infomaton'))
self.CopyrightInsertItem.setText(translate(u'EditSongDialog', u'(c)'))
self.CCLILabel.setText(translate(u'EditSongDialog', u'CCLI Number:'))
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py 2009-07-13 17:02:38 +0000
+++ openlp/plugins/songs/forms/editsongform.py 2009-07-19 07:58:37 +0000
@@ -40,24 +40,24 @@
QtGui.QDialog.__init__(self, parent)
self.setupUi(self)
# Connecting signals and slots
- QtCore.QObject.connect(self.AddAuthorsButton,
- QtCore.SIGNAL(u'clicked()'), self.onAddAuthorsButtonClicked)
+# QtCore.QObject.connect(self.AddAuthorsButton,
+# QtCore.SIGNAL(u'clicked()'), self.onAddAuthorsButtonClicked)
QtCore.QObject.connect(self.AuthorAddtoSongItem,
QtCore.SIGNAL(u'clicked()'), self.onAuthorAddtoSongItemClicked)
QtCore.QObject.connect(self.AuthorRemoveItem,
QtCore.SIGNAL(u'clicked()'), self.onAuthorRemovefromSongItemClicked)
QtCore.QObject.connect(self.AuthorsListView,
QtCore.SIGNAL(u'itemClicked(QListWidgetItem*)'), self.onAuthorsListViewPressed)
- QtCore.QObject.connect(self.AddTopicButton,
- QtCore.SIGNAL(u'clicked()'), self.onAddTopicButtonClicked)
+# QtCore.QObject.connect(self.AddTopicButton,
+# QtCore.SIGNAL(u'clicked()'), self.onAddTopicButtonClicked)
QtCore.QObject.connect(self.AddTopicsToSongButton,
QtCore.SIGNAL(u'clicked()'), self.onTopicAddtoSongItemClicked)
QtCore.QObject.connect(self.TopicRemoveItem,
QtCore.SIGNAL(u'clicked()'), self.onTopicRemovefromSongItemClicked)
QtCore.QObject.connect(self.TopicsListView,
QtCore.SIGNAL(u'itemClicked(QListWidgetItem*)'), self.onTopicListViewPressed)
- QtCore.QObject.connect(self.AddSongBookButton,
- QtCore.SIGNAL(u'clicked()'), self.onAddSongBookButtonClicked)
+# QtCore.QObject.connect(self.AddSongBookButton,
+# QtCore.SIGNAL(u'clicked()'), self.onAddSongBookButtonClicked)
QtCore.QObject.connect(self.CopyrightInsertItem,
QtCore.SIGNAL(u'clicked()'), self.onCopyrightInsertItemTriggered)
QtCore.QObject.connect(self.AddButton,
@@ -75,9 +75,9 @@
# Create other objects and forms
self.songmanager = songmanager
self.eventmanager = eventmanager
- self.authors_form = AuthorsForm(self.songmanager)
- self.topics_form = TopicsForm(self.songmanager)
- self.song_book_form = SongBookForm(self.songmanager)
+# self.authors_form = AuthorsForm(self.songmanager)
+# self.topics_form = TopicsForm(self.songmanager)
+# self.song_book_form = SongBookForm(self.songmanager)
self.verse_form = EditVerseForm()
self.initialise()
self.AuthorsListView.setSortingEnabled(False)
@@ -86,9 +86,6 @@
self.TopicsListView.setAlternatingRowColors(True)
def initialise(self):
- self.loadAuthors()
- self.loadTopics()
- self.loadBooks()
self.EditButton.setEnabled(False)
self.DeleteButton.setEnabled(False)
self.AuthorRemoveItem.setEnabled(False)
@@ -140,26 +137,32 @@
self.TopicsListView.clear()
self.title_change = False
self.TitleEditItem.setFocus(QtCore.Qt.OtherFocusReason)
+ self.loadAuthors()
+ self.loadTopics()
+ self.loadBooks()
def loadSong(self, id):
log.debug(u'Load Song')
+ self.loadAuthors()
+ self.loadTopics()
+ self.loadBooks()
self.song = self.songmanager.get_song(id)
self.TitleEditItem.setText(self.song.title)
title = self.song.search_title.split(u'@')
if self.song.song_book_id != 0:
book_name = self.songmanager.get_book(self.song.song_book_id)
- id = self.SongbookCombo.findText(unicode(book_name), QtCore.Qt.MatchExactly)
+ id = self.SongbookCombo.findText(unicode(book_name.name), QtCore.Qt.MatchExactly)
if id == -1:
# Not Found
id = 0
- book_name.setCurrentIndex(id)
+ self.SongbookCombo.setCurrentIndex(id)
if self.song.theme_name is not None and len(self.song.theme_name) > 0:
- id = self.SongbookCombo.findText(unicode(self.song.theme_name), QtCore.Qt.MatchExactly)
+ id = self.ThemeSelectionComboItem.findText(unicode(self.song.theme_name), QtCore.Qt.MatchExactly)
if id == -1:
# Not Found
id = 0
self.song.theme_name = None
- self.SongbookCombo.setCurrentIndex(id)
+ self.ThemeSelectionComboItem.setCurrentIndex(id)
if len(title) > 1:
self.AlternativeEdit.setText(title[1])
if self.song.copyright is not None:
@@ -207,15 +210,16 @@
def onAuthorAddtoSongItemClicked(self):
item = int(self.AuthorsSelectionComboItem.currentIndex())
- item_id = (self.AuthorsSelectionComboItem.itemData(item)).toInt()[0]
- author = self.songmanager.get_author(item_id)
- self.song.authors.append(author)
- author_item = QtGui.QListWidgetItem(unicode(author.display_name))
- author_item.setData(QtCore.Qt.UserRole, QtCore.QVariant(author.id))
- self.AuthorsListView.addItem(author_item)
+ if item > -1:
+ item_id = (self.AuthorsSelectionComboItem.itemData(item)).toInt()[0]
+ author = self.songmanager.get_author(item_id)
+ self.song.authors.append(author)
+ author_item = QtGui.QListWidgetItem(unicode(author.display_name))
+ author_item.setData(QtCore.Qt.UserRole, QtCore.QVariant(author.id))
+ self.AuthorsListView.addItem(author_item)
def onAuthorsListViewPressed(self):
- if self.AuthorsListView.count() >1:
+ if self.AuthorsListView.count() > 1:
self.AuthorRemoveItem.setEnabled(True)
def onAuthorRemovefromSongItemClicked(self):
@@ -229,12 +233,13 @@
def onTopicAddtoSongItemClicked(self):
item = int(self.SongTopicCombo.currentIndex())
- item_id = (self.SongTopicCombo.itemData(item)).toInt()[0]
- topic = self.songmanager.get_topic(item_id)
- self.song.topics.append(topic)
- topic_item = QtGui.QListWidgetItem(unicode(topic.name))
- topic_item.setData(QtCore.Qt.UserRole, QtCore.QVariant(topic.id))
- self.TopicsListView.addItem(topic_item)
+ if item > -1:
+ item_id = (self.SongTopicCombo.itemData(item)).toInt()[0]
+ topic = self.songmanager.get_topic(item_id)
+ self.song.topics.append(topic)
+ topic_item = QtGui.QListWidgetItem(unicode(topic.name))
+ topic_item.setData(QtCore.Qt.UserRole, QtCore.QVariant(topic.id))
+ self.TopicsListView.addItem(topic_item)
def onTopicListViewPressed(self):
self.TopicRemoveItem.setEnabled(True)
@@ -247,29 +252,30 @@
self.song.topics.remove(topic)
row = self.TopicsListView.row(item)
self.TopicsListView.takeItem(row)
- def onAddAuthorsButtonClicked(self):
- """
- Slot documentation goes here.
- """
- self.authors_form.load_form()
- self.authors_form.exec_()
- self.loadAuthors()
-
- def onAddTopicButtonClicked(self):
- """
- Slot documentation goes here.
- """
- self.topics_form.load_form()
- self.topics_form.exec_()
- self.loadTopics()
-
- def onAddSongBookButtonClicked(self):
- """
- Slot documentation goes here.
- """
- self.song_book_form.load_form()
- self.song_book_form.exec_()
- self.loadBooks()
+
+# def onAddAuthorsButtonClicked(self):
+# """
+# Slot documentation goes here.
+# """
+# self.authors_form.load_form()
+# self.authors_form.exec_()
+# self.loadAuthors()
+#
+# def onAddTopicButtonClicked(self):
+# """
+# Slot documentation goes here.
+# """
+# self.topics_form.load_form()
+# self.topics_form.exec_()
+# self.loadTopics()
+#
+# def onAddSongBookButtonClicked(self):
+# """
+# Slot documentation goes here.
+# """
+# self.song_book_form.load_form()
+# self.song_book_form.exec_()
+# self.loadBooks()
def onSongBookComboChanged(self, item):
if item == 0:
@@ -301,7 +307,7 @@
self.verse_form.setVerse(item.text())
self.verse_form.exec_()
item.setText(self.verse_form.getVerse())
- self.VerseListWidget.update()
+ self.VerseListWidget.repaint()
self.EditButton.setEnabled(False)
self.DeleteButton.setEnabled(False)
@@ -367,7 +373,6 @@
self.song.ccli_number = unicode(self.CCLNumberEdit.displayText())
self.processLyrics()
self.processTitle()
- self.song.song_book_id = 0
self.songmanager.save_song(self.song)
if self.title_change:
self.eventmanager.post_event(Event(EventType.LoadSongList))
=== modified file 'openlp/plugins/songs/lib/manager.py'
--- openlp/plugins/songs/lib/manager.py 2009-07-08 05:12:16 +0000
+++ openlp/plugins/songs/lib/manager.py 2009-07-18 07:30:26 +0000
@@ -55,13 +55,9 @@
self.config.get_config(u'db hostname') + u'/' + \
self.config.get_config(u'db database')
self.session = init_models(self.db_url)
- if not songs_table.exists():
- metadata.create_all()
+ metadata.create_all(checkfirst=True)
log.debug(u'Song Initialised')
-# def process_dialog(self, dialogobject):
-# self.dialogobject = dialogobject
-
def get_songs(self):
"""
Returns the details of a song
=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py 2009-07-04 05:52:30 +0000
+++ openlp/plugins/songs/lib/mediaitem.py 2009-07-18 05:43:50 +0000
@@ -22,7 +22,7 @@
from PyQt4 import QtCore, QtGui
from openlp.core.lib import MediaManagerItem, translate, ServiceItem, SongXMLParser , contextMenuAction, contextMenuSeparator
-from openlp.plugins.songs.forms import EditSongForm
+from openlp.plugins.songs.forms import EditSongForm, AuthorsForm, TopicsForm, SongBookForm
class SongList(QtGui.QListWidget):
@@ -59,6 +59,9 @@
self.ConfigSection = u'song'
MediaManagerItem.__init__(self, parent, icon, title)
self.edit_song_form = EditSongForm(self.parent.songmanager, self.parent.event_manager)
+ self.authors_form = AuthorsForm(self.parent.songmanager)
+ self.topics_form = TopicsForm(self.parent.songmanager)
+ self.song_book_form = SongBookForm(self.parent.songmanager)
def setupUi(self):
# Add a toolbar
@@ -90,6 +93,19 @@
self.addToolbarButton(translate(u'SongMediaItem', u'Add Song To Service'),
translate(u'SongMediaItem', u'Add the selected song(s) to the service'),
':/system/system_add.png', self.onSongAddClick, 'SongAddItem')
+ self.addToolbarSeparator()
+ ## Author Edit Button ##
+ self.addToolbarButton(translate(u'SongMediaItem', u'Edit Authors'),
+ translate(u'SongMediaItem', u'Maintain the list of Song Authors'),
+ ':/songs/song_author_edit.png', self.onEditAuthorClick, 'SongAuthorEditItem')
+ ## Author Edit Button ##
+ self.addToolbarButton(translate(u'SongMediaItem', u'Edit Books'),
+ translate(u'SongMediaItem', u'Maintain the list of Song Books'),
+ ':/songs/song_book_edit.png', self.onEditBookClick, 'SongAuthorEditItem')
+ ## Author Edit Button ##
+ self.addToolbarButton(translate(u'SongMediaItem', u'Edit Topics'),
+ translate(u'SongMediaItem', u'Maintain the list of Song Topics'),
+ ':/songs/song_topic_edit.png', self.onEditTopicClick, 'SongAuthorEditItem')
## Add the songlist widget ##
# Create the tab widget
self.SongWidget = QtGui.QWidget(self)
@@ -222,6 +238,18 @@
self.edit_song_form.newSong()
self.edit_song_form.exec_()
+ def onEditAuthorClick(self):
+ self.authors_form.load_form()
+ self.authors_form.exec_()
+
+ def onEditTopicClick(self):
+ self.topics_form.load_form()
+ self.topics_form.exec_()
+
+ def onEditBookClick(self):
+ self.song_book_form.load_form()
+ self.song_book_form.exec_()
+
def onSongEditClick(self):
item = self.ListView.currentItem()
if item is not None:
=== modified file 'resources/images/openlp-2.qrc'
--- resources/images/openlp-2.qrc 2009-07-03 19:08:21 +0000
+++ resources/images/openlp-2.qrc 2009-07-18 05:43:50 +0000
@@ -4,6 +4,9 @@
<file>song_edit.png</file>
<file>song_export.png</file>
<file>song_new.png</file>
+ <file>song_author_edit.png</file>
+ <file>song_topic_edit.png</file>
+ <file>song_book_edit.png</file>
</qresource>
<qresource prefix="slides" >
<file>slide_close.png</file>
=== added file 'resources/images/song_author_edit.png'
Binary files resources/images/song_author_edit.png 1970-01-01 00:00:00 +0000 and resources/images/song_author_edit.png 2009-07-18 05:45:44 +0000 differ
=== added file 'resources/images/song_book_edit.png'
Binary files resources/images/song_book_edit.png 1970-01-01 00:00:00 +0000 and resources/images/song_book_edit.png 2009-07-18 05:45:44 +0000 differ
=== added file 'resources/images/song_topic_edit.png'
Binary files resources/images/song_topic_edit.png 1970-01-01 00:00:00 +0000 and resources/images/song_topic_edit.png 2009-07-18 05:45:44 +0000 differ
=== added file 'songcnv.sh'
--- songcnv.sh 1970-01-01 00:00:00 +0000
+++ songcnv.sh 2009-07-19 06:31:08 +0000
@@ -0,0 +1,5 @@
+/usr/bin/sqlite ~/.local/share/openlp/songs/songs.olp .dump > ~/.local/share/openlp/songs/songs.dmp
+./cnvdb.py ~/.local/share/openlp/songs/songs.dmp ~/.local/share/openlp/songs/songs.dmp2
+rm ~/.local/share/openlp/songs/songs.sqlite
+sqlite3 ~/.local/share/openlp/songs/songs.sqlite < ~/.local/share/openlp/songs/songs.dmp2
+./openlpcnv.pyw
Follow ups