Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~trb143/openlp/audit |
Merge into: | lp:openlp |
Diff against target: |
552 lines 21 files modified
openlp/core/lib/plugin.py (+1/-2) openlp/core/lib/serviceitem.py (+18/-5) openlp/core/lib/settingsmanager.py (+3/-3) openlp/core/lib/xmlrootclass.py (+2/-2) openlp/core/ui/about.py (+1/-0) openlp/core/ui/maindisplay.py (+1/-1) openlp/plugins/audit/auditplugin.py (+1/-1) openlp/plugins/audit/lib/manager.py (+1/-1) openlp/plugins/bibles/bibleplugin.py (+1/-1) openlp/plugins/bibles/lib/bibleCSVimpl.py (+1/-1) openlp/plugins/bibles/lib/bibleHTTPimpl.py (+14/-15) openlp/plugins/bibles/lib/bibleOSISimpl.py (+6/-4) openlp/plugins/bibles/lib/common.py (+3/-3) openlp/plugins/bibles/lib/manager.py (+7/-9) openlp/plugins/bibles/lib/mediaitem.py (+10/-13) openlp/plugins/custom/customplugin.py (+1/-1) openlp/plugins/custom/lib/mediaitem.py (+1/-1) openlp/plugins/presentations/lib/mediaitem.py (+1/-1) openlp/plugins/presentations/lib/messagelistener.py (+1/-1) openlp/plugins/presentations/presentationplugin.py (+2/-2) openlp/plugins/remotes/remoteplugin.py (+1/-1) |
To merge this branch: | bzr merge lp:~trb143/openlp/audit |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jon Tibble (community) | Approve | ||
Review via email:
|
This proposal supersedes a proposal from 2009-09-29.
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Tim Bentley (trb143) wrote : Posted in a previous version of this proposal | # |
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Jonathan Corwin (j-corwin) wrote : Posted in a previous version of this proposal | # |
Given the list of developers appears to be in alphabetical order, shouldn't Jon appear a few lines further down?
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'openlp/core/lib/plugin.py' | |||
2 | --- openlp/core/lib/plugin.py 2009-09-29 12:51:38 +0000 | |||
3 | +++ openlp/core/lib/plugin.py 2009-09-29 17:25:26 +0000 | |||
4 | @@ -200,8 +200,7 @@ | |||
5 | 200 | 200 | ||
6 | 201 | def process_add_service_event(self): | 201 | def process_add_service_event(self): |
7 | 202 | """ | 202 | """ |
10 | 203 | Proxy method as method is not defined early enough | 203 | Generic Drag and drop handler triggered from service_manager. |
9 | 204 | in the processing | ||
11 | 205 | """ | 204 | """ |
12 | 206 | log.debug(u'process_add_service_event event called for plugin %s' % self.name) | 205 | log.debug(u'process_add_service_event event called for plugin %s' % self.name) |
13 | 207 | self.media_item.onAddClick() | 206 | self.media_item.onAddClick() |
14 | 208 | 207 | ||
15 | === modified file 'openlp/core/lib/serviceitem.py' | |||
16 | --- openlp/core/lib/serviceitem.py 2009-09-25 23:06:54 +0000 | |||
17 | +++ openlp/core/lib/serviceitem.py 2009-09-29 17:25:26 +0000 | |||
18 | @@ -24,12 +24,16 @@ | |||
19 | 24 | 24 | ||
20 | 25 | import logging | 25 | import logging |
21 | 26 | import os | 26 | import os |
22 | 27 | import time | ||
23 | 27 | 28 | ||
24 | 28 | from PyQt4 import QtGui | 29 | from PyQt4 import QtGui |
25 | 29 | 30 | ||
26 | 30 | from openlp.core.lib import buildIcon | 31 | from openlp.core.lib import buildIcon |
27 | 31 | 32 | ||
28 | 32 | class ServiceType(object): | 33 | class ServiceType(object): |
29 | 34 | """ | ||
30 | 35 | Defines the type of service item | ||
31 | 36 | """ | ||
32 | 33 | Text = 1 | 37 | Text = 1 |
33 | 34 | Image = 2 | 38 | Image = 2 |
34 | 35 | Command = 3 | 39 | Command = 3 |
35 | @@ -82,7 +86,7 @@ | |||
36 | 82 | 86 | ||
37 | 83 | def render(self): | 87 | def render(self): |
38 | 84 | """ | 88 | """ |
40 | 85 | The render method is what renders the frames for the screen. | 89 | The render method is what generates the frames for the screen. |
41 | 86 | """ | 90 | """ |
42 | 87 | log.debug(u'Render called') | 91 | log.debug(u'Render called') |
43 | 88 | self.frames = [] | 92 | self.frames = [] |
44 | @@ -93,6 +97,7 @@ | |||
45 | 93 | else: | 97 | else: |
46 | 94 | self.RenderManager.set_override_theme(self.theme) | 98 | self.RenderManager.set_override_theme(self.theme) |
47 | 95 | for slide in self.service_frames: | 99 | for slide in self.service_frames: |
48 | 100 | before = time.time() | ||
49 | 96 | formated = self.RenderManager.format_slide(slide[u'raw_slide']) | 101 | formated = self.RenderManager.format_slide(slide[u'raw_slide']) |
50 | 97 | for format in formated: | 102 | for format in formated: |
51 | 98 | frame = None | 103 | frame = None |
52 | @@ -102,6 +107,7 @@ | |||
53 | 102 | title = lines.split(u'\n')[0] | 107 | title = lines.split(u'\n')[0] |
54 | 103 | self.frames.append({u'title': title, u'text': lines, | 108 | self.frames.append({u'title': title, u'text': lines, |
55 | 104 | u'image': frame}) | 109 | u'image': frame}) |
56 | 110 | log.info(u'Formatting took %4s' % (time.time() - before)) | ||
57 | 105 | elif self.service_item_type == ServiceType.Command: | 111 | elif self.service_item_type == ServiceType.Command: |
58 | 106 | self.frames = self.service_frames | 112 | self.frames = self.service_frames |
59 | 107 | elif self.service_item_type == ServiceType.Image: | 113 | elif self.service_item_type == ServiceType.Image: |
60 | @@ -113,6 +119,11 @@ | |||
61 | 113 | log.error(u'Invalid value renderer :%s' % self.service_item_type) | 119 | log.error(u'Invalid value renderer :%s' % self.service_item_type) |
62 | 114 | 120 | ||
63 | 115 | def render_individual(self, row): | 121 | def render_individual(self, row): |
64 | 122 | """ | ||
65 | 123 | Takes an array of text and geneates an Image from the | ||
66 | 124 | theme. It assumes the text will fit on the screen as it | ||
67 | 125 | has generated by the render method above. | ||
68 | 126 | """ | ||
69 | 116 | log.debug(u'render individual') | 127 | log.debug(u'render individual') |
70 | 117 | if self.theme is None: | 128 | if self.theme is None: |
71 | 118 | self.RenderManager.set_override_theme(None) | 129 | self.RenderManager.set_override_theme(None) |
72 | @@ -138,7 +149,8 @@ | |||
73 | 138 | """ | 149 | """ |
74 | 139 | self.service_item_type = ServiceType.Image | 150 | self.service_item_type = ServiceType.Image |
75 | 140 | self.service_item_path = path | 151 | self.service_item_path = path |
77 | 141 | self.service_frames.append({u'title': frame_title, u'text':None, u'image': image}) | 152 | self.service_frames.append( |
78 | 153 | {u'title': frame_title, u'text':None, u'image': image}) | ||
79 | 142 | 154 | ||
80 | 143 | def add_from_text(self, frame_title, raw_slide): | 155 | def add_from_text(self, frame_title, raw_slide): |
81 | 144 | """ | 156 | """ |
82 | @@ -152,8 +164,8 @@ | |||
83 | 152 | """ | 164 | """ |
84 | 153 | self.service_item_type = ServiceType.Text | 165 | self.service_item_type = ServiceType.Text |
85 | 154 | frame_title = frame_title.split(u'\n')[0] | 166 | frame_title = frame_title.split(u'\n')[0] |
88 | 155 | self.service_frames.append({u'title': frame_title, | 167 | self.service_frames.append( |
89 | 156 | u'raw_slide': raw_slide}) | 168 | {u'title': frame_title, u'raw_slide': raw_slide}) |
90 | 157 | 169 | ||
91 | 158 | def add_from_command(self, path, frame_title): | 170 | def add_from_command(self, path, frame_title): |
92 | 159 | """ | 171 | """ |
93 | @@ -167,7 +179,8 @@ | |||
94 | 167 | """ | 179 | """ |
95 | 168 | self.service_item_type = ServiceType.Command | 180 | self.service_item_type = ServiceType.Command |
96 | 169 | self.service_item_path = path | 181 | self.service_item_path = path |
98 | 170 | self.service_frames.append({u'title': frame_title, u'command': None}) | 182 | self.service_frames.append( |
99 | 183 | {u'title': frame_title, u'command': None}) | ||
100 | 171 | 184 | ||
101 | 172 | def get_service_repr(self): | 185 | def get_service_repr(self): |
102 | 173 | """ | 186 | """ |
103 | 174 | 187 | ||
104 | === modified file 'openlp/core/lib/settingsmanager.py' | |||
105 | --- openlp/core/lib/settingsmanager.py 2009-09-29 02:54:32 +0000 | |||
106 | +++ openlp/core/lib/settingsmanager.py 2009-09-29 17:25:26 +0000 | |||
107 | @@ -67,13 +67,13 @@ | |||
108 | 67 | def setUIItemVisibility(self, item=u'', isVisible=True): | 67 | def setUIItemVisibility(self, item=u'', isVisible=True): |
109 | 68 | if item != u'': | 68 | if item != u'': |
110 | 69 | if item == u'ThemeManagerDock': | 69 | if item == u'ThemeManagerDock': |
112 | 70 | ConfigHelper.set_config('user interface', | 70 | ConfigHelper.set_config(u'user interface', |
113 | 71 | u'display thememanager', isVisible) | 71 | u'display thememanager', isVisible) |
114 | 72 | elif item == u'ServiceManagerDock': | 72 | elif item == u'ServiceManagerDock': |
116 | 73 | ConfigHelper.set_config('user interface', | 73 | ConfigHelper.set_config(u'user interface', |
117 | 74 | u'display servicemanager', isVisible) | 74 | u'display servicemanager', isVisible) |
118 | 75 | elif item == u'MediaManagerDock': | 75 | elif item == u'MediaManagerDock': |
120 | 76 | ConfigHelper.set_config('user interface', | 76 | ConfigHelper.set_config(u'user interface', |
121 | 77 | u'display mediamanager', isVisible) | 77 | u'display mediamanager', isVisible) |
122 | 78 | 78 | ||
123 | 79 | def togglePreviewPanel(self, isVisible): | 79 | def togglePreviewPanel(self, isVisible): |
124 | 80 | 80 | ||
125 | === modified file 'openlp/core/lib/xmlrootclass.py' | |||
126 | --- openlp/core/lib/xmlrootclass.py 2009-09-25 00:43:42 +0000 | |||
127 | +++ openlp/core/lib/xmlrootclass.py 2009-09-29 17:25:26 +0000 | |||
128 | @@ -28,7 +28,7 @@ | |||
129 | 28 | 28 | ||
130 | 29 | from xml.etree.ElementTree import ElementTree, XML | 29 | from xml.etree.ElementTree import ElementTree, XML |
131 | 30 | 30 | ||
133 | 31 | sys.path.append(os.path.abspath(os.path.join('.', '..', '..'))) | 31 | sys.path.append(os.path.abspath(os.path.join(u'.', u'..', u'..'))) |
134 | 32 | 32 | ||
135 | 33 | class XmlRootClass(object): | 33 | class XmlRootClass(object): |
136 | 34 | """ | 34 | """ |
137 | @@ -61,7 +61,7 @@ | |||
138 | 61 | val = text | 61 | val = text |
139 | 62 | elif type(text) is StringType: | 62 | elif type(text) is StringType: |
140 | 63 | # Strings need special handling to sort the colours out | 63 | # Strings need special handling to sort the colours out |
142 | 64 | if text[0] == '$': | 64 | if text[0] == u'$': |
143 | 65 | # This might be a hex number, let's try to convert it. | 65 | # This might be a hex number, let's try to convert it. |
144 | 66 | try: | 66 | try: |
145 | 67 | val = int(text[1:], 16) | 67 | val = int(text[1:], 16) |
146 | 68 | 68 | ||
147 | === modified file 'openlp/core/ui/about.py' | |||
148 | --- openlp/core/ui/about.py 2009-09-29 02:54:32 +0000 | |||
149 | +++ openlp/core/ui/about.py 2009-09-29 17:25:26 +0000 | |||
150 | @@ -162,6 +162,7 @@ | |||
151 | 162 | u' Scott \"sguerrieri\" Guerrieri\n' | 162 | u' Scott \"sguerrieri\" Guerrieri\n' |
152 | 163 | u' Raoul \"superfly\" Snyman\n' | 163 | u' Raoul \"superfly\" Snyman\n' |
153 | 164 | u' Martin \"mijiti\" Thompson\n' | 164 | u' Martin \"mijiti\" Thompson\n' |
154 | 165 | u' Jon \"Meths\" Tibble\n' | ||
155 | 165 | u' Carsten \"catini\" Tingaard')) | 166 | u' Carsten \"catini\" Tingaard')) |
156 | 166 | self.AboutNotebook.setTabText( | 167 | self.AboutNotebook.setTabText( |
157 | 167 | self.AboutNotebook.indexOf(self.CreditsTab), | 168 | self.AboutNotebook.indexOf(self.CreditsTab), |
158 | 168 | 169 | ||
159 | === modified file 'openlp/core/ui/maindisplay.py' | |||
160 | --- openlp/core/ui/maindisplay.py 2009-09-25 00:43:42 +0000 | |||
161 | +++ openlp/core/ui/maindisplay.py 2009-09-29 17:25:26 +0000 | |||
162 | @@ -32,7 +32,7 @@ | |||
163 | 32 | This is the form that is used to display things on the projector. | 32 | This is the form that is used to display things on the projector. |
164 | 33 | """ | 33 | """ |
165 | 34 | global log | 34 | global log |
167 | 35 | log=logging.getLogger(u'MainDisplay') | 35 | log = logging.getLogger(u'MainDisplay') |
168 | 36 | log.info(u'MainDisplay Loaded') | 36 | log.info(u'MainDisplay Loaded') |
169 | 37 | 37 | ||
170 | 38 | def __init__(self, parent, screens): | 38 | def __init__(self, parent, screens): |
171 | 39 | 39 | ||
172 | === modified file 'openlp/plugins/audit/auditplugin.py' | |||
173 | --- openlp/plugins/audit/auditplugin.py 2009-09-29 02:54:32 +0000 | |||
174 | +++ openlp/plugins/audit/auditplugin.py 2009-09-29 17:25:26 +0000 | |||
175 | @@ -49,7 +49,7 @@ | |||
176 | 49 | """ | 49 | """ |
177 | 50 | Check to see if auditing is required | 50 | Check to see if auditing is required |
178 | 51 | """ | 51 | """ |
180 | 52 | log.debug('check_pre_conditions') | 52 | log.debug(u'check_pre_conditions') |
181 | 53 | #Lets see if audit is required | 53 | #Lets see if audit is required |
182 | 54 | if int(self.config.get_config(u'startup', 0)) == QtCore.Qt.Checked: | 54 | if int(self.config.get_config(u'startup', 0)) == QtCore.Qt.Checked: |
183 | 55 | return True | 55 | return True |
184 | 56 | 56 | ||
185 | === modified file 'openlp/plugins/audit/lib/manager.py' | |||
186 | --- openlp/plugins/audit/lib/manager.py 2009-09-26 06:46:26 +0000 | |||
187 | +++ openlp/plugins/audit/lib/manager.py 2009-09-29 17:25:26 +0000 | |||
188 | @@ -33,7 +33,7 @@ | |||
189 | 33 | """ | 33 | """ |
190 | 34 | 34 | ||
191 | 35 | global log | 35 | global log |
193 | 36 | log=logging.getLogger(u'AuditManager') | 36 | log = logging.getLogger(u'AuditManager') |
194 | 37 | log.info(u'Audit manager loaded') | 37 | log.info(u'Audit manager loaded') |
195 | 38 | 38 | ||
196 | 39 | def __init__(self, config): | 39 | def __init__(self, config): |
197 | 40 | 40 | ||
198 | === modified file 'openlp/plugins/bibles/bibleplugin.py' | |||
199 | --- openlp/plugins/bibles/bibleplugin.py 2009-09-29 02:54:32 +0000 | |||
200 | +++ openlp/plugins/bibles/bibleplugin.py 2009-09-29 17:25:26 +0000 | |||
201 | @@ -31,7 +31,7 @@ | |||
202 | 31 | 31 | ||
203 | 32 | class BiblePlugin(Plugin): | 32 | class BiblePlugin(Plugin): |
204 | 33 | global log | 33 | global log |
206 | 34 | log=logging.getLogger(u'BiblePlugin') | 34 | log = logging.getLogger(u'BiblePlugin') |
207 | 35 | log.info(u'Bible Plugin loaded') | 35 | log.info(u'Bible Plugin loaded') |
208 | 36 | 36 | ||
209 | 37 | def __init__(self, plugin_helpers): | 37 | def __init__(self, plugin_helpers): |
210 | 38 | 38 | ||
211 | === modified file 'openlp/plugins/bibles/lib/bibleCSVimpl.py' | |||
212 | --- openlp/plugins/bibles/lib/bibleCSVimpl.py 2009-09-25 00:43:42 +0000 | |||
213 | +++ openlp/plugins/bibles/lib/bibleCSVimpl.py 2009-09-29 17:25:26 +0000 | |||
214 | @@ -30,7 +30,7 @@ | |||
215 | 30 | 30 | ||
216 | 31 | class BibleCSVImpl(BibleCommon): | 31 | class BibleCSVImpl(BibleCommon): |
217 | 32 | global log | 32 | global log |
219 | 33 | log=logging.getLogger(u'BibleCSVImpl') | 33 | log = logging.getLogger(u'BibleCSVImpl') |
220 | 34 | log.info(u'BibleCVSImpl loaded') | 34 | log.info(u'BibleCVSImpl loaded') |
221 | 35 | def __init__(self, bibledb): | 35 | def __init__(self, bibledb): |
222 | 36 | """ | 36 | """ |
223 | 37 | 37 | ||
224 | === modified file 'openlp/plugins/bibles/lib/bibleHTTPimpl.py' | |||
225 | --- openlp/plugins/bibles/lib/bibleHTTPimpl.py 2009-09-26 18:22:10 +0000 | |||
226 | +++ openlp/plugins/bibles/lib/bibleHTTPimpl.py 2009-09-29 17:25:26 +0000 | |||
227 | @@ -28,7 +28,7 @@ | |||
228 | 28 | 28 | ||
229 | 29 | class BGExtract(BibleCommon): | 29 | class BGExtract(BibleCommon): |
230 | 30 | global log | 30 | global log |
232 | 31 | log=logging.getLogger(u'BibleHTTPMgr(BG_extract)') | 31 | log = logging.getLogger(u'BibleHTTPMgr(BG_extract)') |
233 | 32 | log.info(u'BG_extract loaded') | 32 | log.info(u'BG_extract loaded') |
234 | 33 | 33 | ||
235 | 34 | def __init__(self, proxyurl= None): | 34 | def __init__(self, proxyurl= None): |
236 | @@ -65,7 +65,7 @@ | |||
237 | 65 | bible = {} | 65 | bible = {} |
238 | 66 | while versePos > -1: | 66 | while versePos > -1: |
239 | 67 | # clear out string | 67 | # clear out string |
241 | 68 | verseText = '' | 68 | verseText = u'' |
242 | 69 | versePos = xml_string.find(u'</span', versePos) | 69 | versePos = xml_string.find(u'</span', versePos) |
243 | 70 | i = xml_string.find(VerseSearch, versePos+1) | 70 | i = xml_string.find(VerseSearch, versePos+1) |
244 | 71 | if i == -1: | 71 | if i == -1: |
245 | @@ -88,7 +88,7 @@ | |||
246 | 88 | 88 | ||
247 | 89 | class CWExtract(BibleCommon): | 89 | class CWExtract(BibleCommon): |
248 | 90 | global log | 90 | global log |
250 | 91 | log=logging.getLogger(u'BibleHTTPMgr(CWExtract)') | 91 | log = logging.getLogger(u'BibleHTTPMgr(CWExtract)') |
251 | 92 | log.info(u'CWExtract loaded') | 92 | log.info(u'CWExtract loaded') |
252 | 93 | 93 | ||
253 | 94 | def __init__(self, proxyurl=None): | 94 | def __init__(self, proxyurl=None): |
254 | @@ -121,8 +121,8 @@ | |||
255 | 121 | xml_string = self._get_web_text(urlstring, self.proxyurl) | 121 | xml_string = self._get_web_text(urlstring, self.proxyurl) |
256 | 122 | ## Strip Book Title from Heading to return it to system | 122 | ## Strip Book Title from Heading to return it to system |
257 | 123 | ## | 123 | ## |
260 | 124 | i= xml_string.find(u'<title>') | 124 | i = xml_string.find(u'<title>') |
261 | 125 | j= xml_string.find(u'-', i) | 125 | j = xml_string.find(u'-', i) |
262 | 126 | book_title = xml_string[i + 7:j] | 126 | book_title = xml_string[i + 7:j] |
263 | 127 | book_title = book_title.rstrip() | 127 | book_title = book_title.rstrip() |
264 | 128 | log.debug(u'Book Title %s', book_title) | 128 | log.debug(u'Book Title %s', book_title) |
265 | @@ -133,15 +133,15 @@ | |||
266 | 133 | log.debug(u'Book Chapter %s', book_chapter) | 133 | log.debug(u'Book Chapter %s', book_chapter) |
267 | 134 | # Strip Verse Data from Page and build an array | 134 | # Strip Verse Data from Page and build an array |
268 | 135 | 135 | ||
274 | 136 | i= xml_string.find(u'NavCurrentChapter') | 136 | i = xml_string.find(u'NavCurrentChapter') |
275 | 137 | xml_string = xml_string[i:len(xml_string)] | 137 | xml_string = xml_string[i:len(xml_string)] |
276 | 138 | i= xml_string.find(u'<TABLE') | 138 | i = xml_string.find(u'<TABLE') |
277 | 139 | xml_string = xml_string[i:len(xml_string)] | 139 | xml_string = xml_string[i:len(xml_string)] |
278 | 140 | i= xml_string.find(u'<B>') | 140 | i = xml_string.find(u'<B>') |
279 | 141 | #remove the <B> at the front | 141 | #remove the <B> at the front |
280 | 142 | xml_string = xml_string[i + 3 :len(xml_string)] | 142 | xml_string = xml_string[i + 3 :len(xml_string)] |
281 | 143 | # Remove the heading for the book | 143 | # Remove the heading for the book |
283 | 144 | i= xml_string.find(u'<B>') | 144 | i = xml_string.find(u'<B>') |
284 | 145 | #remove the <B> at the front | 145 | #remove the <B> at the front |
285 | 146 | xml_string = xml_string[i + 3 :len(xml_string)] | 146 | xml_string = xml_string[i + 3 :len(xml_string)] |
286 | 147 | versePos = xml_string.find(u'<BLOCKQUOTE>') | 147 | versePos = xml_string.find(u'<BLOCKQUOTE>') |
287 | @@ -151,7 +151,7 @@ | |||
288 | 151 | versePos = xml_string.find(u'<B><I>', versePos) + 6 | 151 | versePos = xml_string.find(u'<B><I>', versePos) + 6 |
289 | 152 | i = xml_string.find(u'</I></B>', versePos) | 152 | i = xml_string.find(u'</I></B>', versePos) |
290 | 153 | # Got the Chapter | 153 | # Got the Chapter |
292 | 154 | verse= xml_string[versePos:i] | 154 | verse = xml_string[versePos:i] |
293 | 155 | # move the starting position to begining of the text | 155 | # move the starting position to begining of the text |
294 | 156 | versePos = i + 8 | 156 | versePos = i + 8 |
295 | 157 | # find the start of the next verse | 157 | # find the start of the next verse |
296 | @@ -168,7 +168,7 @@ | |||
297 | 168 | 168 | ||
298 | 169 | class BibleHTTPImpl(): | 169 | class BibleHTTPImpl(): |
299 | 170 | global log | 170 | global log |
301 | 171 | log=logging.getLogger(u'BibleHTTPMgr') | 171 | log = logging.getLogger(u'BibleHTTPMgr') |
302 | 172 | log.info(u'BibleHTTP manager loaded') | 172 | log.info(u'BibleHTTP manager loaded') |
303 | 173 | def __init__(self): | 173 | def __init__(self): |
304 | 174 | """ | 174 | """ |
305 | @@ -180,8 +180,7 @@ | |||
306 | 180 | 180 | ||
307 | 181 | Init confirms the bible exists and stores the database path. | 181 | Init confirms the bible exists and stores the database path. |
308 | 182 | """ | 182 | """ |
311 | 183 | #bible = {} | 183 | self.biblesource = u'' |
310 | 184 | self.biblesource = '' | ||
312 | 185 | self.proxyurl = None | 184 | self.proxyurl = None |
313 | 186 | self.bibleid = None | 185 | self.bibleid = None |
314 | 187 | 186 | ||
315 | 188 | 187 | ||
316 | === modified file 'openlp/plugins/bibles/lib/bibleOSISimpl.py' | |||
317 | --- openlp/plugins/bibles/lib/bibleOSISimpl.py 2009-09-26 14:36:08 +0000 | |||
318 | +++ openlp/plugins/bibles/lib/bibleOSISimpl.py 2009-09-29 17:25:26 +0000 | |||
319 | @@ -60,7 +60,7 @@ | |||
320 | 60 | filepath = os.path.split(os.path.abspath(__file__))[0] | 60 | filepath = os.path.split(os.path.abspath(__file__))[0] |
321 | 61 | filepath = os.path.abspath(os.path.join( | 61 | filepath = os.path.abspath(os.path.join( |
322 | 62 | filepath, u'..', u'resources',u'osisbooks.csv')) | 62 | filepath, u'..', u'resources',u'osisbooks.csv')) |
324 | 63 | fbibles=open(filepath, u'r') | 63 | fbibles = open(filepath, u'r') |
325 | 64 | for line in fbibles: | 64 | for line in fbibles: |
326 | 65 | p = line.split(u',') | 65 | p = line.split(u',') |
327 | 66 | self.booksOfBible[p[0]] = p[1].replace(u'\n', u'') | 66 | self.booksOfBible[p[0]] = p[1].replace(u'\n', u'') |
328 | @@ -99,9 +99,11 @@ | |||
329 | 99 | if self.loadbible == False: | 99 | if self.loadbible == False: |
330 | 100 | break | 100 | break |
331 | 101 | pos = file_record.find(verseText) | 101 | pos = file_record.find(verseText) |
335 | 102 | if pos > -1: # we have a verse | 102 | # we have a verse |
336 | 103 | epos= file_record.find(u'>', pos) | 103 | if pos > -1: |
337 | 104 | ref = file_record[pos+15:epos-1] # Book Reference | 104 | epos = file_record.find(u'>', pos) |
338 | 105 | # Book Reference | ||
339 | 106 | ref = file_record[pos+15:epos-1] | ||
340 | 105 | #lets find the bible text only | 107 | #lets find the bible text only |
341 | 106 | # find start of text | 108 | # find start of text |
342 | 107 | pos = epos + 1 | 109 | pos = epos + 1 |
343 | 108 | 110 | ||
344 | === modified file 'openlp/plugins/bibles/lib/common.py' | |||
345 | --- openlp/plugins/bibles/lib/common.py 2009-09-26 18:22:10 +0000 | |||
346 | +++ openlp/plugins/bibles/lib/common.py 2009-09-29 17:25:26 +0000 | |||
347 | @@ -104,15 +104,15 @@ | |||
348 | 104 | urllib2.install_opener(opener) | 104 | urllib2.install_opener(opener) |
349 | 105 | xml_string = u'' | 105 | xml_string = u'' |
350 | 106 | req = urllib2.Request(urlstring) | 106 | req = urllib2.Request(urlstring) |
352 | 107 | req.add_header('User-Agent', 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)') | 107 | req.add_header(u'User-Agent', u'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)') |
353 | 108 | try: | 108 | try: |
354 | 109 | handle = urllib2.urlopen(req) | 109 | handle = urllib2.urlopen(req) |
355 | 110 | html = handle.read() | 110 | html = handle.read() |
356 | 111 | details = chardet.detect(html) | 111 | details = chardet.detect(html) |
358 | 112 | xml_string = unicode(html, details['encoding']) | 112 | xml_string = unicode(html, details[u'encoding']) |
359 | 113 | except IOError, e: | 113 | except IOError, e: |
360 | 114 | if hasattr(e, u'reason'): | 114 | if hasattr(e, u'reason'): |
362 | 115 | log.error(u'Reason : %s', e.reason) | 115 | log.exception(u'Reason for failure: %s', e.reason) |
363 | 116 | return xml_string | 116 | return xml_string |
364 | 117 | 117 | ||
365 | 118 | def _clean_text(self, text): | 118 | def _clean_text(self, text): |
366 | 119 | 119 | ||
367 | === modified file 'openlp/plugins/bibles/lib/manager.py' | |||
368 | --- openlp/plugins/bibles/lib/manager.py 2009-09-26 18:22:10 +0000 | |||
369 | +++ openlp/plugins/bibles/lib/manager.py 2009-09-29 17:25:26 +0000 | |||
370 | @@ -322,8 +322,7 @@ | |||
371 | 322 | Rest can be guessed at ! | 322 | Rest can be guessed at ! |
372 | 323 | """ | 323 | """ |
373 | 324 | text = [] | 324 | text = [] |
376 | 325 | self.media.setQuickMsg1(u'') | 325 | self.media.setQuickMessage(u'') |
375 | 326 | self.media.setQuickMsg2(u'') | ||
377 | 327 | log.debug(u'get_verse_text %s,%s,%s,%s,%s,%s', | 326 | log.debug(u'get_verse_text %s,%s,%s,%s,%s,%s', |
378 | 328 | bible, bookname, schapter, echapter, sverse, everse) | 327 | bible, bookname, schapter, echapter, sverse, everse) |
379 | 329 | # check to see if book/chapter exists fow HTTP bibles and load cache | 328 | # check to see if book/chapter exists fow HTTP bibles and load cache |
380 | @@ -331,10 +330,10 @@ | |||
381 | 331 | if self.bible_http_cache[bible] is not None: | 330 | if self.bible_http_cache[bible] is not None: |
382 | 332 | book = self.bible_db_cache[bible].get_bible_book(bookname) | 331 | book = self.bible_db_cache[bible].get_bible_book(bookname) |
383 | 333 | if book is None: | 332 | if book is None: |
384 | 334 | self.media.setQuickMsg1(u'Downloading') | ||
385 | 335 | log.debug(u'get_verse_text : new book') | 333 | log.debug(u'get_verse_text : new book') |
386 | 336 | for chapter in range(schapter, echapter + 1): | 334 | for chapter in range(schapter, echapter + 1): |
388 | 337 | self.media.setQuickMsg2(u'%s: %s'% (bookname, chapter)) | 335 | self.media.setQuickMessage \ |
389 | 336 | (u'Downloading %s: %s'% (bookname, chapter)) | ||
390 | 338 | search_results = \ | 337 | search_results = \ |
391 | 339 | self.bible_http_cache[bible].get_bible_chapter( | 338 | self.bible_http_cache[bible].get_bible_chapter( |
392 | 340 | bible, 0, bookname, chapter) | 339 | bible, 0, bookname, chapter) |
393 | @@ -362,8 +361,8 @@ | |||
394 | 362 | v = self.bible_db_cache[bible].get_bible_chapter( | 361 | v = self.bible_db_cache[bible].get_bible_chapter( |
395 | 363 | book.id, chapter) | 362 | book.id, chapter) |
396 | 364 | if v is None: | 363 | if v is None: |
399 | 365 | self.media.setQuickMsg2(u'%s: %s'% ( | 364 | self.media.setQuickMessage \ |
400 | 366 | bookname, chapter)) | 365 | (u'%Downloading %s: %s'% (bookname, chapter)) |
401 | 367 | self.bible_db_cache[bible].create_chapter( | 366 | self.bible_db_cache[bible].create_chapter( |
402 | 368 | book.id, chapter, | 367 | book.id, chapter, |
403 | 369 | search_results.get_verselist()) | 368 | search_results.get_verselist()) |
404 | @@ -374,9 +373,8 @@ | |||
405 | 374 | book.id, chapter) | 373 | book.id, chapter) |
406 | 375 | if v is None: | 374 | if v is None: |
407 | 376 | try: | 375 | try: |
411 | 377 | self.media.setQuickMsg1(u'Downloading') | 376 | self.media.setQuickMessage \ |
412 | 378 | self.media.setQuickMsg2(u'%s: %s'% \ | 377 | (u'Downloading %s: %s'% (bookname, chapter)) |
410 | 379 | (bookname, chapter)) | ||
413 | 380 | search_results = \ | 378 | search_results = \ |
414 | 381 | self.bible_http_cache[bible].get_bible_chapter( | 379 | self.bible_http_cache[bible].get_bible_chapter( |
415 | 382 | bible, book.id, bookname, chapter) | 380 | bible, book.id, bookname, chapter) |
416 | 383 | 381 | ||
417 | === modified file 'openlp/plugins/bibles/lib/mediaitem.py' | |||
418 | --- openlp/plugins/bibles/lib/mediaitem.py 2009-09-29 02:54:32 +0000 | |||
419 | +++ openlp/plugins/bibles/lib/mediaitem.py 2009-09-29 17:25:26 +0000 | |||
420 | @@ -76,7 +76,9 @@ | |||
421 | 76 | # Add the Quick Search tab | 76 | # Add the Quick Search tab |
422 | 77 | self.QuickTab = QtGui.QWidget() | 77 | self.QuickTab = QtGui.QWidget() |
423 | 78 | self.QuickTab.setObjectName(u'QuickTab') | 78 | self.QuickTab.setObjectName(u'QuickTab') |
425 | 79 | self.QuickLayout = QtGui.QGridLayout(self.QuickTab) | 79 | self.QuickVerticalLayout = QtGui.QVBoxLayout(self.QuickTab) |
426 | 80 | self.QuickVerticalLayout.setObjectName("verticalLayout") | ||
427 | 81 | self.QuickLayout = QtGui.QGridLayout() | ||
428 | 80 | self.QuickLayout.setMargin(5) | 82 | self.QuickLayout.setMargin(5) |
429 | 81 | self.QuickLayout.setSpacing(4) | 83 | self.QuickLayout.setSpacing(4) |
430 | 82 | self.QuickLayout.setObjectName(u'QuickLayout') | 84 | self.QuickLayout.setObjectName(u'QuickLayout') |
431 | @@ -107,12 +109,10 @@ | |||
432 | 107 | self.ClearQuickSearchComboBox = QtGui.QComboBox(self.QuickTab) | 109 | self.ClearQuickSearchComboBox = QtGui.QComboBox(self.QuickTab) |
433 | 108 | self.ClearQuickSearchComboBox.setObjectName(u'ClearQuickSearchComboBox') | 110 | self.ClearQuickSearchComboBox.setObjectName(u'ClearQuickSearchComboBox') |
434 | 109 | self.QuickLayout.addWidget(self.ClearQuickSearchComboBox, 3, 1, 1, 1) | 111 | self.QuickLayout.addWidget(self.ClearQuickSearchComboBox, 3, 1, 1, 1) |
441 | 110 | self.QuickMsg1 = QtGui.QLabel(self.QuickTab) | 112 | self.QuickVerticalLayout.addLayout(self.QuickLayout) |
442 | 111 | self.QuickMsg1.setObjectName(u'QuickSearchLabel') | 113 | self.QuickMessage = QtGui.QLabel(self.QuickTab) |
443 | 112 | self.QuickLayout.addWidget(self.QuickMsg1, 4, 0, 1, 1) | 114 | self.QuickMessage.setObjectName(u'QuickMessage') |
444 | 113 | self.QuickMsg2 = QtGui.QLabel(self.QuickTab) | 115 | self.QuickVerticalLayout.addWidget(self.QuickMessage) |
439 | 114 | self.QuickMsg2.setObjectName(u'QuickSearchLabel') | ||
440 | 115 | self.QuickLayout.addWidget(self.QuickMsg2, 4, 1, 1, 1) | ||
445 | 116 | self.SearchTabWidget.addTab(self.QuickTab, 'Quick') | 116 | self.SearchTabWidget.addTab(self.QuickTab, 'Quick') |
446 | 117 | QuickSpacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, | 117 | QuickSpacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, |
447 | 118 | QtGui.QSizePolicy.Expanding) | 118 | QtGui.QSizePolicy.Expanding) |
448 | @@ -230,14 +230,11 @@ | |||
449 | 230 | self.loadBibles() | 230 | self.loadBibles() |
450 | 231 | self.parent.biblemanager.set_media_manager(self) | 231 | self.parent.biblemanager.set_media_manager(self) |
451 | 232 | 232 | ||
457 | 233 | def setQuickMsg1(self, text): | 233 | def setQuickMessage(self, text): |
458 | 234 | self.QuickMsg1.setText(translate(u'BibleMediaItem', unicode(text))) | 234 | self.QuickMessage.setText(translate(u'BibleMediaItem', unicode(text))) |
454 | 235 | |||
455 | 236 | def setQuickMsg2(self, text): | ||
456 | 237 | self.QuickMsg2.setText(translate(u'BibleMediaItem', unicode(text))) | ||
459 | 238 | Receiver().send_message(u'process_events') | 235 | Receiver().send_message(u'process_events') |
460 | 239 | #minor delay to get the events processed | 236 | #minor delay to get the events processed |
462 | 240 | time.sleep(0.5) | 237 | time.sleep(0.1) |
463 | 241 | 238 | ||
464 | 242 | def loadBibles(self): | 239 | def loadBibles(self): |
465 | 243 | log.debug(u'Loading Bibles') | 240 | log.debug(u'Loading Bibles') |
466 | 244 | 241 | ||
467 | === modified file 'openlp/plugins/custom/customplugin.py' | |||
468 | --- openlp/plugins/custom/customplugin.py 2009-09-29 02:54:32 +0000 | |||
469 | +++ openlp/plugins/custom/customplugin.py 2009-09-29 17:25:26 +0000 | |||
470 | @@ -40,7 +40,7 @@ | |||
471 | 40 | """ | 40 | """ |
472 | 41 | 41 | ||
473 | 42 | global log | 42 | global log |
475 | 43 | log=logging.getLogger(u'CustomPlugin') | 43 | log = logging.getLogger(u'CustomPlugin') |
476 | 44 | log.info(u'Custom Plugin loaded') | 44 | log.info(u'Custom Plugin loaded') |
477 | 45 | 45 | ||
478 | 46 | def __init__(self, plugin_helpers): | 46 | def __init__(self, plugin_helpers): |
479 | 47 | 47 | ||
480 | === modified file 'openlp/plugins/custom/lib/mediaitem.py' | |||
481 | --- openlp/plugins/custom/lib/mediaitem.py 2009-09-26 09:11:39 +0000 | |||
482 | +++ openlp/plugins/custom/lib/mediaitem.py 2009-09-29 17:25:26 +0000 | |||
483 | @@ -38,7 +38,7 @@ | |||
484 | 38 | This is the custom media manager item for Custom Slides. | 38 | This is the custom media manager item for Custom Slides. |
485 | 39 | """ | 39 | """ |
486 | 40 | global log | 40 | global log |
488 | 41 | log=logging.getLogger(u'CustomMediaItem') | 41 | log = logging.getLogger(u'CustomMediaItem') |
489 | 42 | log.info(u'Custom Media Item loaded') | 42 | log.info(u'Custom Media Item loaded') |
490 | 43 | 43 | ||
491 | 44 | def __init__(self, parent, icon, title): | 44 | def __init__(self, parent, icon, title): |
492 | 45 | 45 | ||
493 | === modified file 'openlp/plugins/presentations/lib/mediaitem.py' | |||
494 | --- openlp/plugins/presentations/lib/mediaitem.py 2009-09-26 09:11:39 +0000 | |||
495 | +++ openlp/plugins/presentations/lib/mediaitem.py 2009-09-29 17:25:26 +0000 | |||
496 | @@ -43,7 +43,7 @@ | |||
497 | 43 | It can present files using Openoffice | 43 | It can present files using Openoffice |
498 | 44 | """ | 44 | """ |
499 | 45 | global log | 45 | global log |
501 | 46 | log=logging.getLogger(u'PresentationsMediaItem') | 46 | log = logging.getLogger(u'PresentationsMediaItem') |
502 | 47 | log.info(u'Presentations Media Item loaded') | 47 | log.info(u'Presentations Media Item loaded') |
503 | 48 | 48 | ||
504 | 49 | def __init__(self, parent, icon, title, controllers): | 49 | def __init__(self, parent, icon, title, controllers): |
505 | 50 | 50 | ||
506 | === modified file 'openlp/plugins/presentations/lib/messagelistener.py' | |||
507 | --- openlp/plugins/presentations/lib/messagelistener.py 2009-09-25 22:20:34 +0000 | |||
508 | +++ openlp/plugins/presentations/lib/messagelistener.py 2009-09-29 17:25:26 +0000 | |||
509 | @@ -30,7 +30,7 @@ | |||
510 | 30 | controller and passes the messages on the the correct presentation handlers | 30 | controller and passes the messages on the the correct presentation handlers |
511 | 31 | """ | 31 | """ |
512 | 32 | global log | 32 | global log |
514 | 33 | log=logging.getLogger(u'MessageListener') | 33 | log = logging.getLogger(u'MessageListener') |
515 | 34 | log.info(u'Message Listener loaded') | 34 | log.info(u'Message Listener loaded') |
516 | 35 | 35 | ||
517 | 36 | def __init__(self, controllers): | 36 | def __init__(self, controllers): |
518 | 37 | 37 | ||
519 | === modified file 'openlp/plugins/presentations/presentationplugin.py' | |||
520 | --- openlp/plugins/presentations/presentationplugin.py 2009-09-29 02:54:32 +0000 | |||
521 | +++ openlp/plugins/presentations/presentationplugin.py 2009-09-29 17:25:26 +0000 | |||
522 | @@ -36,7 +36,7 @@ | |||
523 | 36 | 36 | ||
524 | 37 | def __init__(self, plugin_helpers): | 37 | def __init__(self, plugin_helpers): |
525 | 38 | # Call the parent constructor | 38 | # Call the parent constructor |
527 | 39 | log.debug('Initialised') | 39 | log.debug(u'Initialised') |
528 | 40 | self.controllers = {} | 40 | self.controllers = {} |
529 | 41 | Plugin.__init__(self, u'Presentations', u'1.9.0', plugin_helpers) | 41 | Plugin.__init__(self, u'Presentations', u'1.9.0', plugin_helpers) |
530 | 42 | self.weight = -8 | 42 | self.weight = -8 |
531 | @@ -66,7 +66,7 @@ | |||
532 | 66 | Check to see if we have any presentation software available | 66 | Check to see if we have any presentation software available |
533 | 67 | If Not do not install the plugin. | 67 | If Not do not install the plugin. |
534 | 68 | """ | 68 | """ |
536 | 69 | log.debug('check_pre_conditions') | 69 | log.debug(u'check_pre_conditions') |
537 | 70 | #Lets see if Powerpoint is required (Default is Not wanted) | 70 | #Lets see if Powerpoint is required (Default is Not wanted) |
538 | 71 | controller = PowerpointController(self) | 71 | controller = PowerpointController(self) |
539 | 72 | if int(self.config.get_config( | 72 | if int(self.config.get_config( |
540 | 73 | 73 | ||
541 | === modified file 'openlp/plugins/remotes/remoteplugin.py' | |||
542 | --- openlp/plugins/remotes/remoteplugin.py 2009-09-25 00:43:42 +0000 | |||
543 | +++ openlp/plugins/remotes/remoteplugin.py 2009-09-29 17:25:26 +0000 | |||
544 | @@ -39,7 +39,7 @@ | |||
545 | 39 | """ | 39 | """ |
546 | 40 | Check to see if remotes is required | 40 | Check to see if remotes is required |
547 | 41 | """ | 41 | """ |
549 | 42 | log.debug('check_pre_conditions') | 42 | log.debug(u'check_pre_conditions') |
550 | 43 | #Lets see if Remote is required | 43 | #Lets see if Remote is required |
551 | 44 | if int(self.config.get_config(u'startup', 0)) == QtCore.Qt.Checked: | 44 | if int(self.config.get_config(u'startup', 0)) == QtCore.Qt.Checked: |
552 | 45 | return True | 45 | return True |
Caught Jon's bug and done some cleanups.
Added Jon About screen so he gets some well aimed blame!
Next request may do something useful