Merge lp:~trb143/openlp/bugfixes into lp:openlp

Proposed by Tim Bentley
Status: Merged
Merged at revision: not available
Proposed branch: lp:~trb143/openlp/bugfixes
Merge into: lp:openlp
Diff against target: None lines
To merge this branch: bzr merge lp:~trb143/openlp/bugfixes
Reviewer Review Type Date Requested Status
Raoul Snyman Approve
Review via email: mp+9022@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Tim Bentley (trb143) wrote :

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.

Revision history for this message
Raoul Snyman (raoul-snyman) wrote :

On line 586 of openlp/core/resources.py ....

Just kidding!

review: Approve
lp:~trb143/openlp/bugfixes updated
495. By Tim Bentley

Fix song editing so it works
Added now images for Song editors
Fix up Alert code so now works.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cnvdb.py' (properties changed: -x to +x)
2--- cnvdb.py 2009-07-08 06:55:08 +0000
3+++ cnvdb.py 2009-07-19 06:31:08 +0000
4@@ -21,7 +21,7 @@
5 import codecs
6 import sys
7
8-def convert_file(self, inname, outname):
9+def convert_file(inname, outname):
10 """
11 Convert a file from another encoding into UTF-8.
12
13@@ -35,7 +35,8 @@
14 writefile = codecs.open(outname, 'w', encoding='utf-8')
15 for line in infile:
16 #replace the quotes with quotes
17- line = line.replace(u'\'\'', u'\'')
18+ #TODO fix double quotes
19+ #line = line.replace(u'\'\'', u'@')
20 writefile.write(line)
21 infile.close()
22 writefile.close()
23
24=== modified file 'openlp/core/lib/plugin.py'
25--- openlp/core/lib/plugin.py 2009-07-10 13:16:15 +0000
26+++ openlp/core/lib/plugin.py 2009-07-18 05:43:50 +0000
27@@ -243,3 +243,9 @@
28 """
29 pass
30
31+ def shutdown(self):
32+ """
33+ Called by the plugin Manager to cleanup things
34+ """
35+ pass
36+
37
38=== modified file 'openlp/core/lib/pluginmanager.py'
39--- openlp/core/lib/pluginmanager.py 2009-07-10 13:16:15 +0000
40+++ openlp/core/lib/pluginmanager.py 2009-07-18 05:43:50 +0000
41@@ -174,3 +174,10 @@
42 for plugin in self.plugins:
43 plugin.initialise()
44
45+ def cleanup_plugins(self):
46+ """
47+ Loop through all the plugins and give them an opportunity to
48+ clean themselves up
49+ """
50+ for plugin in self.plugins:
51+ plugin.cleanup()
52
53=== modified file 'openlp/core/resources.py'
54--- openlp/core/resources.py 2009-07-03 19:08:21 +0000
55+++ openlp/core/resources.py 2009-07-18 05:43:50 +0000
56@@ -2,7 +2,7 @@
57
58 # Resource object code
59 #
60-# Created: Fri Jul 3 19:41:53 2009
61+# Created: Sat Jul 18 06:20:33 2009
62 # by: The Resource Compiler for PyQt (Qt v4.5.0)
63 #
64 # WARNING! All changes made in this file will be lost!
65@@ -52405,6 +52405,48 @@
66 \x1f\x00\xf7\xed\xe4\x0a\x00\x92\x24\x02\x70\x1c\xc7\x3f\xb4\x2c\
67 \x21\xd5\x80\x04\x87\x89\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\
68 \x60\x82\
69+\x00\x00\x02\x7c\
70+\x89\
71+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
72+\x00\x00\x10\x00\x00\x00\x10\x08\x06\x00\x00\x00\x1f\xf3\xff\x61\
73+\x00\x00\x00\x04\x73\x42\x49\x54\x08\x08\x08\x08\x7c\x08\x64\x88\
74+\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x01\xbb\x00\x00\x01\xbb\
75+\x01\x3a\xec\xe3\xe2\x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\
76+\x74\x77\x61\x72\x65\x00\x77\x77\x77\x2e\x69\x6e\x6b\x73\x63\x61\
77+\x70\x65\x2e\x6f\x72\x67\x9b\xee\x3c\x1a\x00\x00\x01\xf9\x49\x44\
78+\x41\x54\x78\xda\x8d\x92\x4d\x6b\x13\x41\x18\xc7\x9f\x79\xd9\x97\
79+\xec\xa6\xbb\xcd\xdb\x46\x52\x2b\x6d\x4a\x40\x41\xaa\xd6\x82\x07\
80+\x11\xf2\x05\x04\x11\x85\x7e\x82\xa2\x07\x3d\x79\x11\xbc\xf4\xe2\
81+\xc1\x8b\x9f\xc0\xb3\x62\x11\xfd\x06\x42\x41\x04\x7b\x10\xa5\x15\
82+\x84\x46\x0d\x6a\x68\x0c\xd8\xa4\x6c\xb7\x99\x9d\x9d\x19\xc7\x15\
83+\x2a\x94\x4d\x9b\x1f\x3c\x0c\x3c\x03\xbf\x79\xe6\x3f\x83\x94\x52\
84+\x30\x8a\xf5\x17\x8f\x97\x28\x21\xdd\x0b\xd7\xee\xbe\x86\x11\x64\
85+\x0a\xde\x3c\x7d\x74\x66\x38\x64\xef\xc2\x30\xca\x97\xaa\x35\x70\
86+\x1c\x67\x97\xa8\xf8\xd4\xb9\xab\xb7\x07\x70\x08\x0c\x19\x48\x09\
87+\xcf\x13\xa9\xf2\x12\x14\x60\xc3\x04\x2f\xa8\x79\xc4\xb4\x5f\x41\
88+\x06\x14\x32\xc8\xb9\xee\xd4\xf9\xc5\x45\x40\x4e\x19\x84\xfa\x67\
89+\xfc\xfc\xf3\x5b\x63\x2c\xc1\x8f\xb7\xab\xb9\x4a\xb9\x30\x40\x86\
90+\x55\xa0\xa6\x0d\xa6\x61\xa5\xfd\xda\x4c\xfd\x3b\x68\x8e\xbd\xc2\
91+\x16\xab\x70\xcf\x73\x3b\x80\x30\x20\x04\x1a\x05\x4a\x49\x98\xf0\
92+\x26\x5a\x63\x09\x9a\xcd\x66\xa2\x12\x7e\x1f\x12\x06\x20\x19\x28\
93+\x1e\xe9\x25\x4a\x08\x52\xf7\xb2\x05\x19\x14\x17\x6e\xac\xb5\xbf\
94+\xb6\x12\x11\xf5\x41\xc5\x11\x6c\x7c\x5c\x67\xf9\xfa\xe5\xed\xb1\
95+\x43\x4c\xb1\x0b\xfd\xcd\x4f\x1b\xe5\x98\x09\xc8\x4f\x06\xe9\xf8\
96+\x63\x4f\x90\x24\x12\x9d\x9c\x3b\x5b\x68\xcc\x5f\x01\xcb\xf5\x21\
97+\x98\x9e\xad\xeb\x1e\x3e\x56\xd0\x19\x88\x6a\xaf\xb7\xf7\xf0\x77\
98+\x3f\xdc\x1e\xd2\x8a\xe4\xd4\x87\xe2\xf4\xbc\x32\x4a\x0d\x22\xa5\
99+\x6c\x31\xc6\x1f\x70\x2e\x82\xcc\x9f\xd8\xed\x0e\x6e\x62\x4c\x9e\
100+\x39\x2e\xc5\x04\x93\x34\x7d\x8c\xf1\xa1\x0f\xa6\x40\x08\x11\x1b\
101+\x06\x5d\x32\x4d\xfa\xf2\x40\x30\x64\x9c\x6c\xb5\x7f\xed\x4f\x55\
102+\x7d\xc3\xb6\x4c\x40\x08\xc1\x28\xf4\x04\x20\xa4\xda\xcd\xd9\x46\
103+\x60\x99\x94\xa5\x47\x7c\xe9\xf4\xee\x14\x7d\xd7\xd0\x3e\xd0\xc2\
104+\x23\x4b\xfe\x2d\x29\xbc\x9d\x70\xef\xfa\xc1\x2b\xec\xf4\xc2\xaa\
105+\x59\x25\x52\x6f\x61\x4a\x31\x10\x9c\x99\x57\x2a\x60\x2c\x86\x30\
106+\x62\x52\xe7\x34\x77\xa2\xe8\xff\xcf\x60\x65\x65\xd5\x0c\x66\x4a\
107+\xcd\x4b\x0b\xb3\xb7\x72\xb6\x7d\x5a\x2a\xe1\x4a\x01\xb6\x54\x12\
108+\x00\xa1\x08\xe9\xb1\xf7\x59\xbc\xf9\xfe\x43\xfb\x09\xe6\x93\x6b\
109+\xcb\xcb\x17\x39\x68\xfe\x00\x58\x95\xf6\xff\x16\xb1\xc6\xc2\x00\
110+\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
111 \x00\x00\x02\x43\
112 \x89\
113 \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
114@@ -52488,6 +52530,44 @@
115 \x9c\x62\xb1\x98\x2b\x97\xcb\x93\x00\x42\x25\x11\x09\xec\x46\xd1\
116 \xd9\x1b\x95\x91\x88\xea\x2f\xfb\x5c\xf8\xbd\xf0\xc1\x4d\x21\x00\
117 \x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
118+\x00\x00\x02\x31\
119+\x89\
120+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
121+\x00\x00\x10\x00\x00\x00\x10\x08\x06\x00\x00\x00\x1f\xf3\xff\x61\
122+\x00\x00\x00\x04\x73\x42\x49\x54\x08\x08\x08\x08\x7c\x08\x64\x88\
123+\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x01\xbb\x00\x00\x01\xbb\
124+\x01\x3a\xec\xe3\xe2\x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\
125+\x74\x77\x61\x72\x65\x00\x77\x77\x77\x2e\x69\x6e\x6b\x73\x63\x61\
126+\x70\x65\x2e\x6f\x72\x67\x9b\xee\x3c\x1a\x00\x00\x01\xae\x49\x44\
127+\x41\x54\x78\xda\x8d\x90\xbb\x8e\xd3\x40\x14\x40\xcf\x78\x1e\xb6\
128+\x43\xd8\x6c\xc4\xa6\x58\x68\xa1\x03\x21\xf1\x05\x20\xa8\x68\xa0\
129+\xa1\x82\x8e\x6f\x80\x0a\xd1\xd2\xf0\x09\x14\xf0\x1f\x34\xfb\x07\
130+\x34\x80\x28\x58\x21\x2d\xac\x28\x48\xd8\x0d\x4b\xec\xf8\x31\x97\
131+\x31\x96\x23\xa2\x18\x96\xd3\xcd\xbd\xd6\xf1\x99\x51\x22\x82\x9a\
132+\x5c\x79\x71\xde\xcd\x1e\x66\x59\xc6\xf7\xf4\x12\x5c\xbe\xcf\xa9\
133+\xe4\xf3\x47\xb2\xf7\xe4\xb9\x69\x4f\xfe\xe2\xf5\x9b\xb7\x78\xfc\
134+\xf4\x19\xff\xc3\xab\xbd\xcf\xbc\x7c\xbd\x7f\x17\x68\x05\x7c\x7b\
135+\x77\xf4\xf6\xfd\x88\x7b\xb7\x6f\x50\x4f\xae\x31\xb8\xfa\x80\xb2\
136+\xf6\x14\x95\xd0\xe1\x4c\x14\xce\x9e\x86\xba\x2a\xb1\xe5\x62\x17\
137+\xc0\xd0\xf2\x66\x7b\x67\xf7\xce\xc1\x74\xc9\x56\x3c\x26\x1d\x4d\
138+\xb8\x30\xb4\x7c\x99\x2d\xe9\x50\x0a\x46\x36\x62\x51\xb4\x92\x1f\
139+\xd3\xc3\x83\x4e\xb0\xc2\x57\x15\x3a\x8a\xf0\xd2\xfc\x0d\xce\x9d\
140+\x8d\x39\xc9\x6b\x3a\x6c\xa8\x88\xa5\x15\x58\x6b\xd9\x14\xf8\x1a\
141+\xad\x35\x2e\x2c\xf3\x0a\xb6\x12\x4d\xe9\x23\x44\xa0\x41\x80\x41\
142+\x98\x55\x35\x18\xeb\x36\x05\x22\x82\x09\x05\xb1\x6d\xc7\x45\x0d\
143+\x3b\xa1\x62\x9e\xad\x2a\xc2\x5e\x85\x4a\x09\x35\x3d\x02\x90\x50\
144+\x10\x35\x05\x7f\x4c\x60\x98\xe8\x20\x13\x3a\x12\x03\xa6\xef\x0a\
145+\x11\x60\x8c\x0e\x99\x6e\x4d\x1b\x1b\x85\xf3\x82\xf7\xdd\x83\x2a\
146+\xac\x8b\x7b\x04\xbf\xf3\x1d\xc3\x34\x59\x13\x28\x25\x24\x4a\x21\
147+\x1e\x7c\x73\x06\xdc\xa6\xa0\xcd\xda\x1e\x8f\x39\x93\xb6\xcb\x35\
148+\x79\x10\x40\xa8\x10\x01\x54\x10\xf4\xbc\x81\xd5\x86\x34\x49\x18\
149+\xc4\x31\x7d\x68\xd5\x08\x42\x09\x82\xb5\x7d\x05\xc6\x10\x89\x90\
150+\xc6\x8e\x1e\x56\xd7\x21\x48\x6c\x5f\x81\x36\x9a\x3c\x5f\x34\x0f\
151+\xf9\x77\xc1\xea\x5b\xbb\x29\x40\x45\xe4\xcb\x9c\x65\x51\x72\x1a\
152+\x4a\xe9\x35\xc1\xa7\x93\xf9\x11\xd9\xcf\x63\xa6\xb3\x63\x3e\x7c\
153+\xdc\xe7\x5f\x14\x75\xc5\x22\xcb\xbe\x02\xfc\x02\xce\x8e\x94\x0e\
154+\x4b\x04\xe7\x86\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
155+\
156 \x00\x00\x02\x7e\
157 \x89\
158 \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
159@@ -52530,6 +52610,60 @@
160 \x2d\x7f\x6b\xac\x3a\x6f\x91\x45\x04\x05\x3c\x58\x29\xdf\x95\x98\
161 \x70\x35\xf3\x6f\x89\x5a\x6e\xe0\x0f\xd5\xf2\x24\x09\x1c\xd8\x9f\
162 \xe3\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
163+\x00\x00\x03\x3e\
164+\x89\
165+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
166+\x00\x00\x10\x00\x00\x00\x10\x08\x03\x00\x00\x00\x28\x2d\x0f\x53\
167+\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13\
168+\x01\x00\x9a\x9c\x18\x00\x00\x00\x04\x67\x41\x4d\x41\x00\x00\xb1\
169+\x8e\x7c\xfb\x51\x93\x00\x00\x00\x20\x63\x48\x52\x4d\x00\x00\x7a\
170+\x25\x00\x00\x80\x83\x00\x00\xf9\xff\x00\x00\x80\xe9\x00\x00\x75\
171+\x30\x00\x00\xea\x60\x00\x00\x3a\x98\x00\x00\x17\x6f\x92\x5f\xc5\
172+\x46\x00\x00\x01\xb0\x50\x4c\x54\x45\x00\x00\x00\xff\xff\xff\xdf\
173+\x98\x00\xe6\xa0\x0c\xe7\xa3\x10\xdf\x98\x00\xe6\xa2\x0e\xe7\xa2\
174+\x10\xdf\x98\x00\xe5\xa0\x0d\xe3\x9d\x08\xe1\x9e\x01\xe1\x9f\x00\
175+\xe1\x9f\x01\xe1\x9f\x0d\xe1\x9f\x12\xe3\xa1\x11\xe5\xa5\x1a\x00\
176+\x56\xff\x10\x60\xef\x10\x60\xf2\x20\x99\xdd\x30\x80\xce\x50\x8b\
177+\xb1\x50\xb2\xad\x8e\xb2\xa2\x8f\xad\x72\x8f\xb2\x9e\x9f\xbb\x66\
178+\xc3\x4d\x02\xc4\x4f\x01\xcc\x5d\x03\xd4\x69\x02\xdc\x84\x0c\xdc\
179+\x8d\x05\xe1\x90\x09\xe3\x9b\x0b\xe5\x99\x0a\xe5\xa8\x01\xe7\x9d\
180+\x09\xe7\xad\x02\xe7\xae\x01\xe7\xaf\x01\xe7\xb0\x01\xe7\xb0\x03\
181+\xe7\xb0\x09\xe7\xb0\x10\xe7\xb1\x1c\xe7\xb1\x1f\xe7\xb1\x33\xe7\
182+\xb2\x38\xe7\xb2\x40\xe9\xb4\x43\xeb\xb6\x04\xeb\xb8\x45\xeb\xbb\
183+\x20\xeb\xbc\x2d\xec\xb9\x48\xef\xbd\x3a\xef\xc4\x65\xf3\xb9\x17\
184+\xf4\xb8\x14\xf5\xba\x13\xf7\xcd\x0e\xf7\xcf\x0d\xf7\xd1\x0f\xf7\
185+\xd7\x18\xf7\xdc\x61\xf7\xe4\x91\xf7\xe6\xa5\xf8\xce\x11\xf8\xe7\
186+\xbf\xfb\xc8\x1d\xfb\xca\x1b\xfb\xd8\x10\xfc\xcd\x1a\xfc\xfd\xac\
187+\xfd\xd2\x17\xfd\xfa\x60\xfd\xfb\x7c\xfd\xfc\x7e\xfd\xfc\x84\xfd\
188+\xfe\xd2\xfe\xf8\x20\xfe\xf8\x24\xfe\xf9\x37\xfe\xf9\x3b\xfe\xfa\
189+\x47\xfe\xfa\x4f\xfe\xfc\x9c\xfe\xfc\xa3\xfe\xfe\xd9\xff\xd0\x1f\
190+\xff\xd1\x1e\xff\xd2\x1d\xff\xd3\x1d\xff\xd4\x1c\xff\xd5\x1b\xff\
191+\xd6\x1a\xff\xd6\x1b\xff\xd9\x18\xff\xda\x17\xff\xda\x22\xff\xda\
192+\x24\xff\xdb\x19\xff\xdc\x16\xff\xdf\x19\xff\xdf\x41\xff\xe0\x12\
193+\xff\xe2\x3c\xff\xe3\x10\xff\xe4\x19\xff\xe5\x0e\xff\xe6\x0e\xff\
194+\xe7\x0d\xff\xe7\x61\xff\xe9\x20\xff\xea\x0a\xff\xea\x1a\xff\xeb\
195+\x0a\xff\xed\x08\xff\xed\x67\xff\xef\x06\xff\xf0\x06\xff\xf1\x04\
196+\xff\xf2\x5d\xff\xf2\x7c\xff\xf4\x53\xff\xf4\x82\xff\xf5\x03\xff\
197+\xf6\x05\xff\xf7\x07\xff\xf8\x16\xff\xf8\x17\xff\xf8\x6c\xff\xf8\
198+\x87\xff\xf9\x30\xff\xfa\x78\xff\xfb\x7d\xff\xfd\xaf\xff\xfd\xc0\
199+\xff\xfe\xe1\xff\xff\xf2\xff\xff\xf5\xc6\x84\xb0\x01\x00\x00\x00\
200+\x12\x74\x52\x4e\x53\x00\x00\x20\x20\x20\x60\x60\x60\x8f\x8f\x9f\
201+\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xb4\xb2\xe3\xac\x00\x00\x00\xda\x49\
202+\x44\x41\x54\x18\x95\x63\x60\x44\x03\x0c\x8c\x0c\x0c\x0c\x2c\x9c\
203+\x82\x26\xc6\xfc\x1c\x4c\x40\x26\x58\x80\xdd\xd2\xbd\x3f\x3a\xaa\
204+\xdb\xc5\x90\x15\x22\xc0\x66\xdd\x17\xe4\x13\x10\x11\xd2\x54\x6f\
205+\xc1\x0a\x12\x60\x36\xeb\x8d\x0c\xf4\xf7\x0b\x6b\x6d\xac\x28\xd3\
206+\x63\x02\x0a\x70\xb9\x76\x85\x4b\x4a\x87\x05\xcb\x48\x95\xe6\x39\
207+\x71\x00\x05\x04\x7a\x3a\x42\x85\x44\x5a\x9a\x85\x85\x4a\x72\xf2\
208+\x79\x81\x02\x46\xed\x6d\x9d\x62\x12\x8d\x35\xe2\xa2\x95\xc5\x19\
209+\x3a\x40\x01\xc3\x86\x5a\xfd\xea\xaa\x8a\xf2\x22\x2f\xab\xec\x34\
210+\x6d\xa0\x00\x5f\x5d\x81\x9c\x52\x51\x61\x5e\x8e\x8a\xac\x4d\x26\
211+\x0f\x50\x80\xc3\x39\xcb\x4d\x55\x41\x5d\x59\x5e\xd1\xd3\xc3\x01\
212+\x64\x28\x93\x41\x6e\x4a\x8a\xaf\x9d\xad\x77\x5c\x4c\x92\x1a\xc8\
213+\x5a\x06\x56\xf3\xf4\xf8\xf8\xb8\xd8\x98\x98\x64\x53\x56\x88\xd3\
214+\x59\x75\x1d\x33\x13\x13\x52\xed\x35\xa0\x4e\x67\x60\x60\xe2\xe0\
215+\xd1\xd2\xe4\x86\x79\x0e\x0d\x00\x00\x00\x82\x2d\xeb\x05\xb0\x41\
216+\x76\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
217 \x00\x00\x02\x9a\
218 \x89\
219 \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
220@@ -53680,6 +53814,11 @@
221 \x03\x8c\x2f\x27\
222 \x00\x69\
223 \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\
224+\x00\x14\
225+\x07\xde\x82\x27\
226+\x00\x73\
227+\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\
228+\x00\x70\x00\x6e\x00\x67\
229 \x00\x0c\
230 \x0b\x86\xcd\x87\
231 \x00\x73\
232@@ -53688,10 +53827,20 @@
233 \x0f\xce\xfd\xc7\
234 \x00\x73\
235 \x00\x6f\x00\x6e\x00\x67\x00\x5f\x00\x65\x00\x64\x00\x69\x00\x74\x00\x2e\x00\x70\x00\x6e\x00\x67\
236+\x00\x12\
237+\x07\x52\x49\x67\
238+\x00\x73\
239+\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\
240+\x00\x67\
241 \x00\x0f\
242 \x0f\x3d\x20\x27\
243 \x00\x73\
244 \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\
245+\x00\x13\
246+\x0e\x4b\x25\x27\
247+\x00\x73\
248+\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\
249+\x00\x6e\x00\x67\
250 \x00\x0f\
251 \x05\x0e\x96\x87\
252 \x00\x73\
253@@ -53780,10 +53929,10 @@
254
255 qt_resource_struct = "\
256 \x00\x00\x00\x00\x00\x02\x00\x00\x00\x11\x00\x00\x00\x01\
257-\x00\x00\x00\xa6\x00\x02\x00\x00\x00\x06\x00\x00\x00\x56\
258-\x00\x00\x00\x38\x00\x02\x00\x00\x00\x04\x00\x00\x00\x52\
259-\x00\x00\x01\x02\x00\x02\x00\x00\x00\x08\x00\x00\x00\x4a\
260-\x00\x00\x00\x5c\x00\x02\x00\x00\x00\x04\x00\x00\x00\x46\
261+\x00\x00\x00\xa6\x00\x02\x00\x00\x00\x06\x00\x00\x00\x59\
262+\x00\x00\x00\x38\x00\x02\x00\x00\x00\x04\x00\x00\x00\x55\
263+\x00\x00\x01\x02\x00\x02\x00\x00\x00\x08\x00\x00\x00\x4d\
264+\x00\x00\x00\x5c\x00\x02\x00\x00\x00\x07\x00\x00\x00\x46\
265 \x00\x00\x00\x4c\x00\x02\x00\x00\x00\x02\x00\x00\x00\x44\
266 \x00\x00\x01\x12\x00\x02\x00\x00\x00\x02\x00\x00\x00\x42\
267 \x00\x00\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x3f\
268@@ -53798,10 +53947,10 @@
269 \x00\x00\x00\x24\x00\x02\x00\x00\x00\x04\x00\x00\x00\x13\
270 \x00\x00\x00\xc6\x00\x02\x00\x00\x00\x01\x00\x00\x00\x12\
271 \x00\x00\x06\x58\x00\x00\x00\x00\x00\x01\x00\x00\x55\x3f\
272-\x00\x00\x0b\x5a\x00\x00\x00\x00\x00\x01\x00\x0c\xde\x36\
273-\x00\x00\x0b\x8e\x00\x00\x00\x00\x00\x01\x00\x0c\xe1\x98\
274-\x00\x00\x0b\xb6\x00\x00\x00\x00\x00\x01\x00\x0c\xe4\x36\
275-\x00\x00\x0b\xe4\x00\x00\x00\x00\x00\x01\x00\x0c\xe7\x4a\
276+\x00\x00\x0b\xde\x00\x00\x00\x00\x00\x01\x00\x0c\xe6\x2d\
277+\x00\x00\x0c\x12\x00\x00\x00\x00\x00\x01\x00\x0c\xe9\x8f\
278+\x00\x00\x0c\x3a\x00\x00\x00\x00\x00\x01\x00\x0c\xec\x2d\
279+\x00\x00\x0c\x68\x00\x00\x00\x00\x00\x01\x00\x0c\xef\x41\
280 \x00\x00\x05\xbc\x00\x00\x00\x00\x00\x01\x00\x00\x4a\xfb\
281 \x00\x00\x05\xe2\x00\x00\x00\x00\x00\x01\x00\x00\x4d\x32\
282 \x00\x00\x06\x2e\x00\x00\x00\x00\x00\x01\x00\x00\x52\x74\
283@@ -53835,24 +53984,27 @@
284 \x00\x00\x06\xd0\x00\x00\x00\x00\x00\x01\x00\x02\xfc\x9c\
285 \x00\x00\x06\xf6\x00\x00\x00\x00\x00\x01\x00\x02\xff\x14\
286 \x00\x00\x06\x8a\x00\x00\x00\x00\x00\x01\x00\x02\xf6\x21\
287-\x00\x00\x0c\x94\x00\x00\x00\x00\x00\x01\x00\x0c\xf3\xd4\
288-\x00\x00\x0c\x2a\x00\x00\x00\x00\x00\x01\x00\x0c\xeb\xff\
289-\x00\x00\x0c\x4e\x00\x00\x00\x00\x00\x01\x00\x0c\xee\x90\
290-\x00\x00\x0c\x70\x00\x00\x00\x00\x00\x01\x00\x0c\xf0\xa3\
291-\x00\x00\x0c\x08\x00\x00\x00\x00\x00\x01\x00\x0c\xe9\x61\
292+\x00\x00\x0d\x18\x00\x00\x00\x00\x00\x01\x00\x0c\xfb\xcb\
293+\x00\x00\x0c\xae\x00\x00\x00\x00\x00\x01\x00\x0c\xf3\xf6\
294+\x00\x00\x0c\xd2\x00\x00\x00\x00\x00\x01\x00\x0c\xf6\x87\
295+\x00\x00\x0c\xf4\x00\x00\x00\x00\x00\x01\x00\x0c\xf8\x9a\
296+\x00\x00\x0c\x8c\x00\x00\x00\x00\x00\x01\x00\x0c\xf1\x58\
297 \x00\x00\x09\xc0\x00\x00\x00\x00\x00\x01\x00\x0c\xc1\x6c\
298 \x00\x00\x09\x9a\x00\x00\x00\x00\x00\x01\x00\x0c\xbe\xce\
299-\x00\x00\x0c\xe2\x00\x00\x00\x00\x00\x01\x00\x0c\xf8\x78\
300-\x00\x00\x0d\x0a\x00\x00\x00\x00\x00\x01\x00\x0c\xfb\x16\
301-\x00\x00\x0c\xbe\x00\x00\x00\x00\x00\x01\x00\x0c\xf5\xd8\
302+\x00\x00\x0d\x66\x00\x00\x00\x00\x00\x01\x00\x0d\x00\x6f\
303+\x00\x00\x0d\x8e\x00\x00\x00\x00\x00\x01\x00\x0d\x03\x0d\
304+\x00\x00\x0d\x42\x00\x00\x00\x00\x00\x01\x00\x0c\xfd\xcf\
305 \x00\x00\x01\xde\x00\x00\x00\x00\x00\x01\x00\x00\x09\x05\
306 \x00\x00\x02\x12\x00\x00\x00\x00\x00\x01\x00\x00\x0b\xa3\
307-\x00\x00\x0a\x68\x00\x00\x00\x00\x00\x01\x00\x0c\xcd\x8a\
308-\x00\x00\x0a\x8c\x00\x00\x00\x00\x00\x01\x00\x0c\xd0\x88\
309-\x00\x00\x0a\x44\x00\x00\x00\x00\x00\x01\x00\x0c\xca\xec\
310+\x00\x00\x0a\xec\x00\x00\x00\x00\x00\x01\x00\x0c\xd5\x81\
311+\x00\x00\x0b\x10\x00\x00\x00\x00\x00\x01\x00\x0c\xd8\x7f\
312+\x00\x00\x0a\xc8\x00\x00\x00\x00\x00\x01\x00\x0c\xd2\xe3\
313+\x00\x00\x0a\x4e\x00\x00\x00\x00\x00\x01\x00\x0c\xca\xea\
314 \x00\x00\x09\xe2\x00\x00\x00\x00\x00\x01\x00\x0c\xc3\x83\
315-\x00\x00\x0a\x20\x00\x00\x00\x00\x00\x01\x00\x0c\xc8\x6a\
316-\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x01\x00\x0c\xc5\xca\
317+\x00\x00\x0a\x10\x00\x00\x00\x00\x00\x01\x00\x0c\xc6\x03\
318+\x00\x00\x0a\x9c\x00\x00\x00\x00\x00\x01\x00\x0c\xcf\xa1\
319+\x00\x00\x0a\x78\x00\x00\x00\x00\x00\x01\x00\x0c\xcd\x1f\
320+\x00\x00\x0a\x2e\x00\x00\x00\x00\x00\x01\x00\x0c\xc8\x4a\
321 \x00\x00\x02\x66\x00\x00\x00\x00\x00\x01\x00\x00\x10\x0c\
322 \x00\x00\x02\xd2\x00\x00\x00\x00\x00\x01\x00\x00\x17\xff\
323 \x00\x00\x03\x04\x00\x00\x00\x00\x00\x01\x00\x00\x1a\x2a\
324@@ -53861,10 +54013,10 @@
325 \x00\x00\x03\x4a\x00\x00\x00\x00\x00\x01\x00\x00\x20\x24\
326 \x00\x00\x02\x42\x00\x00\x00\x00\x00\x01\x00\x00\x0d\xba\
327 \x00\x00\x03\x26\x00\x00\x00\x00\x00\x01\x00\x00\x1c\x8d\
328-\x00\x00\x0a\xac\x00\x00\x00\x00\x00\x01\x00\x0c\xd3\x0b\
329-\x00\x00\x0b\x0e\x00\x00\x00\x00\x00\x01\x00\x0c\xd9\x81\
330-\x00\x00\x0a\xe0\x00\x00\x00\x00\x00\x01\x00\x0c\xd6\x6d\
331-\x00\x00\x0b\x36\x00\x00\x00\x00\x00\x01\x00\x0c\xdc\x1f\
332+\x00\x00\x0b\x30\x00\x00\x00\x00\x00\x01\x00\x0c\xdb\x02\
333+\x00\x00\x0b\x92\x00\x00\x00\x00\x00\x01\x00\x0c\xe1\x78\
334+\x00\x00\x0b\x64\x00\x00\x00\x00\x00\x01\x00\x0c\xde\x64\
335+\x00\x00\x0b\xba\x00\x00\x00\x00\x00\x01\x00\x0c\xe4\x16\
336 \x00\x00\x07\xce\x00\x00\x00\x00\x00\x01\x00\x03\x3e\xa4\
337 \x00\x00\x07\x6e\x00\x00\x00\x00\x00\x01\x00\x03\x0f\x64\
338 \x00\x00\x07\x3e\x00\x00\x00\x00\x00\x01\x00\x03\x04\xd0\
339
340=== modified file 'openlp/core/ui/maindisplay.py'
341--- openlp/core/ui/maindisplay.py 2009-07-03 19:08:21 +0000
342+++ openlp/core/ui/maindisplay.py 2009-07-19 07:40:31 +0000
343@@ -18,7 +18,7 @@
344 Place, Suite 330, Boston, MA 02111-1307 USA
345 """
346
347-from PyQt4 import QtCore, QtGui, QtTest
348+from PyQt4 import QtCore, QtGui
349
350 from time import sleep
351 from openlp.core.lib import translate
352@@ -41,6 +41,7 @@
353 self.alertactive = False
354 self.alerttext = u''
355 self.alertTab = None
356+ self.timer_id = 0
357
358 def setup(self, screenNumber):
359 """
360@@ -69,11 +70,18 @@
361 self.frameView(self.blankFrame)
362
363 def frameView(self, frame):
364+ """
365+ Called from a slide controller to display a frame
366+ if the alert is in progress the alert is added on top
367+ ``frame``
368+ Image frame to be rendered
369+ """
370+
371 self.frame = frame
372- if not self.displayBlank:
373+ if self.timer_id != 0 :
374+ self.displayAlert()
375+ elif not self.displayBlank:
376 self.display.setPixmap(QtGui.QPixmap.fromImage(frame))
377- elif self.alertactive:
378- self.displayAlert()
379
380 def blankDisplay(self):
381 if not self.displayBlank:
382@@ -85,17 +93,17 @@
383
384 def alert(self, alertTab, text):
385 """
386- Called from the Alert Tab
387- alertTab = details from AlertTab
388- text = display text
389- screen = screen number to be displayed on.
390+ Called from the Alert Tab to display an alert
391+ ``alertTab``
392+ details from AlertTab
393+
394+ ``text``
395+ display text
396 """
397 self.alerttext = text
398 self.alertTab = alertTab
399 if len(text) > 0:
400- self.alertactive = True
401 self.displayAlert()
402- self.alertactive = False
403
404 def displayAlert(self):
405 alertframe = QtGui.QPixmap.fromImage(self.frame)
406@@ -113,5 +121,12 @@
407 painter.drawText(x, y+metrics.height()-metrics.descent()-1, self.alerttext)
408 painter.end()
409 self.display.setPixmap(alertframe)
410- QtTest.QTest.qWait(self.alertTab.timeout*1000)
411- self.display.setPixmap(QtGui.QPixmap.fromImage(self.frame))
412+ # check to see if we have a timer running
413+ if self.timer_id == 0:
414+ self.timer_id = self.startTimer(int(self.alertTab.timeout) * 1000)
415+
416+ def timerEvent(self, event):
417+ if event.timerId() == self.timer_id:
418+ self.display.setPixmap(QtGui.QPixmap.fromImage(self.frame))
419+ self.killTimer(self.timer_id)
420+ self.timer_id = 0
421
422=== modified file 'openlp/core/ui/mainwindow.py'
423--- openlp/core/ui/mainwindow.py 2009-07-09 05:15:26 +0000
424+++ openlp/core/ui/mainwindow.py 2009-07-18 05:43:50 +0000
425@@ -139,16 +139,24 @@
426 if ret == QtGui.QMessageBox.Save:
427 self.ServiceManagerContents.onSaveService()
428 self.mainDisplay.close()
429+ self.cleanUp()
430 event.accept()
431 elif ret == QtGui.QMessageBox.Discard:
432 self.mainDisplay.close()
433+ self.cleanUp()
434 event.accept()
435 else:
436 event.ignore()
437 else:
438 self.mainDisplay.close()
439+ self.cleanUp()
440 event.accept()
441
442+ def cleanUp(self):
443+ # Call the cleanup method to shutdown plugins.
444+ log.info(u'cleanup plugins')
445+ self.plugin_manager.initialise_plugins()
446+
447 def OosChanged(self, reset = False, oosName = None):
448 """
449 Hook to change the title if the OOS has been changed
450
451=== modified file 'openlp/migration/migratesongs.py'
452--- openlp/migration/migratesongs.py 2009-07-14 18:38:33 +0000
453+++ openlp/migration/migratesongs.py 2009-07-18 07:30:26 +0000
454@@ -137,8 +137,7 @@
455 self.db_url = u'sqlite:///' + self.data_path + u'/songs.sqlite'
456 print self.db_url
457 self.session = init_models(self.db_url)
458- if not songs_table.exists():
459- metadata.create_all()
460+ metadata.create_all(checkfirst=True)
461 results = self.session.query(TSong).order_by(TSong.songid).all()
462 for songs_temp in results:
463 song = Song()
464@@ -151,18 +150,21 @@
465 aa = self.session.execute(u'select * from songauthors_temp where songid =' + unicode(songs_temp.songid) )
466 for row in aa:
467 a = row['authorid']
468- author = Author()
469 authors_temp = self.session.query(TAuthor).get(a)
470- author.display_name = authors_temp.authorname
471- author.first_name = u''
472- author.last_name = u''
473+ bb = self.session.execute(u'select * from authors where display_name = \"%s\"' % unicode(authors_temp.authorname) ).fetchone()
474+ if bb is None:
475+ author = Author()
476+ author.display_name = authors_temp.authorname
477+ else:
478+ id = int(bb[0])
479+ author = self.session.query(Author).get(bb[0])
480 song.authors.append(author)
481- try:
482- self.session.add(song)
483- self.session.commit()
484- except:
485- self.session.rollback()
486- print u'Errow thrown = ', sys.exc_info()[1]
487+ try:
488+ self.session.add(song)
489+ self.session.commit()
490+ except:
491+ self.session.rollback()
492+ print u'Errow thrown = ', sys.exc_info()[1]
493
494 def _v1_9_0_cleanup(self, database):
495 self.display.sub_output(u'Update Internal Data ' + database)
496@@ -184,5 +186,4 @@
497 conn.execute(u'drop table songauthors_temp;')
498 conn.commit()
499 conn.execute(u'drop table settings;')
500-
501 conn.commit()
502
503=== modified file 'openlp/plugins/bibles/lib/bibleDBimpl.py'
504--- openlp/plugins/bibles/lib/bibleDBimpl.py 2009-07-14 19:44:15 +0000
505+++ openlp/plugins/bibles/lib/bibleDBimpl.py 2009-07-18 05:43:50 +0000
506@@ -58,7 +58,6 @@
507
508 def add_verse(self, bookid, chap, vse, text):
509 #log.debug(u'add_verse %s,%s,%s", bookid, chap, vse)
510- #metadata.bind.echo = False
511 verse = Verse()
512 verse.book_id = bookid
513 verse.chapter = chap
514@@ -69,8 +68,6 @@
515
516 def create_chapter(self, bookid, chap, textlist):
517 log.debug(u'create_chapter %s,%s', bookid, chap)
518- #log.debug(u'Text %s ", textlist)
519- #metadata.bind.echo = False
520 #text list has book and chapter as first to elements of the array
521 for verse_number, verse_text in textlist.iteritems():
522 verse = Verse()
523@@ -83,7 +80,6 @@
524
525 def create_book(self, bookname, bookabbrev, testament=1):
526 log.debug(u'create_book %s,%s', bookname, bookabbrev)
527- #metadata.bind.echo = False
528 book = Book()
529 book.testament_id = testament
530 book.name = bookname
531@@ -94,7 +90,6 @@
532
533 def save_meta(self, key, value):
534 log.debug(u'save_meta %s/%s', key, value)
535- #metadata.bind.echo = False
536 bmeta = BibleMeta()
537 bmeta.key = key
538 bmeta.value = value
539@@ -116,7 +111,6 @@
540
541 def _load_testament(self, testament):
542 log.debug(u'load_testaments %s', testament)
543- #metadata.bind.echo = False
544 test = ONTestament()
545 test.name = testament
546 self.session.add(test)
547@@ -128,17 +122,11 @@
548
549 def get_max_bible_book_verses(self, bookname, chapter):
550 log.debug(u'get_max_bible_book_verses %s, %s', bookname, chapter)
551- #metadata.bind.echo = False
552- #s = text (u'select max(verse.verse) from verse,book where chapter = :c and book_id = book.id and book.name = :b ')
553- #return self.db.execute(s, c=chapter, b=bookname).fetchone()
554 verse = self.session.query(Verse).join(Book).filter(Book.name==bookname).filter(Verse.chapter==chapter).order_by(Verse.verse.desc()).first()
555 return verse.verse
556
557 def get_max_bible_book_chapter(self, bookname):
558 log.debug(u'get_max_bible_book_chapter %s', bookname)
559- #metadata.bind.echo = False
560- #s = text (u'select max(verse.chapter) from verse,book where book_id = book.id and book.name = :b')
561- #return self.db.execute(s, b=bookname).fetchone()
562 verse = self.session.query(Verse).join(Book).filter(Book.name==bookname).order_by(Verse.chapter.desc()).first()
563 return verse.chapter
564
565@@ -151,34 +139,24 @@
566
567 def get_bible_chapter(self, id, chapter):
568 log.debug(u'get_bible_chapter %s, %s', id, chapter)
569- #metadata.bind.echo = False
570 return self.session.query(Verse).filter_by(chapter=chapter).filter_by(book_id=id).first()
571
572 def get_bible_text(self, bookname, chapter, sverse, everse):
573 log.debug(u'get_bible_text %s, %s, %s, %s', bookname, chapter, sverse, everse)
574- #metadata.bind.echo = False
575- #bookname = bookname + u"%"
576- #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)')
577- #return self.db.execute(s, c=chapter, v1=sverse , v2=everse, b=bookname).fetchall()
578 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()
579 return verses
580
581 def get_verses_from_text(self, versetext):
582 log.debug(u'get_verses_from_text %s',versetext)
583- #metadata.bind.echo = False
584 versetext = u'%%%s%%' % versetext
585- #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')
586- #return self.db.execute(s, t=versetext).fetchall()
587 verses = self.session.query(Verse).filter(Verse.text.like(versetext)).all()
588 return verses
589
590 def dump_bible(self):
591 log.debug( u'.........Dumping Bible Database')
592 log.debug( '...............................Books ')
593- #s = text (u'select * FROM book ')
594 books = self.session.query(Book).all()
595 log.debug(books)
596 log.debug( u'...............................Verses ')
597- #s = text (u'select * FROM verse ')
598 verses = self.session.query(Verse).all()
599 log.debug(verses)
600
601=== modified file 'openlp/plugins/bibles/lib/manager.py'
602--- openlp/plugins/bibles/lib/manager.py 2009-07-13 20:08:43 +0000
603+++ openlp/plugins/bibles/lib/manager.py 2009-07-18 05:43:50 +0000
604@@ -29,8 +29,8 @@
605 from bibleDBimpl import BibleDBImpl
606 from bibleHTTPimpl import BibleHTTPImpl
607
608-from openlp.plugins.bibles.lib.tables import *
609-from openlp.plugins.bibles.lib.classes import *
610+#from openlp.plugins.bibles.lib.tables import *
611+#from openlp.plugins.bibles.lib.classes import *
612
613 class BibleMode(object):
614 Full = 1
615
616=== modified file 'openlp/plugins/bibles/lib/models.py'
617--- openlp/plugins/bibles/lib/models.py 2009-07-14 19:44:15 +0000
618+++ openlp/plugins/bibles/lib/models.py 2009-07-18 05:43:50 +0000
619@@ -68,19 +68,14 @@
620 """
621 pass
622
623-
624 def init_models(db_url):
625 engine = create_engine(db_url)
626 metadata.bind = engine
627 session = scoped_session(sessionmaker(autoflush=True,
628 autocommit=False,
629 bind=engine))
630- # Don't think this is needed...
631- #metadata.bind.echo = False
632- #Define the tables and indexes
633 return metadata, session
634
635-
636 metadata = MetaData()
637 meta_table = Table(u'metadata', metadata,
638 Column(u'key', types.Unicode(255), primary_key=True, index=True),
639
640=== modified file 'openlp/plugins/songs/forms/authorsform.py'
641--- openlp/plugins/songs/forms/authorsform.py 2009-07-14 18:38:33 +0000
642+++ openlp/plugins/songs/forms/authorsform.py 2009-07-18 05:43:50 +0000
643@@ -51,7 +51,8 @@
644 Refresh the screen and rest fields
645 """
646 self.AuthorListWidget.clear()
647- self.onClearButtonClick() # tidy up screen
648+ # tidy up screen
649+ self.onClearButtonClick()
650 authors = self.songmanager.get_authors()
651 for author in authors:
652 author_name = QtGui.QListWidgetItem(author.display_name)
653@@ -127,6 +128,9 @@
654 self.DisplayEdit.setFocus()
655
656 def _validate_form(self):
657+ """
658+ Validate the form and set if Add button if valid.
659+ """
660 # We need at lease a display name
661 if len(self.DisplayEdit.displayText()) == 0:
662 self.AddUpdateButton.setEnabled(False)
663
664=== modified file 'openlp/plugins/songs/forms/editsongdialog.py'
665--- openlp/plugins/songs/forms/editsongdialog.py 2009-06-14 13:50:56 +0000
666+++ openlp/plugins/songs/forms/editsongdialog.py 2009-07-18 05:43:50 +0000
667@@ -178,9 +178,9 @@
668 self.AuthorRemoveItem = QtGui.QPushButton(self.AuthorRemoveWidget)
669 self.AuthorRemoveItem.setObjectName(u'AuthorRemoveItem')
670 self.AuthorRemoveLayout.addWidget(self.AuthorRemoveItem)
671- self.AddAuthorsButton = QtGui.QPushButton(self.AuthorRemoveWidget)
672- self.AddAuthorsButton.setObjectName(u'AddAuthorsButton')
673- self.AuthorRemoveLayout.addWidget(self.AddAuthorsButton)
674+# self.AddAuthorsButton = QtGui.QPushButton(self.AuthorRemoveWidget)
675+# self.AddAuthorsButton.setObjectName(u'AddAuthorsButton')
676+# self.AuthorRemoveLayout.addWidget(self.AddAuthorsButton)
677 self.AuthorsLayout.addWidget(self.AuthorRemoveWidget)
678 self.AdditionalLayout.addWidget(self.AuthorsGroupBox)
679 self.SongBookGroup = QtGui.QGroupBox(self.AdditionalWidget)
680@@ -197,14 +197,14 @@
681 self.SongbookCombo.setSizePolicy(sizePolicy)
682 self.SongbookCombo.setObjectName(u'SongbookCombo')
683 self.SongbookLayout.addWidget(self.SongbookCombo, 0, 0, 1, 1)
684- self.AddSongBookButton = QtGui.QPushButton(self.SongBookGroup)
685- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
686- sizePolicy.setHorizontalStretch(0)
687- sizePolicy.setVerticalStretch(0)
688- sizePolicy.setHeightForWidth(self.AddSongBookButton.sizePolicy().hasHeightForWidth())
689- self.AddSongBookButton.setSizePolicy(sizePolicy)
690- self.AddSongBookButton.setObjectName(u'AddSongBookButton')
691- self.SongbookLayout.addWidget(self.AddSongBookButton, 0, 1, 1, 1)
692+# self.AddSongBookButton = QtGui.QPushButton(self.SongBookGroup)
693+# sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
694+# sizePolicy.setHorizontalStretch(0)
695+# sizePolicy.setVerticalStretch(0)
696+# sizePolicy.setHeightForWidth(self.AddSongBookButton.sizePolicy().hasHeightForWidth())
697+# self.AddSongBookButton.setSizePolicy(sizePolicy)
698+# self.AddSongBookButton.setObjectName(u'AddSongBookButton')
699+# self.SongbookLayout.addWidget(self.AddSongBookButton, 0, 1, 1, 1)
700 self.AdditionalLayout.addWidget(self.SongBookGroup)
701 self.TopicGroupBox = QtGui.QGroupBox(self.AdditionalWidget)
702 sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
703@@ -255,9 +255,9 @@
704 self.TopicRemoveItem = QtGui.QPushButton(self.TopicRemoveWidget)
705 self.TopicRemoveItem.setObjectName(u'TopicRemoveItem')
706 self.TopicRemoveLayout.addWidget(self.TopicRemoveItem)
707- self.AddTopicButton = QtGui.QPushButton(self.TopicRemoveWidget)
708- self.AddTopicButton.setObjectName(u'AddTopicButton')
709- self.TopicRemoveLayout.addWidget(self.AddTopicButton)
710+# self.AddTopicButton = QtGui.QPushButton(self.TopicRemoveWidget)
711+# self.AddTopicButton.setObjectName(u'AddTopicButton')
712+# self.TopicRemoveLayout.addWidget(self.AddTopicButton)
713 self.TopicLayout.addWidget(self.TopicRemoveWidget)
714 self.AdditionalLayout.addWidget(self.TopicGroupBox)
715 self.CopyrightgroupBox = QtGui.QGroupBox(self.AdditionalWidget)
716@@ -313,8 +313,9 @@
717 EditSongDialog.setTabOrder(self.AuthorAddtoSongItem, self.AuthorsListView)
718 EditSongDialog.setTabOrder(self.AuthorsListView, self.AuthorRemoveItem)
719 EditSongDialog.setTabOrder(self.AuthorRemoveItem, self.SongbookCombo)
720- EditSongDialog.setTabOrder(self.SongbookCombo, self.AddSongBookButton)
721- EditSongDialog.setTabOrder(self.AddSongBookButton, self.SongTopicCombo)
722+ #EditSongDialog.setTabOrder(self.SongbookCombo, self.AddSongBookButton)
723+ #EditSongDialog.setTabOrder(self.AddSongBookButton, self.SongTopicCombo)
724+ EditSongDialog.setTabOrder(self.SongbookCombo, self.SongTopicCombo)
725 EditSongDialog.setTabOrder(self.SongTopicCombo, self.TopicsListView)
726 EditSongDialog.setTabOrder(self.TopicsListView, self.TopicRemoveItem)
727 EditSongDialog.setTabOrder(self.TopicRemoveItem, self.CopyrightEditItem)
728@@ -336,13 +337,13 @@
729 self.AuthorsGroupBox.setTitle(translate(u'EditSongDialog', u'Authors'))
730 self.AuthorAddtoSongItem.setText(translate(u'EditSongDialog', u'Add to Song'))
731 self.AuthorRemoveItem.setText(translate(u'EditSongDialog', u'Remove'))
732- self.AddAuthorsButton.setText(translate(u'EditSongDialog', u'Manage Authors'))
733+ #self.AddAuthorsButton.setText(translate(u'EditSongDialog', u'Manage Authors'))
734 self.SongBookGroup.setTitle(translate(u'EditSongDialog', u'Song Book'))
735- self.AddSongBookButton.setText(translate(u'EditSongDialog', u'Manage Song Books'))
736+ #self.AddSongBookButton.setText(translate(u'EditSongDialog', u'Manage Song Books'))
737 self.TopicGroupBox.setTitle(translate(u'EditSongDialog', u'Topic'))
738 self.AddTopicsToSongButton.setText(translate(u'EditSongDialog', u'Add to Song'))
739 self.TopicRemoveItem.setText(translate(u'EditSongDialog', u'Remove'))
740- self.AddTopicButton.setText(translate(u'EditSongDialog', u'Manage Topics'))
741+ #self.AddTopicButton.setText(translate(u'EditSongDialog', u'Manage Topics'))
742 self.CopyrightgroupBox.setTitle(translate(u'EditSongDialog', u'Copyright Infomaton'))
743 self.CopyrightInsertItem.setText(translate(u'EditSongDialog', u'(c)'))
744 self.CCLILabel.setText(translate(u'EditSongDialog', u'CCLI Number:'))
745
746=== modified file 'openlp/plugins/songs/forms/editsongform.py'
747--- openlp/plugins/songs/forms/editsongform.py 2009-07-13 17:02:38 +0000
748+++ openlp/plugins/songs/forms/editsongform.py 2009-07-19 07:58:37 +0000
749@@ -40,24 +40,24 @@
750 QtGui.QDialog.__init__(self, parent)
751 self.setupUi(self)
752 # Connecting signals and slots
753- QtCore.QObject.connect(self.AddAuthorsButton,
754- QtCore.SIGNAL(u'clicked()'), self.onAddAuthorsButtonClicked)
755+# QtCore.QObject.connect(self.AddAuthorsButton,
756+# QtCore.SIGNAL(u'clicked()'), self.onAddAuthorsButtonClicked)
757 QtCore.QObject.connect(self.AuthorAddtoSongItem,
758 QtCore.SIGNAL(u'clicked()'), self.onAuthorAddtoSongItemClicked)
759 QtCore.QObject.connect(self.AuthorRemoveItem,
760 QtCore.SIGNAL(u'clicked()'), self.onAuthorRemovefromSongItemClicked)
761 QtCore.QObject.connect(self.AuthorsListView,
762 QtCore.SIGNAL(u'itemClicked(QListWidgetItem*)'), self.onAuthorsListViewPressed)
763- QtCore.QObject.connect(self.AddTopicButton,
764- QtCore.SIGNAL(u'clicked()'), self.onAddTopicButtonClicked)
765+# QtCore.QObject.connect(self.AddTopicButton,
766+# QtCore.SIGNAL(u'clicked()'), self.onAddTopicButtonClicked)
767 QtCore.QObject.connect(self.AddTopicsToSongButton,
768 QtCore.SIGNAL(u'clicked()'), self.onTopicAddtoSongItemClicked)
769 QtCore.QObject.connect(self.TopicRemoveItem,
770 QtCore.SIGNAL(u'clicked()'), self.onTopicRemovefromSongItemClicked)
771 QtCore.QObject.connect(self.TopicsListView,
772 QtCore.SIGNAL(u'itemClicked(QListWidgetItem*)'), self.onTopicListViewPressed)
773- QtCore.QObject.connect(self.AddSongBookButton,
774- QtCore.SIGNAL(u'clicked()'), self.onAddSongBookButtonClicked)
775+# QtCore.QObject.connect(self.AddSongBookButton,
776+# QtCore.SIGNAL(u'clicked()'), self.onAddSongBookButtonClicked)
777 QtCore.QObject.connect(self.CopyrightInsertItem,
778 QtCore.SIGNAL(u'clicked()'), self.onCopyrightInsertItemTriggered)
779 QtCore.QObject.connect(self.AddButton,
780@@ -75,9 +75,9 @@
781 # Create other objects and forms
782 self.songmanager = songmanager
783 self.eventmanager = eventmanager
784- self.authors_form = AuthorsForm(self.songmanager)
785- self.topics_form = TopicsForm(self.songmanager)
786- self.song_book_form = SongBookForm(self.songmanager)
787+# self.authors_form = AuthorsForm(self.songmanager)
788+# self.topics_form = TopicsForm(self.songmanager)
789+# self.song_book_form = SongBookForm(self.songmanager)
790 self.verse_form = EditVerseForm()
791 self.initialise()
792 self.AuthorsListView.setSortingEnabled(False)
793@@ -86,9 +86,6 @@
794 self.TopicsListView.setAlternatingRowColors(True)
795
796 def initialise(self):
797- self.loadAuthors()
798- self.loadTopics()
799- self.loadBooks()
800 self.EditButton.setEnabled(False)
801 self.DeleteButton.setEnabled(False)
802 self.AuthorRemoveItem.setEnabled(False)
803@@ -140,26 +137,32 @@
804 self.TopicsListView.clear()
805 self.title_change = False
806 self.TitleEditItem.setFocus(QtCore.Qt.OtherFocusReason)
807+ self.loadAuthors()
808+ self.loadTopics()
809+ self.loadBooks()
810
811 def loadSong(self, id):
812 log.debug(u'Load Song')
813+ self.loadAuthors()
814+ self.loadTopics()
815+ self.loadBooks()
816 self.song = self.songmanager.get_song(id)
817 self.TitleEditItem.setText(self.song.title)
818 title = self.song.search_title.split(u'@')
819 if self.song.song_book_id != 0:
820 book_name = self.songmanager.get_book(self.song.song_book_id)
821- id = self.SongbookCombo.findText(unicode(book_name), QtCore.Qt.MatchExactly)
822+ id = self.SongbookCombo.findText(unicode(book_name.name), QtCore.Qt.MatchExactly)
823 if id == -1:
824 # Not Found
825 id = 0
826- book_name.setCurrentIndex(id)
827+ self.SongbookCombo.setCurrentIndex(id)
828 if self.song.theme_name is not None and len(self.song.theme_name) > 0:
829- id = self.SongbookCombo.findText(unicode(self.song.theme_name), QtCore.Qt.MatchExactly)
830+ id = self.ThemeSelectionComboItem.findText(unicode(self.song.theme_name), QtCore.Qt.MatchExactly)
831 if id == -1:
832 # Not Found
833 id = 0
834 self.song.theme_name = None
835- self.SongbookCombo.setCurrentIndex(id)
836+ self.ThemeSelectionComboItem.setCurrentIndex(id)
837 if len(title) > 1:
838 self.AlternativeEdit.setText(title[1])
839 if self.song.copyright is not None:
840@@ -207,15 +210,16 @@
841
842 def onAuthorAddtoSongItemClicked(self):
843 item = int(self.AuthorsSelectionComboItem.currentIndex())
844- item_id = (self.AuthorsSelectionComboItem.itemData(item)).toInt()[0]
845- author = self.songmanager.get_author(item_id)
846- self.song.authors.append(author)
847- author_item = QtGui.QListWidgetItem(unicode(author.display_name))
848- author_item.setData(QtCore.Qt.UserRole, QtCore.QVariant(author.id))
849- self.AuthorsListView.addItem(author_item)
850+ if item > -1:
851+ item_id = (self.AuthorsSelectionComboItem.itemData(item)).toInt()[0]
852+ author = self.songmanager.get_author(item_id)
853+ self.song.authors.append(author)
854+ author_item = QtGui.QListWidgetItem(unicode(author.display_name))
855+ author_item.setData(QtCore.Qt.UserRole, QtCore.QVariant(author.id))
856+ self.AuthorsListView.addItem(author_item)
857
858 def onAuthorsListViewPressed(self):
859- if self.AuthorsListView.count() >1:
860+ if self.AuthorsListView.count() > 1:
861 self.AuthorRemoveItem.setEnabled(True)
862
863 def onAuthorRemovefromSongItemClicked(self):
864@@ -229,12 +233,13 @@
865
866 def onTopicAddtoSongItemClicked(self):
867 item = int(self.SongTopicCombo.currentIndex())
868- item_id = (self.SongTopicCombo.itemData(item)).toInt()[0]
869- topic = self.songmanager.get_topic(item_id)
870- self.song.topics.append(topic)
871- topic_item = QtGui.QListWidgetItem(unicode(topic.name))
872- topic_item.setData(QtCore.Qt.UserRole, QtCore.QVariant(topic.id))
873- self.TopicsListView.addItem(topic_item)
874+ if item > -1:
875+ item_id = (self.SongTopicCombo.itemData(item)).toInt()[0]
876+ topic = self.songmanager.get_topic(item_id)
877+ self.song.topics.append(topic)
878+ topic_item = QtGui.QListWidgetItem(unicode(topic.name))
879+ topic_item.setData(QtCore.Qt.UserRole, QtCore.QVariant(topic.id))
880+ self.TopicsListView.addItem(topic_item)
881
882 def onTopicListViewPressed(self):
883 self.TopicRemoveItem.setEnabled(True)
884@@ -247,29 +252,30 @@
885 self.song.topics.remove(topic)
886 row = self.TopicsListView.row(item)
887 self.TopicsListView.takeItem(row)
888- def onAddAuthorsButtonClicked(self):
889- """
890- Slot documentation goes here.
891- """
892- self.authors_form.load_form()
893- self.authors_form.exec_()
894- self.loadAuthors()
895-
896- def onAddTopicButtonClicked(self):
897- """
898- Slot documentation goes here.
899- """
900- self.topics_form.load_form()
901- self.topics_form.exec_()
902- self.loadTopics()
903-
904- def onAddSongBookButtonClicked(self):
905- """
906- Slot documentation goes here.
907- """
908- self.song_book_form.load_form()
909- self.song_book_form.exec_()
910- self.loadBooks()
911+
912+# def onAddAuthorsButtonClicked(self):
913+# """
914+# Slot documentation goes here.
915+# """
916+# self.authors_form.load_form()
917+# self.authors_form.exec_()
918+# self.loadAuthors()
919+#
920+# def onAddTopicButtonClicked(self):
921+# """
922+# Slot documentation goes here.
923+# """
924+# self.topics_form.load_form()
925+# self.topics_form.exec_()
926+# self.loadTopics()
927+#
928+# def onAddSongBookButtonClicked(self):
929+# """
930+# Slot documentation goes here.
931+# """
932+# self.song_book_form.load_form()
933+# self.song_book_form.exec_()
934+# self.loadBooks()
935
936 def onSongBookComboChanged(self, item):
937 if item == 0:
938@@ -301,7 +307,7 @@
939 self.verse_form.setVerse(item.text())
940 self.verse_form.exec_()
941 item.setText(self.verse_form.getVerse())
942- self.VerseListWidget.update()
943+ self.VerseListWidget.repaint()
944 self.EditButton.setEnabled(False)
945 self.DeleteButton.setEnabled(False)
946
947@@ -367,7 +373,6 @@
948 self.song.ccli_number = unicode(self.CCLNumberEdit.displayText())
949 self.processLyrics()
950 self.processTitle()
951- self.song.song_book_id = 0
952 self.songmanager.save_song(self.song)
953 if self.title_change:
954 self.eventmanager.post_event(Event(EventType.LoadSongList))
955
956=== modified file 'openlp/plugins/songs/lib/manager.py'
957--- openlp/plugins/songs/lib/manager.py 2009-07-08 05:12:16 +0000
958+++ openlp/plugins/songs/lib/manager.py 2009-07-18 07:30:26 +0000
959@@ -55,13 +55,9 @@
960 self.config.get_config(u'db hostname') + u'/' + \
961 self.config.get_config(u'db database')
962 self.session = init_models(self.db_url)
963- if not songs_table.exists():
964- metadata.create_all()
965+ metadata.create_all(checkfirst=True)
966 log.debug(u'Song Initialised')
967
968-# def process_dialog(self, dialogobject):
969-# self.dialogobject = dialogobject
970-
971 def get_songs(self):
972 """
973 Returns the details of a song
974
975=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
976--- openlp/plugins/songs/lib/mediaitem.py 2009-07-04 05:52:30 +0000
977+++ openlp/plugins/songs/lib/mediaitem.py 2009-07-18 05:43:50 +0000
978@@ -22,7 +22,7 @@
979 from PyQt4 import QtCore, QtGui
980 from openlp.core.lib import MediaManagerItem, translate, ServiceItem, SongXMLParser , contextMenuAction, contextMenuSeparator
981
982-from openlp.plugins.songs.forms import EditSongForm
983+from openlp.plugins.songs.forms import EditSongForm, AuthorsForm, TopicsForm, SongBookForm
984
985 class SongList(QtGui.QListWidget):
986
987@@ -59,6 +59,9 @@
988 self.ConfigSection = u'song'
989 MediaManagerItem.__init__(self, parent, icon, title)
990 self.edit_song_form = EditSongForm(self.parent.songmanager, self.parent.event_manager)
991+ self.authors_form = AuthorsForm(self.parent.songmanager)
992+ self.topics_form = TopicsForm(self.parent.songmanager)
993+ self.song_book_form = SongBookForm(self.parent.songmanager)
994
995 def setupUi(self):
996 # Add a toolbar
997@@ -90,6 +93,19 @@
998 self.addToolbarButton(translate(u'SongMediaItem', u'Add Song To Service'),
999 translate(u'SongMediaItem', u'Add the selected song(s) to the service'),
1000 ':/system/system_add.png', self.onSongAddClick, 'SongAddItem')
1001+ self.addToolbarSeparator()
1002+ ## Author Edit Button ##
1003+ self.addToolbarButton(translate(u'SongMediaItem', u'Edit Authors'),
1004+ translate(u'SongMediaItem', u'Maintain the list of Song Authors'),
1005+ ':/songs/song_author_edit.png', self.onEditAuthorClick, 'SongAuthorEditItem')
1006+ ## Author Edit Button ##
1007+ self.addToolbarButton(translate(u'SongMediaItem', u'Edit Books'),
1008+ translate(u'SongMediaItem', u'Maintain the list of Song Books'),
1009+ ':/songs/song_book_edit.png', self.onEditBookClick, 'SongAuthorEditItem')
1010+ ## Author Edit Button ##
1011+ self.addToolbarButton(translate(u'SongMediaItem', u'Edit Topics'),
1012+ translate(u'SongMediaItem', u'Maintain the list of Song Topics'),
1013+ ':/songs/song_topic_edit.png', self.onEditTopicClick, 'SongAuthorEditItem')
1014 ## Add the songlist widget ##
1015 # Create the tab widget
1016 self.SongWidget = QtGui.QWidget(self)
1017@@ -222,6 +238,18 @@
1018 self.edit_song_form.newSong()
1019 self.edit_song_form.exec_()
1020
1021+ def onEditAuthorClick(self):
1022+ self.authors_form.load_form()
1023+ self.authors_form.exec_()
1024+
1025+ def onEditTopicClick(self):
1026+ self.topics_form.load_form()
1027+ self.topics_form.exec_()
1028+
1029+ def onEditBookClick(self):
1030+ self.song_book_form.load_form()
1031+ self.song_book_form.exec_()
1032+
1033 def onSongEditClick(self):
1034 item = self.ListView.currentItem()
1035 if item is not None:
1036
1037=== modified file 'resources/images/openlp-2.qrc'
1038--- resources/images/openlp-2.qrc 2009-07-03 19:08:21 +0000
1039+++ resources/images/openlp-2.qrc 2009-07-18 05:43:50 +0000
1040@@ -4,6 +4,9 @@
1041 <file>song_edit.png</file>
1042 <file>song_export.png</file>
1043 <file>song_new.png</file>
1044+ <file>song_author_edit.png</file>
1045+ <file>song_topic_edit.png</file>
1046+ <file>song_book_edit.png</file>
1047 </qresource>
1048 <qresource prefix="slides" >
1049 <file>slide_close.png</file>
1050
1051=== added file 'resources/images/song_author_edit.png'
1052Binary 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
1053=== added file 'resources/images/song_book_edit.png'
1054Binary 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
1055=== added file 'resources/images/song_topic_edit.png'
1056Binary 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
1057=== added file 'songcnv.sh'
1058--- songcnv.sh 1970-01-01 00:00:00 +0000
1059+++ songcnv.sh 2009-07-19 06:31:08 +0000
1060@@ -0,0 +1,5 @@
1061+/usr/bin/sqlite ~/.local/share/openlp/songs/songs.olp .dump > ~/.local/share/openlp/songs/songs.dmp
1062+./cnvdb.py ~/.local/share/openlp/songs/songs.dmp ~/.local/share/openlp/songs/songs.dmp2
1063+rm ~/.local/share/openlp/songs/songs.sqlite
1064+sqlite3 ~/.local/share/openlp/songs/songs.sqlite < ~/.local/share/openlp/songs/songs.dmp2
1065+./openlpcnv.pyw