Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~trb143/openlp/songs |
Merge into: | lp:openlp |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~trb143/openlp/songs |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Raoul Snyman | Approve | ||
Review via email:
|
Commit message
Description of the change
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Tim Bentley (trb143) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Raoul Snyman (raoul-snyman) wrote : | # |
These seem to be commented out, so they're not "break" but it would be nice if they were corrected:
openlp/
61 Receiver(
61 Receiver(
openlp/
85 #suffix = self.get_
85 #suffix = self.get_
You missed one (or more)!
openlp/
171 if event == "line":
173 filename = frame.f_
179 name = frame.f_
183 print "%s:%s: %s" % (name, lineno, line.rstrip()) # do we need the print?
openlp/
252 logging.info (u'App is " + unicode(self.app))
277 log.info(
278 log.info(
281 i1.addToolbarBu
287 i2.addToolbarBu
288 self.MediaToolB
289 self.MediaToolB
296 if __name_
openlp/
342 assert (u'testplugin1" in names)
343 assert (u'testplugin2" in names)
346 assert (u'testplugin3" not in names)
348 assert p.plugins[
349 assert p.plugins[
350 if __name_
359 log.debug(u'Plugin %s, name=%s (version=
(plus a bunch more in other test classes)
For future reference, rather put the comment on the line before this one:
openlp/
191 self.footer_start = int(self.
Preview Diff
1 | === modified file 'demo.py' |
2 | --- demo.py 2008-10-23 19:50:52 +0000 |
3 | +++ demo.py 2009-06-16 18:21:24 +0000 |
4 | @@ -40,7 +40,7 @@ |
5 | self.size=(1024,768) |
6 | |
7 | self.v=0 |
8 | - self._font=QtGui.QFont('Decorative', 32) |
9 | + self._font=QtGui.QFont(u'Decorative', 32) |
10 | self.framecount=0 |
11 | self.totaltime = 0 |
12 | self.dir=1 |
13 | @@ -49,7 +49,7 @@ |
14 | self.frame=QtGui.QFrame() |
15 | self.setCentralWidget(self.frame) |
16 | self.r=Renderer() |
17 | - self.r.set_theme(Theme('demo_theme.xml')) |
18 | + self.r.set_theme(Theme(u'demo_theme.xml')) |
19 | |
20 | self.r.set_text_rectangle(self.frame.frameRect()) |
21 | self.r.set_paint_dest(self) |
22 | @@ -79,4 +79,3 @@ |
23 | |
24 | if __name__=="__main__": |
25 | t=Demo() |
26 | - |
27 | |
28 | === modified file 'openlp/core/lib/__init__.py' |
29 | --- openlp/core/lib/__init__.py 2009-05-22 18:30:25 +0000 |
30 | +++ openlp/core/lib/__init__.py 2009-06-16 18:21:24 +0000 |
31 | @@ -49,7 +49,7 @@ |
32 | """ |
33 | action = QtGui.QAction(text, base) |
34 | action .setIcon(buildIcon(icon)) |
35 | - QtCore.QObject.connect(action, QtCore.SIGNAL("triggered()"), slot) |
36 | + QtCore.QObject.connect(action, QtCore.SIGNAL(u'triggered()'), slot) |
37 | return action |
38 | |
39 | def contextMenuSeparator(base): |
40 | @@ -75,11 +75,4 @@ |
41 | from renderer import Renderer |
42 | from rendermanager import RenderManager |
43 | |
44 | -#__all__ = ['Renderer','PluginConfig', 'Plugin', 'SettingsTab', 'MediaManagerItem', 'Event', 'EventType' |
45 | -# 'XmlRootClass', 'ServiceItem', 'Receiver', 'OpenLPToolbar', 'SongXMLBuilder', |
46 | -# 'SongXMLParser', 'EventManager', 'ThemeXML', 'RenderManager'] |
47 | - |
48 | __all__ = [ 'translate', 'file_to_xml', 'str_to_bool', 'contextMenuAction', 'contextMenuSeparator'] |
49 | - |
50 | - |
51 | - |
52 | |
53 | === modified file 'openlp/core/lib/eventreceiver.py' |
54 | --- openlp/core/lib/eventreceiver.py 2009-06-05 05:13:34 +0000 |
55 | +++ openlp/core/lib/eventreceiver.py 2009-06-16 18:21:24 +0000 |
56 | @@ -41,10 +41,10 @@ |
57 | As there is only one instance of it in the systems the QT signal/slot architecture |
58 | can send messages across the system |
59 | Send message |
60 | - Receiver().send_message("messageid",data) |
61 | + Receiver().send_message(u'messageid",data) |
62 | |
63 | Receive Message |
64 | - QtCore.QObject.connect(Receiver().get_receiver(),QtCore.SIGNAL("openlprepaint"),<<ACTION>>) |
65 | + QtCore.QObject.connect(Receiver().get_receiver(),QtCore.SIGNAL(u'openlprepaint'),<<ACTION>>) |
66 | """ |
67 | eventreceiver = EventReceiver() |
68 | |
69 | @@ -58,4 +58,4 @@ |
70 | |
71 | @staticmethod |
72 | def get_receiver(): |
73 | - return Receiver.eventreceiver |
74 | + return Receiver.eventreceiver |
75 | \ No newline at end of file |
76 | |
77 | === modified file 'openlp/core/lib/pluginconfig.py' |
78 | --- openlp/core/lib/pluginconfig.py 2009-06-05 18:53:50 +0000 |
79 | +++ openlp/core/lib/pluginconfig.py 2009-06-16 18:21:24 +0000 |
80 | @@ -64,7 +64,7 @@ |
81 | return self.set_config(u'data path', os.path.basename(path)) |
82 | |
83 | def get_files(self, suffix=None): |
84 | - #suffix = self.get_config("suffix name", default_suffixes) |
85 | + #suffix = self.get_config(u'suffix name", default_suffixes) |
86 | try: |
87 | files = os.listdir(self.get_data_path()) |
88 | except: |
89 | @@ -97,7 +97,7 @@ |
90 | list = [] |
91 | if list_count > 0: |
92 | for counter in range(0 , list_count): |
93 | - item = str(self.get_config(u'%s %d' % (name, counter))) |
94 | + item = unicode(self.get_config(u'%s %d' % (name, counter))) |
95 | list.append(item) |
96 | return list |
97 | |
98 | @@ -136,4 +136,4 @@ |
99 | name = u'last directory %d' % num |
100 | else: |
101 | name = u'last directory' |
102 | - self.set_config(name, directory) |
103 | + self.set_config(name, directory) |
104 | \ No newline at end of file |
105 | |
106 | === modified file 'openlp/core/lib/pluginmanager.py' |
107 | --- openlp/core/lib/pluginmanager.py 2009-05-20 20:17:20 +0000 |
108 | +++ openlp/core/lib/pluginmanager.py 2009-06-16 18:21:24 +0000 |
109 | @@ -39,7 +39,7 @@ |
110 | """ |
111 | log.info(u'Plugin manager initing') |
112 | if not dir in sys.path: |
113 | - log.debug("Inserting %s into sys.path", dir) |
114 | + log.debug(u'Inserting %s into sys.path', dir) |
115 | sys.path.insert(0, dir) |
116 | self.basepath = os.path.abspath(dir) |
117 | log.debug(u'Base path %s ', self.basepath) |
118 | @@ -53,7 +53,7 @@ |
119 | """ |
120 | self.plugin_helpers = plugin_helpers |
121 | startdepth = len(os.path.abspath(dir).split(os.sep)) |
122 | - log.debug(u'find plugins %s at depth %d' %( str(dir), startdepth)) |
123 | + log.debug(u'find plugins %s at depth %d' %( unicode(dir), startdepth)) |
124 | |
125 | for root, dirs, files in os.walk(dir): |
126 | for name in files: |
127 | @@ -80,14 +80,14 @@ |
128 | for p in self.plugin_classes: |
129 | try: |
130 | plugin = p(self.plugin_helpers) |
131 | - log.debug(u'loaded plugin %s with helpers'%str(p)) |
132 | - log.debug(u'Plugin: %s', str(p)) |
133 | + log.debug(u'loaded plugin %s with helpers'%unicode(p)) |
134 | + log.debug(u'Plugin: %s', unicode(p)) |
135 | if plugin.check_pre_conditions(): |
136 | - log.debug(u'Appending %s ', str(p)) |
137 | + log.debug(u'Appending %s ', unicode(p)) |
138 | plugin_objects.append(plugin) |
139 | eventmanager.register(plugin) |
140 | except TypeError: |
141 | - log.error(u'loaded plugin %s has no helpers'%str(p)) |
142 | + log.error(u'loaded plugin %s has no helpers'%unicode(p)) |
143 | self.plugins = sorted(plugin_objects, self.order_by_weight) |
144 | |
145 | def order_by_weight(self, x, y): |
146 | |
147 | === modified file 'openlp/core/lib/renderer.py' |
148 | --- openlp/core/lib/renderer.py 2009-06-10 16:20:57 +0000 |
149 | +++ openlp/core/lib/renderer.py 2009-06-16 18:21:24 +0000 |
150 | @@ -67,7 +67,7 @@ |
151 | |
152 | def set_bg_image(self, filename): |
153 | log.debug(u'set bg image %s', filename) |
154 | - self._bg_image_filename = str(filename) |
155 | + self._bg_image_filename = unicode(filename) |
156 | if self._frame is not None: |
157 | self.scale_bg_image() |
158 | |
159 | @@ -447,4 +447,4 @@ |
160 | im.save(u'renderer.png', u'png') |
161 | if image2 is not None: |
162 | im = image2.toImage() |
163 | - im.save(u'renderer2.png', u'png') |
164 | + im.save(u'renderer2.png', u'png') |
165 | \ No newline at end of file |
166 | |
167 | === modified file 'openlp/core/lib/rendermanager.py' |
168 | --- openlp/core/lib/rendermanager.py 2009-06-10 15:54:46 +0000 |
169 | +++ openlp/core/lib/rendermanager.py 2009-06-16 18:21:24 +0000 |
170 | @@ -35,12 +35,12 @@ |
171 | if event == "line": |
172 | lineno = frame.f_lineno |
173 | filename = frame.f_globals["__file__"] |
174 | - if (filename.endswith(".pyc") or |
175 | - filename.endswith(".pyo")): |
176 | + if (filename.endswith(u'.pyc') or |
177 | + filename.endswith(u'.pyo')): |
178 | filename = filename[:-1] |
179 | name = frame.f_globals["__name__"] |
180 | line = linecache.getline(filename, lineno) |
181 | - if name.startswith("openlp"): |
182 | + if name.startswith(u'openlp'): |
183 | print "%s:%s: %s" % (name, lineno, line.rstrip()) |
184 | return traceit |
185 | |
186 | @@ -163,4 +163,4 @@ |
187 | self.width = 1024 |
188 | self.height = 768 |
189 | log.debug(u'calculate default %d,%d' , self.width, self.height) |
190 | - self.footer_start = int(self.height*0.90) # 90% is start of footer |
191 | + self.footer_start = int(self.height*0.90) # 90% is start of footer |
192 | \ No newline at end of file |
193 | |
194 | === modified file 'openlp/core/lib/songxmlhandler.py' |
195 | --- openlp/core/lib/songxmlhandler.py 2009-04-30 21:02:28 +0000 |
196 | +++ openlp/core/lib/songxmlhandler.py 2009-06-16 18:21:24 +0000 |
197 | @@ -66,7 +66,7 @@ |
198 | |
199 | def dump_xml(self): |
200 | # Debugging aid to see what we have |
201 | - print self.song_xml.toprettyxml(indent=" ") |
202 | + print self.song_xml.toprettyxml(indent=u' ') |
203 | |
204 | def extract_xml(self): |
205 | # Print our newly created XML |
206 | |
207 | === modified file 'openlp/core/lib/toolbar.py' |
208 | --- openlp/core/lib/toolbar.py 2009-05-01 22:26:43 +0000 |
209 | +++ openlp/core/lib/toolbar.py 2009-06-16 18:21:24 +0000 |
210 | @@ -54,12 +54,12 @@ |
211 | if tooltip is not None: |
212 | ToolbarButton.setToolTip(tooltip) |
213 | if slot is not None: |
214 | - QtCore.QObject.connect(ToolbarButton, QtCore.SIGNAL('triggered()'), slot) |
215 | + QtCore.QObject.connect(ToolbarButton, QtCore.SIGNAL(u'triggered()'), slot) |
216 | self.icons[title] = ButtonIcon |
217 | |
218 | def getIconFromTitle(self, title): |
219 | if self.icons.has_key(title): |
220 | return self.icons[title] |
221 | else: |
222 | - self.log.error("getIconFromTitle - no icon for %s" % title) |
223 | + self.log.error(u'getIconFromTitle - no icon for %s' % title) |
224 | return QtGui.QIcon() |
225 | |
226 | === modified file 'openlp/core/test/test_mediamanageritem.py' |
227 | --- openlp/core/test/test_mediamanageritem.py 2009-03-12 20:19:24 +0000 |
228 | +++ openlp/core/test/test_mediamanageritem.py 2009-06-16 18:21:24 +0000 |
229 | @@ -8,13 +8,13 @@ |
230 | |
231 | console=logging.StreamHandler() |
232 | # set a format which is simpler for console use |
233 | -formatter = logging.Formatter('%(name)24s: %(levelname)-8s %(message)s') |
234 | +formatter = logging.Formatter(u'%(name)24s: %(levelname)-8s %(message)s') |
235 | # tell the handler to use this format |
236 | console.setFormatter(formatter) |
237 | -logging.getLogger('').addHandler(console) |
238 | -log=logging.getLogger('') |
239 | +logging.getLogger(u'').addHandler(console) |
240 | +log=logging.getLogger(u'') |
241 | |
242 | -logging.info("Logging started") |
243 | +logging.info(u'Logging started') |
244 | import os, sys |
245 | mypath=os.path.split(os.path.abspath(__file__))[0] |
246 | |
247 | @@ -23,7 +23,7 @@ |
248 | class TestMediaManager: |
249 | def setup_class(self): |
250 | self.app = QtGui.QApplication([]) |
251 | - logging.info ("App is " + str(self.app)) |
252 | + logging.info (u'App is " + unicode(self.app)) |
253 | self.main_window = QtGui.QMainWindow() |
254 | self.main_window.resize(200, 600) |
255 | self.MediaManagerDock = QtGui.QDockWidget(self.main_window) |
256 | @@ -33,7 +33,7 @@ |
257 | sizePolicy.setHeightForWidth(self.MediaManagerDock.sizePolicy().hasHeightForWidth()) |
258 | self.MediaManagerDock.setSizePolicy(sizePolicy) |
259 | icon = QtGui.QIcon() |
260 | - icon.addPixmap(QtGui.QPixmap(":/system/system_mediamanager.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
261 | + icon.addPixmap(QtGui.QPixmap(u':/system/system_mediamanager.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
262 | self.MediaManagerDock.setWindowIcon(icon) |
263 | self.MediaManagerDock.setFloating(False) |
264 | self.MediaManagerContents = QtGui.QWidget() |
265 | @@ -49,26 +49,26 @@ |
266 | self.main_window.addDockWidget(QtCore.Qt.DockWidgetArea(1), self.MediaManagerDock) |
267 | self.MediaManagerLayout.addWidget(self.MediaToolBox) |
268 | def test1(self): |
269 | - log=logging.getLogger("test1") |
270 | - log.info("Start") |
271 | + log=logging.getLogger(u'test1') |
272 | + log.info(u'Start') |
273 | i1=MediaManagerItem(self.MediaToolBox) |
274 | i2=MediaManagerItem(self.MediaToolBox) |
275 | - log.info("i1"+str(i1)) |
276 | - log.info("i2"+str(i2)) |
277 | + log.info(u'i1"+unicode(i1)) |
278 | + log.info(u'i2"+unicode(i2)) |
279 | i1.addToolbar() |
280 | - i1.addToolbarButton("Test1", "Test1", None) |
281 | + i1.addToolbarButton(u'Test1", u'Test1", None) |
282 | i2.addToolbar() |
283 | - i2.addToolbarButton("Test2", "Test2", None) |
284 | - self.MediaToolBox.setItemText(self.MediaToolBox.indexOf(i1), QtGui.QApplication.translate("main_window", "Item1", None, QtGui.QApplication.UnicodeUTF8)) |
285 | - self.MediaToolBox.setItemText(self.MediaToolBox.indexOf(i2), QtGui.QApplication.translate("main_window", "Item2", None, QtGui.QApplication.UnicodeUTF8)) |
286 | - log.info("Show window") |
287 | + i2.addToolbarButton(u'Test2", u'Test2", None) |
288 | + self.MediaToolBox.setItemText(self.MediaToolBox.indexOf(i1), translate(u'main_window", u'Item1")) |
289 | + self.MediaToolBox.setItemText(self.MediaToolBox.indexOf(i2), translate(u'main_window", u'Item2")) |
290 | + log.info(u'Show window') |
291 | self.main_window.show() |
292 | - log.info("End") |
293 | + log.info(u'End') |
294 | return 1 |
295 | |
296 | if __name__=="__main__": |
297 | t=TestMediaManager() |
298 | t.setup_class() |
299 | t.test1() |
300 | - log.info("exec") |
301 | - sys.exit(t.app.exec_()) |
302 | + log.info(u'exec') |
303 | + sys.exit(t.app.exec_()) |
304 | \ No newline at end of file |
305 | |
306 | === modified file 'openlp/core/test/test_plugin_manager.py' |
307 | --- openlp/core/test/test_plugin_manager.py 2009-04-20 18:22:42 +0000 |
308 | +++ openlp/core/test/test_plugin_manager.py 2009-06-16 18:21:24 +0000 |
309 | @@ -10,13 +10,13 @@ |
310 | |
311 | console=logging.StreamHandler() |
312 | # set a format which is simpler for console use |
313 | -formatter = logging.Formatter('%(name)-12s: %(levelname)-8s %(message)s') |
314 | +formatter = logging.Formatter(u'%(name)-12s: %(levelname)-8s %(message)s') |
315 | # tell the handler to use this format |
316 | console.setFormatter(formatter) |
317 | -logging.getLogger('').addHandler(console) |
318 | -log=logging.getLogger('') |
319 | +logging.getLogger(u'').addHandler(console) |
320 | +log=logging.getLogger(u'') |
321 | |
322 | -logging.info("Logging started") |
323 | +logging.info(u'Logging started') |
324 | mypath=os.path.split(os.path.abspath(__file__))[0] |
325 | |
326 | sys.path.insert(0,(os.path.join(mypath, '..' ,'..', '..'))) |
327 | @@ -24,24 +24,24 @@ |
328 | # test the plugin manager with some plugins in the test_plugins directory |
329 | class TestPluginManager: |
330 | def test_init(self): |
331 | - self.p=PluginManager("./testplugins") |
332 | + self.p=PluginManager(u'./testplugins') |
333 | p=self.p |
334 | - p.find_plugins('./testplugins', None, None) |
335 | + p.find_plugins(u'./testplugins', None, None) |
336 | assert (len(p.plugins)==2); |
337 | # get list of the names of the plugins |
338 | names=[plugin.name for plugin in p.plugins] |
339 | # see which ones we've got |
340 | - assert ("testplugin1" in names) |
341 | - assert ("testplugin2" in names) |
342 | + assert (u'testplugin1" in names) |
343 | + assert (u'testplugin2" in names) |
344 | # and not got - it's too deep in the hierarchy! |
345 | - assert ("testplugin3" not in names) |
346 | + assert (u'testplugin3" not in names) |
347 | # test that the weighting is done right |
348 | assert p.plugins[0].name=="testplugin2" |
349 | assert p.plugins[1].name=="testplugin1" |
350 | if __name__=="__main__": |
351 | - log.debug("Starting") |
352 | + log.debug(u'Starting') |
353 | t=TestPluginManager() |
354 | t.test_init() |
355 | - log.debug("List of plugins found:") |
356 | + log.debug(u'List of plugins found:') |
357 | for plugin in t.p.plugins: |
358 | - log.debug("Plugin %s, name=%s (version=%d)"%(str(plugin), plugin.name, plugin.version)) |
359 | + log.debug(u'Plugin %s, name=%s (version=%d)"%(unicode(plugin), plugin.name, plugin.version)) |
360 | \ No newline at end of file |
361 | |
362 | === modified file 'openlp/core/test/test_render.py' |
363 | --- openlp/core/test/test_render.py 2009-03-29 14:38:23 +0000 |
364 | +++ openlp/core/test/test_render.py 2009-06-16 18:21:24 +0000 |
365 | @@ -45,15 +45,15 @@ |
366 | |
367 | class TestRender_base: |
368 | def __init__(self): |
369 | - if not os.path.exists("test_results"): |
370 | - os.mkdir("test_results") |
371 | + if not os.path.exists(u'test_results'): |
372 | + os.mkdir(u'test_results') |
373 | self.app=None |
374 | def write_to_file(self, pixmap, name): |
375 | im=pixmap.toImage() |
376 | - testpathname=os.path.join("test_results", name+".bmp") |
377 | + testpathname=os.path.join(u'test_results", name+".bmp') |
378 | if os.path.exists(testpathname): |
379 | os.unlink(testpathname) |
380 | - im.save(testpathname, "bmp") |
381 | + im.save(testpathname, "bmp') |
382 | return im |
383 | # xxx quitting the app still leaves it hanging aroudn so we die |
384 | # when trying to start another one. Not quitting doesn't help |
385 | @@ -84,7 +84,7 @@ |
386 | |
387 | def setup_method(self, method): |
388 | print "SSsetup", method |
389 | - if not hasattr(self, "app"): |
390 | + if not hasattr(self, "app'): |
391 | self.app=None |
392 | try: # see if we already have an app for some reason. |
393 | # have to try and so something, cant just test against None |
394 | @@ -109,7 +109,7 @@ |
395 | print "--------------- Setup Done -------------" |
396 | |
397 | def teardown_method(self, method): |
398 | - self.write_to_file(self.frame.GetPixmap(), "test_render") |
399 | + self.write_to_file(self.frame.GetPixmap(), "test_render') |
400 | |
401 | class TestRender(TestRender_base): |
402 | def __init__(self): |
403 | @@ -118,29 +118,29 @@ |
404 | def setup_method(self, method): |
405 | TestRender_base.setup_method(self, method) |
406 | self.r.set_debug(1) |
407 | - themefile=os.path.abspath("data_for_tests/render_theme.xml") |
408 | + themefile=os.path.abspath(u'data_for_tests/render_theme.xml') |
409 | self.r.set_theme(Theme(themefile)) # set default theme |
410 | self.r._render_background() |
411 | self.r.set_text_rectangle(QtCore.QRect(0,0, self.size.width()-1, self.size.height()-1)) |
412 | self.msg=None |
413 | |
414 | def test_easy(self): |
415 | - answer=self.r._render_single_line("Test line", tlcorner=(0,100)) |
416 | + answer=self.r._render_single_line(u'Test line", tlcorner=(0,100)) |
417 | assert (answer==(219,163)) |
418 | def test_longer(self): |
419 | - answer=self.r._render_single_line("Test line with more words than fit on one line", |
420 | + answer=self.r._render_single_line(u'Test line with more words than fit on one line", |
421 | tlcorner=(10,10)) |
422 | assert (answer==(753,136)) |
423 | def test_even_longer(self): |
424 | - answer=self.r._render_single_line("Test line with more words than fit on either one or two lines", |
425 | + answer=self.r._render_single_line(u'Test line with more words than fit on either one or two lines", |
426 | tlcorner=(10,10)) |
427 | assert(answer==(753,199)) |
428 | def test_lines(self): |
429 | lines=[] |
430 | - lines.append("Line One") |
431 | - lines.append("Line Two") |
432 | - lines.append("Line Three and should be long enough to wrap") |
433 | - lines.append("Line Four and should be long enough to wrap also") |
434 | + lines.append(u'Line One') |
435 | + lines.append(u'Line Two') |
436 | + lines.append(u'Line Three and should be long enough to wrap') |
437 | + lines.append(u'Line Four and should be long enough to wrap also') |
438 | answer=self.r._render_lines(lines) |
439 | assert(answer==QtCore.QRect(0,0,741,378)) |
440 | |
441 | @@ -187,7 +187,7 @@ |
442 | extra="" |
443 | if i == 51: # make an extra long line on line 51 to test wrapping |
444 | extra="Some more words to make it wrap around don't you know until it wraps so many times we don't know what to do" |
445 | - lines.append("Line %d %s" % (i, extra)) |
446 | + lines.append(u'Line %d %s" % (i, extra)) |
447 | result=self.r.split_set_of_lines(lines) |
448 | print "results---------------__", result |
449 | for i in range(len(result)): |
450 | @@ -218,5 +218,4 @@ |
451 | t.setup_method(None) |
452 | t.test_easy() |
453 | t.test_splits() |
454 | - t.teardown_method(None) |
455 | - |
456 | + t.teardown_method(None) |
457 | \ No newline at end of file |
458 | |
459 | === modified file 'openlp/core/test/test_render_theme.py' |
460 | --- openlp/core/test/test_render_theme.py 2009-03-12 20:19:24 +0000 |
461 | +++ openlp/core/test/test_render_theme.py 2009-06-16 18:21:24 +0000 |
462 | @@ -57,7 +57,7 @@ |
463 | TestRender_base.setup_method(self, method) |
464 | print "Theme setup", method |
465 | # print "setup theme" |
466 | - self.r.set_theme(Theme('blank_theme.xml')) # set "blank" theme |
467 | + self.r.set_theme(Theme(u'blank_theme.xml')) # set "blank" theme |
468 | self.r.set_text_rectangle(QtCore.QRect(0,0, self.size.width(), self.size.height())) |
469 | words="""How sweet the name of Jesus sounds |
470 | In a believer's ear! |
471 | @@ -87,7 +87,7 @@ |
472 | p=self.frame.GetPixmap() |
473 | im=self.write_to_file(p, name) |
474 | print "Compare" |
475 | - goldenfilename=os.path.join("golden_bitmaps",name+".bmp") |
476 | + goldenfilename=os.path.join(u'golden_bitmaps",name+".bmp') |
477 | if os.path.exists(goldenfilename): |
478 | goldenim=QtGui.QImage(goldenfilename) |
479 | else: |
480 | @@ -129,9 +129,9 @@ |
481 | # }}} |
482 | # {{{ backgrounds |
483 | def test_bg_stretch_y(self): |
484 | - t=Theme('blank_theme.xml') |
485 | + t=Theme(u'blank_theme.xml') |
486 | t.BackgroundType = 2 |
487 | - t.BackgroundParameter1 = os.path.join('data_for_tests', "snowsmall.jpg"); |
488 | + t.BackgroundParameter1 = os.path.join(u'data_for_tests', "snowsmall.jpg'); |
489 | t.BackgroundParameter2 = QtGui.QColor(0,0,64); |
490 | t.BackgroundParameter3 = 0 |
491 | t.Name="stretch y" |
492 | @@ -142,9 +142,9 @@ |
493 | self.bmpname=whoami() |
494 | print "fone" |
495 | def test_bg_shrink_y(self): |
496 | - t=Theme('blank_theme.xml') |
497 | + t=Theme(u'blank_theme.xml') |
498 | t.BackgroundType = 2 |
499 | - t.BackgroundParameter1 = os.path.join('data_for_tests', "snowbig.jpg"); |
500 | + t.BackgroundParameter1 = os.path.join(u'data_for_tests', "snowbig.jpg'); |
501 | t.BackgroundParameter2 = QtGui.QColor(0,0,64); |
502 | t.BackgroundParameter3 = 0 |
503 | t.Name="shrink y" |
504 | @@ -153,9 +153,9 @@ |
505 | self.bmpname=whoami() |
506 | |
507 | def test_bg_stretch_x(self): |
508 | - t=Theme('blank_theme.xml') |
509 | + t=Theme(u'blank_theme.xml') |
510 | t.BackgroundType = 2 |
511 | - t.BackgroundParameter1 = os.path.join('data_for_tests', "treessmall.jpg"); |
512 | + t.BackgroundParameter1 = os.path.join(u'data_for_tests', "treessmall.jpg'); |
513 | t.BackgroundParameter2 = QtGui.QColor(0,0,64); |
514 | t.BackgroundParameter3 = 0 |
515 | t.VerticalAlign = 2 |
516 | @@ -166,9 +166,9 @@ |
517 | self.bmpname=whoami() |
518 | |
519 | def test_bg_shrink_x(self): |
520 | - t=Theme('blank_theme.xml') |
521 | + t=Theme(u'blank_theme.xml') |
522 | t.BackgroundType = 2 |
523 | - t.BackgroundParameter1 = os.path.join('data_for_tests', "treesbig.jpg"); |
524 | + t.BackgroundParameter1 = os.path.join(u'data_for_tests', "treesbig.jpg'); |
525 | t.BackgroundParameter2 = QtGui.QColor(0,0,64); |
526 | t.BackgroundParameter3 = 0 |
527 | t.VerticalAlign = 2 |
528 | @@ -180,7 +180,7 @@ |
529 | # }}} |
530 | # {{{ Vertical alignment |
531 | def test_theme_vertical_align_top(self): |
532 | - t=Theme('blank_theme.xml') |
533 | + t=Theme(u'blank_theme.xml') |
534 | t.BackgroundType = 0 |
535 | t.BackgroundParameter1 = QtGui.QColor(0,0,64); |
536 | t.VerticalAlign = 0 |
537 | @@ -190,7 +190,7 @@ |
538 | self.bmpname=whoami() |
539 | |
540 | def test_theme_vertical_align_bot(self): |
541 | - t=Theme('blank_theme.xml') |
542 | + t=Theme(u'blank_theme.xml') |
543 | t.BackgroundType = 0 |
544 | t.BackgroundParameter1 = QtGui.QColor(0,0,64); |
545 | t.VerticalAlign = 1 |
546 | @@ -201,7 +201,7 @@ |
547 | self.bmpname=whoami() |
548 | |
549 | def test_theme_vertical_align_cen(self): |
550 | - t=Theme('blank_theme.xml') |
551 | + t=Theme(u'blank_theme.xml') |
552 | t.BackgroundType = 0 |
553 | t.BackgroundParameter1 = QtGui.QColor(0,0,64); |
554 | t.VerticalAlign = 2 |
555 | @@ -213,7 +213,7 @@ |
556 | # }}} |
557 | # {{{ Horzontal alignment |
558 | def test_theme_horizontal_align_left(self): |
559 | - t=Theme('blank_theme.xml') |
560 | + t=Theme(u'blank_theme.xml') |
561 | t.BackgroundType = 0 |
562 | t.BackgroundParameter1 = QtGui.QColor(0,0,64); |
563 | t.VerticalAlign = 0 |
564 | @@ -224,7 +224,7 @@ |
565 | self.bmpname=whoami() |
566 | |
567 | def test_theme_horizontal_align_right(self): |
568 | - t=Theme('blank_theme.xml') |
569 | + t=Theme(u'blank_theme.xml') |
570 | t.BackgroundType = 0 |
571 | t.BackgroundParameter1 = QtGui.QColor(0,0,64); |
572 | t.VerticalAlign = 0 |
573 | @@ -236,7 +236,7 @@ |
574 | self.bmpname=whoami() |
575 | |
576 | def test_theme_horizontal_align_centre(self): |
577 | - t=Theme('blank_theme.xml') |
578 | + t=Theme(u'blank_theme.xml') |
579 | t.BackgroundType = 0 |
580 | t.BackgroundParameter1 = QtGui.QColor(0,0,64); |
581 | t.VerticalAlign = 0 |
582 | @@ -248,7 +248,7 @@ |
583 | self.bmpname=whoami() |
584 | |
585 | def test_theme_horizontal_align_left_lyric(self): |
586 | - t=Theme('blank_theme.xml') |
587 | + t=Theme(u'blank_theme.xml') |
588 | t.BackgroundType = 0 |
589 | t.BackgroundParameter1 = QtGui.QColor(0,0,64); |
590 | t.VerticalAlign = 0 |
591 | @@ -263,7 +263,7 @@ |
592 | # }}} |
593 | # {{{ Shadows and outlines |
594 | def test_theme_shadow_outline(self): |
595 | - t=Theme('blank_theme.xml') |
596 | + t=Theme(u'blank_theme.xml') |
597 | |
598 | t.BackgroundType = 0 |
599 | t.BackgroundParameter1 = QtGui.QColor(0,0,0); |
600 | @@ -282,7 +282,7 @@ |
601 | self.bmpname=whoami() |
602 | # }}} |
603 | def test_theme_font(self): |
604 | - t=Theme('blank_theme.xml') |
605 | + t=Theme(u'blank_theme.xml') |
606 | t.BackgroundType = 0 |
607 | t.BackgroundParameter1 = QtGui.QColor(0,0,64); |
608 | t.Name="font" |
609 | @@ -298,4 +298,4 @@ |
610 | t.setup_class() |
611 | t.setup_method(None) |
612 | t.test_bg_stretch_y() |
613 | - t.teardown_method(None) |
614 | + t.teardown_method(None) |
615 | \ No newline at end of file |
616 | |
617 | === modified file 'openlp/core/test/testplugins/deeper/toodeep/plugin3toodeep.py' |
618 | --- openlp/core/test/testplugins/deeper/toodeep/plugin3toodeep.py 2009-01-20 21:20:05 +0000 |
619 | +++ openlp/core/test/testplugins/deeper/toodeep/plugin3toodeep.py 2009-06-16 18:21:24 +0000 |
620 | @@ -5,9 +5,9 @@ |
621 | name="testplugin3" |
622 | version=0 |
623 | global log |
624 | - log=logging.getLogger("testplugin1") |
625 | - log.info("Started") |
626 | + log=logging.getLogger(u'testplugin1') |
627 | + log.info(u'Started') |
628 | weight=10 |
629 | def __init__(self): |
630 | pass |
631 | - |
632 | + |
633 | \ No newline at end of file |
634 | |
635 | === modified file 'openlp/core/test/testplugins/testplugin1.py' |
636 | --- openlp/core/test/testplugins/testplugin1.py 2009-01-20 21:20:05 +0000 |
637 | +++ openlp/core/test/testplugins/testplugin1.py 2009-06-16 18:21:24 +0000 |
638 | @@ -5,9 +5,9 @@ |
639 | name="testplugin1" |
640 | version=0 |
641 | global log |
642 | - log=logging.getLogger("testplugin1") |
643 | - log.info("Started") |
644 | + log=logging.getLogger(u'testplugin1') |
645 | + log.info(u'Started') |
646 | weight=10 |
647 | def __init__(self): |
648 | pass |
649 | - |
650 | + |
651 | \ No newline at end of file |
652 | |
653 | === modified file 'openlp/core/theme/test/test_theme.py' |
654 | --- openlp/core/theme/test/test_theme.py 2009-03-12 20:19:24 +0000 |
655 | +++ openlp/core/theme/test/test_theme.py 2009-06-16 18:21:24 +0000 |
656 | @@ -11,18 +11,18 @@ |
657 | def test_read_theme(): |
658 | dir=os.path.split(__file__)[0] |
659 | # test we can read a theme |
660 | - t=Theme(os.path.join(dir, "test_theme.xml")) |
661 | + t=Theme(os.path.join(dir, "test_theme.xml')) |
662 | print t |
663 | - assert(t.BackgroundParameter1 == "sunset1.jpg") |
664 | + assert(t.BackgroundParameter1 == "sunset1.jpg') |
665 | assert(t.BackgroundParameter2 == None) |
666 | assert(t.BackgroundParameter3 == None) |
667 | assert(t.BackgroundType == 2) |
668 | assert(t.FontColor == QtGui.QColor(255,255,255)) |
669 | - assert(t.FontName == "Tahoma") |
670 | + assert(t.FontName == "Tahoma') |
671 | assert(t.FontProportion == 16) |
672 | - assert(t.FontUnits == "pixels") |
673 | + assert(t.FontUnits == "pixels') |
674 | assert(t.HorizontalAlign == 2) |
675 | - assert(t.Name == "openlp.org Packaged Theme") |
676 | + assert(t.Name == "openlp.org Packaged Theme') |
677 | assert(t.Outline == -1) |
678 | assert(t.OutlineColor == QtGui.QColor(255,0,0)) |
679 | assert(t.Shadow == -1) |
680 | @@ -37,11 +37,11 @@ |
681 | assert(t.BackgroundParameter3 == None) |
682 | assert(t.BackgroundType == 0) |
683 | assert(t.FontColor == QtGui.QColor(255,255,255)) |
684 | - assert(t.FontName == "Arial") |
685 | + assert(t.FontName == "Arial') |
686 | assert(t.FontProportion == 30) |
687 | assert(t.HorizontalAlign == 0) |
688 | - assert(t.FontUnits == "pixels") |
689 | - assert(t.Name == "BlankStyle") |
690 | + assert(t.FontUnits == "pixels') |
691 | + assert(t.Name == "BlankStyle') |
692 | assert(t.Outline == 0) |
693 | assert(t.Shadow == 0) |
694 | assert(t.VerticalAlign == 0) |
695 | @@ -52,4 +52,4 @@ |
696 | |
697 | if __name__=="__main__": |
698 | test_read_theme() |
699 | - test_theme() |
700 | + test_theme() |
701 | \ No newline at end of file |
702 | |
703 | === modified file 'openlp/core/theme/theme.py' |
704 | --- openlp/core/theme/theme.py 2009-04-06 18:45:45 +0000 |
705 | +++ openlp/core/theme/theme.py 2009-06-16 18:21:24 +0000 |
706 | @@ -96,7 +96,7 @@ |
707 | # print element.tag, t, type(t) |
708 | if type(t) == type(None): # easy! |
709 | val=t |
710 | - if type(t) == type(" "): # strings need special handling to sort the colours out |
711 | + if type(t) == type(u' '): # strings need special handling to sort the colours out |
712 | # print "str", |
713 | if t[0] == "$": # might be a hex number |
714 | # print "hex", |
715 | @@ -113,8 +113,8 @@ |
716 | val=int(t) |
717 | except ValueError: |
718 | val=t |
719 | - if (element.tag.find("Color") > 0 or |
720 | - (element.tag.find("BackgroundParameter") == 0 and type(val) == type(0))): |
721 | + if (element.tag.find(u'Color') > 0 or |
722 | + (element.tag.find(u'BackgroundParameter') == 0 and type(val) == type(0))): |
723 | # convert to a wx.Colour |
724 | val= QtGui.QColor((val>>16) & 0xFF, (val>>8)&0xFF, val&0xFF) |
725 | # print [val] |
726 | @@ -126,5 +126,4 @@ |
727 | for k in dir(self): |
728 | if k[0:1] != "_": |
729 | s+= "%30s : %s\n" %(k,getattr(self,k)) |
730 | - return s |
731 | - |
732 | + return s |
733 | \ No newline at end of file |
734 | |
735 | === modified file 'openlp/core/ui/alertform.py' |
736 | --- openlp/core/ui/alertform.py 2009-06-01 17:50:37 +0000 |
737 | +++ openlp/core/ui/alertform.py 2009-06-16 18:21:24 +0000 |
738 | @@ -18,7 +18,6 @@ |
739 | Place, Suite 330, Boston, MA 02111-1307 USA |
740 | """ |
741 | import logging |
742 | - |
743 | from PyQt4 import QtCore, QtGui |
744 | from openlp.core.lib import translate |
745 | |
746 | @@ -33,22 +32,22 @@ |
747 | log.debug(u'Defined') |
748 | |
749 | def setupUi(self, AlertForm): |
750 | - AlertForm.setObjectName("AlertForm") |
751 | + AlertForm.setObjectName(u'AlertForm') |
752 | AlertForm.resize(370, 110) |
753 | icon = QtGui.QIcon() |
754 | - icon.addPixmap(QtGui.QPixmap(":/icon/openlp-logo-16x16.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
755 | + icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
756 | AlertForm.setWindowIcon(icon) |
757 | self.AlertFormLayout = QtGui.QVBoxLayout(AlertForm) |
758 | self.AlertFormLayout.setSpacing(8) |
759 | self.AlertFormLayout.setMargin(8) |
760 | - self.AlertFormLayout.setObjectName("AlertFormLayout") |
761 | + self.AlertFormLayout.setObjectName(u'AlertFormLayout') |
762 | self.AlertEntryWidget = QtGui.QWidget(AlertForm) |
763 | sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) |
764 | sizePolicy.setHorizontalStretch(0) |
765 | sizePolicy.setVerticalStretch(0) |
766 | sizePolicy.setHeightForWidth(self.AlertEntryWidget.sizePolicy().hasHeightForWidth()) |
767 | self.AlertEntryWidget.setSizePolicy(sizePolicy) |
768 | - self.AlertEntryWidget.setObjectName("AlertEntryWidget") |
769 | + self.AlertEntryWidget.setObjectName(u'AlertEntryWidget') |
770 | self.AlertEntryLabel = QtGui.QLabel(self.AlertEntryWidget) |
771 | self.AlertEntryLabel.setGeometry(QtCore.QRect(0, 0, 353, 16)) |
772 | sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed) |
773 | @@ -56,10 +55,10 @@ |
774 | sizePolicy.setVerticalStretch(0) |
775 | sizePolicy.setHeightForWidth(self.AlertEntryLabel.sizePolicy().hasHeightForWidth()) |
776 | self.AlertEntryLabel.setSizePolicy(sizePolicy) |
777 | - self.AlertEntryLabel.setObjectName("AlertEntryLabel") |
778 | + self.AlertEntryLabel.setObjectName(u'AlertEntryLabel') |
779 | self.AlertEntryEditItem = QtGui.QLineEdit(self.AlertEntryWidget) |
780 | self.AlertEntryEditItem.setGeometry(QtCore.QRect(0, 20, 353, 26)) |
781 | - self.AlertEntryEditItem.setObjectName("AlertEntryEditItem") |
782 | + self.AlertEntryEditItem.setObjectName(u'AlertEntryEditItem') |
783 | self.AlertFormLayout.addWidget(self.AlertEntryWidget) |
784 | self.ButtonBoxWidget = QtGui.QWidget(AlertForm) |
785 | sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) |
786 | @@ -67,32 +66,32 @@ |
787 | sizePolicy.setVerticalStretch(0) |
788 | sizePolicy.setHeightForWidth(self.ButtonBoxWidget.sizePolicy().hasHeightForWidth()) |
789 | self.ButtonBoxWidget.setSizePolicy(sizePolicy) |
790 | - self.ButtonBoxWidget.setObjectName("ButtonBoxWidget") |
791 | + self.ButtonBoxWidget.setObjectName(u'ButtonBoxWidget') |
792 | self.horizontalLayout = QtGui.QHBoxLayout(self.ButtonBoxWidget) |
793 | self.horizontalLayout.setSpacing(8) |
794 | self.horizontalLayout.setMargin(0) |
795 | - self.horizontalLayout.setObjectName("horizontalLayout") |
796 | + self.horizontalLayout.setObjectName(u'horizontalLayout') |
797 | spacerItem = QtGui.QSpacerItem(267, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
798 | self.horizontalLayout.addItem(spacerItem) |
799 | self.DisplayButton = QtGui.QPushButton(self.ButtonBoxWidget) |
800 | - self.DisplayButton.setObjectName("DisplayButton") |
801 | + self.DisplayButton.setObjectName(u'DisplayButton') |
802 | self.horizontalLayout.addWidget(self.DisplayButton) |
803 | self.CancelButton = QtGui.QPushButton(self.ButtonBoxWidget) |
804 | - self.CancelButton.setObjectName("CancelButton") |
805 | + self.CancelButton.setObjectName(u'CancelButton') |
806 | self.horizontalLayout.addWidget(self.CancelButton) |
807 | self.AlertFormLayout.addWidget(self.ButtonBoxWidget) |
808 | |
809 | self.retranslateUi(AlertForm) |
810 | |
811 | - QtCore.QObject.connect(self.CancelButton, QtCore.SIGNAL("clicked()"), AlertForm.close) |
812 | - QtCore.QObject.connect(self.DisplayButton, QtCore.SIGNAL("clicked()"), self.onDisplayClicked) |
813 | + QtCore.QObject.connect(self.CancelButton, QtCore.SIGNAL(u'clicked()'), AlertForm.close) |
814 | + QtCore.QObject.connect(self.DisplayButton, QtCore.SIGNAL(u'clicked()'), self.onDisplayClicked) |
815 | QtCore.QMetaObject.connectSlotsByName(AlertForm) |
816 | |
817 | def retranslateUi(self, AlertForm): |
818 | - AlertForm.setWindowTitle(translate("AlertForm", u'Alert Message')) |
819 | - self.AlertEntryLabel.setText(translate("AlertForm", u'Alert Text:')) |
820 | - self.DisplayButton.setText(translate("AlertForm", u'Display')) |
821 | - self.CancelButton.setText(translate("AlertForm", u'Cancel')) |
822 | + AlertForm.setWindowTitle(translate(u'AlertForm', u'Alert Message')) |
823 | + self.AlertEntryLabel.setText(translate(u'AlertForm', u'Alert Text:')) |
824 | + self.DisplayButton.setText(translate(u'AlertForm', u'Display')) |
825 | + self.CancelButton.setText(translate(u'AlertForm', u'Cancel')) |
826 | |
827 | def load_settings(self): |
828 | pass |
829 | |
830 | === modified file 'openlp/core/ui/alertstab.py' |
831 | --- openlp/core/ui/alertstab.py 2009-06-05 18:53:50 +0000 |
832 | +++ openlp/core/ui/alertstab.py 2009-06-16 18:21:24 +0000 |
833 | @@ -65,7 +65,7 @@ |
834 | self.FontColorLabel.setObjectName(u'FontColorLabel') |
835 | self.ColorLayout.addWidget(self.FontColorLabel) |
836 | self.FontColorButton = QtGui.QPushButton(self.ColorWidget) |
837 | - self.FontColorButton.setObjectName("FontColorButton") |
838 | + self.FontColorButton.setObjectName(u'FontColorButton') |
839 | self.ColorLayout.addWidget(self.FontColorButton) |
840 | self.ColorSpacerItem = QtGui.QSpacerItem(40, 20, |
841 | QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
842 | @@ -74,7 +74,7 @@ |
843 | self.BackgroundColorLabel.setObjectName(u'BackgroundColorLabel') |
844 | self.ColorLayout.addWidget(self.BackgroundColorLabel) |
845 | self.BackgroundColorButton = QtGui.QPushButton(self.ColorWidget) |
846 | - self.BackgroundColorButton.setObjectName("BackgroundColorButton") |
847 | + self.BackgroundColorButton.setObjectName(u'BackgroundColorButton') |
848 | self.ColorLayout.addWidget(self.BackgroundColorButton) |
849 | self.FontLayout.addWidget(self.ColorWidget) |
850 | self.TimeoutWidget = QtGui.QWidget(self.FontGroupBox) |
851 | @@ -170,9 +170,9 @@ |
852 | |
853 | def load(self): |
854 | self.timeout = int(self.config.get_config(u'timeout', 5)) |
855 | - self.font_color = str(self.config.get_config(u'font color', u'#ffffff')) |
856 | - self.bg_color = str(self.config.get_config(u'background color', u'#660000')) |
857 | - self.font_face = str(self.config.get_config(u'font face', QtGui.QFont().family())) |
858 | + self.font_color = unicode(self.config.get_config(u'font color', u'#ffffff')) |
859 | + self.bg_color = unicode(self.config.get_config(u'background color', u'#660000')) |
860 | + self.font_face = unicode(self.config.get_config(u'font face', QtGui.QFont().family())) |
861 | self.TimeoutSpinBox.setValue(self.timeout) |
862 | self.FontColorButton.setStyleSheet(u'background-color: %s' % self.font_color) |
863 | self.BackgroundColorButton.setStyleSheet(u'background-color: %s' % self.bg_color) |
864 | @@ -183,10 +183,10 @@ |
865 | |
866 | def save(self): |
867 | self.font_face = self.FontComboBox.currentFont().family() |
868 | - self.config.set_config(u'background color', str(self.bg_color)) |
869 | - self.config.set_config(u'font color', str(self.font_color)) |
870 | - self.config.set_config(u'font face', str(self.font_face)) |
871 | - self.config.set_config(u'timeout', str(self.timeout)) |
872 | + self.config.set_config(u'background color', unicode(self.bg_color)) |
873 | + self.config.set_config(u'font color', unicode(self.font_color)) |
874 | + self.config.set_config(u'font face', unicode(self.font_face)) |
875 | + self.config.set_config(u'timeout', unicode(self.timeout)) |
876 | |
877 | def updateDisplay(self): |
878 | font = QtGui.QFont() |
879 | @@ -195,4 +195,4 @@ |
880 | font.setPointSize(16) |
881 | self.FontPreview.setFont(font) |
882 | self.FontPreview.setStyleSheet( |
883 | - u'background-color: %s; color: %s' % (self.bg_color, self.font_color)) |
884 | + u'background-color: %s; color: %s' % (self.bg_color, self.font_color)) |
885 | \ No newline at end of file |
886 | |
887 | === modified file 'openlp/core/ui/amendthemedialog.py' |
888 | --- openlp/core/ui/amendthemedialog.py 2009-05-22 18:30:25 +0000 |
889 | +++ openlp/core/ui/amendthemedialog.py 2009-06-16 18:21:24 +0000 |
890 | @@ -1,147 +1,158 @@ |
891 | # -*- coding: utf-8 -*- |
892 | - |
893 | -# Form implementation generated from reading ui file 'amendthemedialog.ui' |
894 | -# |
895 | -# Created: Tue Apr 21 06:06:56 2009 |
896 | -# by: PyQt4 UI code generator 4.4.4 |
897 | -# |
898 | -# WARNING! All changes made in this file will be lost! |
899 | - |
900 | +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 |
901 | +""" |
902 | +OpenLP - Open Source Lyrics Projection |
903 | +Copyright (c) 2008 Raoul Snyman |
904 | +Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley, |
905 | + |
906 | +This program is free software; you can redistribute it and/or modify it under |
907 | +the terms of the GNU General Public License as published by the Free Software |
908 | +Foundation; version 2 of the License. |
909 | + |
910 | +This program is distributed in the hope that it will be useful, but WITHOUT ANY |
911 | +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
912 | +PARTICULAR PURPOSE. See the GNU General Public License for more details. |
913 | + |
914 | +You should have received a copy of the GNU General Public License along with |
915 | +this program; if not, write to the Free Software Foundation, Inc., 59 Temple |
916 | +Place, Suite 330, Boston, MA 02111-1307 USA |
917 | +""" |
918 | from PyQt4 import QtCore, QtGui |
919 | +from openlp.core.lib import translate |
920 | |
921 | class Ui_AmendThemeDialog(object): |
922 | def setupUi(self, AmendThemeDialog): |
923 | - AmendThemeDialog.setObjectName("AmendThemeDialog") |
924 | + AmendThemeDialog.setObjectName(u'AmendThemeDialog') |
925 | AmendThemeDialog.setWindowModality(QtCore.Qt.ApplicationModal) |
926 | AmendThemeDialog.resize(586, 651) |
927 | icon = QtGui.QIcon() |
928 | - icon.addPixmap(QtGui.QPixmap(":/icon/openlp-logo-16x16.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
929 | + icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
930 | AmendThemeDialog.setWindowIcon(icon) |
931 | AmendThemeDialog.setModal(True) |
932 | self.AmendThemeLayout = QtGui.QVBoxLayout(AmendThemeDialog) |
933 | self.AmendThemeLayout.setSpacing(8) |
934 | self.AmendThemeLayout.setMargin(8) |
935 | - self.AmendThemeLayout.setObjectName("AmendThemeLayout") |
936 | + self.AmendThemeLayout.setObjectName(u'AmendThemeLayout') |
937 | self.ThemeNameWidget = QtGui.QWidget(AmendThemeDialog) |
938 | - self.ThemeNameWidget.setObjectName("ThemeNameWidget") |
939 | + self.ThemeNameWidget.setObjectName(u'ThemeNameWidget') |
940 | self.ThemeNameLayout = QtGui.QHBoxLayout(self.ThemeNameWidget) |
941 | self.ThemeNameLayout.setSpacing(8) |
942 | self.ThemeNameLayout.setMargin(0) |
943 | - self.ThemeNameLayout.setObjectName("ThemeNameLayout") |
944 | + self.ThemeNameLayout.setObjectName(u'ThemeNameLayout') |
945 | self.ThemeNameLabel = QtGui.QLabel(self.ThemeNameWidget) |
946 | - self.ThemeNameLabel.setObjectName("ThemeNameLabel") |
947 | + self.ThemeNameLabel.setObjectName(u'ThemeNameLabel') |
948 | self.ThemeNameLayout.addWidget(self.ThemeNameLabel) |
949 | self.ThemeNameEdit = QtGui.QLineEdit(self.ThemeNameWidget) |
950 | - self.ThemeNameEdit.setObjectName("ThemeNameEdit") |
951 | + self.ThemeNameEdit.setObjectName(u'ThemeNameEdit') |
952 | self.ThemeNameLayout.addWidget(self.ThemeNameEdit) |
953 | self.AmendThemeLayout.addWidget(self.ThemeNameWidget) |
954 | self.ContentWidget = QtGui.QWidget(AmendThemeDialog) |
955 | - self.ContentWidget.setObjectName("ContentWidget") |
956 | + self.ContentWidget.setObjectName(u'ContentWidget') |
957 | self.ContentLayout = QtGui.QHBoxLayout(self.ContentWidget) |
958 | self.ContentLayout.setSpacing(8) |
959 | self.ContentLayout.setMargin(0) |
960 | - self.ContentLayout.setObjectName("ContentLayout") |
961 | + self.ContentLayout.setObjectName(u'ContentLayout') |
962 | self.ThemeTabWidget = QtGui.QTabWidget(self.ContentWidget) |
963 | - self.ThemeTabWidget.setObjectName("ThemeTabWidget") |
964 | + self.ThemeTabWidget.setObjectName(u'ThemeTabWidget') |
965 | self.BackgroundTab = QtGui.QWidget() |
966 | - self.BackgroundTab.setObjectName("BackgroundTab") |
967 | + self.BackgroundTab.setObjectName(u'BackgroundTab') |
968 | self.BackgroundLayout = QtGui.QFormLayout(self.BackgroundTab) |
969 | self.BackgroundLayout.setMargin(8) |
970 | self.BackgroundLayout.setSpacing(8) |
971 | - self.BackgroundLayout.setObjectName("BackgroundLayout") |
972 | + self.BackgroundLayout.setObjectName(u'BackgroundLayout') |
973 | self.BackgroundLabel = QtGui.QLabel(self.BackgroundTab) |
974 | - self.BackgroundLabel.setObjectName("BackgroundLabel") |
975 | + self.BackgroundLabel.setObjectName(u'BackgroundLabel') |
976 | self.BackgroundLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.BackgroundLabel) |
977 | self.BackgroundComboBox = QtGui.QComboBox(self.BackgroundTab) |
978 | - self.BackgroundComboBox.setObjectName("BackgroundComboBox") |
979 | + self.BackgroundComboBox.setObjectName(u'BackgroundComboBox') |
980 | self.BackgroundComboBox.addItem(QtCore.QString()) |
981 | self.BackgroundComboBox.addItem(QtCore.QString()) |
982 | self.BackgroundLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.BackgroundComboBox) |
983 | self.BackgroundTypeLabel = QtGui.QLabel(self.BackgroundTab) |
984 | - self.BackgroundTypeLabel.setObjectName("BackgroundTypeLabel") |
985 | + self.BackgroundTypeLabel.setObjectName(u'BackgroundTypeLabel') |
986 | self.BackgroundLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.BackgroundTypeLabel) |
987 | self.BackgroundTypeComboBox = QtGui.QComboBox(self.BackgroundTab) |
988 | - self.BackgroundTypeComboBox.setObjectName("BackgroundTypeComboBox") |
989 | + self.BackgroundTypeComboBox.setObjectName(u'BackgroundTypeComboBox') |
990 | self.BackgroundTypeComboBox.addItem(QtCore.QString()) |
991 | self.BackgroundTypeComboBox.addItem(QtCore.QString()) |
992 | self.BackgroundTypeComboBox.addItem(QtCore.QString()) |
993 | self.BackgroundLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.BackgroundTypeComboBox) |
994 | self.Color1Label = QtGui.QLabel(self.BackgroundTab) |
995 | - self.Color1Label.setObjectName("Color1Label") |
996 | + self.Color1Label.setObjectName(u'Color1Label') |
997 | self.BackgroundLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.Color1Label) |
998 | self.Color1PushButton = QtGui.QPushButton(self.BackgroundTab) |
999 | - self.Color1PushButton.setObjectName("Color1PushButton") |
1000 | + self.Color1PushButton.setObjectName(u'Color1PushButton') |
1001 | self.BackgroundLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.Color1PushButton) |
1002 | self.Color2Label = QtGui.QLabel(self.BackgroundTab) |
1003 | - self.Color2Label.setObjectName("Color2Label") |
1004 | + self.Color2Label.setObjectName(u'Color2Label') |
1005 | self.BackgroundLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.Color2Label) |
1006 | self.Color2PushButton = QtGui.QPushButton(self.BackgroundTab) |
1007 | - self.Color2PushButton.setObjectName("Color2PushButton") |
1008 | + self.Color2PushButton.setObjectName(u'Color2PushButton') |
1009 | self.BackgroundLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.Color2PushButton) |
1010 | self.ImageLabel = QtGui.QLabel(self.BackgroundTab) |
1011 | - self.ImageLabel.setObjectName("ImageLabel") |
1012 | + self.ImageLabel.setObjectName(u'ImageLabel') |
1013 | self.BackgroundLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.ImageLabel) |
1014 | self.GradientLabel = QtGui.QLabel(self.BackgroundTab) |
1015 | - self.GradientLabel.setObjectName("GradientLabel") |
1016 | + self.GradientLabel.setObjectName(u'GradientLabel') |
1017 | self.BackgroundLayout.setWidget(6, QtGui.QFormLayout.LabelRole, self.GradientLabel) |
1018 | self.GradientComboBox = QtGui.QComboBox(self.BackgroundTab) |
1019 | - self.GradientComboBox.setObjectName("GradientComboBox") |
1020 | + self.GradientComboBox.setObjectName(u'GradientComboBox') |
1021 | self.GradientComboBox.addItem(QtCore.QString()) |
1022 | self.GradientComboBox.addItem(QtCore.QString()) |
1023 | self.GradientComboBox.addItem(QtCore.QString()) |
1024 | self.BackgroundLayout.setWidget(6, QtGui.QFormLayout.FieldRole, self.GradientComboBox) |
1025 | self.ImageFilenameWidget = QtGui.QWidget(self.BackgroundTab) |
1026 | - self.ImageFilenameWidget.setObjectName("ImageFilenameWidget") |
1027 | + self.ImageFilenameWidget.setObjectName(u'ImageFilenameWidget') |
1028 | self.horizontalLayout_2 = QtGui.QHBoxLayout(self.ImageFilenameWidget) |
1029 | self.horizontalLayout_2.setSpacing(0) |
1030 | self.horizontalLayout_2.setMargin(0) |
1031 | - self.horizontalLayout_2.setObjectName("horizontalLayout_2") |
1032 | + self.horizontalLayout_2.setObjectName(u'horizontalLayout_2') |
1033 | self.ImageLineEdit = QtGui.QLineEdit(self.ImageFilenameWidget) |
1034 | - self.ImageLineEdit.setObjectName("ImageLineEdit") |
1035 | + self.ImageLineEdit.setObjectName(u'ImageLineEdit') |
1036 | self.horizontalLayout_2.addWidget(self.ImageLineEdit) |
1037 | self.ImageToolButton = QtGui.QToolButton(self.ImageFilenameWidget) |
1038 | icon1 = QtGui.QIcon() |
1039 | - icon1.addPixmap(QtGui.QPixmap(":/images/image_load.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
1040 | + icon1.addPixmap(QtGui.QPixmap(u':/images/image_load.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
1041 | self.ImageToolButton.setIcon(icon1) |
1042 | - self.ImageToolButton.setObjectName("ImageToolButton") |
1043 | + self.ImageToolButton.setObjectName(u'ImageToolButton') |
1044 | self.horizontalLayout_2.addWidget(self.ImageToolButton) |
1045 | self.BackgroundLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.ImageFilenameWidget) |
1046 | spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
1047 | #self.BackgroundLayout.addItem(spacerItem, 7, 1, 1, 1) |
1048 | - self.ThemeTabWidget.addTab(self.BackgroundTab, "") |
1049 | + self.ThemeTabWidget.addTab(self.BackgroundTab, u'') |
1050 | self.FontMainTab = QtGui.QWidget() |
1051 | - self.FontMainTab.setObjectName("FontMainTab") |
1052 | + self.FontMainTab.setObjectName(u'FontMainTab') |
1053 | self.FontMainLayout = QtGui.QHBoxLayout(self.FontMainTab) |
1054 | self.FontMainLayout.setSpacing(8) |
1055 | self.FontMainLayout.setMargin(8) |
1056 | - self.FontMainLayout.setObjectName("FontMainLayout") |
1057 | + self.FontMainLayout.setObjectName(u'FontMainLayout') |
1058 | self.MainLeftWidget = QtGui.QWidget(self.FontMainTab) |
1059 | - self.MainLeftWidget.setObjectName("MainLeftWidget") |
1060 | + self.MainLeftWidget.setObjectName(u'MainLeftWidget') |
1061 | self.MainLeftLayout = QtGui.QVBoxLayout(self.MainLeftWidget) |
1062 | self.MainLeftLayout.setSpacing(8) |
1063 | self.MainLeftLayout.setMargin(0) |
1064 | - self.MainLeftLayout.setObjectName("MainLeftLayout") |
1065 | + self.MainLeftLayout.setObjectName(u'MainLeftLayout') |
1066 | self.FontMainGroupBox = QtGui.QGroupBox(self.MainLeftWidget) |
1067 | - self.FontMainGroupBox.setObjectName("FontMainGroupBox") |
1068 | + self.FontMainGroupBox.setObjectName(u'FontMainGroupBox') |
1069 | self.MainFontLayout = QtGui.QFormLayout(self.FontMainGroupBox) |
1070 | self.MainFontLayout.setFormAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) |
1071 | self.MainFontLayout.setMargin(8) |
1072 | self.MainFontLayout.setSpacing(8) |
1073 | - self.MainFontLayout.setObjectName("MainFontLayout") |
1074 | + self.MainFontLayout.setObjectName(u'MainFontLayout') |
1075 | self.FontMainlabel = QtGui.QLabel(self.FontMainGroupBox) |
1076 | - self.FontMainlabel.setObjectName("FontMainlabel") |
1077 | + self.FontMainlabel.setObjectName(u'FontMainlabel') |
1078 | self.MainFontLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.FontMainlabel) |
1079 | self.FontMainComboBox = QtGui.QFontComboBox(self.FontMainGroupBox) |
1080 | - self.FontMainComboBox.setObjectName("FontMainComboBox") |
1081 | + self.FontMainComboBox.setObjectName(u'FontMainComboBox') |
1082 | self.MainFontLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.FontMainComboBox) |
1083 | self.FontMainColorLabel = QtGui.QLabel(self.FontMainGroupBox) |
1084 | - self.FontMainColorLabel.setObjectName("FontMainColorLabel") |
1085 | + self.FontMainColorLabel.setObjectName(u'FontMainColorLabel') |
1086 | self.MainFontLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.FontMainColorLabel) |
1087 | self.FontMainColorPushButton = QtGui.QPushButton(self.FontMainGroupBox) |
1088 | - self.FontMainColorPushButton.setObjectName("FontMainColorPushButton") |
1089 | + self.FontMainColorPushButton.setObjectName(u'FontMainColorPushButton') |
1090 | self.MainFontLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.FontMainColorPushButton) |
1091 | self.FontMainSize = QtGui.QLabel(self.FontMainGroupBox) |
1092 | - self.FontMainSize.setObjectName("FontMainSize") |
1093 | + self.FontMainSize.setObjectName(u'FontMainSize') |
1094 | self.MainFontLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.FontMainSize) |
1095 | self.FontMainSizeSpinBox = QtGui.QSpinBox(self.FontMainGroupBox) |
1096 | sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) |
1097 | @@ -150,44 +161,44 @@ |
1098 | sizePolicy.setHeightForWidth(self.FontMainSizeSpinBox.sizePolicy().hasHeightForWidth()) |
1099 | self.FontMainSizeSpinBox.setSizePolicy(sizePolicy) |
1100 | self.FontMainSizeSpinBox.setMinimumSize(QtCore.QSize(70, 0)) |
1101 | - self.FontMainSizeSpinBox.setProperty("value", QtCore.QVariant(16)) |
1102 | + self.FontMainSizeSpinBox.setProperty(u'value', QtCore.QVariant(16)) |
1103 | self.FontMainSizeSpinBox.setMaximum(999) |
1104 | - self.FontMainSizeSpinBox.setObjectName("FontMainSizeSpinBox") |
1105 | + self.FontMainSizeSpinBox.setObjectName(u'FontMainSizeSpinBox') |
1106 | self.MainFontLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.FontMainSizeSpinBox) |
1107 | self.MainLeftLayout.addWidget(self.FontMainGroupBox) |
1108 | spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
1109 | self.MainLeftLayout.addItem(spacerItem1) |
1110 | self.FontMainLayout.addWidget(self.MainLeftWidget) |
1111 | self.MainRightWidget = QtGui.QWidget(self.FontMainTab) |
1112 | - self.MainRightWidget.setObjectName("MainRightWidget") |
1113 | + self.MainRightWidget.setObjectName(u'MainRightWidget') |
1114 | self.MainRightLayout = QtGui.QVBoxLayout(self.MainRightWidget) |
1115 | self.MainRightLayout.setSpacing(8) |
1116 | self.MainRightLayout.setMargin(0) |
1117 | - self.MainRightLayout.setObjectName("MainRightLayout") |
1118 | + self.MainRightLayout.setObjectName(u'MainRightLayout') |
1119 | self.MainLocationGroupBox = QtGui.QGroupBox(self.MainRightWidget) |
1120 | - self.MainLocationGroupBox.setObjectName("MainLocationGroupBox") |
1121 | + self.MainLocationGroupBox.setObjectName(u'MainLocationGroupBox') |
1122 | self.MainLocationLayout = QtGui.QFormLayout(self.MainLocationGroupBox) |
1123 | self.MainLocationLayout.setMargin(8) |
1124 | self.MainLocationLayout.setSpacing(8) |
1125 | - self.MainLocationLayout.setObjectName("MainLocationLayout") |
1126 | + self.MainLocationLayout.setObjectName(u'MainLocationLayout') |
1127 | self.DefaultLocationLabel = QtGui.QLabel(self.MainLocationGroupBox) |
1128 | - self.DefaultLocationLabel.setObjectName("DefaultLocationLabel") |
1129 | + self.DefaultLocationLabel.setObjectName(u'DefaultLocationLabel') |
1130 | self.MainLocationLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.DefaultLocationLabel) |
1131 | self.FontMainDefaultCheckBox = QtGui.QCheckBox(self.MainLocationGroupBox) |
1132 | self.FontMainDefaultCheckBox.setTristate(False) |
1133 | - self.FontMainDefaultCheckBox.setObjectName("FontMainDefaultCheckBox") |
1134 | + self.FontMainDefaultCheckBox.setObjectName(u'FontMainDefaultCheckBox') |
1135 | self.MainLocationLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.FontMainDefaultCheckBox) |
1136 | self.FontMainXLabel = QtGui.QLabel(self.MainLocationGroupBox) |
1137 | - self.FontMainXLabel.setObjectName("FontMainXLabel") |
1138 | + self.FontMainXLabel.setObjectName(u'FontMainXLabel') |
1139 | self.MainLocationLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.FontMainXLabel) |
1140 | self.FontMainYLabel = QtGui.QLabel(self.MainLocationGroupBox) |
1141 | - self.FontMainYLabel.setObjectName("FontMainYLabel") |
1142 | + self.FontMainYLabel.setObjectName(u'FontMainYLabel') |
1143 | self.MainLocationLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.FontMainYLabel) |
1144 | self.FontMainWidthLabel = QtGui.QLabel(self.MainLocationGroupBox) |
1145 | - self.FontMainWidthLabel.setObjectName("FontMainWidthLabel") |
1146 | + self.FontMainWidthLabel.setObjectName(u'FontMainWidthLabel') |
1147 | self.MainLocationLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.FontMainWidthLabel) |
1148 | self.FontMainHeightLabel = QtGui.QLabel(self.MainLocationGroupBox) |
1149 | - self.FontMainHeightLabel.setObjectName("FontMainHeightLabel") |
1150 | + self.FontMainHeightLabel.setObjectName(u'FontMainHeightLabel') |
1151 | self.MainLocationLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.FontMainHeightLabel) |
1152 | self.FontMainXSpinBox = QtGui.QSpinBox(self.MainLocationGroupBox) |
1153 | sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) |
1154 | @@ -196,9 +207,9 @@ |
1155 | sizePolicy.setHeightForWidth(self.FontMainXSpinBox.sizePolicy().hasHeightForWidth()) |
1156 | self.FontMainXSpinBox.setSizePolicy(sizePolicy) |
1157 | self.FontMainXSpinBox.setMinimumSize(QtCore.QSize(78, 0)) |
1158 | - self.FontMainXSpinBox.setProperty("value", QtCore.QVariant(0)) |
1159 | + self.FontMainXSpinBox.setProperty(u'value', QtCore.QVariant(0)) |
1160 | self.FontMainXSpinBox.setMaximum(9999) |
1161 | - self.FontMainXSpinBox.setObjectName("FontMainXSpinBox") |
1162 | + self.FontMainXSpinBox.setObjectName(u'FontMainXSpinBox') |
1163 | self.MainLocationLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.FontMainXSpinBox) |
1164 | self.FontMainYSpinBox = QtGui.QSpinBox(self.MainLocationGroupBox) |
1165 | sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) |
1166 | @@ -208,7 +219,7 @@ |
1167 | self.FontMainYSpinBox.setSizePolicy(sizePolicy) |
1168 | self.FontMainYSpinBox.setMinimumSize(QtCore.QSize(78, 0)) |
1169 | self.FontMainYSpinBox.setMaximum(9999) |
1170 | - self.FontMainYSpinBox.setObjectName("FontMainYSpinBox") |
1171 | + self.FontMainYSpinBox.setObjectName(u'FontMainYSpinBox') |
1172 | self.MainLocationLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.FontMainYSpinBox) |
1173 | self.FontMainWidthSpinBox = QtGui.QSpinBox(self.MainLocationGroupBox) |
1174 | sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) |
1175 | @@ -218,7 +229,7 @@ |
1176 | self.FontMainWidthSpinBox.setSizePolicy(sizePolicy) |
1177 | self.FontMainWidthSpinBox.setMinimumSize(QtCore.QSize(78, 0)) |
1178 | self.FontMainWidthSpinBox.setMaximum(9999) |
1179 | - self.FontMainWidthSpinBox.setObjectName("FontMainWidthSpinBox") |
1180 | + self.FontMainWidthSpinBox.setObjectName(u'FontMainWidthSpinBox') |
1181 | self.MainLocationLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.FontMainWidthSpinBox) |
1182 | self.FontMainHeightSpinBox = QtGui.QSpinBox(self.MainLocationGroupBox) |
1183 | sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) |
1184 | @@ -228,47 +239,47 @@ |
1185 | self.FontMainHeightSpinBox.setSizePolicy(sizePolicy) |
1186 | self.FontMainHeightSpinBox.setMinimumSize(QtCore.QSize(78, 0)) |
1187 | self.FontMainHeightSpinBox.setMaximum(9999) |
1188 | - self.FontMainHeightSpinBox.setObjectName("FontMainHeightSpinBox") |
1189 | + self.FontMainHeightSpinBox.setObjectName(u'FontMainHeightSpinBox') |
1190 | self.MainLocationLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.FontMainHeightSpinBox) |
1191 | self.MainRightLayout.addWidget(self.MainLocationGroupBox) |
1192 | spacerItem2 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
1193 | self.MainRightLayout.addItem(spacerItem2) |
1194 | self.FontMainLayout.addWidget(self.MainRightWidget) |
1195 | - self.ThemeTabWidget.addTab(self.FontMainTab, "") |
1196 | + self.ThemeTabWidget.addTab(self.FontMainTab, u'') |
1197 | self.FontFooterTab = QtGui.QWidget() |
1198 | - self.FontFooterTab.setObjectName("FontFooterTab") |
1199 | + self.FontFooterTab.setObjectName(u'FontFooterTab') |
1200 | self.FontFooterLayout = QtGui.QHBoxLayout(self.FontFooterTab) |
1201 | self.FontFooterLayout.setSpacing(8) |
1202 | self.FontFooterLayout.setMargin(8) |
1203 | - self.FontFooterLayout.setObjectName("FontFooterLayout") |
1204 | + self.FontFooterLayout.setObjectName(u'FontFooterLayout') |
1205 | self.FooterLeftWidget = QtGui.QWidget(self.FontFooterTab) |
1206 | - self.FooterLeftWidget.setObjectName("FooterLeftWidget") |
1207 | + self.FooterLeftWidget.setObjectName(u'FooterLeftWidget') |
1208 | self.FooterLeftLayout = QtGui.QVBoxLayout(self.FooterLeftWidget) |
1209 | self.FooterLeftLayout.setSpacing(8) |
1210 | self.FooterLeftLayout.setMargin(0) |
1211 | - self.FooterLeftLayout.setObjectName("FooterLeftLayout") |
1212 | + self.FooterLeftLayout.setObjectName(u'FooterLeftLayout') |
1213 | self.FooterFontGroupBox = QtGui.QGroupBox(self.FooterLeftWidget) |
1214 | - self.FooterFontGroupBox.setObjectName("FooterFontGroupBox") |
1215 | + self.FooterFontGroupBox.setObjectName(u'FooterFontGroupBox') |
1216 | self.FooterFontLayout = QtGui.QFormLayout(self.FooterFontGroupBox) |
1217 | self.FooterFontLayout.setFieldGrowthPolicy(QtGui.QFormLayout.ExpandingFieldsGrow) |
1218 | self.FooterFontLayout.setFormAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) |
1219 | self.FooterFontLayout.setMargin(8) |
1220 | self.FooterFontLayout.setSpacing(8) |
1221 | - self.FooterFontLayout.setObjectName("FooterFontLayout") |
1222 | + self.FooterFontLayout.setObjectName(u'FooterFontLayout') |
1223 | self.FontFooterLabel = QtGui.QLabel(self.FooterFontGroupBox) |
1224 | - self.FontFooterLabel.setObjectName("FontFooterLabel") |
1225 | + self.FontFooterLabel.setObjectName(u'FontFooterLabel') |
1226 | self.FooterFontLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.FontFooterLabel) |
1227 | self.FontFooterComboBox = QtGui.QFontComboBox(self.FooterFontGroupBox) |
1228 | - self.FontFooterComboBox.setObjectName("FontFooterComboBox") |
1229 | + self.FontFooterComboBox.setObjectName(u'FontFooterComboBox') |
1230 | self.FooterFontLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.FontFooterComboBox) |
1231 | self.FontFooterColorLabel = QtGui.QLabel(self.FooterFontGroupBox) |
1232 | - self.FontFooterColorLabel.setObjectName("FontFooterColorLabel") |
1233 | + self.FontFooterColorLabel.setObjectName(u'FontFooterColorLabel') |
1234 | self.FooterFontLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.FontFooterColorLabel) |
1235 | self.FontFooterColorPushButton = QtGui.QPushButton(self.FooterFontGroupBox) |
1236 | - self.FontFooterColorPushButton.setObjectName("FontFooterColorPushButton") |
1237 | + self.FontFooterColorPushButton.setObjectName(u'FontFooterColorPushButton') |
1238 | self.FooterFontLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.FontFooterColorPushButton) |
1239 | self.FontFooterSizeLabel = QtGui.QLabel(self.FooterFontGroupBox) |
1240 | - self.FontFooterSizeLabel.setObjectName("FontFooterSizeLabel") |
1241 | + self.FontFooterSizeLabel.setObjectName(u'FontFooterSizeLabel') |
1242 | self.FooterFontLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.FontFooterSizeLabel) |
1243 | self.FontFooterSizeSpinBox = QtGui.QSpinBox(self.FooterFontGroupBox) |
1244 | sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) |
1245 | @@ -277,46 +288,46 @@ |
1246 | sizePolicy.setHeightForWidth(self.FontFooterSizeSpinBox.sizePolicy().hasHeightForWidth()) |
1247 | self.FontFooterSizeSpinBox.setSizePolicy(sizePolicy) |
1248 | self.FontFooterSizeSpinBox.setMinimumSize(QtCore.QSize(70, 0)) |
1249 | - self.FontFooterSizeSpinBox.setProperty("value", QtCore.QVariant(10)) |
1250 | + self.FontFooterSizeSpinBox.setProperty(u'value', QtCore.QVariant(10)) |
1251 | self.FontFooterSizeSpinBox.setMaximum(999) |
1252 | - self.FontFooterSizeSpinBox.setObjectName("FontFooterSizeSpinBox") |
1253 | + self.FontFooterSizeSpinBox.setObjectName(u'FontFooterSizeSpinBox') |
1254 | self.FooterFontLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.FontFooterSizeSpinBox) |
1255 | self.FooterLeftLayout.addWidget(self.FooterFontGroupBox) |
1256 | spacerItem3 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
1257 | self.FooterLeftLayout.addItem(spacerItem3) |
1258 | self.FontFooterLayout.addWidget(self.FooterLeftWidget) |
1259 | self.FooterRightWidget = QtGui.QWidget(self.FontFooterTab) |
1260 | - self.FooterRightWidget.setObjectName("FooterRightWidget") |
1261 | + self.FooterRightWidget.setObjectName(u'FooterRightWidget') |
1262 | self.FooterRightLayout = QtGui.QVBoxLayout(self.FooterRightWidget) |
1263 | self.FooterRightLayout.setSpacing(8) |
1264 | self.FooterRightLayout.setMargin(0) |
1265 | - self.FooterRightLayout.setObjectName("FooterRightLayout") |
1266 | + self.FooterRightLayout.setObjectName(u'FooterRightLayout') |
1267 | self.LocationFooterGroupBox = QtGui.QGroupBox(self.FooterRightWidget) |
1268 | - self.LocationFooterGroupBox.setObjectName("LocationFooterGroupBox") |
1269 | + self.LocationFooterGroupBox.setObjectName(u'LocationFooterGroupBox') |
1270 | self.LocationFooterLayout = QtGui.QFormLayout(self.LocationFooterGroupBox) |
1271 | self.LocationFooterLayout.setFieldGrowthPolicy(QtGui.QFormLayout.ExpandingFieldsGrow) |
1272 | self.LocationFooterLayout.setFormAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) |
1273 | self.LocationFooterLayout.setMargin(8) |
1274 | self.LocationFooterLayout.setSpacing(8) |
1275 | - self.LocationFooterLayout.setObjectName("LocationFooterLayout") |
1276 | + self.LocationFooterLayout.setObjectName(u'LocationFooterLayout') |
1277 | self.FontFooterDefaultLabel = QtGui.QLabel(self.LocationFooterGroupBox) |
1278 | - self.FontFooterDefaultLabel.setObjectName("FontFooterDefaultLabel") |
1279 | + self.FontFooterDefaultLabel.setObjectName(u'FontFooterDefaultLabel') |
1280 | self.LocationFooterLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.FontFooterDefaultLabel) |
1281 | self.FontFooterDefaultCheckBox = QtGui.QCheckBox(self.LocationFooterGroupBox) |
1282 | self.FontFooterDefaultCheckBox.setTristate(False) |
1283 | - self.FontFooterDefaultCheckBox.setObjectName("FontFooterDefaultCheckBox") |
1284 | + self.FontFooterDefaultCheckBox.setObjectName(u'FontFooterDefaultCheckBox') |
1285 | self.LocationFooterLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.FontFooterDefaultCheckBox) |
1286 | self.FontFooterXLabel = QtGui.QLabel(self.LocationFooterGroupBox) |
1287 | - self.FontFooterXLabel.setObjectName("FontFooterXLabel") |
1288 | + self.FontFooterXLabel.setObjectName(u'FontFooterXLabel') |
1289 | self.LocationFooterLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.FontFooterXLabel) |
1290 | self.FontFooterYLabel = QtGui.QLabel(self.LocationFooterGroupBox) |
1291 | - self.FontFooterYLabel.setObjectName("FontFooterYLabel") |
1292 | + self.FontFooterYLabel.setObjectName(u'FontFooterYLabel') |
1293 | self.LocationFooterLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.FontFooterYLabel) |
1294 | self.FontFooterWidthLabel = QtGui.QLabel(self.LocationFooterGroupBox) |
1295 | - self.FontFooterWidthLabel.setObjectName("FontFooterWidthLabel") |
1296 | + self.FontFooterWidthLabel.setObjectName(u'FontFooterWidthLabel') |
1297 | self.LocationFooterLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.FontFooterWidthLabel) |
1298 | self.FontFooterHeightLabel = QtGui.QLabel(self.LocationFooterGroupBox) |
1299 | - self.FontFooterHeightLabel.setObjectName("FontFooterHeightLabel") |
1300 | + self.FontFooterHeightLabel.setObjectName(u'FontFooterHeightLabel') |
1301 | self.LocationFooterLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.FontFooterHeightLabel) |
1302 | self.FontFooterXSpinBox = QtGui.QSpinBox(self.LocationFooterGroupBox) |
1303 | sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) |
1304 | @@ -325,9 +336,9 @@ |
1305 | sizePolicy.setHeightForWidth(self.FontFooterXSpinBox.sizePolicy().hasHeightForWidth()) |
1306 | self.FontFooterXSpinBox.setSizePolicy(sizePolicy) |
1307 | self.FontFooterXSpinBox.setMinimumSize(QtCore.QSize(78, 0)) |
1308 | - self.FontFooterXSpinBox.setProperty("value", QtCore.QVariant(0)) |
1309 | + self.FontFooterXSpinBox.setProperty(u'value', QtCore.QVariant(0)) |
1310 | self.FontFooterXSpinBox.setMaximum(9999) |
1311 | - self.FontFooterXSpinBox.setObjectName("FontFooterXSpinBox") |
1312 | + self.FontFooterXSpinBox.setObjectName(u'FontFooterXSpinBox') |
1313 | self.LocationFooterLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.FontFooterXSpinBox) |
1314 | self.FontFooterYSpinBox = QtGui.QSpinBox(self.LocationFooterGroupBox) |
1315 | sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) |
1316 | @@ -336,79 +347,79 @@ |
1317 | sizePolicy.setHeightForWidth(self.FontFooterYSpinBox.sizePolicy().hasHeightForWidth()) |
1318 | self.FontFooterYSpinBox.setSizePolicy(sizePolicy) |
1319 | self.FontFooterYSpinBox.setMinimumSize(QtCore.QSize(78, 0)) |
1320 | - self.FontFooterYSpinBox.setProperty("value", QtCore.QVariant(0)) |
1321 | + self.FontFooterYSpinBox.setProperty(u'value', QtCore.QVariant(0)) |
1322 | self.FontFooterYSpinBox.setMaximum(9999) |
1323 | - self.FontFooterYSpinBox.setObjectName("FontFooterYSpinBox") |
1324 | + self.FontFooterYSpinBox.setObjectName(u'FontFooterYSpinBox') |
1325 | self.LocationFooterLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.FontFooterYSpinBox) |
1326 | self.FontFooterWidthSpinBox = QtGui.QSpinBox(self.LocationFooterGroupBox) |
1327 | self.FontFooterWidthSpinBox.setMinimumSize(QtCore.QSize(78, 0)) |
1328 | self.FontFooterWidthSpinBox.setMaximum(9999) |
1329 | - self.FontFooterWidthSpinBox.setObjectName("FontFooterWidthSpinBox") |
1330 | + self.FontFooterWidthSpinBox.setObjectName(u'FontFooterWidthSpinBox') |
1331 | self.LocationFooterLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.FontFooterWidthSpinBox) |
1332 | self.FontFooterHeightSpinBox = QtGui.QSpinBox(self.LocationFooterGroupBox) |
1333 | self.FontFooterHeightSpinBox.setMinimumSize(QtCore.QSize(78, 0)) |
1334 | self.FontFooterHeightSpinBox.setMaximum(9999) |
1335 | - self.FontFooterHeightSpinBox.setObjectName("FontFooterHeightSpinBox") |
1336 | + self.FontFooterHeightSpinBox.setObjectName(u'FontFooterHeightSpinBox') |
1337 | self.LocationFooterLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.FontFooterHeightSpinBox) |
1338 | self.FooterRightLayout.addWidget(self.LocationFooterGroupBox) |
1339 | spacerItem4 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
1340 | self.FooterRightLayout.addItem(spacerItem4) |
1341 | self.FontFooterLayout.addWidget(self.FooterRightWidget) |
1342 | - self.ThemeTabWidget.addTab(self.FontFooterTab, "") |
1343 | + self.ThemeTabWidget.addTab(self.FontFooterTab, u'') |
1344 | self.OtherOptionsTab = QtGui.QWidget() |
1345 | - self.OtherOptionsTab.setObjectName("OtherOptionsTab") |
1346 | + self.OtherOptionsTab.setObjectName(u'OtherOptionsTab') |
1347 | self.OtherOptionsLayout = QtGui.QHBoxLayout(self.OtherOptionsTab) |
1348 | self.OtherOptionsLayout.setSpacing(8) |
1349 | self.OtherOptionsLayout.setMargin(8) |
1350 | - self.OtherOptionsLayout.setObjectName("OtherOptionsLayout") |
1351 | + self.OtherOptionsLayout.setObjectName(u'OtherOptionsLayout') |
1352 | self.OptionsLeftWidget = QtGui.QWidget(self.OtherOptionsTab) |
1353 | - self.OptionsLeftWidget.setObjectName("OptionsLeftWidget") |
1354 | + self.OptionsLeftWidget.setObjectName(u'OptionsLeftWidget') |
1355 | self.OptionsLeftLayout = QtGui.QVBoxLayout(self.OptionsLeftWidget) |
1356 | self.OptionsLeftLayout.setSpacing(8) |
1357 | self.OptionsLeftLayout.setMargin(0) |
1358 | - self.OptionsLeftLayout.setObjectName("OptionsLeftLayout") |
1359 | + self.OptionsLeftLayout.setObjectName(u'OptionsLeftLayout') |
1360 | self.ShadowGroupBox = QtGui.QGroupBox(self.OptionsLeftWidget) |
1361 | - self.ShadowGroupBox.setObjectName("ShadowGroupBox") |
1362 | + self.ShadowGroupBox.setObjectName(u'ShadowGroupBox') |
1363 | self.verticalLayout = QtGui.QVBoxLayout(self.ShadowGroupBox) |
1364 | self.verticalLayout.setSpacing(8) |
1365 | self.verticalLayout.setMargin(8) |
1366 | - self.verticalLayout.setObjectName("verticalLayout") |
1367 | + self.verticalLayout.setObjectName(u'verticalLayout') |
1368 | self.OutlineWidget = QtGui.QWidget(self.ShadowGroupBox) |
1369 | - self.OutlineWidget.setObjectName("OutlineWidget") |
1370 | + self.OutlineWidget.setObjectName(u'OutlineWidget') |
1371 | self.OutlineLayout = QtGui.QFormLayout(self.OutlineWidget) |
1372 | self.OutlineLayout.setMargin(0) |
1373 | self.OutlineLayout.setSpacing(8) |
1374 | - self.OutlineLayout.setObjectName("OutlineLayout") |
1375 | + self.OutlineLayout.setObjectName(u'OutlineLayout') |
1376 | self.OutlineCheckBox = QtGui.QCheckBox(self.OutlineWidget) |
1377 | - self.OutlineCheckBox.setObjectName("OutlineCheckBox") |
1378 | + self.OutlineCheckBox.setObjectName(u'OutlineCheckBox') |
1379 | self.OutlineLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.OutlineCheckBox) |
1380 | self.OutlineColorLabel = QtGui.QLabel(self.OutlineWidget) |
1381 | - self.OutlineColorLabel.setObjectName("OutlineColorLabel") |
1382 | + self.OutlineColorLabel.setObjectName(u'OutlineColorLabel') |
1383 | self.OutlineLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.OutlineColorLabel) |
1384 | self.OutlineColorPushButton = QtGui.QPushButton(self.OutlineWidget) |
1385 | - self.OutlineColorPushButton.setObjectName("OutlineColorPushButton") |
1386 | + self.OutlineColorPushButton.setObjectName(u'OutlineColorPushButton') |
1387 | self.OutlineLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.OutlineColorPushButton) |
1388 | self.OutlineEnabledLabel = QtGui.QLabel(self.OutlineWidget) |
1389 | - self.OutlineEnabledLabel.setObjectName("OutlineEnabledLabel") |
1390 | + self.OutlineEnabledLabel.setObjectName(u'OutlineEnabledLabel') |
1391 | self.OutlineLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.OutlineEnabledLabel) |
1392 | self.verticalLayout.addWidget(self.OutlineWidget) |
1393 | self.ShadowWidget = QtGui.QWidget(self.ShadowGroupBox) |
1394 | - self.ShadowWidget.setObjectName("ShadowWidget") |
1395 | + self.ShadowWidget.setObjectName(u'ShadowWidget') |
1396 | self.ShadowLayout = QtGui.QFormLayout(self.ShadowWidget) |
1397 | self.ShadowLayout.setMargin(0) |
1398 | self.ShadowLayout.setSpacing(8) |
1399 | - self.ShadowLayout.setObjectName("ShadowLayout") |
1400 | + self.ShadowLayout.setObjectName(u'ShadowLayout') |
1401 | self.ShadowCheckBox = QtGui.QCheckBox(self.ShadowWidget) |
1402 | - self.ShadowCheckBox.setObjectName("ShadowCheckBox") |
1403 | + self.ShadowCheckBox.setObjectName(u'ShadowCheckBox') |
1404 | self.ShadowLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.ShadowCheckBox) |
1405 | self.ShadowColorLabel = QtGui.QLabel(self.ShadowWidget) |
1406 | - self.ShadowColorLabel.setObjectName("ShadowColorLabel") |
1407 | + self.ShadowColorLabel.setObjectName(u'ShadowColorLabel') |
1408 | self.ShadowLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.ShadowColorLabel) |
1409 | self.ShadowColorPushButton = QtGui.QPushButton(self.ShadowWidget) |
1410 | - self.ShadowColorPushButton.setObjectName("ShadowColorPushButton") |
1411 | + self.ShadowColorPushButton.setObjectName(u'ShadowColorPushButton') |
1412 | self.ShadowLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.ShadowColorPushButton) |
1413 | self.ShadowEnabledLabel = QtGui.QLabel(self.ShadowWidget) |
1414 | - self.ShadowEnabledLabel.setObjectName("ShadowEnabledLabel") |
1415 | + self.ShadowEnabledLabel.setObjectName(u'ShadowEnabledLabel') |
1416 | self.ShadowLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.ShadowEnabledLabel) |
1417 | self.verticalLayout.addWidget(self.ShadowWidget) |
1418 | self.OptionsLeftLayout.addWidget(self.ShadowGroupBox) |
1419 | @@ -416,29 +427,29 @@ |
1420 | self.OptionsLeftLayout.addItem(spacerItem5) |
1421 | self.OtherOptionsLayout.addWidget(self.OptionsLeftWidget) |
1422 | self.OptionsRightWidget = QtGui.QWidget(self.OtherOptionsTab) |
1423 | - self.OptionsRightWidget.setObjectName("OptionsRightWidget") |
1424 | + self.OptionsRightWidget.setObjectName(u'OptionsRightWidget') |
1425 | self.OptionsRightLayout = QtGui.QVBoxLayout(self.OptionsRightWidget) |
1426 | self.OptionsRightLayout.setSpacing(8) |
1427 | self.OptionsRightLayout.setMargin(0) |
1428 | - self.OptionsRightLayout.setObjectName("OptionsRightLayout") |
1429 | + self.OptionsRightLayout.setObjectName(u'OptionsRightLayout') |
1430 | self.AlignmentGroupBox = QtGui.QGroupBox(self.OptionsRightWidget) |
1431 | - self.AlignmentGroupBox.setObjectName("AlignmentGroupBox") |
1432 | + self.AlignmentGroupBox.setObjectName(u'AlignmentGroupBox') |
1433 | self.gridLayout_4 = QtGui.QGridLayout(self.AlignmentGroupBox) |
1434 | - self.gridLayout_4.setObjectName("gridLayout_4") |
1435 | + self.gridLayout_4.setObjectName(u'gridLayout_4') |
1436 | self.HorizontalLabel = QtGui.QLabel(self.AlignmentGroupBox) |
1437 | - self.HorizontalLabel.setObjectName("HorizontalLabel") |
1438 | + self.HorizontalLabel.setObjectName(u'HorizontalLabel') |
1439 | self.gridLayout_4.addWidget(self.HorizontalLabel, 0, 0, 1, 1) |
1440 | self.HorizontalComboBox = QtGui.QComboBox(self.AlignmentGroupBox) |
1441 | - self.HorizontalComboBox.setObjectName("HorizontalComboBox") |
1442 | + self.HorizontalComboBox.setObjectName(u'HorizontalComboBox') |
1443 | self.HorizontalComboBox.addItem(QtCore.QString()) |
1444 | self.HorizontalComboBox.addItem(QtCore.QString()) |
1445 | self.HorizontalComboBox.addItem(QtCore.QString()) |
1446 | self.gridLayout_4.addWidget(self.HorizontalComboBox, 0, 1, 1, 1) |
1447 | self.VerticalLabel = QtGui.QLabel(self.AlignmentGroupBox) |
1448 | - self.VerticalLabel.setObjectName("VerticalLabel") |
1449 | + self.VerticalLabel.setObjectName(u'VerticalLabel') |
1450 | self.gridLayout_4.addWidget(self.VerticalLabel, 1, 0, 1, 1) |
1451 | self.VerticalComboBox = QtGui.QComboBox(self.AlignmentGroupBox) |
1452 | - self.VerticalComboBox.setObjectName("VerticalComboBox") |
1453 | + self.VerticalComboBox.setObjectName(u'VerticalComboBox') |
1454 | self.VerticalComboBox.addItem(QtCore.QString()) |
1455 | self.VerticalComboBox.addItem(QtCore.QString()) |
1456 | self.VerticalComboBox.addItem(QtCore.QString()) |
1457 | @@ -447,15 +458,15 @@ |
1458 | spacerItem6 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
1459 | self.OptionsRightLayout.addItem(spacerItem6) |
1460 | self.OtherOptionsLayout.addWidget(self.OptionsRightWidget) |
1461 | - self.ThemeTabWidget.addTab(self.OtherOptionsTab, "") |
1462 | + self.ThemeTabWidget.addTab(self.OtherOptionsTab, u'') |
1463 | self.ContentLayout.addWidget(self.ThemeTabWidget) |
1464 | self.AmendThemeLayout.addWidget(self.ContentWidget) |
1465 | self.PreviewGroupBox = QtGui.QGroupBox(AmendThemeDialog) |
1466 | - self.PreviewGroupBox.setObjectName("PreviewGroupBox") |
1467 | + self.PreviewGroupBox.setObjectName(u'PreviewGroupBox') |
1468 | self.ThemePreviewLayout = QtGui.QHBoxLayout(self.PreviewGroupBox) |
1469 | self.ThemePreviewLayout.setSpacing(8) |
1470 | self.ThemePreviewLayout.setMargin(8) |
1471 | - self.ThemePreviewLayout.setObjectName("ThemePreviewLayout") |
1472 | + self.ThemePreviewLayout.setObjectName(u'ThemePreviewLayout') |
1473 | spacerItem7 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) |
1474 | self.ThemePreviewLayout.addItem(spacerItem7) |
1475 | self.ThemePreview = QtGui.QLabel(self.PreviewGroupBox) |
1476 | @@ -469,20 +480,20 @@ |
1477 | self.ThemePreview.setFrameShadow(QtGui.QFrame.Sunken) |
1478 | self.ThemePreview.setLineWidth(1) |
1479 | self.ThemePreview.setScaledContents(True) |
1480 | - self.ThemePreview.setObjectName("ThemePreview") |
1481 | + self.ThemePreview.setObjectName(u'ThemePreview') |
1482 | self.ThemePreviewLayout.addWidget(self.ThemePreview) |
1483 | spacerItem8 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) |
1484 | self.ThemePreviewLayout.addItem(spacerItem8) |
1485 | self.AmendThemeLayout.addWidget(self.PreviewGroupBox) |
1486 | self.ThemeButtonBox = QtGui.QDialogButtonBox(AmendThemeDialog) |
1487 | self.ThemeButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok) |
1488 | - self.ThemeButtonBox.setObjectName("ThemeButtonBox") |
1489 | + self.ThemeButtonBox.setObjectName(u'ThemeButtonBox') |
1490 | self.AmendThemeLayout.addWidget(self.ThemeButtonBox) |
1491 | |
1492 | self.retranslateUi(AmendThemeDialog) |
1493 | self.ThemeTabWidget.setCurrentIndex(0) |
1494 | - QtCore.QObject.connect(self.ThemeButtonBox, QtCore.SIGNAL("accepted()"), AmendThemeDialog.accept) |
1495 | - QtCore.QObject.connect(self.ThemeButtonBox, QtCore.SIGNAL("rejected()"), AmendThemeDialog.reject) |
1496 | + QtCore.QObject.connect(self.ThemeButtonBox, QtCore.SIGNAL(u'accepted()'), AmendThemeDialog.accept) |
1497 | + QtCore.QObject.connect(self.ThemeButtonBox, QtCore.SIGNAL(u'rejected()'), AmendThemeDialog.reject) |
1498 | QtCore.QMetaObject.connectSlotsByName(AmendThemeDialog) |
1499 | AmendThemeDialog.setTabOrder(self.ThemeButtonBox, self.ThemeNameEdit) |
1500 | AmendThemeDialog.setTabOrder(self.ThemeNameEdit, self.ThemeTabWidget) |
1501 | @@ -517,69 +528,68 @@ |
1502 | AmendThemeDialog.setTabOrder(self.HorizontalComboBox, self.VerticalComboBox) |
1503 | |
1504 | def retranslateUi(self, AmendThemeDialog): |
1505 | - AmendThemeDialog.setWindowTitle(QtGui.QApplication.translate("AmendThemeDialog", "Theme Maintenance", None, QtGui.QApplication.UnicodeUTF8)) |
1506 | - self.ThemeNameLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Theme Name:", None, QtGui.QApplication.UnicodeUTF8)) |
1507 | - self.BackgroundLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Background:", None, QtGui.QApplication.UnicodeUTF8)) |
1508 | - self.BackgroundComboBox.setItemText(0, QtGui.QApplication.translate("AmendThemeDialog", "Opaque", None, QtGui.QApplication.UnicodeUTF8)) |
1509 | - self.BackgroundComboBox.setItemText(1, QtGui.QApplication.translate("AmendThemeDialog", "Transparent", None, QtGui.QApplication.UnicodeUTF8)) |
1510 | - self.BackgroundTypeLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Background Type:", None, QtGui.QApplication.UnicodeUTF8)) |
1511 | - self.BackgroundTypeComboBox.setItemText(0, QtGui.QApplication.translate("AmendThemeDialog", "Solid Color", None, QtGui.QApplication.UnicodeUTF8)) |
1512 | - self.BackgroundTypeComboBox.setItemText(1, QtGui.QApplication.translate("AmendThemeDialog", "Gradient", None, QtGui.QApplication.UnicodeUTF8)) |
1513 | - self.BackgroundTypeComboBox.setItemText(2, QtGui.QApplication.translate("AmendThemeDialog", "Image", None, QtGui.QApplication.UnicodeUTF8)) |
1514 | - self.Color1Label.setText(QtGui.QApplication.translate("AmendThemeDialog", "<Color1>", None, QtGui.QApplication.UnicodeUTF8)) |
1515 | - self.Color2Label.setText(QtGui.QApplication.translate("AmendThemeDialog", "<Color2>", None, QtGui.QApplication.UnicodeUTF8)) |
1516 | - self.ImageLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Image:", None, QtGui.QApplication.UnicodeUTF8)) |
1517 | - self.GradientLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Gradient :", None, QtGui.QApplication.UnicodeUTF8)) |
1518 | - self.GradientComboBox.setItemText(0, QtGui.QApplication.translate("AmendThemeDialog", "Horizontal", None, QtGui.QApplication.UnicodeUTF8)) |
1519 | - self.GradientComboBox.setItemText(1, QtGui.QApplication.translate("AmendThemeDialog", "Vertical", None, QtGui.QApplication.UnicodeUTF8)) |
1520 | - self.GradientComboBox.setItemText(2, QtGui.QApplication.translate("AmendThemeDialog", "Circular", None, QtGui.QApplication.UnicodeUTF8)) |
1521 | - self.ThemeTabWidget.setTabText(self.ThemeTabWidget.indexOf(self.BackgroundTab), QtGui.QApplication.translate("AmendThemeDialog", "Background", None, QtGui.QApplication.UnicodeUTF8)) |
1522 | - self.FontMainGroupBox.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Main Font", None, QtGui.QApplication.UnicodeUTF8)) |
1523 | - self.FontMainlabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Font:", None, QtGui.QApplication.UnicodeUTF8)) |
1524 | - self.FontMainColorLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Font Color:", None, QtGui.QApplication.UnicodeUTF8)) |
1525 | - self.FontMainSize.setText(QtGui.QApplication.translate("AmendThemeDialog", "Size:", None, QtGui.QApplication.UnicodeUTF8)) |
1526 | - self.FontMainSizeSpinBox.setSuffix(QtGui.QApplication.translate("AmendThemeDialog", "pt", None, QtGui.QApplication.UnicodeUTF8)) |
1527 | - self.MainLocationGroupBox.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Display Location", None, QtGui.QApplication.UnicodeUTF8)) |
1528 | - self.DefaultLocationLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Use Default Location:", None, QtGui.QApplication.UnicodeUTF8)) |
1529 | - self.FontMainXLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "X Position:", None, QtGui.QApplication.UnicodeUTF8)) |
1530 | - self.FontMainYLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Y Position:", None, QtGui.QApplication.UnicodeUTF8)) |
1531 | - self.FontMainWidthLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Width:", None, QtGui.QApplication.UnicodeUTF8)) |
1532 | - self.FontMainHeightLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Height:", None, QtGui.QApplication.UnicodeUTF8)) |
1533 | - self.FontMainXSpinBox.setSuffix(QtGui.QApplication.translate("AmendThemeDialog", "px", None, QtGui.QApplication.UnicodeUTF8)) |
1534 | - self.FontMainYSpinBox.setSuffix(QtGui.QApplication.translate("AmendThemeDialog", "px", None, QtGui.QApplication.UnicodeUTF8)) |
1535 | - self.FontMainWidthSpinBox.setSuffix(QtGui.QApplication.translate("AmendThemeDialog", "px", None, QtGui.QApplication.UnicodeUTF8)) |
1536 | - self.FontMainHeightSpinBox.setSuffix(QtGui.QApplication.translate("AmendThemeDialog", "px", None, QtGui.QApplication.UnicodeUTF8)) |
1537 | - self.ThemeTabWidget.setTabText(self.ThemeTabWidget.indexOf(self.FontMainTab), QtGui.QApplication.translate("AmendThemeDialog", "Font Main", None, QtGui.QApplication.UnicodeUTF8)) |
1538 | - self.FooterFontGroupBox.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Footer Font", None, QtGui.QApplication.UnicodeUTF8)) |
1539 | - self.FontFooterLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Font:", None, QtGui.QApplication.UnicodeUTF8)) |
1540 | - self.FontFooterColorLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Font Color:", None, QtGui.QApplication.UnicodeUTF8)) |
1541 | - self.FontFooterSizeLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Size:", None, QtGui.QApplication.UnicodeUTF8)) |
1542 | - self.FontFooterSizeSpinBox.setSuffix(QtGui.QApplication.translate("AmendThemeDialog", "pt", None, QtGui.QApplication.UnicodeUTF8)) |
1543 | - self.LocationFooterGroupBox.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Display Location", None, QtGui.QApplication.UnicodeUTF8)) |
1544 | - self.FontFooterDefaultLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Use Default Location:", None, QtGui.QApplication.UnicodeUTF8)) |
1545 | - self.FontFooterXLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "X Position:", None, QtGui.QApplication.UnicodeUTF8)) |
1546 | - self.FontFooterYLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Y Position:", None, QtGui.QApplication.UnicodeUTF8)) |
1547 | - self.FontFooterWidthLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Width:", None, QtGui.QApplication.UnicodeUTF8)) |
1548 | - self.FontFooterHeightLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Height:", None, QtGui.QApplication.UnicodeUTF8)) |
1549 | - self.FontFooterXSpinBox.setSuffix(QtGui.QApplication.translate("AmendThemeDialog", "px", None, QtGui.QApplication.UnicodeUTF8)) |
1550 | - self.FontFooterYSpinBox.setSuffix(QtGui.QApplication.translate("AmendThemeDialog", "px", None, QtGui.QApplication.UnicodeUTF8)) |
1551 | - self.FontFooterWidthSpinBox.setSuffix(QtGui.QApplication.translate("AmendThemeDialog", "px", None, QtGui.QApplication.UnicodeUTF8)) |
1552 | - self.FontFooterHeightSpinBox.setSuffix(QtGui.QApplication.translate("AmendThemeDialog", "px", None, QtGui.QApplication.UnicodeUTF8)) |
1553 | - self.ThemeTabWidget.setTabText(self.ThemeTabWidget.indexOf(self.FontFooterTab), QtGui.QApplication.translate("AmendThemeDialog", "Font Footer", None, QtGui.QApplication.UnicodeUTF8)) |
1554 | - self.ShadowGroupBox.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Shadow && Outline", None, QtGui.QApplication.UnicodeUTF8)) |
1555 | - self.OutlineColorLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Outline Color:", None, QtGui.QApplication.UnicodeUTF8)) |
1556 | - self.OutlineEnabledLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Show Outline:", None, QtGui.QApplication.UnicodeUTF8)) |
1557 | - self.ShadowColorLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Shadow Color:", None, QtGui.QApplication.UnicodeUTF8)) |
1558 | - self.ShadowEnabledLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Show Shadow:", None, QtGui.QApplication.UnicodeUTF8)) |
1559 | - self.AlignmentGroupBox.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Alignment", None, QtGui.QApplication.UnicodeUTF8)) |
1560 | - self.HorizontalLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Horizontal Align:", None, QtGui.QApplication.UnicodeUTF8)) |
1561 | - self.HorizontalComboBox.setItemText(0, QtGui.QApplication.translate("AmendThemeDialog", "Left", None, QtGui.QApplication.UnicodeUTF8)) |
1562 | - self.HorizontalComboBox.setItemText(1, QtGui.QApplication.translate("AmendThemeDialog", "Right", None, QtGui.QApplication.UnicodeUTF8)) |
1563 | - self.HorizontalComboBox.setItemText(2, QtGui.QApplication.translate("AmendThemeDialog", "Center", None, QtGui.QApplication.UnicodeUTF8)) |
1564 | - self.VerticalLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Vertical Align:", None, QtGui.QApplication.UnicodeUTF8)) |
1565 | - self.VerticalComboBox.setItemText(0, QtGui.QApplication.translate("AmendThemeDialog", "Top", None, QtGui.QApplication.UnicodeUTF8)) |
1566 | - self.VerticalComboBox.setItemText(1, QtGui.QApplication.translate("AmendThemeDialog", "Middle", None, QtGui.QApplication.UnicodeUTF8)) |
1567 | - self.VerticalComboBox.setItemText(2, QtGui.QApplication.translate("AmendThemeDialog", "Bottom", None, QtGui.QApplication.UnicodeUTF8)) |
1568 | - self.ThemeTabWidget.setTabText(self.ThemeTabWidget.indexOf(self.OtherOptionsTab), QtGui.QApplication.translate("AmendThemeDialog", "Other Options", None, QtGui.QApplication.UnicodeUTF8)) |
1569 | - self.PreviewGroupBox.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Preview", None, QtGui.QApplication.UnicodeUTF8)) |
1570 | - |
1571 | + AmendThemeDialog.setWindowTitle(translate(u'AmendThemeDialog', u'Theme Maintenance')) |
1572 | + self.ThemeNameLabel.setText(translate(u'AmendThemeDialog', u'Theme Name:')) |
1573 | + self.BackgroundLabel.setText(translate(u'AmendThemeDialog', u'Background:')) |
1574 | + self.BackgroundComboBox.setItemText(0, translate(u'AmendThemeDialog', u'Opaque')) |
1575 | + self.BackgroundComboBox.setItemText(1, translate(u'AmendThemeDialog', u'Transparent')) |
1576 | + self.BackgroundTypeLabel.setText(translate(u'AmendThemeDialog', u'Background Type:')) |
1577 | + self.BackgroundTypeComboBox.setItemText(0, translate(u'AmendThemeDialog', u'Solid Color')) |
1578 | + self.BackgroundTypeComboBox.setItemText(1, translate(u'AmendThemeDialog', u'Gradient')) |
1579 | + self.BackgroundTypeComboBox.setItemText(2, translate(u'AmendThemeDialog', u'Image')) |
1580 | + self.Color1Label.setText(translate(u'AmendThemeDialog', u'<Color1>')) |
1581 | + self.Color2Label.setText(translate(u'AmendThemeDialog', u'<Color2>')) |
1582 | + self.ImageLabel.setText(translate(u'AmendThemeDialog', u'Image:')) |
1583 | + self.GradientLabel.setText(translate(u'AmendThemeDialog', u'Gradient :')) |
1584 | + self.GradientComboBox.setItemText(0, translate(u'AmendThemeDialog', u'Horizontal')) |
1585 | + self.GradientComboBox.setItemText(1, translate(u'AmendThemeDialog', u'Vertical')) |
1586 | + self.GradientComboBox.setItemText(2, translate(u'AmendThemeDialog', u'Circular')) |
1587 | + self.ThemeTabWidget.setTabText(self.ThemeTabWidget.indexOf(self.BackgroundTab), translate(u'AmendThemeDialog', u'Background')) |
1588 | + self.FontMainGroupBox.setTitle(translate(u'AmendThemeDialog', u'Main Font')) |
1589 | + self.FontMainlabel.setText(translate(u'AmendThemeDialog', u'Font:')) |
1590 | + self.FontMainColorLabel.setText(translate(u'AmendThemeDialog', u'Font Color:')) |
1591 | + self.FontMainSize.setText(translate(u'AmendThemeDialog', u'Size:')) |
1592 | + self.FontMainSizeSpinBox.setSuffix(translate(u'AmendThemeDialog', u'pt')) |
1593 | + self.MainLocationGroupBox.setTitle(translate(u'AmendThemeDialog', u'Display Location')) |
1594 | + self.DefaultLocationLabel.setText(translate(u'AmendThemeDialog', u'Use Default Location:')) |
1595 | + self.FontMainXLabel.setText(translate(u'AmendThemeDialog', u'X Position:')) |
1596 | + self.FontMainYLabel.setText(translate(u'AmendThemeDialog', u'Y Position:')) |
1597 | + self.FontMainWidthLabel.setText(translate(u'AmendThemeDialog', u'Width:')) |
1598 | + self.FontMainHeightLabel.setText(translate(u'AmendThemeDialog', u'Height:')) |
1599 | + self.FontMainXSpinBox.setSuffix(translate(u'AmendThemeDialog', u'px')) |
1600 | + self.FontMainYSpinBox.setSuffix(translate(u'AmendThemeDialog', u'px')) |
1601 | + self.FontMainWidthSpinBox.setSuffix(translate(u'AmendThemeDialog', u'px')) |
1602 | + self.FontMainHeightSpinBox.setSuffix(translate(u'AmendThemeDialog', u'px')) |
1603 | + self.ThemeTabWidget.setTabText(self.ThemeTabWidget.indexOf(self.FontMainTab), translate(u'AmendThemeDialog', u'Font Main')) |
1604 | + self.FooterFontGroupBox.setTitle(translate(u'AmendThemeDialog', u'Footer Font')) |
1605 | + self.FontFooterLabel.setText(translate(u'AmendThemeDialog', u'Font:')) |
1606 | + self.FontFooterColorLabel.setText(translate(u'AmendThemeDialog', u'Font Color:')) |
1607 | + self.FontFooterSizeLabel.setText(translate(u'AmendThemeDialog', u'Size:')) |
1608 | + self.FontFooterSizeSpinBox.setSuffix(translate(u'AmendThemeDialog', u'pt')) |
1609 | + self.LocationFooterGroupBox.setTitle(translate(u'AmendThemeDialog', u'Display Location')) |
1610 | + self.FontFooterDefaultLabel.setText(translate(u'AmendThemeDialog', u'Use Default Location:')) |
1611 | + self.FontFooterXLabel.setText(translate(u'AmendThemeDialog', u'X Position:')) |
1612 | + self.FontFooterYLabel.setText(translate(u'AmendThemeDialog', u'Y Position:')) |
1613 | + self.FontFooterWidthLabel.setText(translate(u'AmendThemeDialog', u'Width:')) |
1614 | + self.FontFooterHeightLabel.setText(translate(u'AmendThemeDialog', u'Height:')) |
1615 | + self.FontFooterXSpinBox.setSuffix(translate(u'AmendThemeDialog', u'px')) |
1616 | + self.FontFooterYSpinBox.setSuffix(translate(u'AmendThemeDialog', u'px')) |
1617 | + self.FontFooterWidthSpinBox.setSuffix(translate(u'AmendThemeDialog', u'px')) |
1618 | + self.FontFooterHeightSpinBox.setSuffix(translate(u'AmendThemeDialog', u'px')) |
1619 | + self.ThemeTabWidget.setTabText(self.ThemeTabWidget.indexOf(self.FontFooterTab), translate(u'AmendThemeDialog', u'Font Footer')) |
1620 | + self.ShadowGroupBox.setTitle(translate(u'AmendThemeDialog', u'Shadow && Outline')) |
1621 | + self.OutlineColorLabel.setText(translate(u'AmendThemeDialog', u'Outline Color:')) |
1622 | + self.OutlineEnabledLabel.setText(translate(u'AmendThemeDialog', u'Show Outline:')) |
1623 | + self.ShadowColorLabel.setText(translate(u'AmendThemeDialog', u'Shadow Color:')) |
1624 | + self.ShadowEnabledLabel.setText(translate(u'AmendThemeDialog', u'Show Shadow:')) |
1625 | + self.AlignmentGroupBox.setTitle(translate(u'AmendThemeDialog', u'Alignment')) |
1626 | + self.HorizontalLabel.setText(translate(u'AmendThemeDialog', u'Horizontal Align:')) |
1627 | + self.HorizontalComboBox.setItemText(0, translate(u'AmendThemeDialog', u'Left')) |
1628 | + self.HorizontalComboBox.setItemText(1, translate(u'AmendThemeDialog', u'Right')) |
1629 | + self.HorizontalComboBox.setItemText(2, translate(u'AmendThemeDialog', u'Center')) |
1630 | + self.VerticalLabel.setText(translate(u'AmendThemeDialog', u'Vertical Align:')) |
1631 | + self.VerticalComboBox.setItemText(0, translate(u'AmendThemeDialog', u'Top')) |
1632 | + self.VerticalComboBox.setItemText(1, translate(u'AmendThemeDialog', u'Middle')) |
1633 | + self.VerticalComboBox.setItemText(2, translate(u'AmendThemeDialog', u'Bottom')) |
1634 | + self.ThemeTabWidget.setTabText(self.ThemeTabWidget.indexOf(self.OtherOptionsTab), translate(u'AmendThemeDialog', u'Other Options')) |
1635 | + self.PreviewGroupBox.setTitle(translate(u'AmendThemeDialog', u'Preview')) |
1636 | |
1637 | === modified file 'openlp/core/ui/amendthemeform.py' |
1638 | --- openlp/core/ui/amendthemeform.py 2009-06-10 15:37:33 +0000 |
1639 | +++ openlp/core/ui/amendthemeform.py 2009-06-16 18:21:24 +0000 |
1640 | @@ -40,94 +40,94 @@ |
1641 | #define signals |
1642 | #Buttons |
1643 | QtCore.QObject.connect(self.Color1PushButton , |
1644 | - QtCore.SIGNAL("pressed()"), self.onColor1PushButtonClicked) |
1645 | + QtCore.SIGNAL(u'pressed()'), self.onColor1PushButtonClicked) |
1646 | QtCore.QObject.connect(self.Color2PushButton , |
1647 | - QtCore.SIGNAL("pressed()"), self.onColor2PushButtonClicked) |
1648 | + QtCore.SIGNAL(u'pressed()'), self.onColor2PushButtonClicked) |
1649 | QtCore.QObject.connect(self.FontMainColorPushButton, |
1650 | - QtCore.SIGNAL("pressed()"), self.onFontMainColorPushButtonClicked) |
1651 | + QtCore.SIGNAL(u'pressed()'), self.onFontMainColorPushButtonClicked) |
1652 | QtCore.QObject.connect(self.FontFooterColorPushButton, |
1653 | - QtCore.SIGNAL("pressed()"), self.onFontFooterColorPushButtonClicked) |
1654 | + QtCore.SIGNAL(u'pressed()'), self.onFontFooterColorPushButtonClicked) |
1655 | QtCore.QObject.connect(self.OutlineColorPushButton, |
1656 | - QtCore.SIGNAL("pressed()"), self.onOutlineColorPushButtonClicked) |
1657 | + QtCore.SIGNAL(u'pressed()'), self.onOutlineColorPushButtonClicked) |
1658 | QtCore.QObject.connect(self.ShadowColorPushButton, |
1659 | - QtCore.SIGNAL("pressed()"), self.onShadowColorPushButtonClicked) |
1660 | + QtCore.SIGNAL(u'pressed()'), self.onShadowColorPushButtonClicked) |
1661 | QtCore.QObject.connect(self.ImageToolButton, |
1662 | - QtCore.SIGNAL("pressed()"), self.onImageToolButtonClicked) |
1663 | + QtCore.SIGNAL(u'pressed()'), self.onImageToolButtonClicked) |
1664 | |
1665 | #Combo boxes |
1666 | QtCore.QObject.connect(self.BackgroundComboBox, |
1667 | - QtCore.SIGNAL("activated(int)"), self.onBackgroundComboBoxSelected) |
1668 | + QtCore.SIGNAL(u'activated(int)'), self.onBackgroundComboBoxSelected) |
1669 | QtCore.QObject.connect(self.BackgroundTypeComboBox, |
1670 | - QtCore.SIGNAL("activated(int)"), self.onBackgroundTypeComboBoxSelected) |
1671 | + QtCore.SIGNAL(u'activated(int)'), self.onBackgroundTypeComboBoxSelected) |
1672 | QtCore.QObject.connect(self.GradientComboBox, |
1673 | - QtCore.SIGNAL("activated(int)"), self.onGradientComboBoxSelected) |
1674 | + QtCore.SIGNAL(u'activated(int)'), self.onGradientComboBoxSelected) |
1675 | QtCore.QObject.connect(self.FontMainComboBox, |
1676 | - QtCore.SIGNAL("activated(int)"), self.onFontMainComboBoxSelected) |
1677 | + QtCore.SIGNAL(u'activated(int)'), self.onFontMainComboBoxSelected) |
1678 | QtCore.QObject.connect(self.FontFooterComboBox, |
1679 | - QtCore.SIGNAL("activated(int)"), self.onFontFooterComboBoxSelected) |
1680 | + QtCore.SIGNAL(u'activated(int)'), self.onFontFooterComboBoxSelected) |
1681 | QtCore.QObject.connect(self.HorizontalComboBox, |
1682 | - QtCore.SIGNAL("activated(int)"), self.onHorizontalComboBoxSelected) |
1683 | + QtCore.SIGNAL(u'activated(int)'), self.onHorizontalComboBoxSelected) |
1684 | QtCore.QObject.connect(self.VerticalComboBox, |
1685 | - QtCore.SIGNAL("activated(int)"), self.onVerticalComboBoxSelected) |
1686 | + QtCore.SIGNAL(u'activated(int)'), self.onVerticalComboBoxSelected) |
1687 | |
1688 | QtCore.QObject.connect(self.FontMainSizeSpinBox, |
1689 | - QtCore.SIGNAL("valueChanged(int)"), self.onFontMainSizeSpinBoxChanged) |
1690 | + QtCore.SIGNAL(u'valueChanged(int)'), self.onFontMainSizeSpinBoxChanged) |
1691 | QtCore.QObject.connect(self.FontFooterSizeSpinBox, |
1692 | - QtCore.SIGNAL("valueChanged(int)"), self.onFontFooterSizeSpinBoxChanged) |
1693 | + QtCore.SIGNAL(u'valueChanged(int)'), self.onFontFooterSizeSpinBoxChanged) |
1694 | QtCore.QObject.connect(self.FontMainDefaultCheckBox, |
1695 | - QtCore.SIGNAL("stateChanged(int)"), self.onFontMainDefaultCheckBoxChanged) |
1696 | + QtCore.SIGNAL(u'stateChanged(int)'), self.onFontMainDefaultCheckBoxChanged) |
1697 | QtCore.QObject.connect(self.FontMainXSpinBox, |
1698 | - QtCore.SIGNAL("valueChanged(int)"), self.onFontMainXSpinBoxChanged) |
1699 | + QtCore.SIGNAL(u'valueChanged(int)'), self.onFontMainXSpinBoxChanged) |
1700 | QtCore.QObject.connect(self.FontMainYSpinBox, |
1701 | - QtCore.SIGNAL("valueChanged(int)"), self.onFontMainYSpinBoxChanged) |
1702 | + QtCore.SIGNAL(u'valueChanged(int)'), self.onFontMainYSpinBoxChanged) |
1703 | QtCore.QObject.connect(self.FontMainWidthSpinBox, |
1704 | - QtCore.SIGNAL("valueChanged(int)"), self.onFontMainWidthSpinBoxChanged) |
1705 | + QtCore.SIGNAL(u'valueChanged(int)'), self.onFontMainWidthSpinBoxChanged) |
1706 | QtCore.QObject.connect(self.FontMainHeightSpinBox, |
1707 | - QtCore.SIGNAL("valueChanged(int)"), self.onFontMainHeightSpinBoxChanged) |
1708 | + QtCore.SIGNAL(u'valueChanged(int)'), self.onFontMainHeightSpinBoxChanged) |
1709 | QtCore.QObject.connect(self.FontFooterDefaultCheckBox, |
1710 | - QtCore.SIGNAL("stateChanged(int)"), self.onFontFooterDefaultCheckBoxChanged) |
1711 | + QtCore.SIGNAL(u'stateChanged(int)'), self.onFontFooterDefaultCheckBoxChanged) |
1712 | QtCore.QObject.connect(self.FontFooterXSpinBox, |
1713 | - QtCore.SIGNAL("valueChanged(int)"), self.onFontFooterXSpinBoxChanged) |
1714 | + QtCore.SIGNAL(u'valueChanged(int)'), self.onFontFooterXSpinBoxChanged) |
1715 | QtCore.QObject.connect(self.FontFooterYSpinBox, |
1716 | - QtCore.SIGNAL("valueChanged(int)"), self.onFontFooterYSpinBoxChanged) |
1717 | + QtCore.SIGNAL(u'valueChanged(int)'), self.onFontFooterYSpinBoxChanged) |
1718 | QtCore.QObject.connect(self.FontFooterWidthSpinBox, |
1719 | - QtCore.SIGNAL("valueChanged(int)"), self.onFontFooterWidthSpinBoxChanged) |
1720 | + QtCore.SIGNAL(u'valueChanged(int)'), self.onFontFooterWidthSpinBoxChanged) |
1721 | QtCore.QObject.connect(self.FontFooterHeightSpinBox, |
1722 | - QtCore.SIGNAL("valueChanged(int)"), self.onFontFooterHeightSpinBoxChanged) |
1723 | + QtCore.SIGNAL(u'valueChanged(int)'), self.onFontFooterHeightSpinBoxChanged) |
1724 | QtCore.QObject.connect(self.OutlineCheckBox, |
1725 | - QtCore.SIGNAL("stateChanged(int)"), self.onOutlineCheckBoxChanged) |
1726 | + QtCore.SIGNAL(u'stateChanged(int)'), self.onOutlineCheckBoxChanged) |
1727 | QtCore.QObject.connect(self.ShadowCheckBox, |
1728 | - QtCore.SIGNAL("stateChanged(int)"), self.onShadowCheckBoxChanged) |
1729 | + QtCore.SIGNAL(u'stateChanged(int)'), self.onShadowCheckBoxChanged) |
1730 | |
1731 | def accept(self): |
1732 | new_theme = ThemeXML() |
1733 | - theme_name = str(self.ThemeNameEdit.displayText()) |
1734 | + theme_name = unicode(self.ThemeNameEdit.displayText()) |
1735 | new_theme.new_document(theme_name) |
1736 | save_from = None |
1737 | save_to = None |
1738 | if self.theme.background_type == u'solid': |
1739 | - new_theme.add_background_solid(str(self.theme.background_color)) |
1740 | + new_theme.add_background_solid(unicode(self.theme.background_color)) |
1741 | elif self.theme.background_type == u'gradient': |
1742 | - new_theme.add_background_gradient(str(self.theme.background_startColor), |
1743 | - str(self.theme.background_endColor), self.theme.background_direction) |
1744 | + new_theme.add_background_gradient(unicode(self.theme.background_startColor), |
1745 | + unicode(self.theme.background_endColor), self.theme.background_direction) |
1746 | else: |
1747 | - (path, filename) =os.path.split(str(self.theme.background_filename)) |
1748 | + (path, filename) =os.path.split(unicode(self.theme.background_filename)) |
1749 | new_theme.add_background_image(filename) |
1750 | save_to= os.path.join(self.path, theme_name, filename ) |
1751 | save_from = self.theme.background_filename |
1752 | |
1753 | - new_theme.add_font(str(self.theme.font_main_name), str(self.theme.font_main_color), |
1754 | - str(self.theme.font_main_proportion), str(self.theme.font_main_override), u'main', |
1755 | - str(self.theme.font_main_x), str(self.theme.font_main_y), str(self.theme.font_main_width), |
1756 | - str(self.theme.font_main_height)) |
1757 | - new_theme.add_font(str(self.theme.font_footer_name), str(self.theme.font_footer_color), |
1758 | - str(self.theme.font_footer_proportion), str(self.theme.font_footer_override), u'footer', |
1759 | - str(self.theme.font_footer_x), str(self.theme.font_footer_y), str(self.theme.font_footer_width), |
1760 | - str(self.theme.font_footer_height) ) |
1761 | - new_theme.add_display(str(self.theme.display_shadow), str(self.theme.display_shadow_color), |
1762 | - str(self.theme.display_outline), str(self.theme.display_outline_color), |
1763 | - str(self.theme.display_horizontalAlign), str(self.theme.display_verticalAlign), |
1764 | - str(self.theme.display_wrapStyle)) |
1765 | + new_theme.add_font(unicode(self.theme.font_main_name), unicode(self.theme.font_main_color), |
1766 | + unicode(self.theme.font_main_proportion), unicode(self.theme.font_main_override), u'main', |
1767 | + unicode(self.theme.font_main_x), unicode(self.theme.font_main_y), unicode(self.theme.font_main_width), |
1768 | + unicode(self.theme.font_main_height)) |
1769 | + new_theme.add_font(unicode(self.theme.font_footer_name), unicode(self.theme.font_footer_color), |
1770 | + unicode(self.theme.font_footer_proportion), unicode(self.theme.font_footer_override), u'footer', |
1771 | + unicode(self.theme.font_footer_x), unicode(self.theme.font_footer_y), unicode(self.theme.font_footer_width), |
1772 | + unicode(self.theme.font_footer_height) ) |
1773 | + new_theme.add_display(unicode(self.theme.display_shadow), unicode(self.theme.display_shadow_color), |
1774 | + unicode(self.theme.display_outline), unicode(self.theme.display_outline_color), |
1775 | + unicode(self.theme.display_horizontalAlign), unicode(self.theme.display_verticalAlign), |
1776 | + unicode(self.theme.display_wrapStyle)) |
1777 | |
1778 | theme = new_theme.extract_xml() |
1779 | |
1780 | @@ -166,7 +166,7 @@ |
1781 | QtGui.QColor(self.theme.font_main_color), self).name() |
1782 | |
1783 | self.FontMainColorPushButton.setStyleSheet( |
1784 | - u'background-color: %s' % str(self.theme.font_main_color)) |
1785 | + u'background-color: %s' % unicode(self.theme.font_main_color)) |
1786 | self.previewTheme(self.theme) |
1787 | |
1788 | def onFontMainSizeSpinBoxChanged(self, value): |
1789 | @@ -219,7 +219,7 @@ |
1790 | QtGui.QColor(self.theme.font_footer_color), self).name() |
1791 | |
1792 | self.FontFooterColorPushButton.setStyleSheet( |
1793 | - 'background-color: %s' % str(self.theme.font_footer_color)) |
1794 | + 'background-color: %s' % unicode(self.theme.font_footer_color)) |
1795 | self.previewTheme(self.theme) |
1796 | |
1797 | def onFontFooterSizeSpinBoxChanged(self, value): |
1798 | @@ -307,12 +307,12 @@ |
1799 | self.theme.background_color = QtGui.QColorDialog.getColor( |
1800 | QtGui.QColor(self.theme.background_color), self).name() |
1801 | self.Color1PushButton.setStyleSheet( |
1802 | - u'background-color: %s' % str(self.theme.background_color)) |
1803 | + u'background-color: %s' % unicode(self.theme.background_color)) |
1804 | else: |
1805 | self.theme.background_startColor = QtGui.QColorDialog.getColor( |
1806 | QtGui.QColor(self.theme.background_startColor), self).name() |
1807 | self.Color1PushButton.setStyleSheet( |
1808 | - u'background-color: %s' % str(self.theme.background_startColor)) |
1809 | + u'background-color: %s' % unicode(self.theme.background_startColor)) |
1810 | |
1811 | self.previewTheme(self.theme) |
1812 | |
1813 | @@ -320,7 +320,7 @@ |
1814 | self.theme.background_endColor = QtGui.QColorDialog.getColor( |
1815 | QtGui.QColor(self.theme.background_endColor), self).name() |
1816 | self.Color2PushButton.setStyleSheet( |
1817 | - u'background-color: %s' % str(self.theme.background_endColor)) |
1818 | + u'background-color: %s' % unicode(self.theme.background_endColor)) |
1819 | |
1820 | self.previewTheme(self.theme) |
1821 | # |
1822 | @@ -338,7 +338,7 @@ |
1823 | self.theme.display_outline_color = QtGui.QColorDialog.getColor( |
1824 | QtGui.QColor(self.theme.display_outline_color), self).name() |
1825 | self.OutlineColorPushButton.setStyleSheet( |
1826 | - u'background-color: %s' % str(self.theme.display_outline_color)) |
1827 | + u'background-color: %s' % unicode(self.theme.display_outline_color)) |
1828 | self.previewTheme(self.theme) |
1829 | |
1830 | def onShadowCheckBoxChanged(self, value): |
1831 | @@ -353,7 +353,7 @@ |
1832 | self.theme.display_shadow_color = QtGui.QColorDialog.getColor( |
1833 | QtGui.QColor(self.theme.display_shadow_color), self).name() |
1834 | self.ShadowColorPushButton.setStyleSheet( |
1835 | - u'background-color: %s' % str(self.theme.display_shadow_color)) |
1836 | + u'background-color: %s' % unicode(self.theme.display_shadow_color)) |
1837 | self.previewTheme(self.theme) |
1838 | |
1839 | def onHorizontalComboBoxSelected(self, currentIndex): |
1840 | @@ -372,11 +372,11 @@ |
1841 | log.debug(u'base theme created') |
1842 | newtheme = ThemeXML() |
1843 | newtheme.new_document(u'New Theme') |
1844 | - newtheme.add_background_solid(str(u'#000000')) |
1845 | - newtheme.add_font(str(QtGui.QFont().family()), str(u'#FFFFFF'), str(30), u'False') |
1846 | - newtheme.add_font(str(QtGui.QFont().family()), str(u'#FFFFFF'), str(12), u'False', u'footer') |
1847 | - newtheme.add_display(u'False', str(u'#FFFFFF'), u'False', str(u'#FFFFFF'), |
1848 | - str(0), str(0), str(0)) |
1849 | + newtheme.add_background_solid(unicode(u'#000000')) |
1850 | + newtheme.add_font(unicode(QtGui.QFont().family()), unicode(u'#FFFFFF'), unicode(30), u'False') |
1851 | + newtheme.add_font(unicode(QtGui.QFont().family()), unicode(u'#FFFFFF'), unicode(12), u'False', u'footer') |
1852 | + newtheme.add_display(u'False', unicode(u'#FFFFFF'), u'False', unicode(u'#FFFFFF'), |
1853 | + unicode(0), unicode(0), unicode(0)) |
1854 | |
1855 | return newtheme.extract_xml() |
1856 | |
1857 | @@ -413,9 +413,9 @@ |
1858 | self.FontFooterWidthSpinBox.setValue(int(self.theme.font_footer_width)) |
1859 | self.FontFooterHeightSpinBox.setValue(int(self.theme.font_footer_height)) |
1860 | self.FontMainColorPushButton.setStyleSheet( |
1861 | - u'background-color: %s' % str(theme.font_main_color)) |
1862 | + u'background-color: %s' % unicode(theme.font_main_color)) |
1863 | self.FontFooterColorPushButton.setStyleSheet( |
1864 | - u'background-color: %s' % str(theme.font_footer_color)) |
1865 | + u'background-color: %s' % unicode(theme.font_footer_color)) |
1866 | |
1867 | if self.theme.font_main_override == False: |
1868 | self.FontMainDefaultCheckBox.setChecked(True) |
1869 | @@ -428,9 +428,9 @@ |
1870 | self.FontFooterDefaultCheckBox.setChecked(False) |
1871 | |
1872 | self.OutlineColorPushButton.setStyleSheet( |
1873 | - u'background-color: %s' % str(theme.display_outline_color)) |
1874 | + u'background-color: %s' % unicode(theme.display_outline_color)) |
1875 | self.ShadowColorPushButton.setStyleSheet( |
1876 | - u'background-color: %s' % str(theme.display_shadow_color)) |
1877 | + u'background-color: %s' % unicode(theme.display_shadow_color)) |
1878 | |
1879 | if self.theme.display_outline: |
1880 | self.OutlineCheckBox.setChecked(True) |
1881 | @@ -452,7 +452,7 @@ |
1882 | def stateChanging(self, theme): |
1883 | if theme.background_type == u'solid': |
1884 | self.Color1PushButton.setStyleSheet( |
1885 | - u'background-color: %s' % str(theme.background_color)) |
1886 | + u'background-color: %s' % unicode(theme.background_color)) |
1887 | self.Color1Label.setText(translate(u'ThemeManager', u'Background Color:')) |
1888 | self.Color1Label.setVisible(True) |
1889 | self.Color1PushButton.setVisible(True) |
1890 | @@ -465,9 +465,9 @@ |
1891 | self.GradientComboBox.setVisible(False) |
1892 | elif theme.background_type == u'gradient': |
1893 | self.Color1PushButton.setStyleSheet( |
1894 | - u'background-color: %s' % str(theme.background_startColor)) |
1895 | + u'background-color: %s' % unicode(theme.background_startColor)) |
1896 | self.Color2PushButton.setStyleSheet( |
1897 | - u'background-color: %s' % str(theme.background_endColor)) |
1898 | + u'background-color: %s' % unicode(theme.background_endColor)) |
1899 | self.Color1Label.setText(translate(u'ThemeManager', u'First Color:')) |
1900 | self.Color2Label.setText(translate(u'ThemeManager', u'Second Color:')) |
1901 | self.Color1Label.setVisible(True) |
1902 | @@ -526,4 +526,4 @@ |
1903 | def previewTheme(self, theme): |
1904 | if self.allowPreview: |
1905 | frame = self.thememanager.generateImage(theme) |
1906 | - self.ThemePreview.setPixmap(QtGui.QPixmap.fromImage(frame)) |
1907 | + self.ThemePreview.setPixmap(QtGui.QPixmap.fromImage(frame)) |
1908 | \ No newline at end of file |
1909 | |
1910 | === modified file 'openlp/core/ui/generaltab.py' |
1911 | --- openlp/core/ui/generaltab.py 2009-06-11 21:14:12 +0000 |
1912 | +++ openlp/core/ui/generaltab.py 2009-06-16 18:21:24 +0000 |
1913 | @@ -167,7 +167,7 @@ |
1914 | screen_name = translate(u'GeneralTab', u'Screen') + u' ' + \ |
1915 | unicode(screen[u'number'] + 1) |
1916 | if screen[u'primary']: |
1917 | - screen_name = screen_name + u' (' + \ |
1918 | + screen_name = screen_name + u' (u' + \ |
1919 | translate(u'GeneralTab', u'primary') + u')' |
1920 | self.MonitorComboBox.addItem(screen_name) |
1921 | # Get the configs |
1922 | @@ -191,4 +191,4 @@ |
1923 | self.config.set_config(u'Auto Open', self.AutoOpen) |
1924 | self.config.set_config(u'CCL Number', self.CCLNumber) |
1925 | self.config.set_config(u'User Name', self.Username) |
1926 | - self.config.set_config(u'Password', self.Password) |
1927 | + self.config.set_config(u'Password', self.Password) |
1928 | \ No newline at end of file |
1929 | |
1930 | === modified file 'openlp/core/ui/maindisplay.py' |
1931 | --- openlp/core/ui/maindisplay.py 2009-06-10 15:37:33 +0000 |
1932 | +++ openlp/core/ui/maindisplay.py 2009-06-16 18:21:24 +0000 |
1933 | @@ -98,7 +98,7 @@ |
1934 | self.alertactive = False |
1935 | |
1936 | def displayAlert(self): |
1937 | - alertframe = QtGui.QPixmap(self.frame) |
1938 | + alertframe = QtGui.QPixmap.fromImage(self.frame) |
1939 | painter = QtGui.QPainter(alertframe) |
1940 | top = alertframe.rect().height() * 0.9 |
1941 | painter.fillRect(QtCore.QRect(0, top , alertframe.rect().width(), alertframe.rect().height() - top), QtGui.QColor(self.alertTab.bg_color)) |
1942 | @@ -114,4 +114,4 @@ |
1943 | painter.end() |
1944 | self.display.setPixmap(alertframe) |
1945 | QtTest.QTest.qWait(self.alertTab.timeout*1000) |
1946 | - self.display.setPixmap(self.frame) |
1947 | + self.display.QtGui.QPixmap.fromImage(self.frame) |
1948 | |
1949 | === modified file 'openlp/core/ui/servicemanager.py' |
1950 | --- openlp/core/ui/servicemanager.py 2009-06-13 06:46:13 +0000 |
1951 | +++ openlp/core/ui/servicemanager.py 2009-06-16 18:21:24 +0000 |
1952 | @@ -68,7 +68,7 @@ |
1953 | self.ServiceManagerList.setDragDropMode(QtGui.QAbstractItemView.DragDrop) |
1954 | self.ServiceManagerList.setAlternatingRowColors(True) |
1955 | self.ServiceManagerList.setHeaderHidden(True) |
1956 | - self.ServiceManagerList.setObjectName("ServiceManagerList") |
1957 | + self.ServiceManagerList.setObjectName(u'ServiceManagerList') |
1958 | # enable drop |
1959 | self.ServiceManagerList.__class__.dragEnterEvent = self.dragEnterEvent |
1960 | self.ServiceManagerList.__class__.dragMoveEvent = self.dragEnterEvent |
1961 | @@ -268,10 +268,10 @@ |
1962 | self.ThemeComboBox.addItem(u'') |
1963 | for theme in theme_list: |
1964 | self.ThemeComboBox.addItem(theme) |
1965 | - id = self.ThemeComboBox.findText(str(self.service_theme), QtCore.Qt.MatchExactly) |
1966 | + id = self.ThemeComboBox.findText(unicode(self.service_theme), QtCore.Qt.MatchExactly) |
1967 | # Not Found |
1968 | if id == -1: |
1969 | id = 0 |
1970 | self.service_theme = u'' |
1971 | self.ThemeComboBox.setCurrentIndex(id) |
1972 | - self.parent.RenderManager.set_service_theme(self.service_theme) |
1973 | + self.parent.RenderManager.set_service_theme(self.service_theme) |
1974 | \ No newline at end of file |
1975 | |
1976 | === modified file 'openlp/core/ui/settingsdialog.py' |
1977 | --- openlp/core/ui/settingsdialog.py 2009-02-28 23:19:45 +0000 |
1978 | +++ openlp/core/ui/settingsdialog.py 2009-06-16 18:21:24 +0000 |
1979 | @@ -1,21 +1,29 @@ |
1980 | # -*- coding: utf-8 -*- |
1981 | - |
1982 | -# Form implementation generated from reading ui file '/home/raoul/Projects/openlp-2/resources/forms/settings.ui' |
1983 | -# |
1984 | -# Created: Sat Feb 28 23:59:58 2009 |
1985 | -# by: PyQt4 UI code generator 4.4.4 |
1986 | -# |
1987 | -# WARNING! All changes made in this file will be lost! |
1988 | - |
1989 | +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 |
1990 | +""" |
1991 | +OpenLP - Open Source Lyrics Projection |
1992 | +Copyright (c) 2008 Raoul Snyman |
1993 | +Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley, |
1994 | + |
1995 | +This program is free software; you can redistribute it and/or modify it under |
1996 | +the terms of the GNU General Public License as published by the Free Software |
1997 | +Foundation; version 2 of the License. |
1998 | + |
1999 | +This program is distributed in the hope that it will be useful, but WITHOUT ANY |
2000 | +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
2001 | +PARTICULAR PURPOSE. See the GNU General Public License for more details. |
2002 | + |
2003 | +You should have received a copy of the GNU General Public License along with |
2004 | +this program; if not, write to the Free Software Foundation, Inc., 59 Temple |
2005 | +Place, Suite 330, Boston, MA 02111-1307 USA |
2006 | +""" |
2007 | from PyQt4 import QtCore, QtGui |
2008 | +from openlp.core.lib import translate |
2009 | |
2010 | class Ui_SettingsDialog(object): |
2011 | def setupUi(self, SettingsDialog): |
2012 | SettingsDialog.setObjectName(u'SettingsDialog') |
2013 | SettingsDialog.resize(724, 502) |
2014 | - #icon = QtGui.QIcon() |
2015 | - #icon.addPixmap(QtGui.QPixmap(":/icon/openlp.org-icon-32.bmp"), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
2016 | - #SettingsDialog.setWindowIcon(icon) |
2017 | self.SettingsLayout = QtGui.QVBoxLayout(SettingsDialog) |
2018 | self.SettingsLayout.setSpacing(8) |
2019 | self.SettingsLayout.setMargin(8) |
2020 | @@ -32,14 +40,13 @@ |
2021 | self.ButtonsBox.setMaximumSize(QtCore.QSize(16777215, 16777215)) |
2022 | self.ButtonsBox.setOrientation(QtCore.Qt.Horizontal) |
2023 | self.ButtonsBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok) |
2024 | - self.ButtonsBox.setObjectName("ButtonsBox") |
2025 | + self.ButtonsBox.setObjectName(u'ButtonsBox') |
2026 | self.SettingsLayout.addWidget(self.ButtonsBox) |
2027 | - |
2028 | self.retranslateUi(SettingsDialog) |
2029 | self.SettingsTabWidget.setCurrentIndex(0) |
2030 | - QtCore.QObject.connect(self.ButtonsBox, QtCore.SIGNAL("accepted()"), SettingsDialog.accept) |
2031 | - QtCore.QObject.connect(self.ButtonsBox, QtCore.SIGNAL("rejected()"), SettingsDialog.reject) |
2032 | + QtCore.QObject.connect(self.ButtonsBox, QtCore.SIGNAL(u'accepted()'), SettingsDialog.accept) |
2033 | + QtCore.QObject.connect(self.ButtonsBox, QtCore.SIGNAL(u'rejected()'), SettingsDialog.reject) |
2034 | QtCore.QMetaObject.connectSlotsByName(SettingsDialog) |
2035 | |
2036 | def retranslateUi(self, SettingsDialog): |
2037 | - SettingsDialog.setWindowTitle(QtGui.QApplication.translate("SettingsDialog", "Settings", None, QtGui.QApplication.UnicodeUTF8)) |
2038 | + SettingsDialog.setWindowTitle(translate(u'SettingsDialog', u'Settings')) |
2039 | |
2040 | === modified file 'openlp/core/ui/settingsform.py' |
2041 | --- openlp/core/ui/settingsform.py 2009-05-18 19:04:25 +0000 |
2042 | +++ openlp/core/ui/settingsform.py 2009-06-16 18:21:24 +0000 |
2043 | @@ -27,7 +27,7 @@ |
2044 | |
2045 | from settingsdialog import Ui_SettingsDialog |
2046 | |
2047 | -log = logging.getLogger('SettingsForm') |
2048 | +log = logging.getLogger(u'SettingsForm') |
2049 | |
2050 | class SettingsForm(QtGui.QDialog, Ui_SettingsDialog): |
2051 | |
2052 | @@ -51,4 +51,4 @@ |
2053 | def accept(self): |
2054 | for tab_index in range(0, self.SettingsTabWidget.count()): |
2055 | self.SettingsTabWidget.widget(tab_index).save() |
2056 | - return QtGui.QDialog.accept(self) |
2057 | + return QtGui.QDialog.accept(self) |
2058 | \ No newline at end of file |
2059 | |
2060 | === modified file 'openlp/core/ui/slidecontroller.py' |
2061 | --- openlp/core/ui/slidecontroller.py 2009-06-10 16:20:57 +0000 |
2062 | +++ openlp/core/ui/slidecontroller.py 2009-06-16 18:21:24 +0000 |
2063 | @@ -91,7 +91,7 @@ |
2064 | return self.items[row] |
2065 | |
2066 | def getItem(self, row): |
2067 | - log.info(u'Get Item:%d -> %s' %(row, str(self.items))) |
2068 | + log.info(u'Get Item:%d -> %s' %(row, unicode(self.items))) |
2069 | return self.items[row] |
2070 | |
2071 | def getList(self): |
2072 | @@ -321,4 +321,4 @@ |
2073 | if row.isValid(): |
2074 | self.PreviewListView.selectionModel().setCurrentIndex(row, |
2075 | QtGui.QItemSelectionModel.SelectCurrent) |
2076 | - self.onSlideSelected(row) |
2077 | + self.onSlideSelected(row) |
2078 | \ No newline at end of file |
2079 | |
2080 | === modified file 'openlp/core/ui/splashscreen.py' |
2081 | --- openlp/core/ui/splashscreen.py 2009-05-20 20:17:20 +0000 |
2082 | +++ openlp/core/ui/splashscreen.py 2009-06-16 18:21:24 +0000 |
2083 | @@ -17,20 +17,18 @@ |
2084 | this program; if not, write to the Free Software Foundation, Inc., 59 Temple |
2085 | Place, Suite 330, Boston, MA 02111-1307 USA |
2086 | """ |
2087 | - |
2088 | from PyQt4 import QtCore, QtGui |
2089 | - |
2090 | from openlp.core.lib import translate |
2091 | |
2092 | class SplashScreen(object): |
2093 | def __init__(self, version): |
2094 | self.splash_screen = QtGui.QSplashScreen() |
2095 | self.setupUi() |
2096 | - starting = translate('SplashScreen',u'Starting') |
2097 | + starting = translate(u'SplashScreen',u'Starting') |
2098 | self.message=starting+u'..... '+version |
2099 | |
2100 | def setupUi(self): |
2101 | - self.splash_screen.setObjectName("splash_screen") |
2102 | + self.splash_screen.setObjectName(u'splash_screen') |
2103 | self.splash_screen.setWindowModality(QtCore.Qt.NonModal) |
2104 | self.splash_screen.setEnabled(True) |
2105 | self.splash_screen.resize(370, 370) |
2106 | @@ -41,8 +39,8 @@ |
2107 | self.splash_screen.setSizePolicy(sizePolicy) |
2108 | self.splash_screen.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) |
2109 | icon = QtGui.QIcon() |
2110 | - icon.addPixmap(QtGui.QPixmap(":/icon/openlp-logo-16x16.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
2111 | - splash_image = QtGui.QPixmap(":/graphics/openlp-splash-screen.png") |
2112 | + icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
2113 | + splash_image = QtGui.QPixmap(u':/graphics/openlp-splash-screen.png') |
2114 | self.splash_screen.setWindowIcon(icon) |
2115 | self.splash_screen.setPixmap(splash_image) |
2116 | self.splash_screen.setMask(splash_image.mask()) |
2117 | @@ -51,7 +49,7 @@ |
2118 | QtCore.QMetaObject.connectSlotsByName(self.splash_screen) |
2119 | |
2120 | def retranslateUi(self): |
2121 | - self.splash_screen.setWindowTitle(QtGui.QApplication.translate("splash_screen", "Splash Screen", None, QtGui.QApplication.UnicodeUTF8)) |
2122 | + self.splash_screen.setWindowTitle(translate(u'splash_screen', u'Splash Screen')) |
2123 | |
2124 | def show(self): |
2125 | self.splash_screen.show() |
2126 | |
2127 | === modified file 'openlp/core/ui/test/test_service_manager.py' |
2128 | --- openlp/core/ui/test/test_service_manager.py 2009-05-09 07:01:33 +0000 |
2129 | +++ openlp/core/ui/test/test_service_manager.py 2009-06-16 18:21:24 +0000 |
2130 | @@ -28,20 +28,20 @@ |
2131 | from openlp.plugins.images.lib import ImageServiceItem |
2132 | |
2133 | import logging |
2134 | -logging.basicConfig(filename="test_service_manager.log",level=logging.INFO, filemode="w") |
2135 | +logging.basicConfig(filename="test_service_manager.log",level=logging.INFO, filemode="w') |
2136 | |
2137 | # # from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66062 |
2138 | # def whoami(depth=1): |
2139 | # return sys._getframe(depth).f_code.co_name |
2140 | global app |
2141 | global log |
2142 | -log=logging.getLogger("TestServiceManager") |
2143 | +log=logging.getLogger(u'TestServiceManager') |
2144 | class TestServiceManager_base: |
2145 | def __init__(self): |
2146 | pass |
2147 | |
2148 | def setup_class(self): |
2149 | - log.info( "class setup"+str(self)) |
2150 | + log.info( "class setup"+unicode(self)) |
2151 | try: |
2152 | if app is None: |
2153 | app = QtGui.QApplication([]) |
2154 | @@ -53,11 +53,11 @@ |
2155 | pass |
2156 | |
2157 | def setup_method(self, method): |
2158 | - log.info("Setup method:"+str(method)) |
2159 | + log.info(u'Setup method:"+unicode(method)) |
2160 | self.expected_answer="Don't know yet" |
2161 | self.answer=None |
2162 | self.s=ServiceManager(None) |
2163 | - log.info("--------------- Setup Done -------------") |
2164 | + log.info(u'--------------- Setup Done -------------') |
2165 | |
2166 | def teardown_method(self, method): |
2167 | self.s=None |
2168 | @@ -69,64 +69,64 @@ |
2169 | # make a selection of it |
2170 | self.sm=QItemSelectionModel(self.s.service_data) |
2171 | self.sm.select(i, QItemSelectionModel.ClearAndSelect) |
2172 | - log.info(str(self.sm.selectedIndexes())) |
2173 | + log.info(unicode(self.sm.selectedIndexes())) |
2174 | self.s.TreeView.setSelectionModel(self.sm) |
2175 | - log.info("Selected indexes = " + str(self.s.TreeView.selectedIndexes())) |
2176 | + log.info(u'Selected indexes = " + unicode(self.s.TreeView.selectedIndexes())) |
2177 | def test_easy(self): |
2178 | - log.info("test_easy") |
2179 | + log.info(u'test_easy') |
2180 | item=ImageServiceItem(None) |
2181 | - item.add("test.gif") |
2182 | + item.add(u'test.gif') |
2183 | self.s.addServiceItem(item) |
2184 | answer = self.s.oos_as_text() |
2185 | - log.info("Answer = " + str(answer)) |
2186 | - lines=answer.split("\n") |
2187 | - log.info("lines = " + str(lines)) |
2188 | - assert lines[0].startswith("# <openlp.plugins.images.imageserviceitem.ImageServiceItem object") |
2189 | + log.info(u'Answer = " + unicode(answer)) |
2190 | + lines=answer.split(u'\n') |
2191 | + log.info(u'lines = " + unicode(lines)) |
2192 | + assert lines[0].startswith(u'# <openlp.plugins.images.imageserviceitem.ImageServiceItem object') |
2193 | assert lines[1] == "test.gif" |
2194 | - log.info("done") |
2195 | + log.info(u'done') |
2196 | |
2197 | def test_2items_as_separate_items(self): |
2198 | # If nothing is selected when item is added, a new base service item is added |
2199 | - log.info("test_2items_as_separate_items") |
2200 | + log.info(u'test_2items_as_separate_items') |
2201 | item=ImageServiceItem(None) |
2202 | - item.add("test.gif") |
2203 | + item.add(u'test.gif') |
2204 | self.s.addServiceItem(item) |
2205 | item=ImageServiceItem(None) |
2206 | - item.add("test2.gif") |
2207 | - item.add("test3.gif") |
2208 | + item.add(u'test2.gif') |
2209 | + item.add(u'test3.gif') |
2210 | self.s.addServiceItem(item) |
2211 | answer = self.s.oos_as_text() |
2212 | - log.info("Answer = " + str(answer)) |
2213 | - lines=answer.split("\n") |
2214 | - log.info("lines = " + str(lines)) |
2215 | - assert lines[0].startswith("# <openlp.plugins.images.imageserviceitem.ImageServiceItem object") |
2216 | + log.info(u'Answer = " + unicode(answer)) |
2217 | + lines=answer.split(u'\n') |
2218 | + log.info(u'lines = " + unicode(lines)) |
2219 | + assert lines[0].startswith(u'# <openlp.plugins.images.imageserviceitem.ImageServiceItem object') |
2220 | assert lines[1] == "test.gif" |
2221 | - assert lines[2].startswith("# <openlp.plugins.images.imageserviceitem.ImageServiceItem object") |
2222 | + assert lines[2].startswith(u'# <openlp.plugins.images.imageserviceitem.ImageServiceItem object') |
2223 | assert lines[3] == "test2.gif" |
2224 | assert lines[4] == "test3.gif" |
2225 | - log.info("done") |
2226 | + log.info(u'done') |
2227 | |
2228 | def test_2items_merged(self): |
2229 | # If the first object is selected when item is added it should be extended |
2230 | - log.info("test_2items_merged") |
2231 | + log.info(u'test_2items_merged') |
2232 | item=ImageServiceItem(None) |
2233 | - item.add("test.gif") |
2234 | + item.add(u'test.gif') |
2235 | self.s.addServiceItem(item) |
2236 | self.select_row(0) |
2237 | - log.info("Selected indexes = " + str(self.s.TreeView.selectedIndexes())) |
2238 | + log.info(u'Selected indexes = " + unicode(self.s.TreeView.selectedIndexes())) |
2239 | item=ImageServiceItem(None) |
2240 | - item.add("test2.gif") |
2241 | - item.add("test3.gif") |
2242 | + item.add(u'test2.gif') |
2243 | + item.add(u'test3.gif') |
2244 | self.s.addServiceItem(item) |
2245 | answer = self.s.oos_as_text() |
2246 | - log.info("Answer = " + str(answer)) |
2247 | - lines=answer.split("\n") |
2248 | - log.info("lines = " + str(lines)) |
2249 | - assert lines[0].startswith("# <openlp.plugins.images.imageserviceitem.ImageServiceItem object") |
2250 | + log.info(u'Answer = " + unicode(answer)) |
2251 | + lines=answer.split(u'\n') |
2252 | + log.info(u'lines = " + unicode(lines)) |
2253 | + assert lines[0].startswith(u'# <openlp.plugins.images.imageserviceitem.ImageServiceItem object') |
2254 | assert lines[1] == "test.gif" |
2255 | assert lines[2] == "test2.gif" |
2256 | assert lines[3] == "test3.gif" |
2257 | - log.info("done") |
2258 | + log.info(u'done') |
2259 | |
2260 | # more tests to do: |
2261 | # add different types of service item |
2262 | @@ -143,4 +143,4 @@ |
2263 | t.test_easy() |
2264 | t.teardown_method(None) |
2265 | print "Pass" |
2266 | - log.info("Pass") |
2267 | + log.info(u'Pass') |
2268 | \ No newline at end of file |
2269 | |
2270 | === modified file 'openlp/core/ui/thememanager.py' |
2271 | --- openlp/core/ui/thememanager.py 2009-06-10 15:37:33 +0000 |
2272 | +++ openlp/core/ui/thememanager.py 2009-06-16 18:21:24 +0000 |
2273 | @@ -58,12 +58,12 @@ |
2274 | def insertRow(self, row, filename): |
2275 | self.beginInsertRows(QtCore.QModelIndex(), row, row) |
2276 | log.info(u'insert row %d:%s' % (row, filename)) |
2277 | - (prefix, shortfilename) = os.path.split(str(filename)) |
2278 | + (prefix, shortfilename) = os.path.split(unicode(filename)) |
2279 | log.info(u'shortfilename = %s' % shortfilename) |
2280 | theme = shortfilename.split(u'.') |
2281 | # create a preview image |
2282 | if os.path.exists(filename): |
2283 | - preview = QtGui.QImage(str(filename)) |
2284 | + preview = QtGui.QImage(unicode(filename)) |
2285 | width = self.maximagewidth |
2286 | height = self.rowheight |
2287 | preview = preview.scaled(width, height, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation) |
2288 | @@ -117,7 +117,7 @@ |
2289 | return self.items[row] |
2290 | |
2291 | def getItem(self, row): |
2292 | - log.info(u'Get Item:%d -> %s' % (row, str(self.items))) |
2293 | + log.info(u'Get Item:%d -> %s' % (row, unicode(self.items))) |
2294 | return self.items[row] |
2295 | |
2296 | def getList(self): |
2297 | @@ -202,7 +202,7 @@ |
2298 | files = QtGui.QFileDialog.getOpenFileNames(None, |
2299 | translate(u'ThemeManager', u'Select Import File'), |
2300 | self.path, u'Theme (*.theme)') |
2301 | - log.info(u'New Themes %s', str(files)) |
2302 | + log.info(u'New Themes %s', unicode(files)) |
2303 | if len(files) > 0: |
2304 | for file in files: |
2305 | self.unzipTheme(file, self.path) |
2306 | @@ -224,17 +224,17 @@ |
2307 | |
2308 | def getThemeData(self, themename): |
2309 | log.debug(u'getthemedata for theme %s', themename) |
2310 | - xml_file = os.path.join(self.path, str(themename), str(themename) + u'.xml') |
2311 | + xml_file = os.path.join(self.path, unicode(themename), unicode(themename) + u'.xml') |
2312 | try: |
2313 | xml = file_to_xml(xml_file) |
2314 | except: |
2315 | newtheme = ThemeXML() |
2316 | newtheme.new_document(u'New Theme') |
2317 | - newtheme.add_background_solid(str(u'#000000')) |
2318 | - newtheme.add_font(str(QtGui.QFont().family()), str(u'#FFFFFF'), str(30), u'False') |
2319 | - newtheme.add_font(str(QtGui.QFont().family()), str(u'#FFFFFF'), str(12), u'False', u'footer') |
2320 | - newtheme.add_display(u'False', str(u'#FFFFFF'), u'False', str(u'#FFFFFF'), |
2321 | - str(0), str(0), str(0)) |
2322 | + newtheme.add_background_solid(unicode(u'#000000')) |
2323 | + newtheme.add_font(unicode(QtGui.QFont().family()), unicode(u'#FFFFFF'), unicode(30), u'False') |
2324 | + newtheme.add_font(unicode(QtGui.QFont().family()), unicode(u'#FFFFFF'), unicode(12), u'False', u'footer') |
2325 | + newtheme.add_display(u'False', unicode(u'#FFFFFF'), u'False', unicode(u'#FFFFFF'), |
2326 | + unicode(0), unicode(0), unicode(0)) |
2327 | xml = newtheme.extract_xml() |
2328 | theme = ThemeXML() |
2329 | theme.parse(xml) |
2330 | @@ -253,7 +253,7 @@ |
2331 | necessary. |
2332 | """ |
2333 | log.debug(u'Unzipping theme %s', filename) |
2334 | - zip = zipfile.ZipFile(str(filename)) |
2335 | + zip = zipfile.ZipFile(unicode(filename)) |
2336 | filexml = None |
2337 | themename = None |
2338 | for file in zip.namelist(): |
2339 | @@ -299,31 +299,31 @@ |
2340 | newtheme = ThemeXML() |
2341 | newtheme.new_document(theme.Name) |
2342 | if theme.BackgroundType == 0: |
2343 | - newtheme.add_background_solid(str(theme.BackgroundParameter1.name())) |
2344 | + newtheme.add_background_solid(unicode(theme.BackgroundParameter1.name())) |
2345 | elif theme.BackgroundType == 1: |
2346 | direction = u'vertical' |
2347 | if theme.BackgroundParameter3.name() == 1: |
2348 | direction = u'horizontal' |
2349 | newtheme.add_background_gradient( |
2350 | - str(theme.BackgroundParameter1.name()), |
2351 | - str(theme.BackgroundParameter2.name()), direction) |
2352 | + unicode(theme.BackgroundParameter1.name()), |
2353 | + unicode(theme.BackgroundParameter2.name()), direction) |
2354 | else: |
2355 | - newtheme.add_background_image(str(theme.BackgroundParameter1)) |
2356 | + newtheme.add_background_image(unicode(theme.BackgroundParameter1)) |
2357 | |
2358 | - newtheme.add_font(str(theme.FontName), str(theme.FontColor.name()), |
2359 | - str(theme.FontProportion * 2), u'False') |
2360 | - newtheme.add_font(str(theme.FontName), str(theme.FontColor.name()), |
2361 | - str(12), u'False', u'footer') |
2362 | + newtheme.add_font(unicode(theme.FontName), unicode(theme.FontColor.name()), |
2363 | + unicode(theme.FontProportion * 2), u'False') |
2364 | + newtheme.add_font(unicode(theme.FontName), unicode(theme.FontColor.name()), |
2365 | + unicode(12), u'False', u'footer') |
2366 | outline = False |
2367 | shadow = False |
2368 | if theme.Shadow == 1: |
2369 | shadow = True |
2370 | if theme.Outline == 1: |
2371 | outline = True |
2372 | - newtheme.add_display(str(shadow), str(theme.ShadowColor.name()), |
2373 | - str(outline), str(theme.OutlineColor.name()), |
2374 | - str(theme.HorizontalAlign), str(theme.VerticalAlign), |
2375 | - str(theme.WrapStyle)) |
2376 | + newtheme.add_display(unicode(shadow), unicode(theme.ShadowColor.name()), |
2377 | + unicode(outline), unicode(theme.OutlineColor.name()), |
2378 | + unicode(theme.HorizontalAlign), unicode(theme.VerticalAlign), |
2379 | + unicode(theme.WrapStyle)) |
2380 | return newtheme.extract_xml() |
2381 | |
2382 | def saveTheme(self, name, theme_xml, image_from, image_to) : |
2383 | @@ -362,4 +362,4 @@ |
2384 | def getPreviewImage(self, theme): |
2385 | log.debug(u'getPreviewImage %s ', theme) |
2386 | image = os.path.join(self.path, theme + u'.png') |
2387 | - return image |
2388 | + return image |
2389 | \ No newline at end of file |
2390 | |
2391 | === modified file 'openlp/core/ui/themestab.py' |
2392 | --- openlp/core/ui/themestab.py 2009-06-05 18:53:50 +0000 |
2393 | +++ openlp/core/ui/themestab.py 2009-06-16 18:21:24 +0000 |
2394 | @@ -97,7 +97,7 @@ |
2395 | QtCore.SIGNAL(u'pressed()'), self.onGlobalLevelButtonPressed) |
2396 | |
2397 | QtCore.QObject.connect(self.DefaultComboBox, |
2398 | - QtCore.SIGNAL("activated(int)"), self.onDefaultComboBoxChanged) |
2399 | + QtCore.SIGNAL(u'activated(int)'), self.onDefaultComboBoxChanged) |
2400 | |
2401 | #self.DefaultListView.setScaledContents(True) |
2402 | |
2403 | @@ -140,8 +140,8 @@ |
2404 | def onDefaultComboBoxChanged(self, value): |
2405 | self.global_theme = self.DefaultComboBox.currentText() |
2406 | self.parent.RenderManager.set_global_theme(self.global_theme, self.global_style) |
2407 | - image = self.parent.ThemeManagerContents.getPreviewImage(str(self.global_theme)) |
2408 | - preview = QtGui.QPixmap(str(image)) |
2409 | + image = self.parent.ThemeManagerContents.getPreviewImage(unicode(self.global_theme)) |
2410 | + preview = QtGui.QPixmap(unicode(image)) |
2411 | display = preview.scaled(300, 255, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation) |
2412 | self.DefaultListView.setPixmap(display) |
2413 | |
2414 | @@ -152,14 +152,14 @@ |
2415 | self.DefaultComboBox.clear() |
2416 | for theme in theme_list: |
2417 | self.DefaultComboBox.addItem(theme) |
2418 | - id = self.DefaultComboBox.findText(str(self.global_theme), QtCore.Qt.MatchExactly) |
2419 | + id = self.DefaultComboBox.findText(unicode(self.global_theme), QtCore.Qt.MatchExactly) |
2420 | if id == -1: |
2421 | id = 0 # Not Found |
2422 | self.global_theme = u'' |
2423 | self.DefaultComboBox.setCurrentIndex(id) |
2424 | self.parent.RenderManager.set_global_theme(self.global_theme, self.global_style) |
2425 | if self.global_theme is not u'': |
2426 | - image = self.parent.ThemeManagerContents.getPreviewImage(str(self.global_theme)) |
2427 | - preview = QtGui.QPixmap(str(image)) |
2428 | + image = self.parent.ThemeManagerContents.getPreviewImage(unicode(self.global_theme)) |
2429 | + preview = QtGui.QPixmap(unicode(image)) |
2430 | display = preview.scaled(300, 255, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation) |
2431 | - self.DefaultListView.setPixmap(display) |
2432 | + self.DefaultListView.setPixmap(display) |
2433 | \ No newline at end of file |
2434 | |
2435 | === modified file 'openlp/core/utils/confighelper.py' |
2436 | --- openlp/core/utils/confighelper.py 2009-06-04 16:53:49 +0000 |
2437 | +++ openlp/core/utils/confighelper.py 2009-06-16 18:21:24 +0000 |
2438 | @@ -42,7 +42,7 @@ |
2439 | except ImportError: |
2440 | path = os.path.join(os.getenv(u'HOME'), u'.openlp', u'data') |
2441 | reg = ConfigHelper.get_registry() |
2442 | - #path = ConfigHelper.get_config('main', 'data path', path) |
2443 | + #path = ConfigHelper.get_config(u'main', 'data path', path) |
2444 | if not os.path.exists(path): |
2445 | os.makedirs(path) |
2446 | return path |
2447 | @@ -89,4 +89,4 @@ |
2448 | except ImportError: |
2449 | config_path = os.path.join(os.getenv(u'HOME'), u'.openlp') |
2450 | ConfigHelper.__registry__ = Registry(config_path) |
2451 | - return ConfigHelper.__registry__ |
2452 | + return ConfigHelper.__registry__ |
2453 | \ No newline at end of file |
2454 | |
2455 | === modified file 'openlp/core/utils/registry.py' |
2456 | --- openlp/core/utils/registry.py 2009-06-05 18:53:50 +0000 |
2457 | +++ openlp/core/utils/registry.py 2009-06-16 18:21:24 +0000 |
2458 | @@ -54,7 +54,7 @@ |
2459 | Set a single value in the registry. |
2460 | """ |
2461 | try : |
2462 | - self.config.set(section, key, str(value)) |
2463 | + self.config.set(section, key, unicode(value)) |
2464 | return self._save() |
2465 | except: |
2466 | return False |
2467 | @@ -115,4 +115,4 @@ |
2468 | file_handle.close() |
2469 | return self._load() |
2470 | except: |
2471 | - return False |
2472 | + return False |
2473 | \ No newline at end of file |
2474 | |
2475 | === modified file 'openlp/migration/display.py' |
2476 | --- openlp/migration/display.py 2009-01-01 11:18:16 +0000 |
2477 | +++ openlp/migration/display.py 2009-06-16 18:21:24 +0000 |
2478 | @@ -20,8 +20,8 @@ |
2479 | |
2480 | class Display(): |
2481 | global log |
2482 | - log=logging.getLogger("Display Logger") |
2483 | - log.info("Display Class loaded") |
2484 | + log=logging.getLogger(u'Display Logger') |
2485 | + log.info(u'Display Class loaded') |
2486 | |
2487 | @staticmethod |
2488 | def output(string): |
2489 | @@ -31,5 +31,5 @@ |
2490 | @staticmethod |
2491 | def sub_output(string): |
2492 | if not string == None: |
2493 | - log.debug(" "+string); |
2494 | - print (" "+string) |
2495 | + log.debug(u' "+string); |
2496 | + print (u' "+string) |
2497 | \ No newline at end of file |
2498 | |
2499 | === modified file 'openlp/migration/migratebibles.py' |
2500 | --- openlp/migration/migratebibles.py 2009-01-01 11:18:16 +0000 |
2501 | +++ openlp/migration/migratebibles.py 2009-06-16 18:21:24 +0000 |
2502 | @@ -23,5 +23,5 @@ |
2503 | self.display = display |
2504 | |
2505 | def process(self): |
2506 | - self.display.output("Bible process started"); |
2507 | - self.display.output("Bible process finished"); |
2508 | + self.display.output(u'Bible process started'); |
2509 | + self.display.output(u'Bible process finished'); |
2510 | \ No newline at end of file |
2511 | |
2512 | === modified file 'openlp/migration/migratefiles.py' |
2513 | --- openlp/migration/migratefiles.py 2009-01-01 11:18:16 +0000 |
2514 | +++ openlp/migration/migratefiles.py 2009-06-16 18:21:24 +0000 |
2515 | @@ -22,20 +22,20 @@ |
2516 | self.display = display |
2517 | |
2518 | def process(self): |
2519 | - self.display.output("Files process started"); |
2520 | + self.display.output(u'Files process started'); |
2521 | self._initial_setup() |
2522 | - self.display.output("Files process finished"); |
2523 | + self.display.output(u'Files process finished'); |
2524 | |
2525 | def _initial_setup(self): |
2526 | - self.display.output("Initial Setup started"); |
2527 | + self.display.output(u'Initial Setup started'); |
2528 | ConfigHelper.get_data_path() |
2529 | - self.display.sub_output("Config created"); |
2530 | - ConfigHelper.get_config("bible", "data path") |
2531 | - self.display.sub_output("Config created"); |
2532 | - ConfigHelper.get_config("videos", "data path") |
2533 | - self.display.sub_output("videos created"); |
2534 | - ConfigHelper.get_config("images", "data path") |
2535 | - self.display.sub_output("images created"); |
2536 | - ConfigHelper.get_config("presentations", "data path") |
2537 | - self.display.sub_output("presentations created"); |
2538 | - self.display.output("Initial Setup finished"); |
2539 | + self.display.sub_output(u'Config created'); |
2540 | + ConfigHelper.get_config(u'bible", u'data path') |
2541 | + self.display.sub_output(u'Config created'); |
2542 | + ConfigHelper.get_config(u'videos", u'data path') |
2543 | + self.display.sub_output(u'videos created'); |
2544 | + ConfigHelper.get_config(u'images", u'data path') |
2545 | + self.display.sub_output(u'images created'); |
2546 | + ConfigHelper.get_config(u'presentations", u'data path') |
2547 | + self.display.sub_output(u'presentations created'); |
2548 | + self.display.output(u'Initial Setup finished'); |
2549 | \ No newline at end of file |
2550 | |
2551 | === modified file 'openlp/migration/migratesongs.py' |
2552 | --- openlp/migration/migratesongs.py 2009-05-02 21:40:10 +0000 |
2553 | +++ openlp/migration/migratesongs.py 2009-06-16 18:21:24 +0000 |
2554 | @@ -42,9 +42,9 @@ |
2555 | class MigrateSongs(): |
2556 | def __init__(self, display): |
2557 | self.display = display |
2558 | - self.config = PluginConfig('Songs') |
2559 | + self.config = PluginConfig(u'Songs') |
2560 | self.data_path = self.config.get_data_path() |
2561 | - self.database_files = self.config.get_files('sqlite') |
2562 | + self.database_files = self.config.get_files(u'sqlite') |
2563 | print self.database_files |
2564 | |
2565 | def process(self): |
2566 | @@ -66,49 +66,49 @@ |
2567 | def _v1_9_0_authors(self, database): |
2568 | self.display.sub_output(u'Authors Started for ' + database) |
2569 | conn = sqlite3.connect(self.data_path + os.sep + database) |
2570 | - conn.execute("""alter table authors rename to authors_temp;""") |
2571 | + conn.execute(u'""alter table authors rename to authors_temp;""') |
2572 | conn.commit() |
2573 | self.display.sub_output(u'old author renamed to author_temp') |
2574 | - conn.execute("""create table authors ( |
2575 | + conn.execute(u'""create table authors ( |
2576 | id integer primary key ASC AUTOINCREMENT, |
2577 | first_name varchar(128), |
2578 | last_name varchar(128), |
2579 | display_name varchar(255) |
2580 | - );""") |
2581 | + );""') |
2582 | conn.commit() |
2583 | self.display.sub_output(u'authors table created') |
2584 | - conn.execute("""create index if not exists author1 on authors |
2585 | - (display_name ASC,id ASC);""") |
2586 | + conn.execute(u'""create index if not exists author1 on authors |
2587 | + (display_name ASC,id ASC);""') |
2588 | conn.commit() |
2589 | self.display.sub_output(u'index author1 created') |
2590 | - conn.execute("""create index if not exists author2 on authors |
2591 | - (last_name ASC,id ASC);""") |
2592 | + conn.execute(u'""create index if not exists author2 on authors |
2593 | + (last_name ASC,id ASC);""') |
2594 | conn.commit() |
2595 | self.display.sub_output(u'index author2 created') |
2596 | - conn.execute("""create index if not exists author3 on authors |
2597 | - (first_name ASC,id ASC);""") |
2598 | + conn.execute(u'""create index if not exists author3 on authors |
2599 | + (first_name ASC,id ASC);""') |
2600 | conn.commit() |
2601 | self.display.sub_output(u'index author3 created') |
2602 | self.display.sub_output(u'Author Data Migration started') |
2603 | - conn.execute("""insert into authors (id, display_name) |
2604 | - select authorid, authorname from authors_temp;""") |
2605 | + conn.execute(u'""insert into authors (id, display_name) |
2606 | + select authorid, authorname from authors_temp;""') |
2607 | conn.commit() |
2608 | self.display.sub_output(u'authors populated') |
2609 | c = conn.cursor() |
2610 | - text = c.execute("""select * from authors""") .fetchall() |
2611 | + text = c.execute(u'""select * from authors""') .fetchall() |
2612 | for author in text: |
2613 | dispname = author[3] |
2614 | - dispname = dispname.replace("'", "") |
2615 | - pos = dispname.rfind(" ") |
2616 | + dispname = dispname.replace(u''", u'') |
2617 | + pos = dispname.rfind(u' ') |
2618 | authorfirstname = dispname[:pos] |
2619 | authorlastname = dispname[pos + 1:len(dispname)] |
2620 | s = "update authors set first_name = '" \ |
2621 | + authorfirstname + "', last_name = '" + authorlastname \ |
2622 | - + "' where id = " + str(author[0]) |
2623 | + + "' where id = " + unicode(author[0]) |
2624 | c.execute(s) |
2625 | conn.commit() |
2626 | self.display.sub_output(u'Author Data Migration Completed') |
2627 | - conn.execute("""drop table authors_temp;""") |
2628 | + conn.execute(u'""drop table authors_temp;""') |
2629 | conn.commit() |
2630 | conn.close() |
2631 | self.display.sub_output(u'author_temp dropped') |
2632 | @@ -117,17 +117,17 @@ |
2633 | def _v1_9_0_songbook(self, database): |
2634 | self.display.sub_output(u'SongBook Started for ' + database) |
2635 | conn = sqlite3.connect(self.data_path + os.sep + database) |
2636 | - conn.execute("""create table if not exists song_books ( |
2637 | + conn.execute(u'""create table if not exists song_books ( |
2638 | id integer Primary Key ASC AUTOINCREMENT, |
2639 | name varchar(128), |
2640 | publisher varchar(128) |
2641 | - );""") |
2642 | + );""') |
2643 | conn.commit() |
2644 | self.display.sub_output(u'songbook table created') |
2645 | - conn.execute("""create index if not exists songbook1 on song_books (name ASC,id ASC);""") |
2646 | + conn.execute(u'""create index if not exists songbook1 on song_books (name ASC,id ASC);""') |
2647 | conn.commit() |
2648 | self.display.sub_output(u'index songbook1 created') |
2649 | - conn.execute("""create index if not exists songbook2 on song_books (publisher ASC,id ASC);""") |
2650 | + conn.execute(u'""create index if not exists songbook2 on song_books (publisher ASC,id ASC);""') |
2651 | conn.commit() |
2652 | conn.close() |
2653 | self.display.sub_output(u'index songbook2 created') |
2654 | @@ -136,9 +136,9 @@ |
2655 | def _v1_9_0_songs(self, database): |
2656 | self.display.sub_output(u'Songs Started for ' + database) |
2657 | conn = sqlite3.connect(self.data_path + os.sep + database) |
2658 | - conn.execute("""alter table songs rename to songs_temp;""") |
2659 | + conn.execute(u'""alter table songs rename to songs_temp;""') |
2660 | conn.commit() |
2661 | - conn.execute("""create table if not exists songs ( |
2662 | + conn.execute(u'""create table if not exists songs ( |
2663 | id integer Primary Key ASC AUTOINCREMENT, |
2664 | song_book_id integer, |
2665 | title varchar(255), |
2666 | @@ -151,31 +151,31 @@ |
2667 | theme_name varchar(128), |
2668 | search_title varchar(255), |
2669 | search_lyrics text |
2670 | - );""") |
2671 | + );""') |
2672 | conn.commit() |
2673 | self.display.sub_output(u'songs table created') |
2674 | - conn.execute("""create index if not exists songs1 on songs |
2675 | - (search_lyrics ASC,id ASC);""") |
2676 | + conn.execute(u'""create index if not exists songs1 on songs |
2677 | + (search_lyrics ASC,id ASC);""') |
2678 | conn.commit() |
2679 | self.display.sub_output(u'index songs1 created') |
2680 | - conn.execute("""create index if not exists songs2 on songs |
2681 | - (search_title ASC,id ASC);""") |
2682 | + conn.execute(u'""create index if not exists songs2 on songs |
2683 | + (search_title ASC,id ASC);""') |
2684 | conn.commit() |
2685 | self.display.sub_output(u'index songs2 created') |
2686 | - conn.execute("""insert into songs (id, title, lyrics, copyright, |
2687 | + conn.execute(u'""insert into songs (id, title, lyrics, copyright, |
2688 | search_title, search_lyrics, song_book_id) |
2689 | select songid, songtitle, lyrics, copyrightinfo, |
2690 | replace(replace(replace(replace(replace(replace(replace(replace( |
2691 | replace(songtitle, '&', 'and'), ',', ''), ';', ''), ':', ''), |
2692 | - '(', ''), ')', ''), '{', ''), '}',''),'?',''), |
2693 | + '(u', ''), ')', ''), '{', ''), '}',''),'?',''), |
2694 | replace(replace(replace(replace(replace(replace(replace(replace( |
2695 | replace(lyrics, '&', 'and'), ',', ''), ';', ''), ':', ''), |
2696 | - '(', ''), ')', ''), '{', ''), '}',''),'?',''), |
2697 | + '(u', ''), ')', ''), '{', ''), '}',''),'?',''), |
2698 | 0 |
2699 | - from songs_temp;""") |
2700 | + from songs_temp;""') |
2701 | conn.commit() |
2702 | self.display.sub_output(u'songs populated') |
2703 | - conn.execute("""drop table songs_temp;""") |
2704 | + conn.execute(u'""drop table songs_temp;""') |
2705 | conn.commit() |
2706 | conn.close() |
2707 | self.display.sub_output(u'songs_temp dropped') |
2708 | @@ -185,12 +185,12 @@ |
2709 | self.display.sub_output(u'Topics Started for ' + database) |
2710 | conn = sqlite3.connect(self.data_path+os.sep+database) |
2711 | conn.text_factory = str |
2712 | - conn.execute("""create table if not exists topics |
2713 | + conn.execute(u'""create table if not exists topics |
2714 | (id integer Primary Key ASC AUTOINCREMENT, |
2715 | - name varchar(128));""") |
2716 | + name varchar(128));""') |
2717 | conn.commit() |
2718 | self.display.sub_output(u'Topic table created') |
2719 | - conn.execute("""create index if not exists topic1 on topics (name ASC,id ASC);""") |
2720 | + conn.execute(u'""create index if not exists topic1 on topics (name ASC,id ASC);""') |
2721 | conn.commit() |
2722 | conn.close() |
2723 | self.display.sub_output(u'index topic1 created') |
2724 | @@ -200,16 +200,16 @@ |
2725 | def _v1_9_0_songauthors(self, database): |
2726 | self.display.sub_output(u'SongAuthors Started for ' + database); |
2727 | conn = sqlite3.connect(self.data_path + os.sep + database) |
2728 | - conn.execute("""create table if not exists authors_songs |
2729 | + conn.execute(u'""create table if not exists authors_songs |
2730 | (author_id integer, |
2731 | - song_id integer);""") |
2732 | + song_id integer);""') |
2733 | conn.commit() |
2734 | self.display.sub_output(u'authors_songs table created') |
2735 | - conn.execute("""insert into authors_songs (author_id, song_id) |
2736 | - select authorid, songid from songauthors;""") |
2737 | + conn.execute(u'""insert into authors_songs (author_id, song_id) |
2738 | + select authorid, songid from songauthors;""') |
2739 | conn.commit() |
2740 | self.display.sub_output(u'authors_songs populated') |
2741 | - conn.execute("""drop table songauthors;""") |
2742 | + conn.execute(u'""drop table songauthors;""') |
2743 | conn.commit() |
2744 | self.display.sub_output(u'songauthors dropped') |
2745 | conn.close() |
2746 | @@ -218,15 +218,15 @@ |
2747 | def _v1_9_0_songtopics(self, database): |
2748 | self.display.sub_output(u'Songtopics Started for ' + database); |
2749 | conn = sqlite3.connect(self.data_path+os.sep+database) |
2750 | - conn.execute("""create table if not exists song_topics |
2751 | + conn.execute(u'""create table if not exists song_topics |
2752 | (song_id integer, |
2753 | - topic_id integer);""") |
2754 | + topic_id integer);""') |
2755 | conn.commit() |
2756 | self.display.sub_output(u'songtopics table created') |
2757 | - conn.execute("""create index if not exists songtopic1 on song_topics (topic_id ASC,song_id ASC);""") |
2758 | + conn.execute(u'""create index if not exists songtopic1 on song_topics (topic_id ASC,song_id ASC);""') |
2759 | conn.commit() |
2760 | self.display.sub_output(u'index songtopic1 created') |
2761 | - conn.execute("""create index if not exists songtopic2 on song_topics (song_id ASC,topic_id ASC);""") |
2762 | + conn.execute(u'""create index if not exists songtopic2 on song_topics (song_id ASC,topic_id ASC);""') |
2763 | conn.commit() |
2764 | conn.close() |
2765 | self.display.sub_output(u'index songtopic2 created') |
2766 | @@ -237,4 +237,4 @@ |
2767 | out = fileout.readlines() |
2768 | if len(out) > 0: |
2769 | for o in range (0, len(out)): |
2770 | - self.display.sub_output(out[o]) |
2771 | + self.display.sub_output(out[o]) |
2772 | \ No newline at end of file |
2773 | |
2774 | === modified file 'openlp/plugins/bibles/bibleplugin.py' |
2775 | --- openlp/plugins/bibles/bibleplugin.py 2009-05-21 05:15:51 +0000 |
2776 | +++ openlp/plugins/bibles/bibleplugin.py 2009-06-16 18:21:24 +0000 |
2777 | @@ -39,7 +39,7 @@ |
2778 | self.weight = -9 |
2779 | # Create the plugin icon |
2780 | self.icon = QtGui.QIcon() |
2781 | - self.icon.addPixmap(QtGui.QPixmap(':/media/media_verse.png'), |
2782 | + self.icon.addPixmap(QtGui.QPixmap(u':/media/media_verse.png'), |
2783 | QtGui.QIcon.Normal, QtGui.QIcon.Off) |
2784 | #Register the bible Manager |
2785 | self.biblemanager = BibleManager(self.config) |
2786 | @@ -55,17 +55,17 @@ |
2787 | |
2788 | def add_import_menu_item(self, import_menu): |
2789 | self.ImportBibleItem = QtGui.QAction(import_menu) |
2790 | - self.ImportBibleItem.setObjectName("ImportBibleItem") |
2791 | + self.ImportBibleItem.setObjectName(u'ImportBibleItem') |
2792 | import_menu.addAction(self.ImportBibleItem) |
2793 | - self.ImportBibleItem.setText(translate("BiblePlugin", "&Bible")) |
2794 | + self.ImportBibleItem.setText(translate(u'BiblePlugin', u'&Bible')) |
2795 | # Signals and slots |
2796 | - QtCore.QObject.connect(self.ImportBibleItem, QtCore.SIGNAL("triggered()"), self.onBibleNewClick) |
2797 | + QtCore.QObject.connect(self.ImportBibleItem, QtCore.SIGNAL(u'triggered()'), self.onBibleNewClick) |
2798 | |
2799 | def add_export_menu_item(self, export_menu): |
2800 | self.ExportBibleItem = QtGui.QAction(export_menu) |
2801 | - self.ExportBibleItem.setObjectName("ExportBibleItem") |
2802 | + self.ExportBibleItem.setObjectName(u'ExportBibleItem') |
2803 | export_menu.addAction(self.ExportBibleItem) |
2804 | - self.ExportBibleItem.setText(translate("BiblePlugin", u'&Bible')) |
2805 | + self.ExportBibleItem.setText(translate(u'BiblePlugin', u'&Bible')) |
2806 | |
2807 | def initialise(self): |
2808 | pass |
2809 | |
2810 | === modified file 'openlp/plugins/bibles/forms/bibleimportdialog.py' |
2811 | --- openlp/plugins/bibles/forms/bibleimportdialog.py 2009-06-01 17:50:37 +0000 |
2812 | +++ openlp/plugins/bibles/forms/bibleimportdialog.py 2009-06-16 18:21:24 +0000 |
2813 | @@ -11,178 +11,178 @@ |
2814 | |
2815 | class Ui_BibleImportDialog(object): |
2816 | def setupUi(self, BibleImportDialog): |
2817 | - BibleImportDialog.setObjectName("BibleImportDialog") |
2818 | + BibleImportDialog.setObjectName(u'BibleImportDialog') |
2819 | BibleImportDialog.resize(494, 725) |
2820 | icon = QtGui.QIcon() |
2821 | - icon.addPixmap(QtGui.QPixmap(":/icon/openlp-logo-16x16.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
2822 | + icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
2823 | BibleImportDialog.setWindowIcon(icon) |
2824 | self.ImportToolBox = QtGui.QToolBox(BibleImportDialog) |
2825 | self.ImportToolBox.setGeometry(QtCore.QRect(20, 20, 451, 401)) |
2826 | self.ImportToolBox.setFrameShape(QtGui.QFrame.StyledPanel) |
2827 | - self.ImportToolBox.setObjectName("ImportToolBox") |
2828 | + self.ImportToolBox.setObjectName(u'ImportToolBox') |
2829 | self.FileImportPage = QtGui.QWidget() |
2830 | self.FileImportPage.setGeometry(QtCore.QRect(0, 0, 447, 337)) |
2831 | - self.FileImportPage.setObjectName("FileImportPage") |
2832 | + self.FileImportPage.setObjectName(u'FileImportPage') |
2833 | self.OSISGroupBox = QtGui.QGroupBox(self.FileImportPage) |
2834 | self.OSISGroupBox.setGeometry(QtCore.QRect(18, 65, 411, 81)) |
2835 | - self.OSISGroupBox.setObjectName("OSISGroupBox") |
2836 | + self.OSISGroupBox.setObjectName(u'OSISGroupBox') |
2837 | self.gridLayout_2 = QtGui.QGridLayout(self.OSISGroupBox) |
2838 | self.gridLayout_2.setMargin(8) |
2839 | self.gridLayout_2.setSpacing(8) |
2840 | - self.gridLayout_2.setObjectName("gridLayout_2") |
2841 | + self.gridLayout_2.setObjectName(u'gridLayout_2') |
2842 | self.LocatioLabel = QtGui.QLabel(self.OSISGroupBox) |
2843 | - self.LocatioLabel.setObjectName("LocatioLabel") |
2844 | + self.LocatioLabel.setObjectName(u'LocatioLabel') |
2845 | self.gridLayout_2.addWidget(self.LocatioLabel, 0, 0, 1, 1) |
2846 | self.OSISLocationEdit = QtGui.QLineEdit(self.OSISGroupBox) |
2847 | - self.OSISLocationEdit.setObjectName("OSISLocationEdit") |
2848 | + self.OSISLocationEdit.setObjectName(u'OSISLocationEdit') |
2849 | self.gridLayout_2.addWidget(self.OSISLocationEdit, 0, 1, 1, 1) |
2850 | self.OsisFileButton = QtGui.QPushButton(self.OSISGroupBox) |
2851 | icon1 = QtGui.QIcon() |
2852 | - icon1.addPixmap(QtGui.QPixmap(":/imports/import_load.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
2853 | + icon1.addPixmap(QtGui.QPixmap(u':/imports/import_load.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
2854 | self.OsisFileButton.setIcon(icon1) |
2855 | - self.OsisFileButton.setObjectName("OsisFileButton") |
2856 | + self.OsisFileButton.setObjectName(u'OsisFileButton') |
2857 | self.gridLayout_2.addWidget(self.OsisFileButton, 0, 2, 1, 1) |
2858 | self.CVSGroupBox = QtGui.QGroupBox(self.FileImportPage) |
2859 | self.CVSGroupBox.setGeometry(QtCore.QRect(20, 170, 411, 191)) |
2860 | - self.CVSGroupBox.setObjectName("CVSGroupBox") |
2861 | + self.CVSGroupBox.setObjectName(u'CVSGroupBox') |
2862 | self.gridLayout = QtGui.QGridLayout(self.CVSGroupBox) |
2863 | self.gridLayout.setMargin(8) |
2864 | self.gridLayout.setSpacing(8) |
2865 | - self.gridLayout.setObjectName("gridLayout") |
2866 | + self.gridLayout.setObjectName(u'gridLayout') |
2867 | self.BooksLocationLabel = QtGui.QLabel(self.CVSGroupBox) |
2868 | - self.BooksLocationLabel.setObjectName("BooksLocationLabel") |
2869 | + self.BooksLocationLabel.setObjectName(u'BooksLocationLabel') |
2870 | self.gridLayout.addWidget(self.BooksLocationLabel, 0, 0, 1, 1) |
2871 | self.VerseLocationLabel = QtGui.QLabel(self.CVSGroupBox) |
2872 | - self.VerseLocationLabel.setObjectName("VerseLocationLabel") |
2873 | + self.VerseLocationLabel.setObjectName(u'VerseLocationLabel') |
2874 | self.gridLayout.addWidget(self.VerseLocationLabel, 4, 0, 1, 1) |
2875 | self.VerseLocationEdit = QtGui.QLineEdit(self.CVSGroupBox) |
2876 | - self.VerseLocationEdit.setObjectName("VerseLocationEdit") |
2877 | + self.VerseLocationEdit.setObjectName(u'VerseLocationEdit') |
2878 | self.gridLayout.addWidget(self.VerseLocationEdit, 4, 1, 1, 1) |
2879 | self.BooksLocationEdit = QtGui.QLineEdit(self.CVSGroupBox) |
2880 | - self.BooksLocationEdit.setObjectName("BooksLocationEdit") |
2881 | + self.BooksLocationEdit.setObjectName(u'BooksLocationEdit') |
2882 | self.gridLayout.addWidget(self.BooksLocationEdit, 0, 1, 1, 1) |
2883 | self.BooksFileButton = QtGui.QPushButton(self.CVSGroupBox) |
2884 | self.BooksFileButton.setIcon(icon1) |
2885 | - self.BooksFileButton.setObjectName("BooksFileButton") |
2886 | + self.BooksFileButton.setObjectName(u'BooksFileButton') |
2887 | self.gridLayout.addWidget(self.BooksFileButton, 0, 2, 1, 1) |
2888 | self.VersesFileButton = QtGui.QPushButton(self.CVSGroupBox) |
2889 | self.VersesFileButton.setIcon(icon1) |
2890 | - self.VersesFileButton.setObjectName("VersesFileButton") |
2891 | + self.VersesFileButton.setObjectName(u'VersesFileButton') |
2892 | self.gridLayout.addWidget(self.VersesFileButton, 4, 2, 1, 1) |
2893 | self.BibleNameEdit = QtGui.QLineEdit(self.FileImportPage) |
2894 | self.BibleNameEdit.setGeometry(QtCore.QRect(100, 20, 280, 28)) |
2895 | - self.BibleNameEdit.setObjectName("BibleNameEdit") |
2896 | + self.BibleNameEdit.setObjectName(u'BibleNameEdit') |
2897 | self.BibleNameLabel = QtGui.QLabel(self.FileImportPage) |
2898 | self.BibleNameLabel.setGeometry(QtCore.QRect(18, 20, 98, 22)) |
2899 | - self.BibleNameLabel.setObjectName("BibleNameLabel") |
2900 | - self.ImportToolBox.addItem(self.FileImportPage, "") |
2901 | + self.BibleNameLabel.setObjectName(u'BibleNameLabel') |
2902 | + self.ImportToolBox.addItem(self.FileImportPage, u'') |
2903 | self.WebBiblePage = QtGui.QWidget() |
2904 | self.WebBiblePage.setGeometry(QtCore.QRect(0, 0, 447, 337)) |
2905 | - self.WebBiblePage.setObjectName("WebBiblePage") |
2906 | + self.WebBiblePage.setObjectName(u'WebBiblePage') |
2907 | self.WebBibleLayout = QtGui.QVBoxLayout(self.WebBiblePage) |
2908 | self.WebBibleLayout.setSpacing(8) |
2909 | self.WebBibleLayout.setMargin(8) |
2910 | - self.WebBibleLayout.setObjectName("WebBibleLayout") |
2911 | + self.WebBibleLayout.setObjectName(u'WebBibleLayout') |
2912 | self.OptionsGroupBox = QtGui.QGroupBox(self.WebBiblePage) |
2913 | - self.OptionsGroupBox.setObjectName("OptionsGroupBox") |
2914 | + self.OptionsGroupBox.setObjectName(u'OptionsGroupBox') |
2915 | self.formLayout_2 = QtGui.QFormLayout(self.OptionsGroupBox) |
2916 | - self.formLayout_2.setObjectName("formLayout_2") |
2917 | + self.formLayout_2.setObjectName(u'formLayout_2') |
2918 | self.LocationLabel = QtGui.QLabel(self.OptionsGroupBox) |
2919 | - self.LocationLabel.setObjectName("LocationLabel") |
2920 | + self.LocationLabel.setObjectName(u'LocationLabel') |
2921 | self.formLayout_2.setWidget(0, QtGui.QFormLayout.LabelRole, self.LocationLabel) |
2922 | self.LocationComboBox = QtGui.QComboBox(self.OptionsGroupBox) |
2923 | - self.LocationComboBox.setObjectName("LocationComboBox") |
2924 | + self.LocationComboBox.setObjectName(u'LocationComboBox') |
2925 | self.LocationComboBox.addItem(QtCore.QString()) |
2926 | self.formLayout_2.setWidget(0, QtGui.QFormLayout.FieldRole, self.LocationComboBox) |
2927 | self.BibleLabel = QtGui.QLabel(self.OptionsGroupBox) |
2928 | - self.BibleLabel.setObjectName("BibleLabel") |
2929 | + self.BibleLabel.setObjectName(u'BibleLabel') |
2930 | self.formLayout_2.setWidget(1, QtGui.QFormLayout.LabelRole, self.BibleLabel) |
2931 | self.BibleComboBox = QtGui.QComboBox(self.OptionsGroupBox) |
2932 | - self.BibleComboBox.setObjectName("BibleComboBox") |
2933 | + self.BibleComboBox.setObjectName(u'BibleComboBox') |
2934 | self.BibleComboBox.addItem(QtCore.QString()) |
2935 | - self.BibleComboBox.setItemText(0, "") |
2936 | + self.BibleComboBox.setItemText(0, u'') |
2937 | self.BibleComboBox.addItem(QtCore.QString()) |
2938 | self.BibleComboBox.addItem(QtCore.QString()) |
2939 | self.formLayout_2.setWidget(1, QtGui.QFormLayout.FieldRole, self.BibleComboBox) |
2940 | self.WebBibleLayout.addWidget(self.OptionsGroupBox) |
2941 | self.ProxyGroupBox = QtGui.QGroupBox(self.WebBiblePage) |
2942 | - self.ProxyGroupBox.setObjectName("ProxyGroupBox") |
2943 | + self.ProxyGroupBox.setObjectName(u'ProxyGroupBox') |
2944 | self.ProxySettingsLayout = QtGui.QFormLayout(self.ProxyGroupBox) |
2945 | self.ProxySettingsLayout.setFieldGrowthPolicy(QtGui.QFormLayout.AllNonFixedFieldsGrow) |
2946 | self.ProxySettingsLayout.setMargin(8) |
2947 | self.ProxySettingsLayout.setSpacing(8) |
2948 | - self.ProxySettingsLayout.setObjectName("ProxySettingsLayout") |
2949 | + self.ProxySettingsLayout.setObjectName(u'ProxySettingsLayout') |
2950 | self.AddressLabel = QtGui.QLabel(self.ProxyGroupBox) |
2951 | - self.AddressLabel.setObjectName("AddressLabel") |
2952 | + self.AddressLabel.setObjectName(u'AddressLabel') |
2953 | self.ProxySettingsLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.AddressLabel) |
2954 | self.AddressEdit = QtGui.QLineEdit(self.ProxyGroupBox) |
2955 | - self.AddressEdit.setObjectName("AddressEdit") |
2956 | + self.AddressEdit.setObjectName(u'AddressEdit') |
2957 | self.ProxySettingsLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.AddressEdit) |
2958 | self.UsernameLabel = QtGui.QLabel(self.ProxyGroupBox) |
2959 | - self.UsernameLabel.setObjectName("UsernameLabel") |
2960 | + self.UsernameLabel.setObjectName(u'UsernameLabel') |
2961 | self.ProxySettingsLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.UsernameLabel) |
2962 | self.UsernameEdit = QtGui.QLineEdit(self.ProxyGroupBox) |
2963 | - self.UsernameEdit.setObjectName("UsernameEdit") |
2964 | + self.UsernameEdit.setObjectName(u'UsernameEdit') |
2965 | self.ProxySettingsLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.UsernameEdit) |
2966 | self.PasswordLabel = QtGui.QLabel(self.ProxyGroupBox) |
2967 | - self.PasswordLabel.setObjectName("PasswordLabel") |
2968 | + self.PasswordLabel.setObjectName(u'PasswordLabel') |
2969 | self.ProxySettingsLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.PasswordLabel) |
2970 | self.PasswordEdit = QtGui.QLineEdit(self.ProxyGroupBox) |
2971 | self.PasswordEdit.setEchoMode(QtGui.QLineEdit.Password) |
2972 | - self.PasswordEdit.setObjectName("PasswordEdit") |
2973 | + self.PasswordEdit.setObjectName(u'PasswordEdit') |
2974 | self.ProxySettingsLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.PasswordEdit) |
2975 | self.WebBibleLayout.addWidget(self.ProxyGroupBox) |
2976 | - self.ImportToolBox.addItem(self.WebBiblePage, "") |
2977 | + self.ImportToolBox.addItem(self.WebBiblePage, u'') |
2978 | self.LicenceDetailsGroupBox = QtGui.QGroupBox(BibleImportDialog) |
2979 | self.LicenceDetailsGroupBox.setGeometry(QtCore.QRect(10, 435, 471, 151)) |
2980 | self.LicenceDetailsGroupBox.setMinimumSize(QtCore.QSize(0, 123)) |
2981 | - self.LicenceDetailsGroupBox.setObjectName("LicenceDetailsGroupBox") |
2982 | + self.LicenceDetailsGroupBox.setObjectName(u'LicenceDetailsGroupBox') |
2983 | self.formLayout = QtGui.QFormLayout(self.LicenceDetailsGroupBox) |
2984 | self.formLayout.setMargin(8) |
2985 | self.formLayout.setHorizontalSpacing(8) |
2986 | - self.formLayout.setObjectName("formLayout") |
2987 | + self.formLayout.setObjectName(u'formLayout') |
2988 | self.VersionNameLabel = QtGui.QLabel(self.LicenceDetailsGroupBox) |
2989 | - self.VersionNameLabel.setObjectName("VersionNameLabel") |
2990 | + self.VersionNameLabel.setObjectName(u'VersionNameLabel') |
2991 | self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.VersionNameLabel) |
2992 | self.VersionNameEdit = QtGui.QLineEdit(self.LicenceDetailsGroupBox) |
2993 | - self.VersionNameEdit.setObjectName("VersionNameEdit") |
2994 | + self.VersionNameEdit.setObjectName(u'VersionNameEdit') |
2995 | self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.VersionNameEdit) |
2996 | self.CopyrightLabel = QtGui.QLabel(self.LicenceDetailsGroupBox) |
2997 | - self.CopyrightLabel.setObjectName("CopyrightLabel") |
2998 | + self.CopyrightLabel.setObjectName(u'CopyrightLabel') |
2999 | self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.CopyrightLabel) |
3000 | self.CopyrightEdit = QtGui.QLineEdit(self.LicenceDetailsGroupBox) |
3001 | - self.CopyrightEdit.setObjectName("CopyrightEdit") |
3002 | + self.CopyrightEdit.setObjectName(u'CopyrightEdit') |
3003 | self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.CopyrightEdit) |
3004 | self.PermisionLabel = QtGui.QLabel(self.LicenceDetailsGroupBox) |
3005 | - self.PermisionLabel.setObjectName("PermisionLabel") |
3006 | + self.PermisionLabel.setObjectName(u'PermisionLabel') |
3007 | self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.PermisionLabel) |
3008 | self.PermisionEdit = QtGui.QLineEdit(self.LicenceDetailsGroupBox) |
3009 | - self.PermisionEdit.setObjectName("PermisionEdit") |
3010 | + self.PermisionEdit.setObjectName(u'PermisionEdit') |
3011 | self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.PermisionEdit) |
3012 | self.MessageLabel = QtGui.QLabel(BibleImportDialog) |
3013 | self.MessageLabel.setGeometry(QtCore.QRect(20, 670, 271, 17)) |
3014 | - self.MessageLabel.setObjectName("MessageLabel") |
3015 | + self.MessageLabel.setObjectName(u'MessageLabel') |
3016 | self.ProgressGroupBox = QtGui.QGroupBox(BibleImportDialog) |
3017 | self.ProgressGroupBox.setGeometry(QtCore.QRect(10, 600, 471, 70)) |
3018 | - self.ProgressGroupBox.setObjectName("ProgressGroupBox") |
3019 | + self.ProgressGroupBox.setObjectName(u'ProgressGroupBox') |
3020 | self.gridLayout_3 = QtGui.QGridLayout(self.ProgressGroupBox) |
3021 | - self.gridLayout_3.setObjectName("gridLayout_3") |
3022 | + self.gridLayout_3.setObjectName(u'gridLayout_3') |
3023 | self.ProgressBar = QtGui.QProgressBar(self.ProgressGroupBox) |
3024 | - self.ProgressBar.setProperty("value", QtCore.QVariant(0)) |
3025 | + self.ProgressBar.setProperty(u'value', QtCore.QVariant(0)) |
3026 | self.ProgressBar.setInvertedAppearance(False) |
3027 | - self.ProgressBar.setObjectName("ProgressBar") |
3028 | + self.ProgressBar.setObjectName(u'ProgressBar') |
3029 | self.gridLayout_3.addWidget(self.ProgressBar, 0, 0, 1, 1) |
3030 | self.layoutWidget = QtGui.QWidget(BibleImportDialog) |
3031 | self.layoutWidget.setGeometry(QtCore.QRect(300, 680, 180, 38)) |
3032 | - self.layoutWidget.setObjectName("layoutWidget") |
3033 | + self.layoutWidget.setObjectName(u'layoutWidget') |
3034 | self.horizontalLayout = QtGui.QHBoxLayout(self.layoutWidget) |
3035 | self.horizontalLayout.setMargin(6) |
3036 | - self.horizontalLayout.setObjectName("horizontalLayout") |
3037 | + self.horizontalLayout.setObjectName(u'horizontalLayout') |
3038 | self.ImportButton = QtGui.QPushButton(self.layoutWidget) |
3039 | - self.ImportButton.setObjectName("ImportButton") |
3040 | + self.ImportButton.setObjectName(u'ImportButton') |
3041 | self.horizontalLayout.addWidget(self.ImportButton) |
3042 | self.CancelButton = QtGui.QPushButton(self.layoutWidget) |
3043 | - self.CancelButton.setObjectName("CancelButton") |
3044 | + self.CancelButton.setObjectName(u'CancelButton') |
3045 | self.horizontalLayout.addWidget(self.CancelButton) |
3046 | |
3047 | self.retranslateUi(BibleImportDialog) |
3048 | @@ -205,31 +205,30 @@ |
3049 | BibleImportDialog.setTabOrder(self.CopyrightEdit, self.PermisionEdit) |
3050 | |
3051 | def retranslateUi(self, BibleImportDialog): |
3052 | - BibleImportDialog.setWindowTitle(QtGui.QApplication.translate("BibleImportDialog", "Bible Registration", None, QtGui.QApplication.UnicodeUTF8)) |
3053 | - self.OSISGroupBox.setTitle(QtGui.QApplication.translate("BibleImportDialog", "OSIS Bible", None, QtGui.QApplication.UnicodeUTF8)) |
3054 | - self.LocatioLabel.setText(QtGui.QApplication.translate("BibleImportDialog", "File Location:", None, QtGui.QApplication.UnicodeUTF8)) |
3055 | - self.CVSGroupBox.setTitle(QtGui.QApplication.translate("BibleImportDialog", "CVS Bible", None, QtGui.QApplication.UnicodeUTF8)) |
3056 | - self.BooksLocationLabel.setText(QtGui.QApplication.translate("BibleImportDialog", "Books Location:", None, QtGui.QApplication.UnicodeUTF8)) |
3057 | - self.VerseLocationLabel.setText(QtGui.QApplication.translate("BibleImportDialog", "Verse Location:", None, QtGui.QApplication.UnicodeUTF8)) |
3058 | - self.BibleNameLabel.setText(QtGui.QApplication.translate("BibleImportDialog", "Bible Name:", None, QtGui.QApplication.UnicodeUTF8)) |
3059 | - self.ImportToolBox.setItemText(self.ImportToolBox.indexOf(self.FileImportPage), QtGui.QApplication.translate("BibleImportDialog", "File Import Page", None, QtGui.QApplication.UnicodeUTF8)) |
3060 | - self.OptionsGroupBox.setTitle(QtGui.QApplication.translate("BibleImportDialog", "Download Options", None, QtGui.QApplication.UnicodeUTF8)) |
3061 | - self.LocationLabel.setText(QtGui.QApplication.translate("BibleImportDialog", "Location:", None, QtGui.QApplication.UnicodeUTF8)) |
3062 | - self.LocationComboBox.setItemText(0, QtGui.QApplication.translate("BibleImportDialog", "Crosswalk", None, QtGui.QApplication.UnicodeUTF8)) |
3063 | - self.BibleLabel.setText(QtGui.QApplication.translate("BibleImportDialog", "Bible:", None, QtGui.QApplication.UnicodeUTF8)) |
3064 | - self.BibleComboBox.setItemText(1, QtGui.QApplication.translate("BibleImportDialog", "NIV", None, QtGui.QApplication.UnicodeUTF8)) |
3065 | - self.BibleComboBox.setItemText(2, QtGui.QApplication.translate("BibleImportDialog", "KJV", None, QtGui.QApplication.UnicodeUTF8)) |
3066 | - self.ProxyGroupBox.setTitle(QtGui.QApplication.translate("BibleImportDialog", "Proxy Settings (Optional)", None, QtGui.QApplication.UnicodeUTF8)) |
3067 | - self.AddressLabel.setText(QtGui.QApplication.translate("BibleImportDialog", "Proxy Address:", None, QtGui.QApplication.UnicodeUTF8)) |
3068 | - self.UsernameLabel.setText(QtGui.QApplication.translate("BibleImportDialog", "Username:", None, QtGui.QApplication.UnicodeUTF8)) |
3069 | - self.PasswordLabel.setText(QtGui.QApplication.translate("BibleImportDialog", "Password:", None, QtGui.QApplication.UnicodeUTF8)) |
3070 | - self.ImportToolBox.setItemText(self.ImportToolBox.indexOf(self.WebBiblePage), QtGui.QApplication.translate("BibleImportDialog", "Web Bible Import page", None, QtGui.QApplication.UnicodeUTF8)) |
3071 | - self.LicenceDetailsGroupBox.setTitle(QtGui.QApplication.translate("BibleImportDialog", "Licence Details", None, QtGui.QApplication.UnicodeUTF8)) |
3072 | - self.VersionNameLabel.setText(QtGui.QApplication.translate("BibleImportDialog", "Version Name:", None, QtGui.QApplication.UnicodeUTF8)) |
3073 | - self.CopyrightLabel.setText(QtGui.QApplication.translate("BibleImportDialog", "Copyright:", None, QtGui.QApplication.UnicodeUTF8)) |
3074 | - self.PermisionLabel.setText(QtGui.QApplication.translate("BibleImportDialog", "Permission:", None, QtGui.QApplication.UnicodeUTF8)) |
3075 | - self.ProgressGroupBox.setTitle(QtGui.QApplication.translate("BibleImportDialog", "Import Progress", None, QtGui.QApplication.UnicodeUTF8)) |
3076 | - self.ProgressBar.setFormat(QtGui.QApplication.translate("BibleImportDialog", "%p", None, QtGui.QApplication.UnicodeUTF8)) |
3077 | - self.ImportButton.setText(QtGui.QApplication.translate("BibleImportDialog", "Import", None, QtGui.QApplication.UnicodeUTF8)) |
3078 | - self.CancelButton.setText(QtGui.QApplication.translate("BibleImportDialog", "Cancel", None, QtGui.QApplication.UnicodeUTF8)) |
3079 | - |
3080 | + BibleImportDialog.setWindowTitle(translate(u'BibleImportDialog', u'Bible Registration')) |
3081 | + self.OSISGroupBox.setTitle(translate(u'BibleImportDialog', u'OSIS Bible')) |
3082 | + self.LocatioLabel.setText(translate(u'BibleImportDialog', u'File Location:')) |
3083 | + self.CVSGroupBox.setTitle(translate(u'BibleImportDialog', u'CVS Bible')) |
3084 | + self.BooksLocationLabel.setText(translate(u'BibleImportDialog', u'Books Location:')) |
3085 | + self.VerseLocationLabel.setText(translate(u'BibleImportDialog', u'Verse Location:')) |
3086 | + self.BibleNameLabel.setText(translate(u'BibleImportDialog', u'Bible Name:')) |
3087 | + self.ImportToolBox.setItemText(self.ImportToolBox.indexOf(self.FileImportPage), translate(u'BibleImportDialog', u'File Import Page')) |
3088 | + self.OptionsGroupBox.setTitle(translate(u'BibleImportDialog', u'Download Options')) |
3089 | + self.LocationLabel.setText(translate(u'BibleImportDialog', u'Location:')) |
3090 | + self.LocationComboBox.setItemText(0, translate(u'BibleImportDialog', u'Crosswalk')) |
3091 | + self.BibleLabel.setText(translate(u'BibleImportDialog', u'Bible:')) |
3092 | + self.BibleComboBox.setItemText(1, translate(u'BibleImportDialog', u'NIV')) |
3093 | + self.BibleComboBox.setItemText(2, translate(u'BibleImportDialog', u'KJV')) |
3094 | + self.ProxyGroupBox.setTitle(translate(u'BibleImportDialog', u'Proxy Settings (Optional)')) |
3095 | + self.AddressLabel.setText(translate(u'BibleImportDialog', u'Proxy Address:')) |
3096 | + self.UsernameLabel.setText(translate(u'BibleImportDialog', u'Username:')) |
3097 | + self.PasswordLabel.setText(translate(u'BibleImportDialog', u'Password:')) |
3098 | + self.ImportToolBox.setItemText(self.ImportToolBox.indexOf(self.WebBiblePage), translate(u'BibleImportDialog', u'Web Bible Import page')) |
3099 | + self.LicenceDetailsGroupBox.setTitle(translate(u'BibleImportDialog', u'Licence Details')) |
3100 | + self.VersionNameLabel.setText(translate(u'BibleImportDialog', u'Version Name:')) |
3101 | + self.CopyrightLabel.setText(translate(u'BibleImportDialog', u'Copyright:')) |
3102 | + self.PermisionLabel.setText(translate(u'BibleImportDialog', u'Permission:')) |
3103 | + self.ProgressGroupBox.setTitle(translate(u'BibleImportDialog', u'Import Progress')) |
3104 | + self.ProgressBar.setFormat(translate(u'BibleImportDialog', u'%p')) |
3105 | + self.ImportButton.setText(translate(u'BibleImportDialog', u'Import')) |
3106 | + self.CancelButton.setText(translate(u'BibleImportDialog', u'Cancel')) |
3107 | |
3108 | === modified file 'openlp/plugins/bibles/forms/bibleimportform.py' |
3109 | --- openlp/plugins/bibles/forms/bibleimportform.py 2009-06-08 05:04:06 +0000 |
3110 | +++ openlp/plugins/bibles/forms/bibleimportform.py 2009-06-16 18:21:24 +0000 |
3111 | @@ -61,7 +61,7 @@ |
3112 | for line in fbibles: |
3113 | p = line.split(u',') |
3114 | self.bible_versions[p[0]] = p[1].replace(u'\n', u'') |
3115 | - self.BibleComboBox.addItem(str(p[0])) |
3116 | + self.BibleComboBox.addItem(unicode(p[0])) |
3117 | |
3118 | #Combo Boxes |
3119 | QtCore.QObject.connect(self.LocationComboBox, |
3120 | @@ -133,20 +133,20 @@ |
3121 | self.checkOsis() |
3122 | |
3123 | def onProxyAddressEditLostFocus(self): |
3124 | - self.config.set_config(u'proxy_address', str(self.AddressEdit.displayText())) |
3125 | + self.config.set_config(u'proxy_address', unicode(self.AddressEdit.displayText())) |
3126 | |
3127 | def onProxyUsernameEditLostFocus(self): |
3128 | - self.config.set_config(u'proxy_username', str(self.UsernameEdit.displayText())) |
3129 | + self.config.set_config(u'proxy_username', unicode(self.UsernameEdit.displayText())) |
3130 | |
3131 | def onProxyPasswordEditLostFocus(self): |
3132 | - self.config.set_config(u'proxy_password', str(self.PasswordEdit.displayText())) |
3133 | + self.config.set_config(u'proxy_password', unicode(self.PasswordEdit.displayText())) |
3134 | |
3135 | def onLocationComboBoxSelected(self): |
3136 | self.checkHttp() |
3137 | |
3138 | def onBibleComboBoxSelected(self): |
3139 | self.checkHttp() |
3140 | - self.BibleNameEdit.setText(str(self.BibleComboBox.currentText())) |
3141 | + self.BibleNameEdit.setText(unicode(self.BibleComboBox.currentText())) |
3142 | |
3143 | def onCancelButtonClicked(self): |
3144 | # tell import to stop |
3145 | @@ -187,26 +187,26 @@ |
3146 | def importBible(self): |
3147 | log.debug(u'Import Bible ') |
3148 | if self.bible_type == u'OSIS': |
3149 | - loaded = self.biblemanager.register_osis_file_bible(str(self.BibleNameEdit.displayText()), |
3150 | + loaded = self.biblemanager.register_osis_file_bible(unicode(self.BibleNameEdit.displayText()), |
3151 | self.OSISLocationEdit.displayText()) |
3152 | elif self.bible_type == u'CSV': |
3153 | - loaded = self.biblemanager.register_csv_file_bible(str(self.BibleNameEdit.displayText()), |
3154 | + loaded = self.biblemanager.register_csv_file_bible(unicode(self.BibleNameEdit.displayText()), |
3155 | self.BooksLocationEdit.displayText(), self.VerseLocationEdit.displayText()) |
3156 | else: |
3157 | # set a value as it will not be needed |
3158 | self.setMax(1) |
3159 | - bible = self.bible_versions[str(self.BibleComboBox.currentText())] |
3160 | - loaded = self.biblemanager.register_http_bible(str(self.BibleComboBox.currentText()), \ |
3161 | - str(self.LocationComboBox.currentText()), \ |
3162 | - str(bible), \ |
3163 | - str(self.AddressEdit.displayText()), \ |
3164 | - str(self.UsernameEdit .displayText()), \ |
3165 | - str(self.PasswordEdit.displayText())) |
3166 | + bible = self.bible_versions[unicode(self.BibleComboBox.currentText())] |
3167 | + loaded = self.biblemanager.register_http_bible(unicode(self.BibleComboBox.currentText()), \ |
3168 | + unicode(self.LocationComboBox.currentText()), \ |
3169 | + unicode(bible), \ |
3170 | + unicode(self.AddressEdit.displayText()), \ |
3171 | + unicode(self.UsernameEdit .displayText()), \ |
3172 | + unicode(self.PasswordEdit.displayText())) |
3173 | if loaded: |
3174 | - self.biblemanager.save_meta_data(str(self.BibleNameEdit.displayText()), |
3175 | - str(self.VersionNameEdit.displayText()), |
3176 | - str(self.CopyrightEdit.displayText()), |
3177 | - str(self.PermisionEdit.displayText())) |
3178 | + self.biblemanager.save_meta_data(unicode(self.BibleNameEdit.displayText()), |
3179 | + unicode(self.VersionNameEdit.displayText()), |
3180 | + unicode(self.CopyrightEdit.displayText()), |
3181 | + unicode(self.PermisionEdit.displayText())) |
3182 | self.bible_type = None |
3183 | # free the screen state restrictions |
3184 | self.resetScreenFieldStates() |
3185 | @@ -286,4 +286,4 @@ |
3186 | self.OSISLocationEdit.setText(u'') |
3187 | self.BibleNameEdit.setText(u'') |
3188 | self.LocationComboBox.setCurrentIndex(0) |
3189 | - self.BibleComboBox.setCurrentIndex(0) |
3190 | + self.BibleComboBox.setCurrentIndex(0) |
3191 | \ No newline at end of file |
3192 | |
3193 | === modified file 'openlp/plugins/bibles/lib/bibleCSVimpl.py' |
3194 | --- openlp/plugins/bibles/lib/bibleCSVimpl.py 2009-03-16 17:33:51 +0000 |
3195 | +++ openlp/plugins/bibles/lib/bibleCSVimpl.py 2009-06-16 18:21:24 +0000 |
3196 | @@ -34,7 +34,7 @@ |
3197 | """ |
3198 | self.bibledb = bibledb |
3199 | self.loadbible = True |
3200 | - QtCore.QObject.connect(Receiver().get_receiver(),QtCore.SIGNAL("openlpstopimport"),self.stop_import) |
3201 | + QtCore.QObject.connect(Receiver().get_receiver(),QtCore.SIGNAL(u'openlpstopimport'),self.stop_import) |
3202 | |
3203 | def stop_import(self): |
3204 | self.loadbible= False |
3205 | @@ -56,7 +56,7 @@ |
3206 | self.bibledb.create_book(p2, p3, int(p1)) |
3207 | count += 1 |
3208 | if count % 3 == 0: #Every x verses repaint the screen |
3209 | - Receiver().send_message("openlpprocessevents") |
3210 | + Receiver().send_message(u'openlpprocessevents') |
3211 | count = 0 |
3212 | |
3213 | count = 0 |
3214 | @@ -75,5 +75,5 @@ |
3215 | self.bibledb.add_verse(book.id, p[1], p[2], p3) |
3216 | count += 1 |
3217 | if count % 3 == 0: #Every x verses repaint the screen |
3218 | - Receiver().send_message("openlpprocessevents") |
3219 | - count = 0 |
3220 | + Receiver().send_message(u'openlpprocessevents') |
3221 | + count = 0 |
3222 | \ No newline at end of file |
3223 | |
3224 | === modified file 'openlp/plugins/bibles/lib/bibleDBimpl.py' |
3225 | --- openlp/plugins/bibles/lib/bibleDBimpl.py 2009-06-05 05:00:26 +0000 |
3226 | +++ openlp/plugins/bibles/lib/bibleDBimpl.py 2009-06-16 18:21:24 +0000 |
3227 | @@ -37,10 +37,10 @@ |
3228 | # Connect to database |
3229 | self.config = config |
3230 | self.biblefile = os.path.join(biblepath, biblename+u'.sqlite') |
3231 | - log.debug( "Load bible %s on path %s", biblename, self.biblefile) |
3232 | + log.debug(u'Load bible %s on path %s', biblename, self.biblefile) |
3233 | db_type = self.config.get_config(u'db type', u'sqlite') |
3234 | if db_type == u'sqlite': |
3235 | - self.db = create_engine("sqlite:///" + self.biblefile) |
3236 | + self.db = create_engine(u'sqlite:///' + self.biblefile) |
3237 | else: |
3238 | self.db_url = u'%s://%s:%s@%s/%s' % \ |
3239 | (db_type, self.config.get_config(u'db username'), |
3240 | @@ -57,12 +57,12 @@ |
3241 | def create_tables(self): |
3242 | log.debug( u'createTables') |
3243 | self.save_meta(u'dbversion', u'2') |
3244 | - self._load_testament("Old Testament") |
3245 | - self._load_testament("New Testament") |
3246 | - self._load_testament("Apocrypha") |
3247 | + self._load_testament(u'Old Testament') |
3248 | + self._load_testament(u'New Testament') |
3249 | + self._load_testament(u'Apocrypha') |
3250 | |
3251 | def add_verse(self, bookid, chap, vse, text): |
3252 | - #log.debug( "add_verse %s,%s,%s", bookid, chap, vse) |
3253 | + #log.debug(u'add_verse %s,%s,%s", bookid, chap, vse) |
3254 | metadata.bind.echo = False |
3255 | session = self.session() |
3256 | verse = Verse() |
3257 | @@ -74,8 +74,8 @@ |
3258 | session.commit() |
3259 | |
3260 | def create_chapter(self, bookid, chap, textlist): |
3261 | - log.debug( "create_chapter %s,%s", bookid, chap) |
3262 | - #log.debug("Text %s ", textlist) |
3263 | + log.debug(u'create_chapter %s,%s', bookid, chap) |
3264 | + #log.debug(u'Text %s ", textlist) |
3265 | metadata.bind.echo = False |
3266 | session = self.session() |
3267 | #text list has book and chapter as first to elements of the array |
3268 | @@ -89,7 +89,7 @@ |
3269 | session.commit() |
3270 | |
3271 | def create_book(self, bookname, bookabbrev, testament = 1): |
3272 | - log.debug( "create_book %s,%s", bookname, bookabbrev) |
3273 | + log.debug(u'create_book %s,%s', bookname, bookabbrev) |
3274 | metadata.bind.echo = False |
3275 | session = self.session() |
3276 | book = Book() |
3277 | @@ -101,7 +101,7 @@ |
3278 | return book |
3279 | |
3280 | def save_meta(self, key, value): |
3281 | - log.debug( "save_meta %s/%s", key, value) |
3282 | + log.debug(u'save_meta %s/%s', key, value) |
3283 | metadata.bind.echo = False |
3284 | session = self.session() |
3285 | bmeta= BibleMeta() |
3286 | @@ -111,7 +111,7 @@ |
3287 | session.commit() |
3288 | |
3289 | def get_meta(self, metakey): |
3290 | - log.debug( "get meta %s", metakey) |
3291 | + log.debug(u'get meta %s', metakey) |
3292 | return self.session.query(BibleMeta).filter_by(key = metakey).first() |
3293 | |
3294 | def delete_meta(self, metakey): |
3295 | @@ -124,7 +124,7 @@ |
3296 | return False |
3297 | |
3298 | def _load_testament(self, testament): |
3299 | - log.debug("load_testaments %s", testament) |
3300 | + log.debug(u'load_testaments %s', testament) |
3301 | metadata.bind.echo = False |
3302 | session = self.session() |
3303 | test = ONTestament() |
3304 | @@ -133,52 +133,52 @@ |
3305 | session.commit() |
3306 | |
3307 | def get_bible_books(self): |
3308 | - log.debug( "get_bible_books ") |
3309 | + log.debug(u'get_bible_books ') |
3310 | return self.session.query(Book).order_by(Book.id).all() |
3311 | |
3312 | def get_max_bible_book_verses(self, bookname, chapter): |
3313 | - log.debug( "get_max_bible_book_verses %s,%s ", bookname , chapter) |
3314 | + log.debug(u'get_max_bible_book_verses %s,%s', bookname , chapter) |
3315 | metadata.bind.echo = False |
3316 | - s = text (""" select max(verse.verse) from verse,book where chapter = :c and book_id = book.id and book.name = :b """) |
3317 | + s = text (u'select max(verse.verse) from verse,book where chapter = :c and book_id = book.id and book.name = :b ') |
3318 | return self.db.execute(s, c=chapter, b=bookname).fetchone() |
3319 | |
3320 | def get_max_bible_book_chapter(self, bookname): |
3321 | - log.debug( "get_max_bible_book_chapter %s ", bookname ) |
3322 | + log.debug(u'get_max_bible_book_chapter %s', bookname ) |
3323 | metadata.bind.echo = False |
3324 | - s = text (""" select max(verse.chapter) from verse,book where book_id = book.id and book.name = :b """) |
3325 | + s = text (u'select max(verse.chapter) from verse,book where book_id = book.id and book.name = :b') |
3326 | return self.db.execute(s, b=bookname).fetchone() |
3327 | |
3328 | def get_bible_book(self, bookname): |
3329 | - log.debug( "get_bible_book %s", bookname) |
3330 | - bk = self.session.query(Book).filter(Book.name.like(bookname+u"%")).first() |
3331 | + log.debug(u'get_bible_book %s', bookname) |
3332 | + bk = self.session.query(Book).filter(Book.name.like(bookname + u'%')).first() |
3333 | if bk == None: |
3334 | - bk = self.session.query(Book).filter(Book.abbreviation.like(bookname+u"%")).first() |
3335 | + bk = self.session.query(Book).filter(Book.abbreviation.like(bookname+u'%')).first() |
3336 | return bk |
3337 | |
3338 | def get_bible_chapter(self, id, chapter): |
3339 | - log.debug( "get_bible_chapter %s,%s", id, chapter ) |
3340 | + log.debug(u'get_bible_chapter %s,%s', id, chapter ) |
3341 | metadata.bind.echo = False |
3342 | return self.session.query(Verse).filter_by(chapter = chapter ).filter_by(book_id = id).first() |
3343 | |
3344 | def get_bible_text(self, bookname, chapter, sverse, everse): |
3345 | - log.debug( "get_bible_text %s,%s,%s,%s ", bookname, chapter, sverse, everse) |
3346 | + log.debug(u'get_bible_text %s,%s,%s,%s', bookname, chapter, sverse, everse) |
3347 | metadata.bind.echo = False |
3348 | bookname = bookname + u"%" |
3349 | - s = text (""" 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) """) |
3350 | + 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)') |
3351 | return self.db.execute(s, c=chapter, v1=sverse , v2=everse, b=bookname).fetchall() |
3352 | |
3353 | def get_verses_from_text(self,versetext): |
3354 | - log.debug( "get_verses_from_text %s",versetext) |
3355 | + log.debug(u'get_verses_from_text %s',versetext) |
3356 | metadata.bind.echo = False |
3357 | versetext = "%"+versetext+"%" |
3358 | - s = text (""" select book.name, verse.chapter, verse.verse, verse.text FROM verse , book where verse.book_id == book.id and verse.text like :t """) |
3359 | + 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') |
3360 | return self.db.execute(s, t=versetext).fetchall() |
3361 | |
3362 | def dump_bible(self): |
3363 | log.debug( u'.........Dumping Bible Database') |
3364 | log.debug( '...............................Books ') |
3365 | - s = text (""" select * FROM book """) |
3366 | + s = text (u'select * FROM book ') |
3367 | log.debug( self.db.execute(s).fetchall()) |
3368 | log.debug( u'...............................Verses ') |
3369 | - s = text (""" select * FROM verse """) |
3370 | + s = text (u'select * FROM verse ') |
3371 | log.debug( self.db.execute(s).fetchall()) |
3372 | |
3373 | === modified file 'openlp/plugins/bibles/lib/bibleHTTPimpl.py' |
3374 | --- openlp/plugins/bibles/lib/bibleHTTPimpl.py 2009-03-16 17:33:51 +0000 |
3375 | +++ openlp/plugins/bibles/lib/bibleHTTPimpl.py 2009-06-16 18:21:24 +0000 |
3376 | @@ -23,31 +23,29 @@ |
3377 | from common import BibleCommon, SearchResults |
3378 | |
3379 | import logging |
3380 | - |
3381 | + |
3382 | class BGExtract(BibleCommon): |
3383 | - global log |
3384 | + global log |
3385 | log=logging.getLogger(u'BibleHTTPMgr(BG_extract)') |
3386 | - log.info(u'BG_extract loaded') |
3387 | - |
3388 | + log.info(u'BG_extract loaded') |
3389 | + |
3390 | def __init__(self, proxyurl= None): |
3391 | - log.debug("init %s", proxyurl) |
3392 | + log.debug(u'init %s', proxyurl) |
3393 | self.proxyurl = proxyurl |
3394 | - |
3395 | + |
3396 | def get_bible_chapter(self, version, bookid, bookname, chapter) : |
3397 | """ |
3398 | Access and decode bibles via the BibleGateway website |
3399 | Version - the version of the bible like 31 for New International version |
3400 | bookid - Book id for the book of the bible - eg 1 for Genesis |
3401 | bookname - not used |
3402 | - chapter - chapter number |
3403 | - |
3404 | + chapter - chapter number |
3405 | """ |
3406 | - version = 49 |
3407 | - log.debug( u"get_bible_chapter %s,%s,%s,%s", version, bookid, bookname, chapter) |
3408 | - urlstring = u"http://www.biblegateway.com/passage/?book_id="+str(bookid)+"&chapter"+str(chapter)+"&version="+str(version) |
3409 | + log.debug( u'get_bible_chapter %s,%s,%s,%s', version, bookid, bookname, chapter) |
3410 | + urlstring = u'http://www.biblegateway.com/passage/?book_id='+unicode(bookid)+u'&chapter'+unicode(chapter)+u'&version='+unicode(version) |
3411 | xml_string = self._get_web_text(urlstring, self.proxyurl) |
3412 | print xml_string |
3413 | - VerseSearch = u'class='+'"'+u'sup'+'"'+u'>' |
3414 | + VerseSearch = u'class='+u'"'+u'sup'+u'"'+u'>' |
3415 | verse = 1 |
3416 | i= xml_string.find(u'result-text-style-normal') |
3417 | xml_string = xml_string[i:len(xml_string)] |
3418 | @@ -61,14 +59,14 @@ |
3419 | #print i , versePos |
3420 | if i == -1: |
3421 | i = xml_string.find(u'</div', versePos+1) |
3422 | - j = xml_string.find(u'<strong', versePos+1) |
3423 | + j = xml_string.find(u'<strong', versePos+1) |
3424 | #print i , j |
3425 | if j > 0 and j < i: |
3426 | i = j |
3427 | - verseText = xml_string[versePos + 7 : i ] |
3428 | + verseText = xml_string[versePos + 7 : i ] |
3429 | #print xml_string |
3430 | - #print 'VerseText = ' + str(verse) +' '+ verseText |
3431 | - bible[verse] = self._clean_text(verseText) # store the verse |
3432 | + #print 'VerseText = ' + unicode(verse) +' '+ verseText |
3433 | + bible[verse] = self._clean_text(verseText) # store the verse |
3434 | versePos = -1 |
3435 | else: |
3436 | i = xml_string[:i].rfind(u'<span')+1 |
3437 | @@ -77,43 +75,43 @@ |
3438 | versePos = xml_string.find(VerseSearch) #look for the next verse |
3439 | bible[verse] = self._clean_text(verseText) # store the verse |
3440 | verse += 1 |
3441 | - return bible |
3442 | - |
3443 | + return bible |
3444 | + |
3445 | class CWExtract(BibleCommon): |
3446 | - global log |
3447 | + global log |
3448 | log=logging.getLogger(u'BibleHTTPMgr(CWExtract)') |
3449 | - log.info(u'CWExtract loaded') |
3450 | - |
3451 | + log.info(u'CWExtract loaded') |
3452 | + |
3453 | def __init__(self, proxyurl=None): |
3454 | - log.debug(u"init %s", proxyurl) |
3455 | + log.debug(u'init %s', proxyurl) |
3456 | self.proxyurl = proxyurl |
3457 | - |
3458 | + |
3459 | def get_bible_chapter(self, version, bookid, bookname, chapter) : |
3460 | - log.debug( u"getBibleChapter %s,%s,%s,%s", version, bookid, bookname, chapter) |
3461 | + log.debug( u'getBibleChapter %s,%s,%s,%s', version, bookid, bookname, chapter) |
3462 | """ |
3463 | Access and decode bibles via the Crosswalk website |
3464 | Version - the version of the bible like niv for New International version |
3465 | bookid - not used |
3466 | bookname - text name of in english eg 'gen' for Genesis |
3467 | - chapter - chapter number |
3468 | - """ |
3469 | - log.debug( "get_bible_chapter %s,%s,%s,%s", version, bookid, bookname, chapter) |
3470 | - bookname = bookname.replace(' ', '') |
3471 | - urlstring = "http://bible.crosswalk.com/OnlineStudyBible/bible.cgi?word="+bookname+"+"+str(chapter)+"&version="+version |
3472 | + chapter - chapter number |
3473 | + """ |
3474 | + log.debug(u'get_bible_chapter %s,%s,%s,%s', version, bookid, bookname, chapter) |
3475 | + bookname = bookname.replace(u' ', '') |
3476 | + urlstring = "http://bible.crosswalk.com/OnlineStudyBible/bible.cgi?word="+bookname+"+"+unicode(chapter)+"&version="+version |
3477 | xml_string = self._get_web_text(urlstring, self.proxyurl) |
3478 | - #log.debug('Return data %s', xml_string) |
3479 | + #log.debug(u'Return data %s', xml_string) |
3480 | ## Strip Book Title from Heading to return it to system |
3481 | ## |
3482 | i= xml_string.find(u'<title>') |
3483 | j= xml_string.find(u'-', i) |
3484 | book_title = xml_string[i + 7:j] |
3485 | book_title = book_title.rstrip() |
3486 | - log.debug(u"Book Title %s", book_title) |
3487 | - i = book_title.rfind(" ") |
3488 | + log.debug(u'Book Title %s', book_title) |
3489 | + i = book_title.rfind(u' ') |
3490 | book_chapter = book_title[i+1:len(book_title)].rstrip() |
3491 | book_title = book_title[:i].rstrip() |
3492 | - log.debug(u"Book Title %s", book_title) |
3493 | - log.debug(u"Book Chapter %s", book_chapter) |
3494 | + log.debug(u'Book Title %s', book_title) |
3495 | + log.debug(u'Book Chapter %s', book_chapter) |
3496 | |
3497 | ## Strip Verse Data from Page and build an array |
3498 | ## |
3499 | @@ -125,17 +123,17 @@ |
3500 | xml_string = xml_string[i + 3 :len(xml_string)] #remove the <B> at the front |
3501 | i= xml_string.find(u'<B>') # Remove the heading for the book |
3502 | xml_string = xml_string[i + 3 :len(xml_string)] #remove the <B> at the front |
3503 | - versePos = xml_string.find(u'<BLOCKQUOTE>') |
3504 | + versePos = xml_string.find(u'<BLOCKQUOTE>') |
3505 | #log.debug( versePos) |
3506 | bible = {} |
3507 | while versePos > 0: |
3508 | verseText = '' # clear out string |
3509 | versePos = xml_string.find(u'<B><I>', versePos) + 6 |
3510 | - i = xml_string.find(u'</I></B>', versePos) |
3511 | + i = xml_string.find(u'</I></B>', versePos) |
3512 | #log.debug( versePos, i) |
3513 | verse= xml_string[versePos:i] # Got the Chapter |
3514 | #verse = int(temp) |
3515 | - #log.debug( 'Chapter = ' + str(temp)) |
3516 | + #log.debug( 'Chapter = ' + unicode(temp)) |
3517 | versePos = i + 8 # move the starting position to negining of the text |
3518 | i = xml_string.find(u'<B><I>', versePos) # fine the start of the next verse |
3519 | if i == -1: |
3520 | @@ -148,14 +146,14 @@ |
3521 | versePos = i |
3522 | bible[verse] = self._clean_text(verseText) |
3523 | #bible[verse] = verseText |
3524 | - |
3525 | + |
3526 | #log.debug( bible) |
3527 | return SearchResults(book_title, book_chapter, bible) |
3528 | - |
3529 | + |
3530 | class BibleHTTPImpl(): |
3531 | - global log |
3532 | + global log |
3533 | log=logging.getLogger(u'BibleHTTPMgr') |
3534 | - log.info(u'BibleHTTP manager loaded') |
3535 | + log.info(u'BibleHTTP manager loaded') |
3536 | def __init__(self): |
3537 | """ |
3538 | Finds all the bibles defined for the system |
3539 | @@ -168,43 +166,41 @@ |
3540 | biblesource = '' |
3541 | proxyurl = None |
3542 | bibleid = None |
3543 | - |
3544 | + |
3545 | def set_proxy(self,proxyurl): |
3546 | """ |
3547 | Set the Proxy Url |
3548 | """ |
3549 | - log.debug(u"set_proxy %s", proxyurl) |
3550 | - self.proxyurl = proxyurl |
3551 | - |
3552 | + log.debug(u'set_proxy %s', proxyurl) |
3553 | + self.proxyurl = proxyurl |
3554 | + |
3555 | def set_bibleid(self,bibleid): |
3556 | """ |
3557 | Set the bible id. |
3558 | The shore identifier of the the bible. |
3559 | """ |
3560 | - log.debug(u"set_bibleid %s", bibleid) |
3561 | - self.bibleid = bibleid |
3562 | - |
3563 | + log.debug(u'set_bibleid %s', bibleid) |
3564 | + self.bibleid = bibleid |
3565 | + |
3566 | def set_bible_source(self,biblesource): |
3567 | """ |
3568 | Set the source of where the bible text is coming from |
3569 | """ |
3570 | - log.debug(u"set_bible_source %s", biblesource) |
3571 | + log.debug(u'set_bible_source %s', biblesource) |
3572 | self.biblesource = biblesource |
3573 | |
3574 | def get_bible_chapter(self, version, bookid, bookname, chapter): |
3575 | """ |
3576 | Receive the request and call the relevant handler methods |
3577 | """ |
3578 | - log.debug(u"get_bible_chapter %s,%s,%s,%s", version, bookid, bookname, chapter) |
3579 | - log.debug(u"biblesource = %s", self.biblesource) |
3580 | + log.debug(u'get_bible_chapter %s,%s,%s,%s', version, bookid, bookname, chapter) |
3581 | + log.debug(u'biblesource = %s', self.biblesource) |
3582 | try: |
3583 | if self.biblesource.lower() == u'crosswalk': |
3584 | ev = CWExtract(self.proxyurl) |
3585 | else: |
3586 | ev = BGExtract(self.proxyurl) |
3587 | - |
3588 | + |
3589 | return ev.get_bible_chapter(self.bibleid, bookid, bookname, chapter) |
3590 | except: |
3591 | - log.error(u"Error thrown = %s", sys.exc_info()[1]) |
3592 | - |
3593 | - |
3594 | + log.error(u'Error thrown = %s', sys.exc_info()[1]) |
3595 | |
3596 | === modified file 'openlp/plugins/bibles/lib/bibleOSISimpl.py' |
3597 | --- openlp/plugins/bibles/lib/bibleOSISimpl.py 2009-06-04 20:06:32 +0000 |
3598 | +++ openlp/plugins/bibles/lib/bibleOSISimpl.py 2009-06-16 18:21:24 +0000 |
3599 | @@ -24,7 +24,7 @@ |
3600 | |
3601 | class BibleOSISImpl(): |
3602 | global log |
3603 | - log=logging.getLogger(u'BibleOSISImpl') |
3604 | + log = logging.getLogger(u'BibleOSISImpl') |
3605 | log.info(u'BibleOSISImpl loaded') |
3606 | |
3607 | def __init__(self, biblepath, bibledb): |
3608 | @@ -33,20 +33,20 @@ |
3609 | self.abbrevOfBible = {} # books of the bible linked to bibleid {osis ,Abbrev } |
3610 | |
3611 | filepath = os.path.split(os.path.abspath(__file__))[0] |
3612 | - filepath = os.path.abspath(os.path.join(filepath, '..', 'resources','osisbooks.csv')) |
3613 | - fbibles=open(filepath, 'r') |
3614 | + filepath = os.path.abspath(os.path.join(filepath, u'..', u'resources',u'osisbooks.csv')) |
3615 | + fbibles=open(filepath, u'r') |
3616 | for line in fbibles: |
3617 | - p = line.split(",") |
3618 | - self.booksOfBible[p[0]] = p[1].replace('\n', '') |
3619 | - self.abbrevOfBible[p[0]] = p[2].replace('\n', '') |
3620 | + p = line.split(u',') |
3621 | + self.booksOfBible[p[0]] = p[1].replace(u'\n', '') |
3622 | + self.abbrevOfBible[p[0]] = p[2].replace(u'\n', '') |
3623 | self.loadbible = True |
3624 | - QtCore.QObject.connect(Receiver().get_receiver(),QtCore.SIGNAL("openlpstopimport"),self.stop_import) |
3625 | + QtCore.QObject.connect(Receiver().get_receiver(),QtCore.SIGNAL(u'openlpstopimport'),self.stop_import) |
3626 | |
3627 | def stop_import(self): |
3628 | self.loadbible= False |
3629 | |
3630 | def load_data(self, osisfile, dialogobject=None): |
3631 | - osis=open(osisfile, 'r') |
3632 | + osis=open(osisfile, u'r') |
3633 | |
3634 | book_ptr = None |
3635 | id = 0 |
3636 | @@ -60,19 +60,19 @@ |
3637 | # print file |
3638 | pos = file.find(verseText) |
3639 | if pos > -1: # we have a verse |
3640 | - epos= file.find(">", pos) |
3641 | + epos= file.find(u'>', pos) |
3642 | ref = file[pos+15:epos-1] # Book Reference |
3643 | |
3644 | #lets find the bible text only |
3645 | pos = epos + 1 # find start of text |
3646 | - epos = file.find("</verse>", pos) # end of text |
3647 | + epos = file.find(u'</verse>', pos) # end of text |
3648 | text = unicode(file[pos : epos], u'utf8') |
3649 | #print pos, e, f[pos:e] # Found Basic Text |
3650 | |
3651 | #remove tags of extra information |
3652 | - text = self.remove_block(u'<title',u'</title>', text) |
3653 | - text = self.remove_block(u'<note',u'</note>', text) |
3654 | - text = self.remove_block(u'<divineName',u'</divineName>', text) |
3655 | + text = self.remove_block(u'<title', u'</title>', text) |
3656 | + text = self.remove_block(u'<note', u'</note>', text) |
3657 | + text = self.remove_block(u'<divineName', u'</divineName>', text) |
3658 | |
3659 | text = self.remove_tag(u'<lb', text) |
3660 | text = self.remove_tag(u'<q', text) |
3661 | @@ -113,12 +113,12 @@ |
3662 | book_ptr = p[0] |
3663 | book = self.bibledb.create_book(self.booksOfBible[p[0]] , self.abbrevOfBible[p[0]], testament) |
3664 | dialogobject.incrementProgressBar(self.booksOfBible[p[0]] ) |
3665 | - Receiver().send_message("openlpprocessevents") |
3666 | + Receiver().send_message(u'openlpprocessevents') |
3667 | count = 0 |
3668 | self.bibledb.add_verse(book.id, p[1], p[2], text) |
3669 | count += 1 |
3670 | if count % 3 == 0: #Every 3 verses repaint the screen |
3671 | - Receiver().send_message("openlpprocessevents") |
3672 | + Receiver().send_message(u'openlpprocessevents') |
3673 | count = 0 |
3674 | |
3675 | def remove_block(self, start_tag, end_tag, text): |
3676 | |
3677 | === modified file 'openlp/plugins/bibles/lib/biblestab.py' |
3678 | --- openlp/plugins/bibles/lib/biblestab.py 2009-06-08 05:04:06 +0000 |
3679 | +++ openlp/plugins/bibles/lib/biblestab.py 2009-06-16 18:21:24 +0000 |
3680 | @@ -70,7 +70,7 @@ |
3681 | self.VerseTypeLayout.addWidget(self.ParagraphRadioButton) |
3682 | self.VerseDisplayLayout.addWidget(self.VerseTypeWidget, 0, 0, 1, 1) |
3683 | self.NewChaptersCheckBox = QtGui.QCheckBox(self.VerseDisplayGroupBox) |
3684 | - self.NewChaptersCheckBox.setObjectName("NewChaptersCheckBox") |
3685 | + self.NewChaptersCheckBox.setObjectName(u'NewChaptersCheckBox') |
3686 | self.VerseDisplayLayout.addWidget(self.NewChaptersCheckBox, 1, 0, 1, 1) |
3687 | self.DisplayStyleWidget = QtGui.QWidget(self.VerseDisplayGroupBox) |
3688 | self.DisplayStyleWidget.setObjectName(u'DisplayStyleWidget') |
3689 | @@ -201,11 +201,11 @@ |
3690 | self.BibleSearchCheckBox.setChecked(self.bible_search) |
3691 | |
3692 | def save(self): |
3693 | - self.config.set_config(u'paragraph style', str(self.paragraph_style)) |
3694 | - self.config.set_config(u'display new chapter', str(self.show_new_chapters)) |
3695 | - self.config.set_config(u'display brackets', str(self.display_style)) |
3696 | - self.config.set_config(u'search as type', str(self.bible_search)) |
3697 | - self.config.set_config(u'bible theme', str(self.bible_theme)) |
3698 | + self.config.set_config(u'paragraph style', unicode(self.paragraph_style)) |
3699 | + self.config.set_config(u'display new chapter', unicode(self.show_new_chapters)) |
3700 | + self.config.set_config(u'display brackets', unicode(self.display_style)) |
3701 | + self.config.set_config(u'search as type', unicode(self.bible_search)) |
3702 | + self.config.set_config(u'bible theme', unicode(self.bible_theme)) |
3703 | |
3704 | def updateThemeList(self, theme_list): |
3705 | """ |
3706 | @@ -215,9 +215,9 @@ |
3707 | self.BibleThemeComboBox.addItem(u'') |
3708 | for theme in theme_list: |
3709 | self.BibleThemeComboBox.addItem(theme) |
3710 | - id = self.BibleThemeComboBox.findText(str(self.bible_theme), QtCore.Qt.MatchExactly) |
3711 | + id = self.BibleThemeComboBox.findText(unicode(self.bible_theme), QtCore.Qt.MatchExactly) |
3712 | if id == -1: |
3713 | # Not Found |
3714 | id = 0 |
3715 | self.bible_theme = u'' |
3716 | - self.BibleThemeComboBox.setCurrentIndex(id) |
3717 | + self.BibleThemeComboBox.setCurrentIndex(id) |
3718 | \ No newline at end of file |
3719 | |
3720 | === modified file 'openlp/plugins/bibles/lib/common.py' |
3721 | --- openlp/plugins/bibles/lib/common.py 2009-02-24 20:24:01 +0000 |
3722 | +++ openlp/plugins/bibles/lib/common.py 2009-06-16 18:21:24 +0000 |
3723 | @@ -15,7 +15,6 @@ |
3724 | this program; if not, write to the Free Software Foundation, Inc., 59 Temple |
3725 | Place, Suite 330, Boston, MA 02111-1307 USA |
3726 | """ |
3727 | - |
3728 | import os |
3729 | import os.path |
3730 | import sys |
3731 | @@ -42,13 +41,13 @@ |
3732 | |
3733 | class BibleCommon: |
3734 | global log |
3735 | - log=logging.getLogger("BibleCommon") |
3736 | - log.info("BibleCommon") |
3737 | + log = logging.getLogger(u'BibleCommon') |
3738 | + log.info(u'BibleCommon') |
3739 | def __init__(self): |
3740 | """ |
3741 | """ |
3742 | def _get_web_text(self, urlstring, proxyurl): |
3743 | - log.debug( "get_web_text %s %s", proxyurl, urlstring) |
3744 | + log.debug(u'get_web_text %s %s', proxyurl, urlstring) |
3745 | if not proxyurl == None: |
3746 | proxy_support = urllib2.ProxyHandler({'http': self.proxyurl}) |
3747 | http_support = urllib2.HTTPHandler() |
3748 | @@ -56,13 +55,13 @@ |
3749 | urllib2.install_opener(opener) |
3750 | xml_string = "" |
3751 | req = urllib2.Request(urlstring) |
3752 | - req.add_header('User-Agent', 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)') |
3753 | + req.add_header(u'User-Agent', 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)') |
3754 | try: |
3755 | handle = urllib2.urlopen(req) |
3756 | xml_string = handle.read() |
3757 | except IOError, e: |
3758 | - if hasattr(e, 'reason'): |
3759 | - log.error( 'Reason : ') |
3760 | + if hasattr(e, u'reason'): |
3761 | + log.error(u'Reason : ') |
3762 | log.error( e.reason) |
3763 | return xml_string |
3764 | |
3765 | @@ -73,42 +72,40 @@ |
3766 | """ |
3767 | #return text.rstrip() |
3768 | # Remove Headings from the Text |
3769 | - i = text.find("<h") |
3770 | + i = text.find(u'<h') |
3771 | while i > -1: |
3772 | - j=text.find("</h", i) |
3773 | + j=text.find(u'</h', i) |
3774 | text = text[ : (i - 1)]+text[(j+4)] |
3775 | - i = text.find("<h") |
3776 | + i = text.find(u'<h') |
3777 | |
3778 | # Remove Support References from the Text |
3779 | - x = text.find("<sup>") |
3780 | + x = text.find(u'<sup>') |
3781 | while x > -1: |
3782 | - y = text.find("</sup>") |
3783 | + y = text.find(u'</sup>') |
3784 | text= text[:x] + text[y + 6:len(text)] |
3785 | - x = text.find("<sup>") |
3786 | + x = text.find(u'<sup>') |
3787 | |
3788 | # Static Clean ups |
3789 | - text= text.replace('\n', '') |
3790 | - text= text.replace('\r', '') |
3791 | - text= text.replace(' ', '') |
3792 | - text= text.replace('<P>', '') |
3793 | - text= text.replace('<I>', '') |
3794 | - text= text.replace('</I>', '') |
3795 | - text= text.replace('<P />', '') |
3796 | - text= text.replace('<p />', '') |
3797 | - text= text.replace('</P>', '') |
3798 | - text= text.replace('<BR>', '') |
3799 | - text= text.replace('<BR />', '') |
3800 | - text= text.replace(chr(189), '1/2') |
3801 | - text= text.replace(""", '"') |
3802 | - text= text.replace("'", "'") |
3803 | + text= text.replace(u'\n', u'') |
3804 | + text= text.replace(u'\r', u'') |
3805 | + text= text.replace(u' ', u'') |
3806 | + text= text.replace(u'<P>', u'') |
3807 | + text= text.replace(u'<I>', u'') |
3808 | + text= text.replace(u'</I>', u'') |
3809 | + text= text.replace(u'<P />', u'') |
3810 | + text= text.replace(u'<p />', u'') |
3811 | + text= text.replace(u'</P>', u'') |
3812 | + text= text.replace(u'<BR>', u'') |
3813 | + text= text.replace(u'<BR />', u'') |
3814 | + text= text.replace(chr(189), u'1/2') |
3815 | + text= text.replace(u'"", u''') |
3816 | + text= text.replace(u''", u''') |
3817 | |
3818 | - i = text.find("<") |
3819 | + i = text.find(u'<') |
3820 | while i > -1 : |
3821 | - j = text.find(">", i) |
3822 | + j = text.find(u'>', i) |
3823 | text= text[:i] + text[j+1:] |
3824 | - i = text.find("<") |
3825 | + i = text.find(u'<') |
3826 | |
3827 | - text= text.replace('>', '') |
3828 | + text= text.replace(u'>', u'') |
3829 | return text.rstrip() |
3830 | - |
3831 | - |
3832 | |
3833 | === modified file 'openlp/plugins/bibles/lib/manager.py' |
3834 | --- openlp/plugins/bibles/lib/manager.py 2009-06-05 05:00:26 +0000 |
3835 | +++ openlp/plugins/bibles/lib/manager.py 2009-06-16 18:21:24 +0000 |
3836 | @@ -17,7 +17,7 @@ |
3837 | this program; if not, write to the Free Software Foundation, Inc., 59 Temple |
3838 | Place, Suite 330, Boston, MA 02111-1307 USA |
3839 | """ |
3840 | - |
3841 | +import logging |
3842 | import os, os.path |
3843 | import sys |
3844 | |
3845 | @@ -29,13 +29,10 @@ |
3846 | from openlp.plugins.bibles.lib.tables import * |
3847 | from openlp.plugins.bibles.lib.classes import * |
3848 | |
3849 | - |
3850 | -import logging |
3851 | - |
3852 | class BibleManager(): |
3853 | global log |
3854 | - log=logging.getLogger("BibleManager") |
3855 | - log.info("Bible manager loaded") |
3856 | + log=logging.getLogger(u'BibleManager') |
3857 | + log.info(u'Bible manager loaded') |
3858 | def __init__(self, config): |
3859 | """ |
3860 | Finds all the bibles defined for the system |
3861 | @@ -45,21 +42,21 @@ |
3862 | Init confirms the bible exists and stores the database path. |
3863 | """ |
3864 | self.config = config |
3865 | - log.debug( "Bible Initialising") |
3866 | + log.debug(u'Bible Initialising') |
3867 | self.bible_db_cache = None # dict of bible database classes |
3868 | self.bible_http_cache = None # dict of bible http readers |
3869 | self.biblePath = self.config.get_data_path() |
3870 | - self.proxyname = self.config.get_config("proxy name") #get proxy name for screen |
3871 | - self.bibleSuffix = "sqlite" |
3872 | + self.proxyname = self.config.get_config(u'proxy name') #get proxy name for screen |
3873 | + self.bibleSuffix = u'sqlite' |
3874 | self.dialogobject = None |
3875 | |
3876 | self.reload_bibles() |
3877 | |
3878 | def reload_bibles(self): |
3879 | - log.debug("Reload bibles") |
3880 | + log.debug(u'Reload bibles') |
3881 | |
3882 | files = self.config.get_files(self.bibleSuffix) |
3883 | - log.debug("Bible Files %s", files ) |
3884 | + log.debug(u'Bible Files %s', files ) |
3885 | |
3886 | self.bible_db_cache = {} |
3887 | self.bible_http_cache = {} |
3888 | @@ -70,21 +67,21 @@ |
3889 | |
3890 | |
3891 | for f in files: |
3892 | - nme = f.split('.') |
3893 | + nme = f.split(u'.') |
3894 | bname = nme[0] |
3895 | self.bible_db_cache[bname] = BibleDBImpl(self.biblePath, bname, self.config) |
3896 | - biblesource = self.bible_db_cache[bname].get_meta("WEB") # look to see if lazy load bible exists and get create getter. |
3897 | + biblesource = self.bible_db_cache[bname].get_meta(u'WEB') # look to see if lazy load bible exists and get create getter. |
3898 | if biblesource: |
3899 | self.web_bibles_present = True |
3900 | nhttp = BibleHTTPImpl() |
3901 | nhttp.set_bible_source(biblesource.value) # tell The Server where to get the verses from. |
3902 | self.bible_http_cache [bname] = nhttp |
3903 | - meta = self.bible_db_cache[bname].get_meta("proxy") # look to see if lazy load bible exists and get create getter. |
3904 | + meta = self.bible_db_cache[bname].get_meta(u'proxy') # look to see if lazy load bible exists and get create getter. |
3905 | proxy = None |
3906 | if meta != None: |
3907 | proxy = meta.value |
3908 | nhttp.set_proxy(proxy) # tell The Server where to get the verses from. |
3909 | - bibleid = self.bible_db_cache[bname].get_meta("bibleid").value # look to see if lazy load bible exists and get create getter. |
3910 | + bibleid = self.bible_db_cache[bname].get_meta(u'bibleid').value # look to see if lazy load bible exists and get create getter. |
3911 | nhttp.set_bibleid(bibleid) # tell The Server where to get the verses from. |
3912 | else: |
3913 | self.bible_http_cache [bname] = None # makes the Full / partial code easier. |
3914 | @@ -94,13 +91,13 @@ |
3915 | self.book_abbreviations = {} # books of the bible linked to bibleid {osis ,Abbrev } |
3916 | |
3917 | filepath = os.path.split(os.path.abspath(__file__))[0] |
3918 | - filepath = os.path.abspath(os.path.join(filepath, '..', 'resources','httpbooks.csv')) |
3919 | + filepath = os.path.abspath(os.path.join(filepath, u'..', u'resources',u'httpbooks.csv')) |
3920 | fbibles=open(filepath, 'r') |
3921 | for line in fbibles: |
3922 | - p = line.split(",") |
3923 | - self.book_abbreviations[p[0]] = p[1].replace('\n', '') |
3924 | - self.book_testaments[p[0]] = p[2].replace('\n', '') |
3925 | - log.debug( "Bible Initialised") |
3926 | + p = line.split(u',') |
3927 | + self.book_abbreviations[p[0]] = p[1].replace(u'\n', '') |
3928 | + self.book_testaments[p[0]] = p[2].replace(u'\n', '') |
3929 | + log.debug(u'Bible Initialised') |
3930 | |
3931 | def process_dialog(self, dialogobject): |
3932 | self.dialogobject = dialogobject |
3933 | @@ -110,7 +107,7 @@ |
3934 | Return a list of bibles from a given URL. |
3935 | The selected Bible can then be registered and LazyLoaded into a database |
3936 | """ |
3937 | - log.debug( "register_HTTP_bible %s,%s,%s,%s,%s,%s", biblename, biblesource, bibleid, proxyurl, proxyid, proxypass) |
3938 | + log.debug(u'register_HTTP_bible %s,%s,%s,%s,%s,%s', biblename, biblesource, bibleid, proxyurl, proxyid, proxypass) |
3939 | if self._is_new_bible(biblename): |
3940 | nbible = BibleDBImpl(self.biblePath, biblename, self.config) # Create new Bible |
3941 | nbible.create_tables() # Create Database |
3942 | @@ -119,18 +116,18 @@ |
3943 | nhttp = BibleHTTPImpl() |
3944 | nhttp.set_bible_source(biblesource) |
3945 | self.bible_http_cache [biblename] = nhttp |
3946 | - nbible.save_meta("WEB", biblesource) # register a lazy loading interest |
3947 | - nbible.save_meta("bibleid", bibleid) # store the we id of the bible |
3948 | + nbible.save_meta(u'WEB', biblesource) # register a lazy loading interest |
3949 | + nbible.save_meta(u'bibleid', bibleid) # store the we id of the bible |
3950 | if proxyurl != None and proxyurl != "": |
3951 | - nbible.save_meta("proxy", proxyurl) # store the proxy URL |
3952 | + nbible.save_meta(u'proxy', proxyurl) # store the proxy URL |
3953 | nhttp.set_proxy(proxyurl) |
3954 | if proxyid != None and proxyid != "": |
3955 | - nbible.save_meta("proxyid", proxyid) # store the proxy userid |
3956 | + nbible.save_meta(u'proxyid', proxyid) # store the proxy userid |
3957 | if proxypass != None and proxypass != "": |
3958 | - nbible.save_meta("proxypass", proxypass) # store the proxy password |
3959 | + nbible.save_meta(u'proxypass', proxypass) # store the proxy password |
3960 | return True |
3961 | else: |
3962 | - log.debug( "register_http_file_bible %s not created already exists", biblename) |
3963 | + log.debug(u'register_http_file_bible %s not created already exists', biblename) |
3964 | return False |
3965 | |
3966 | def register_csv_file_bible(self, biblename, booksfile, versefile): |
3967 | @@ -139,7 +136,7 @@ |
3968 | If the database exists it is deleted and the database is reloaded |
3969 | from scratch. |
3970 | """ |
3971 | - log.debug( "register_CSV_file_bible %s,%s,%s", biblename, booksfile, versefile) |
3972 | + log.debug(u'register_CSV_file_bible %s,%s,%s', biblename, booksfile, versefile) |
3973 | if self._is_new_bible(biblename): |
3974 | nbible = BibleDBImpl(self.biblePath, biblename, self.config) # Create new Bible |
3975 | nbible.create_tables() # Create Database |
3976 | @@ -148,7 +145,7 @@ |
3977 | bcsv.load_data(booksfile, versefile, self.dialogobject) |
3978 | return True |
3979 | else: |
3980 | - log.debug( "register_csv_file_bible %s not created already exists", biblename) |
3981 | + log.debug(u'register_csv_file_bible %s not created already exists', biblename) |
3982 | return False |
3983 | |
3984 | def register_osis_file_bible(self, biblename, osisfile): |
3985 | @@ -157,7 +154,7 @@ |
3986 | If the database exists it is deleted and the database is reloaded |
3987 | from scratch. |
3988 | """ |
3989 | - log.debug( "register_OSIS_file_bible %s , %s", biblename, osisfile) |
3990 | + log.debug(u'register_OSIS_file_bible %s , %s', biblename, osisfile) |
3991 | if self._is_new_bible(biblename): |
3992 | nbible = BibleDBImpl(self.biblePath, biblename, self.config) # Create new Bible |
3993 | nbible.create_tables() # Create Database |
3994 | @@ -166,11 +163,11 @@ |
3995 | bcsv.load_data(osisfile, self.dialogobject) |
3996 | return True |
3997 | else: |
3998 | - log.debug( "register_OSIS_file_bible %s , %s not created already exists", biblename, osisfile) |
3999 | + log.debug(u'register_OSIS_file_bible %s , %s not created already exists', biblename, osisfile) |
4000 | return False |
4001 | |
4002 | - def get_bibles(self, mode="full"): |
4003 | - log.debug("get_bibles") |
4004 | + def get_bibles(self, mode=u'full'): |
4005 | + log.debug(u'get_bibles') |
4006 | """ |
4007 | Returns a list of Books of the bible |
4008 | Mode "Full" - Returns all the bibles for the Queck seearch |
4009 | @@ -178,7 +175,7 @@ |
4010 | """ |
4011 | r=[] |
4012 | for b , o in self.bible_db_cache.iteritems(): |
4013 | - if mode == "full": |
4014 | + if mode == u'full': |
4015 | r.append(b) |
4016 | else: |
4017 | if self.bible_http_cache [b] == None: # we do not have an http bible |
4018 | @@ -189,14 +186,14 @@ |
4019 | """ |
4020 | Returns a list of the books of the bible from the database |
4021 | """ |
4022 | - log.debug("get_bible_books %s", bible) |
4023 | + log.debug(u'get_bible_books %s', bible) |
4024 | return self.bible_db_cache[bible].get_bible_books() |
4025 | |
4026 | def get_book_chapter_count(self, bible, book): |
4027 | """ |
4028 | Returns the number of Chapters for a given book |
4029 | """ |
4030 | - log.debug( "get_book_chapter_count %s,%s", bible, book) |
4031 | + log.debug(u'get_book_chapter_count %s,%s', bible, book) |
4032 | return self.bible_db_cache[bible].get_max_bible_book_chapter(book) |
4033 | |
4034 | def get_book_verse_count(self, bible, book, chapter): |
4035 | @@ -204,7 +201,7 @@ |
4036 | Returns all the number of verses for a given |
4037 | book and chapterMaxBibleBookVerses |
4038 | """ |
4039 | - log.debug( "get_book_verse_count %s,%s,%s", bible, book, chapter) |
4040 | + log.debug(u'get_book_verse_count %s,%s,%s', bible, book, chapter) |
4041 | return self.bible_db_cache[bible].get_max_bible_book_verses(book, chapter) |
4042 | |
4043 | def get_verse_from_text(self, bible, versetext): |
4044 | @@ -212,23 +209,23 @@ |
4045 | Returns all the number of verses for a given |
4046 | book and chapterMaxBibleBookVerses |
4047 | """ |
4048 | - log.debug( "get_verses_from_text %s,%s", bible, versetext) |
4049 | + log.debug(u'get_verses_from_text %s,%s', bible, versetext) |
4050 | return self.bible_db_cache[bible].get_verses_from_text(versetext) |
4051 | |
4052 | def save_meta_data(self, bible, version, copyright, permissions): |
4053 | """ |
4054 | Saves the bibles meta data |
4055 | """ |
4056 | - log.debug( "save_meta data %s,%s, %s,%s", bible, version, copyright, permissions) |
4057 | - self.bible_db_cache[bible].save_meta("Version", version) |
4058 | - self.bible_db_cache[bible].save_meta("Copyright", copyright) |
4059 | - self.bible_db_cache[bible].save_meta("Permissions", permissions) |
4060 | + log.debug(u'save_meta data %s,%s, %s,%s', bible, version, copyright, permissions) |
4061 | + self.bible_db_cache[bible].save_meta(u'Version', version) |
4062 | + self.bible_db_cache[bible].save_meta(u'Copyright', copyright) |
4063 | + self.bible_db_cache[bible].save_meta(u'Permissions', permissions) |
4064 | |
4065 | def get_meta_data(self, bible, key): |
4066 | """ |
4067 | Returns the meta data for a given key |
4068 | """ |
4069 | - log.debug( "get_meta %s,%s", bible, key) |
4070 | + log.debug(u'get_meta %s,%s', bible, key) |
4071 | return self.bible_db_cache[bible].get_meta(key) |
4072 | |
4073 | def get_verse_text(self, bible, bookname, schapter, echapter, sverse, everse = 0 ): |
4074 | @@ -240,11 +237,11 @@ |
4075 | Rest can be guessed at ! |
4076 | """ |
4077 | text = [] |
4078 | - log.debug( "get_verse_text %s,%s,%s,%s,%s,%s", bible, bookname, schapter, echapter, sverse, everse) |
4079 | + log.debug(u'get_verse_text %s,%s,%s,%s,%s,%s', bible, bookname, schapter, echapter, sverse, everse) |
4080 | if not self.bible_http_cache [bible] == None: |
4081 | book= self.bible_db_cache[bible].get_bible_book(bookname) # check to see if book/chapter exists |
4082 | if book == None: |
4083 | - log.debug("get_verse_text : new book") |
4084 | + log.debug(u'get_verse_text : new book') |
4085 | for chapter in range(schapter, echapter+1): |
4086 | search_results = self.bible_http_cache [bible].get_bible_chapter(bible, 0, bookname, chapter) |
4087 | if search_results.has_verselist() : |
4088 | @@ -258,7 +255,7 @@ |
4089 | book = self.bible_db_cache[bible].create_book(bookname, \ |
4090 | self.book_abbreviations[bookname], \ |
4091 | self.book_testaments[bookname]) |
4092 | - log.debug("New http book %s , %s, %s", book, book.id, book.name) |
4093 | + log.debug(u'New http book %s , %s, %s', book, book.id, book.name) |
4094 | self.bible_db_cache[bible].create_chapter(book.id, \ |
4095 | search_results.get_chapter(),\ |
4096 | search_results.get_verselist()) |
4097 | @@ -270,7 +267,7 @@ |
4098 | chapter, \ |
4099 | search_results.get_verselist()) |
4100 | else: |
4101 | - log.debug("get_verse_text : old book") |
4102 | + log.debug(u'get_verse_text : old book') |
4103 | for chapter in range(schapter, echapter+1): |
4104 | v = self.bible_db_cache[bible].get_bible_chapter(book.id, chapter) |
4105 | if v == None: |
4106 | @@ -280,7 +277,7 @@ |
4107 | search_results.get_chapter(),\ |
4108 | search_results.get_verselist()) |
4109 | except : |
4110 | - log.error("Errow thrown %s", sys.exc_info()[1]) |
4111 | + log.error(u'Errow thrown %s', sys.exc_info()[1]) |
4112 | |
4113 | if schapter == echapter: |
4114 | text = self.bible_db_cache[bible].get_bible_text(bookname, schapter, sverse, everse) |
4115 | @@ -305,7 +302,7 @@ |
4116 | Check cache to see if new bible |
4117 | """ |
4118 | for b , o in self.bible_db_cache.iteritems(): |
4119 | - log.debug( "Bible from cache in is_new_bible %s", b ) |
4120 | + log.debug(u'Bible from cache in is_new_bible %s', b ) |
4121 | if b == name : |
4122 | return False |
4123 | return True |
4124 | |
4125 | === modified file 'openlp/plugins/bibles/lib/mediaitem.py' |
4126 | --- openlp/plugins/bibles/lib/mediaitem.py 2009-06-08 05:04:06 +0000 |
4127 | +++ openlp/plugins/bibles/lib/mediaitem.py 2009-06-16 18:21:24 +0000 |
4128 | @@ -272,11 +272,11 @@ |
4129 | self.initialiseBible(bible) |
4130 | |
4131 | def onAdvancedVersionComboBox(self): |
4132 | - self.initialiseBible(str(self.AdvancedVersionComboBox.currentText())) |
4133 | + self.initialiseBible(unicode(self.AdvancedVersionComboBox.currentText())) |
4134 | |
4135 | def onAdvancedBookComboBox(self): |
4136 | - self.initialiseChapterVerse(str(self.AdvancedVersionComboBox.currentText()), |
4137 | - str(self.AdvancedBookComboBox.currentText())) |
4138 | + self.initialiseChapterVerse(unicode(self.AdvancedVersionComboBox.currentText()), |
4139 | + unicode(self.AdvancedBookComboBox.currentText())) |
4140 | |
4141 | def onBibleNewClick(self): |
4142 | self.bibleimportform = BibleImportForm(self.parent.config, self.parent.biblemanager, self) |
4143 | @@ -291,15 +291,15 @@ |
4144 | t1 = self.AdvancedFromChapter.currentText() |
4145 | t2 = self.AdvancedToChapter.currentText() |
4146 | if t1 != t2: |
4147 | - bible = str(self.AdvancedVersionComboBox.currentText()) |
4148 | - book = str(self.AdvancedBookComboBox.currentText()) |
4149 | + bible = unicode(self.AdvancedVersionComboBox.currentText()) |
4150 | + book = unicode(self.AdvancedBookComboBox.currentText()) |
4151 | vse = self.parent.biblemanager.get_book_verse_count(bible, book, int(t2))[0] # get the verse count for new chapter |
4152 | self.adjustComboBox(1, vse, self.AdvancedToVerse) |
4153 | |
4154 | def onAdvancedSearchButton(self): |
4155 | log.debug(u'Advanced Search Button pressed') |
4156 | - bible = str(self.AdvancedVersionComboBox.currentText()) |
4157 | - book = str(self.AdvancedBookComboBox.currentText()) |
4158 | + bible = unicode(self.AdvancedVersionComboBox.currentText()) |
4159 | + book = unicode(self.AdvancedBookComboBox.currentText()) |
4160 | chapter_from = int(self.AdvancedFromChapter.currentText()) |
4161 | chapter_to = int(self.AdvancedToChapter.currentText()) |
4162 | verse_from = int(self.AdvancedFromVerse.currentText()) |
4163 | @@ -311,8 +311,8 @@ |
4164 | self.displayResults(bible) |
4165 | |
4166 | def onAdvancedFromChapter(self): |
4167 | - bible = str(self.AdvancedVersionComboBox.currentText()) |
4168 | - book = str(self.AdvancedBookComboBox.currentText()) |
4169 | + bible = unicode(self.AdvancedVersionComboBox.currentText()) |
4170 | + book = unicode(self.AdvancedBookComboBox.currentText()) |
4171 | cf = self.AdvancedFromChapter.currentText() |
4172 | self.adjustComboBox(cf, self.chapters_from, self.AdvancedToChapter) |
4173 | vse = self.parent.biblemanager.get_book_verse_count(bible, book, int(cf))[0] # get the verse count for new chapter |
4174 | @@ -321,8 +321,8 @@ |
4175 | |
4176 | def onQuickSearchButton(self): |
4177 | log.debug(u'Quick Search Button pressed') |
4178 | - bible = str(self.QuickVersionComboBox.currentText()) |
4179 | - text = str(self.QuickSearchEdit.displayText()) |
4180 | + bible = unicode(self.QuickVersionComboBox.currentText()) |
4181 | + text = unicode(self.QuickSearchEdit.displayText()) |
4182 | if self.ClearQuickSearchComboBox.currentIndex() == 0: |
4183 | self.BibleListData.resetStore() |
4184 | if self.QuickSearchComboBox.currentIndex() == 1: |
4185 | @@ -363,13 +363,13 @@ |
4186 | bible = text[text.find(u'(') + 1:text.find(u')')] |
4187 | self.searchByReference(bible, verse) |
4188 | book = self.search_results[0][0] |
4189 | - chapter = str(self.search_results[0][1]) |
4190 | - verse = str(self.search_results[0][2]) |
4191 | + chapter = unicode(self.search_results[0][1]) |
4192 | + verse = unicode(self.search_results[0][2]) |
4193 | text = self.search_results[0][3] |
4194 | if self.parent.bibles_tab.paragraph_style: #Paragraph |
4195 | text = text + u'\n\n' |
4196 | if self.parent.bibles_tab.display_style == 1: |
4197 | - loc = self.formatVerse(old_chapter, chapter, verse, u'(', u')') |
4198 | + loc = self.formatVerse(old_chapter, chapter, verse, u'(u', u')') |
4199 | elif self.parent.bibles_tab.display_style == 2: |
4200 | loc = self.formatVerse(old_chapter, chapter, verse, u'{', u'}') |
4201 | elif self.parent.bibles_tab.display_style == 3: |
4202 | @@ -407,7 +407,7 @@ |
4203 | |
4204 | def initialiseBible(self, bible): |
4205 | log.debug(u'initialiseBible %s', bible) |
4206 | - books = self.parent.biblemanager.get_bible_books(str(bible)) |
4207 | + books = self.parent.biblemanager.get_bible_books(unicode(bible)) |
4208 | self.AdvancedBookComboBox.clear() |
4209 | first = True |
4210 | for book in books: |
4211 | @@ -429,11 +429,11 @@ |
4212 | log.debug(u'adjustComboBox %s , %s , %s', combo, frm, to) |
4213 | combo.clear() |
4214 | for i in range(int(frm), int(to) + 1): |
4215 | - combo.addItem(str(i)) |
4216 | + combo.addItem(unicode(i)) |
4217 | |
4218 | def displayResults(self, bible): |
4219 | for book, chap, vse , txt in self.search_results: |
4220 | - text = str(u' %s %d:%d (%s)'%(book , chap,vse, bible)) |
4221 | + text = unicode(u' %s %d:%d (%s)'%(book , chap,vse, bible)) |
4222 | self.BibleListData.addRow(0,text) |
4223 | |
4224 | def searchByReference(self, bible, search): |
4225 | @@ -496,8 +496,8 @@ |
4226 | else: |
4227 | end_chapter = sp1[0] |
4228 | end_verse = sp1[1] |
4229 | - #print 'search = ' + str(original) |
4230 | - #print 'results = ' + str(book) + ' @ '+ str(start_chapter)+' @ '+ str(end_chapter)+' @ '+ str(start_verse)+ ' @ '+ str(end_verse) |
4231 | + #print 'search = ' + unicode(original) |
4232 | + #print 'results = ' + unicode(book) + ' @ '+ unicode(start_chapter)+' @ '+ unicode(end_chapter)+' @ '+ unicode(start_verse)+ ' @ '+ unicode(end_verse) |
4233 | if end_chapter == '': |
4234 | end_chapter = start_chapter.rstrip() |
4235 | if start_verse == '': |
4236 | @@ -509,9 +509,9 @@ |
4237 | end_verse = 99 |
4238 | if start_chapter == '': |
4239 | message = u'No chapter found for search' |
4240 | - #print 'message = ' + str(message) |
4241 | - #print 'search = ' + str(original) |
4242 | - #print 'results = ' + str(book) + ' @ '+ str(start_chapter)+' @ '+ str(end_chapter)+' @ '+ str(start_verse)+ ' @ '+ str(end_verse) |
4243 | + #print 'message = ' + unicode(message) |
4244 | + #print 'search = ' + unicode(original) |
4245 | + #print 'results = ' + unicode(book) + ' @ '+ unicode(start_chapter)+' @ '+ unicode(end_chapter)+' @ '+ unicode(start_verse)+ ' @ '+ unicode(end_verse) |
4246 | if message == None: |
4247 | self.search_results = None |
4248 | self.search_results = self.parent.biblemanager.get_verse_text(bible, book, |
4249 | |
4250 | === modified file 'openlp/plugins/bibles/lib/tables.py' |
4251 | --- openlp/plugins/bibles/lib/tables.py 2009-02-22 07:44:08 +0000 |
4252 | +++ openlp/plugins/bibles/lib/tables.py 2009-06-16 18:21:24 +0000 |
4253 | @@ -22,31 +22,31 @@ |
4254 | |
4255 | metadata = MetaData() |
4256 | #Define the tables and indexes |
4257 | -meta_table = Table('metadata', metadata, |
4258 | - Column('key', String(255), primary_key=True), |
4259 | - Column('value', String(255)), |
4260 | +meta_table = Table(u'metadata', metadata, |
4261 | + Column(u'key', String(255), primary_key=True), |
4262 | + Column(u'value', String(255)), |
4263 | ) |
4264 | |
4265 | -testament_table = Table('testament', metadata, |
4266 | - Column('id', Integer, primary_key=True), |
4267 | - Column('name', String(30)), |
4268 | +testament_table = Table(u'testament', metadata, |
4269 | + Column(u'id', Integer, primary_key=True), |
4270 | + Column(u'name', String(30)), |
4271 | ) |
4272 | |
4273 | -book_table = Table('book', metadata, |
4274 | - Column('id', Integer, primary_key=True), |
4275 | - Column('testament_id', Integer, schema.ForeignKey('testament.id')), |
4276 | - Column('name', String(30)), |
4277 | - Column('abbreviation', String(5)), |
4278 | +book_table = Table(u'book', metadata, |
4279 | + Column(u'id', Integer, primary_key=True), |
4280 | + Column(u'testament_id', Integer, schema.ForeignKey(u'testament.id')), |
4281 | + Column(u'name', String(30)), |
4282 | + Column(u'abbreviation', String(5)), |
4283 | ) |
4284 | -Index('idx_name', book_table.c.name, book_table.c.id) |
4285 | -Index('idx_abbrev', book_table.c.abbreviation, book_table.c.id) |
4286 | +Index(u'idx_name', book_table.c.name, book_table.c.id) |
4287 | +Index(u'idx_abbrev', book_table.c.abbreviation, book_table.c.id) |
4288 | |
4289 | -verse_table = Table('verse', metadata, |
4290 | - Column('id', Integer, primary_key=True), |
4291 | - Column('book_id', Integer , schema.ForeignKey('book.id')), |
4292 | - Column('chapter', Integer), |
4293 | - Column('verse', Integer), |
4294 | - Column('text', Text), |
4295 | +verse_table = Table(u'verse', metadata, |
4296 | + Column(u'id', Integer, primary_key=True), |
4297 | + Column(u'book_id', Integer , schema.ForeignKey(u'book.id')), |
4298 | + Column(u'chapter', Integer), |
4299 | + Column(u'verse', Integer), |
4300 | + Column(u'text', Text), |
4301 | ) |
4302 | -Index('idx_chapter_verse_book', verse_table.c.chapter, verse_table.c.verse, verse_table.c.book_id, verse_table.c.id) |
4303 | -Index('idx_chapter_verse_text', verse_table.c.text, verse_table.c.verse, verse_table.c.book_id, verse_table.c.id) |
4304 | +Index(u'idx_chapter_verse_book', verse_table.c.chapter, verse_table.c.verse, verse_table.c.book_id, verse_table.c.id) |
4305 | +Index(u'idx_chapter_verse_text', verse_table.c.text, verse_table.c.verse, verse_table.c.book_id, verse_table.c.id) |
4306 | \ No newline at end of file |
4307 | |
4308 | === modified file 'openlp/plugins/bibles/test/test_bibleManager.py' |
4309 | --- openlp/plugins/bibles/test/test_bibleManager.py 2009-01-10 08:33:31 +0000 |
4310 | +++ openlp/plugins/bibles/test/test_bibleManager.py 2009-06-16 18:21:24 +0000 |
4311 | @@ -36,25 +36,25 @@ |
4312 | |
4313 | console=logging.StreamHandler() |
4314 | # set a format which is simpler for console use |
4315 | -formatter = logging.Formatter('%(name)-12s: %(levelname)-8s %(message)s') |
4316 | +formatter = logging.Formatter(u'%(name)-12s: %(levelname)-8s %(message)s') |
4317 | # tell the handler to use this format |
4318 | console.setFormatter(formatter) |
4319 | -logging.getLogger('').addHandler(console) |
4320 | -log=logging.getLogger('') |
4321 | +logging.getLogger(u'').addHandler(console) |
4322 | +log=logging.getLogger(u'') |
4323 | |
4324 | -logging.info("\nLogging started") |
4325 | +logging.info(u'\nLogging started') |
4326 | |
4327 | class TestBibleManager: |
4328 | - log=logging.getLogger("testBibleMgr") |
4329 | + log=logging.getLogger(u'testBibleMgr') |
4330 | def setup_class(self): |
4331 | - log.debug("\n.......Register BM") |
4332 | + log.debug(u'\n.......Register BM') |
4333 | self.bm = BibleManager() |
4334 | |
4335 | def testRegisterCSVBibleFiles(self): |
4336 | # Register a bible from files |
4337 | - log.debug("\n.......testRegisterBibleFiles") |
4338 | - self.bm.registerFileBible("TheMessage",'biblebooks_msg_short.csv','bibleverses_msg_short.csv') |
4339 | - self.bm.registerFileBible("NIV",'biblebooks_niv_short.csv','bibleverses_niv_short.csv') |
4340 | + log.debug(u'\n.......testRegisterBibleFiles') |
4341 | + self.bm.registerFileBible(u'TheMessage",'biblebooks_msg_short.csv','bibleverses_msg_short.csv') |
4342 | + self.bm.registerFileBible(u'NIV",'biblebooks_niv_short.csv','bibleverses_niv_short.csv') |
4343 | b = self.bm.get_bibles() |
4344 | for b1 in b: |
4345 | log.debug( b1) |
4346 | @@ -62,10 +62,10 @@ |
4347 | |
4348 | def testRegisterHTTPBible(self): |
4349 | # Register a bible from files |
4350 | - log.debug( "\n.......testRegisterBibleHTTP") |
4351 | - self.bm.registerHTTPBible("asv","Crosswalk", "", "", "") |
4352 | - self.bm.registerHTTPBible("nasb","Biblegateway", "", "", "") |
4353 | - self.bm.registerHTTPBible("nkj","Biblegateway", "http://tigger2:3128/", "", "") |
4354 | + log.debug( "\n.......testRegisterBibleHTTP') |
4355 | + self.bm.registerHTTPBible(u'asv","Crosswalk", u'", u'", u'') |
4356 | + self.bm.registerHTTPBible(u'nasb","Biblegateway", u'", u'", u'') |
4357 | + self.bm.registerHTTPBible(u'nkj","Biblegateway", u'http://tigger2:3128/", u'", u'') |
4358 | b = self.bm.get_bibles() |
4359 | for b1 in b: |
4360 | log.debug( b1) |
4361 | @@ -73,7 +73,7 @@ |
4362 | |
4363 | |
4364 | def testGetBibles(self): |
4365 | - log.debug( "\n.......testGetBibles") |
4366 | + log.debug( "\n.......testGetBibles') |
4367 | # make sure the shuffled sequence does not lose any elements |
4368 | b = self.bm.get_bibles() |
4369 | for b1 in b: |
4370 | @@ -81,38 +81,38 @@ |
4371 | assert(b1 in b) |
4372 | |
4373 | def testGetBibleBooks(self): |
4374 | - log.debug( "\n.......testGetBibleBooks") |
4375 | - c = self.bm.get_bible_books("NIV") |
4376 | + log.debug( "\n.......testGetBibleBooks') |
4377 | + c = self.bm.get_bible_books(u'NIV') |
4378 | for c1 in c: |
4379 | log.debug( c1) |
4380 | assert(c1 in c) |
4381 | |
4382 | def testGetBookChapterCount(self): |
4383 | - log.debug( "\n.......testGetBookChapterCount") |
4384 | - assert(self.bm.get_book_chapter_count("Matthew") == '28') |
4385 | + log.debug( "\n.......testGetBookChapterCount') |
4386 | + assert(self.bm.get_book_chapter_count(u'Matthew') == '28') |
4387 | |
4388 | def testGetBookVerseCount(self): |
4389 | - log.debug( "\n.......testGetBookVerseCount") |
4390 | - assert(self.bm.get_book_verse_count("Genesis", 1) == '31') |
4391 | - assert(self.bm.get_book_verse_count("Genesis", 2) == '25') |
4392 | - assert(self.bm.get_book_verse_count("Matthew", 1) == '25') |
4393 | - assert(self.bm.get_book_verse_count("Revelation", 1) == '20') |
4394 | + log.debug( "\n.......testGetBookVerseCount') |
4395 | + assert(self.bm.get_book_verse_count(u'Genesis", 1) == '31') |
4396 | + assert(self.bm.get_book_verse_count(u'Genesis", 2) == '25') |
4397 | + assert(self.bm.get_book_verse_count(u'Matthew", 1) == '25') |
4398 | + assert(self.bm.get_book_verse_count(u'Revelation", 1) == '20') |
4399 | |
4400 | def testGetVerseText(self): |
4401 | - log.debug( "\n.......testGetVerseText") |
4402 | - #c = self.bm.get_verse_text("TheMessage",'Genesis',1,2,1) |
4403 | + log.debug( "\n.......testGetVerseText') |
4404 | + #c = self.bm.get_verse_text(u'TheMessage",'Genesis',1,2,1) |
4405 | #log.debug( c ) |
4406 | - #c = self.bm.get_verse_text('NIV','Genesis',1,1,2) |
4407 | + #c = self.bm.get_verse_text(u'NIV','Genesis',1,1,2) |
4408 | #log.debug( c ) |
4409 | - c = self.bm.get_verse_text('asv','Genesis',10,1,20) |
4410 | + c = self.bm.get_verse_text(u'asv','Genesis',10,1,20) |
4411 | log.debug( c ) |
4412 | - c = self.bm.get_verse_text('nasb','Genesis',10,1,20) |
4413 | + c = self.bm.get_verse_text(u'nasb','Genesis',10,1,20) |
4414 | log.debug( c ) |
4415 | - c = self.bm.get_verse_text('nkj','Revelation',10,1,20) |
4416 | + c = self.bm.get_verse_text(u'nkj','Revelation',10,1,20) |
4417 | log.debug( c ) |
4418 | |
4419 | def testLoadBible(self): |
4420 | - log.debug( "\n.......testLoadBible") |
4421 | - #self.bm.loadBible('asv') |
4422 | - #self.bm.loadBible('nasb') |
4423 | - #self.bm.loadBible('nkj') |
4424 | + log.debug( "\n.......testLoadBible') |
4425 | + #self.bm.loadBible(u'asv') |
4426 | + #self.bm.loadBible(u'nasb') |
4427 | + #self.bm.loadBible(u'nkj') |
4428 | \ No newline at end of file |
4429 | |
4430 | === modified file 'openlp/plugins/bibles/test/test_bibleManagerAPI.py' |
4431 | --- openlp/plugins/bibles/test/test_bibleManagerAPI.py 2008-12-10 19:17:23 +0000 |
4432 | +++ openlp/plugins/bibles/test/test_bibleManagerAPI.py 2009-06-16 18:21:24 +0000 |
4433 | @@ -36,22 +36,22 @@ |
4434 | |
4435 | console=logging.StreamHandler() |
4436 | # set a format which is simpler for console use |
4437 | -formatter = logging.Formatter('%(name)-12s: %(levelname)-8s %(message)s') |
4438 | +formatter = logging.Formatter(u'%(name)-12s: %(levelname)-8s %(message)s') |
4439 | # tell the handler to use this format |
4440 | console.setFormatter(formatter) |
4441 | -logging.getLogger('').addHandler(console) |
4442 | -log=logging.getLogger('') |
4443 | +logging.getLogger(u'').addHandler(console) |
4444 | +log=logging.getLogger(u'') |
4445 | |
4446 | -logging.info("\nLogging started") |
4447 | +logging.info(u'\nLogging started') |
4448 | |
4449 | class TestBibleManager: |
4450 | - log=logging.getLogger("testBibleMgr") |
4451 | + log=logging.getLogger(u'testBibleMgr') |
4452 | def setup_class(self): |
4453 | - log.debug("\n.......Register BM") |
4454 | + log.debug(u'\n.......Register BM') |
4455 | self.bm = BibleManager() |
4456 | |
4457 | def testGetBibles(self): |
4458 | - log.debug( "\n.......testGetBibles") |
4459 | + log.debug( "\n.......testGetBibles') |
4460 | # make sure the shuffled sequence does not lose any elements |
4461 | b = self.bm.getBibles() |
4462 | for b1 in b: |
4463 | @@ -59,37 +59,36 @@ |
4464 | assert(b1 in b) |
4465 | |
4466 | def testGetBibleBooks(self): |
4467 | - log.debug( "\n.......testGetBibleBooks") |
4468 | - c = self.bm.getBibleBooks("asv") |
4469 | + log.debug( "\n.......testGetBibleBooks') |
4470 | + c = self.bm.getBibleBooks(u'asv') |
4471 | for c1 in c: |
4472 | log.debug( c1) |
4473 | assert(c1 in c) |
4474 | |
4475 | def testGetBookChapterCount(self): |
4476 | - log.debug( "\n.......testGetBookChapterCount") |
4477 | - assert(self.bm.getBookChapterCount("asv","Matthew")[0] == 28) |
4478 | + log.debug( "\n.......testGetBookChapterCount') |
4479 | + assert(self.bm.getBookChapterCount(u'asv","Matthew')[0] == 28) |
4480 | |
4481 | def testGetBookVerseCount(self): |
4482 | - log.debug( "\n.......testGetBookVerseCount") |
4483 | - assert(self.bm.getBookVerseCount("asv","Genesis", 1)[0] == 31) |
4484 | - assert(self.bm.getBookVerseCount("TheMessage","Genesis", 2)[0] == 25) |
4485 | - assert(self.bm.getBookVerseCount("asv","Matthew", 1)[0] == 25) |
4486 | - assert(self.bm.getBookVerseCount("TheMessage","Revelation", 1)[0] == 20) |
4487 | + log.debug( "\n.......testGetBookVerseCount') |
4488 | + assert(self.bm.getBookVerseCount(u'asv","Genesis", 1)[0] == 31) |
4489 | + assert(self.bm.getBookVerseCount(u'TheMessage","Genesis", 2)[0] == 25) |
4490 | + assert(self.bm.getBookVerseCount(u'asv","Matthew", 1)[0] == 25) |
4491 | + assert(self.bm.getBookVerseCount(u'TheMessage","Revelation", 1)[0] == 20) |
4492 | |
4493 | def testGetVerseText(self): |
4494 | - log.debug( "\n.......testGetVerseText") |
4495 | - #c = self.bm.getVerseText("TheMessage",'Genesis',1,2,1) |
4496 | + log.debug( "\n.......testGetVerseText') |
4497 | + #c = self.bm.getVerseText(u'TheMessage",'Genesis',1,2,1) |
4498 | #log.debug( c ) |
4499 | - #c = self.bm.getVerseText('NIV','Genesis',1,1,2) |
4500 | + #c = self.bm.getVerseText(u'NIV','Genesis',1,1,2) |
4501 | #log.debug( c ) |
4502 | - c = self.bm.getVerseText('asv','Genesis',10,1,20) |
4503 | + c = self.bm.getVerseText(u'asv','Genesis',10,1,20) |
4504 | log.debug( c ) |
4505 | - c = self.bm.getVerseText('TheMessage','Genesis',10,1,20) |
4506 | + c = self.bm.getVerseText(u'TheMessage','Genesis',10,1,20) |
4507 | log.debug( c ) |
4508 | - c = self.bm.getVerseText('asv','Revelation',10,1,20) |
4509 | + c = self.bm.getVerseText(u'asv','Revelation',10,1,20) |
4510 | log.debug( c ) |
4511 | - c = self.bm.getVersesFromText("asv", "Jesus wept") |
4512 | + c = self.bm.getVersesFromText(u'asv", u'Jesus wept') |
4513 | log.debug( c ) |
4514 | - c = self.bm.getVersesFromText("TheMessage", "Jesus wept") |
4515 | - log.debug( c ) |
4516 | - |
4517 | + c = self.bm.getVersesFromText(u'TheMessage", u'Jesus wept') |
4518 | + log.debug( c ) |
4519 | \ No newline at end of file |
4520 | |
4521 | === modified file 'openlp/plugins/bibles/test/test_bibleManagerCSV.py' |
4522 | --- openlp/plugins/bibles/test/test_bibleManagerCSV.py 2008-12-15 18:10:47 +0000 |
4523 | +++ openlp/plugins/bibles/test/test_bibleManagerCSV.py 2009-06-16 18:21:24 +0000 |
4524 | @@ -36,26 +36,26 @@ |
4525 | |
4526 | console=logging.StreamHandler() |
4527 | # set a format which is simpler for console use |
4528 | -formatter = logging.Formatter('%(name)-12s: %(levelname)-8s %(message)s') |
4529 | +formatter = logging.Formatter(u'%(name)-12s: %(levelname)-8s %(message)s') |
4530 | # tell the handler to use this format |
4531 | console.setFormatter(formatter) |
4532 | -logging.getLogger('').addHandler(console) |
4533 | -log=logging.getLogger('') |
4534 | +logging.getLogger(u'').addHandler(console) |
4535 | +log=logging.getLogger(u'') |
4536 | |
4537 | -logging.info("\nLogging started") |
4538 | +logging.info(u'\nLogging started') |
4539 | |
4540 | class TestBibleManager: |
4541 | - log=logging.getLogger("testBibleMgr") |
4542 | + log=logging.getLogger(u'testBibleMgr') |
4543 | def setup_class(self): |
4544 | - log.debug("\n.......Register BM") |
4545 | + log.debug(u'\n.......Register BM') |
4546 | self.bm = BibleManager() |
4547 | |
4548 | def testRegisterCSVBibleFiles(self): |
4549 | # Register a bible from files |
4550 | - log.debug("\n.......testRegisterBibleFiles") |
4551 | - self.bm.registerCSVFileBible("TheMessage",'biblebooks_msg_short.csv','bibleverses_msg_short.csv') |
4552 | - self.bm.registerCSVFileBible("NIV",'biblebooks_niv_short.csv','bibleverses_niv_short.csv') |
4553 | + log.debug(u'\n.......testRegisterBibleFiles') |
4554 | + self.bm.registerCSVFileBible(u'TheMessage",'biblebooks_msg_short.csv','bibleverses_msg_short.csv') |
4555 | + self.bm.registerCSVFileBible(u'NIV",'biblebooks_niv_short.csv','bibleverses_niv_short.csv') |
4556 | b = self.bm.get_bibles() |
4557 | for b1 in b: |
4558 | log.debug( b1) |
4559 | - assert(b1 in b) |
4560 | + assert(b1 in b) |
4561 | \ No newline at end of file |
4562 | |
4563 | === modified file 'openlp/plugins/bibles/test/test_bibleManagerOSIS.py' |
4564 | --- openlp/plugins/bibles/test/test_bibleManagerOSIS.py 2009-01-10 08:33:31 +0000 |
4565 | +++ openlp/plugins/bibles/test/test_bibleManagerOSIS.py 2009-06-16 18:21:24 +0000 |
4566 | @@ -36,25 +36,25 @@ |
4567 | |
4568 | console=logging.StreamHandler() |
4569 | # set a format which is simpler for console use |
4570 | -formatter = logging.Formatter('%(name)-12s: %(levelname)-8s %(message)s') |
4571 | +formatter = logging.Formatter(u'%(name)-12s: %(levelname)-8s %(message)s') |
4572 | # tell the handler to use this format |
4573 | console.setFormatter(formatter) |
4574 | -logging.getLogger('').addHandler(console) |
4575 | -log=logging.getLogger('') |
4576 | +logging.getLogger(u'').addHandler(console) |
4577 | +log=logging.getLogger(u'') |
4578 | |
4579 | -logging.info("\nLogging started") |
4580 | +logging.info(u'\nLogging started') |
4581 | |
4582 | class TestBibleManager: |
4583 | - log=logging.getLogger("testBibleMgr") |
4584 | + log=logging.getLogger(u'testBibleMgr') |
4585 | def setup_class(self): |
4586 | - log.debug("\n.......Register BM") |
4587 | + log.debug(u'\n.......Register BM') |
4588 | self.bm = BibleManager() |
4589 | |
4590 | def testRegisterOSISBibleFiles(self): |
4591 | # Register a bible from files |
4592 | - log.debug("\n.......testRegisterOSISBibleFiles") |
4593 | - self.bm.register_osis_file_bible("asv",'asv.osis') |
4594 | + log.debug(u'\n.......testRegisterOSISBibleFiles') |
4595 | + self.bm.register_osis_file_bible(u'asv",'asv.osis') |
4596 | b = self.bm.get_bibles() |
4597 | for b1 in b: |
4598 | log.debug( b1) |
4599 | - assert(b1 in b) |
4600 | + assert(b1 in b) |
4601 | \ No newline at end of file |
4602 | |
4603 | === modified file 'openlp/plugins/custom/customplugin.py' |
4604 | --- openlp/plugins/custom/customplugin.py 2009-05-21 16:07:01 +0000 |
4605 | +++ openlp/plugins/custom/customplugin.py 2009-06-16 18:21:24 +0000 |
4606 | @@ -40,7 +40,7 @@ |
4607 | self.edit_custom_form = EditCustomForm(self.custommanager) |
4608 | # Create the plugin icon |
4609 | self.icon = QtGui.QIcon() |
4610 | - self.icon.addPixmap(QtGui.QPixmap(':/media/media_custom.png'), |
4611 | + self.icon.addPixmap(QtGui.QPixmap(u':/media/media_custom.png'), |
4612 | QtGui.QIcon.Normal, QtGui.QIcon.Off) |
4613 | self.preview_service_item = CustomServiceItem(self.preview_controller) |
4614 | self.live_service_item = CustomServiceItem(self.live_controller) |
4615 | @@ -66,4 +66,4 @@ |
4616 | self.media_item.onCustomPreviewClick() |
4617 | if event.event_type == EventType.LiveShow and event.payload == 'Custom': |
4618 | log.debug(u'Load Live Show Item received') |
4619 | - self.media_item.onCustomLiveClick() |
4620 | + self.media_item.onCustomLiveClick() |
4621 | \ No newline at end of file |
4622 | |
4623 | === modified file 'openlp/plugins/custom/forms/editcustomdialog.py' |
4624 | --- openlp/plugins/custom/forms/editcustomdialog.py 2009-05-21 16:07:01 +0000 |
4625 | +++ openlp/plugins/custom/forms/editcustomdialog.py 2009-06-16 18:21:24 +0000 |
4626 | @@ -12,100 +12,100 @@ |
4627 | |
4628 | class Ui_customEditDialog(object): |
4629 | def setupUi(self, customEditDialog): |
4630 | - customEditDialog.setObjectName("customEditDialog") |
4631 | + customEditDialog.setObjectName(u'customEditDialog') |
4632 | customEditDialog.resize(590, 541) |
4633 | icon = QtGui.QIcon() |
4634 | - icon.addPixmap(QtGui.QPixmap(":/icon/openlp-logo-16x16.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
4635 | + icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
4636 | customEditDialog.setWindowIcon(icon) |
4637 | self.gridLayout = QtGui.QGridLayout(customEditDialog) |
4638 | - self.gridLayout.setObjectName("gridLayout") |
4639 | + self.gridLayout.setObjectName(u'gridLayout') |
4640 | self.horizontalLayout = QtGui.QHBoxLayout() |
4641 | - self.horizontalLayout.setObjectName("horizontalLayout") |
4642 | + self.horizontalLayout.setObjectName(u'horizontalLayout') |
4643 | self.TitleLabel = QtGui.QLabel(customEditDialog) |
4644 | - self.TitleLabel.setObjectName("TitleLabel") |
4645 | + self.TitleLabel.setObjectName(u'TitleLabel') |
4646 | self.horizontalLayout.addWidget(self.TitleLabel) |
4647 | self.TitleEdit = QtGui.QLineEdit(customEditDialog) |
4648 | - self.TitleEdit.setObjectName("TitleEdit") |
4649 | + self.TitleEdit.setObjectName(u'TitleEdit') |
4650 | self.horizontalLayout.addWidget(self.TitleEdit) |
4651 | self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 1) |
4652 | self.horizontalLayout_4 = QtGui.QHBoxLayout() |
4653 | - self.horizontalLayout_4.setObjectName("horizontalLayout_4") |
4654 | + self.horizontalLayout_4.setObjectName(u'horizontalLayout_4') |
4655 | self.VerseListView = QtGui.QListWidget(customEditDialog) |
4656 | - self.VerseListView.setObjectName("VerseListView") |
4657 | + self.VerseListView.setObjectName(u'VerseListView') |
4658 | self.horizontalLayout_4.addWidget(self.VerseListView) |
4659 | self.verticalLayout = QtGui.QVBoxLayout() |
4660 | - self.verticalLayout.setObjectName("verticalLayout") |
4661 | + self.verticalLayout.setObjectName(u'verticalLayout') |
4662 | self.UpButton = QtGui.QPushButton(customEditDialog) |
4663 | icon1 = QtGui.QIcon() |
4664 | - icon1.addPixmap(QtGui.QPixmap(":/services/service_up.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
4665 | + icon1.addPixmap(QtGui.QPixmap(u':/services/service_up.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
4666 | self.UpButton.setIcon(icon1) |
4667 | - self.UpButton.setObjectName("UpButton") |
4668 | + self.UpButton.setObjectName(u'UpButton') |
4669 | self.verticalLayout.addWidget(self.UpButton) |
4670 | spacerItem = QtGui.QSpacerItem(20, 128, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
4671 | self.verticalLayout.addItem(spacerItem) |
4672 | self.DownButton = QtGui.QPushButton(customEditDialog) |
4673 | icon2 = QtGui.QIcon() |
4674 | - icon2.addPixmap(QtGui.QPixmap(":/services/service_down.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
4675 | + icon2.addPixmap(QtGui.QPixmap(u':/services/service_down.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
4676 | self.DownButton.setIcon(icon2) |
4677 | - self.DownButton.setObjectName("DownButton") |
4678 | + self.DownButton.setObjectName(u'DownButton') |
4679 | self.verticalLayout.addWidget(self.DownButton) |
4680 | self.horizontalLayout_4.addLayout(self.verticalLayout) |
4681 | self.gridLayout.addLayout(self.horizontalLayout_4, 1, 0, 1, 1) |
4682 | self.EditWidget = QtGui.QWidget(customEditDialog) |
4683 | - self.EditWidget.setObjectName("EditWidget") |
4684 | + self.EditWidget.setObjectName(u'EditWidget') |
4685 | self.EditLayout = QtGui.QHBoxLayout(self.EditWidget) |
4686 | self.EditLayout.setSpacing(8) |
4687 | self.EditLayout.setMargin(0) |
4688 | - self.EditLayout.setObjectName("EditLayout") |
4689 | + self.EditLayout.setObjectName(u'EditLayout') |
4690 | self.VerseTextEdit = QtGui.QTextEdit(self.EditWidget) |
4691 | - self.VerseTextEdit.setObjectName("VerseTextEdit") |
4692 | + self.VerseTextEdit.setObjectName(u'VerseTextEdit') |
4693 | self.EditLayout.addWidget(self.VerseTextEdit) |
4694 | self.ButtonWidget = QtGui.QWidget(self.EditWidget) |
4695 | - self.ButtonWidget.setObjectName("ButtonWidget") |
4696 | + self.ButtonWidget.setObjectName(u'ButtonWidget') |
4697 | self.ButtonLayout = QtGui.QVBoxLayout(self.ButtonWidget) |
4698 | self.ButtonLayout.setSpacing(8) |
4699 | self.ButtonLayout.setMargin(0) |
4700 | - self.ButtonLayout.setObjectName("ButtonLayout") |
4701 | + self.ButtonLayout.setObjectName(u'ButtonLayout') |
4702 | self.AddButton = QtGui.QPushButton(self.ButtonWidget) |
4703 | - self.AddButton.setObjectName("AddButton") |
4704 | + self.AddButton.setObjectName(u'AddButton') |
4705 | self.ButtonLayout.addWidget(self.AddButton) |
4706 | self.EditButton = QtGui.QPushButton(self.ButtonWidget) |
4707 | - self.EditButton.setObjectName("EditButton") |
4708 | + self.EditButton.setObjectName(u'EditButton') |
4709 | self.ButtonLayout.addWidget(self.EditButton) |
4710 | self.SaveButton = QtGui.QPushButton(self.ButtonWidget) |
4711 | - self.SaveButton.setObjectName("SaveButton") |
4712 | + self.SaveButton.setObjectName(u'SaveButton') |
4713 | self.ButtonLayout.addWidget(self.SaveButton) |
4714 | self.DeleteButton = QtGui.QPushButton(self.ButtonWidget) |
4715 | - self.DeleteButton.setObjectName("DeleteButton") |
4716 | + self.DeleteButton.setObjectName(u'DeleteButton') |
4717 | self.ButtonLayout.addWidget(self.DeleteButton) |
4718 | self.ClearButton = QtGui.QPushButton(self.ButtonWidget) |
4719 | - self.ClearButton.setObjectName("ClearButton") |
4720 | + self.ClearButton.setObjectName(u'ClearButton') |
4721 | self.ButtonLayout.addWidget(self.ClearButton) |
4722 | spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
4723 | self.ButtonLayout.addItem(spacerItem1) |
4724 | self.EditLayout.addWidget(self.ButtonWidget) |
4725 | self.gridLayout.addWidget(self.EditWidget, 2, 0, 1, 1) |
4726 | self.horizontalLayout = QtGui.QHBoxLayout() |
4727 | - self.horizontalLayout.setObjectName("horizontalLayout") |
4728 | + self.horizontalLayout.setObjectName(u'horizontalLayout') |
4729 | self.ThemeLabel = QtGui.QLabel(customEditDialog) |
4730 | - self.ThemeLabel.setObjectName("ThemeLabel") |
4731 | + self.ThemeLabel.setObjectName(u'ThemeLabel') |
4732 | self.horizontalLayout.addWidget(self.ThemeLabel) |
4733 | self.ThemecomboBox = QtGui.QComboBox(customEditDialog) |
4734 | - self.ThemecomboBox.setObjectName("ThemecomboBox") |
4735 | + self.ThemecomboBox.setObjectName(u'ThemecomboBox') |
4736 | self.horizontalLayout.addWidget(self.ThemecomboBox) |
4737 | self.gridLayout.addLayout(self.horizontalLayout, 3, 0, 1, 1) |
4738 | self.horizontalLayout_2 = QtGui.QHBoxLayout() |
4739 | - self.horizontalLayout_2.setObjectName("horizontalLayout_2") |
4740 | + self.horizontalLayout_2.setObjectName(u'horizontalLayout_2') |
4741 | self.CreditLabel = QtGui.QLabel(customEditDialog) |
4742 | - self.CreditLabel.setObjectName("CreditLabel") |
4743 | + self.CreditLabel.setObjectName(u'CreditLabel') |
4744 | self.horizontalLayout_2.addWidget(self.CreditLabel) |
4745 | self.CreditEdit = QtGui.QLineEdit(customEditDialog) |
4746 | - self.CreditEdit.setObjectName("CreditEdit") |
4747 | + self.CreditEdit.setObjectName(u'CreditEdit') |
4748 | self.horizontalLayout_2.addWidget(self.CreditEdit) |
4749 | self.gridLayout.addLayout(self.horizontalLayout_2, 4, 0, 1, 1) |
4750 | self.buttonBox = QtGui.QDialogButtonBox(customEditDialog) |
4751 | self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok) |
4752 | - self.buttonBox.setObjectName("buttonBox") |
4753 | + self.buttonBox.setObjectName(u'buttonBox') |
4754 | self.gridLayout.addWidget(self.buttonBox, 5, 0, 1, 1) |
4755 | |
4756 | self.retranslateUi(customEditDialog) |
4757 | @@ -120,12 +120,12 @@ |
4758 | customEditDialog.setTabOrder(self.DeleteButton, self.buttonBox) |
4759 | |
4760 | def retranslateUi(self, customEditDialog): |
4761 | - customEditDialog.setWindowTitle(translate("customEditDialog", "Edit Custom Slides")) |
4762 | - self.TitleLabel.setText(translate("customEditDialog", "Title:")) |
4763 | - self.AddButton.setText(translate("customEditDialog", "Add")) |
4764 | - self.EditButton.setText(translate("customEditDialog", "Edit")) |
4765 | - self.SaveButton.setText(translate("customEditDialog", "Save")) |
4766 | - self.DeleteButton.setText(translate("customEditDialog", "Delete")) |
4767 | - self.ClearButton.setText(translate("customEditDialog", "Clear")) |
4768 | - self.ThemeLabel.setText(translate("customEditDialog", "Theme:")) |
4769 | - self.CreditLabel.setText(translate("customEditDialog", "Credits:")) |
4770 | + customEditDialog.setWindowTitle(translate(u'customEditDialog', u'Edit Custom Slides')) |
4771 | + self.TitleLabel.setText(translate(u'customEditDialog', u'Title:')) |
4772 | + self.AddButton.setText(translate(u'customEditDialog', u'Add')) |
4773 | + self.EditButton.setText(translate(u'customEditDialog', u'Edit')) |
4774 | + self.SaveButton.setText(translate(u'customEditDialog', u'Save')) |
4775 | + self.DeleteButton.setText(translate(u'customEditDialog', u'Delete')) |
4776 | + self.ClearButton.setText(translate(u'customEditDialog', u'Clear')) |
4777 | + self.ThemeLabel.setText(translate(u'customEditDialog', u'Theme:')) |
4778 | + self.CreditLabel.setText(translate(u'customEditDialog', u'Credits:')) |
4779 | |
4780 | === modified file 'openlp/plugins/custom/forms/editcustomform.py' |
4781 | --- openlp/plugins/custom/forms/editcustomform.py 2009-05-01 05:02:53 +0000 |
4782 | +++ openlp/plugins/custom/forms/editcustomform.py 2009-06-16 18:21:24 +0000 |
4783 | @@ -35,21 +35,21 @@ |
4784 | #self.parent = parent |
4785 | self.setupUi(self) |
4786 | # Connecting signals and slots |
4787 | - QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), self.rejected) |
4788 | - QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), self.accept) |
4789 | - QtCore.QObject.connect(self.AddButton, QtCore.SIGNAL("pressed()"), self.onAddButtonPressed) |
4790 | - QtCore.QObject.connect(self.EditButton, QtCore.SIGNAL("pressed()"), self.onEditButtonPressed) |
4791 | - QtCore.QObject.connect(self.SaveButton, QtCore.SIGNAL("pressed()"), self.onSaveButtonPressed) |
4792 | - QtCore.QObject.connect(self.DeleteButton, QtCore.SIGNAL("pressed()"), self.onDeleteButtonPressed) |
4793 | - QtCore.QObject.connect(self.ClearButton, QtCore.SIGNAL("pressed()"), self.onClearButtonPressed) |
4794 | - QtCore.QObject.connect(self.UpButton, QtCore.SIGNAL("pressed()"), self.onUpButtonPressed) |
4795 | - QtCore.QObject.connect(self.DownButton, QtCore.SIGNAL("pressed()"), self.onDownButtonPressed) |
4796 | - QtCore.QObject.connect(self.TitleEdit, QtCore.SIGNAL("lostFocus()"), self.validate) |
4797 | + QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'rejected()'), self.rejected) |
4798 | + QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'accepted()'), self.accept) |
4799 | + QtCore.QObject.connect(self.AddButton, QtCore.SIGNAL(u'pressed()'), self.onAddButtonPressed) |
4800 | + QtCore.QObject.connect(self.EditButton, QtCore.SIGNAL(u'pressed()'), self.onEditButtonPressed) |
4801 | + QtCore.QObject.connect(self.SaveButton, QtCore.SIGNAL(u'pressed()'), self.onSaveButtonPressed) |
4802 | + QtCore.QObject.connect(self.DeleteButton, QtCore.SIGNAL(u'pressed()'), self.onDeleteButtonPressed) |
4803 | + QtCore.QObject.connect(self.ClearButton, QtCore.SIGNAL(u'pressed()'), self.onClearButtonPressed) |
4804 | + QtCore.QObject.connect(self.UpButton, QtCore.SIGNAL(u'pressed()'), self.onUpButtonPressed) |
4805 | + QtCore.QObject.connect(self.DownButton, QtCore.SIGNAL(u'pressed()'), self.onDownButtonPressed) |
4806 | + QtCore.QObject.connect(self.TitleEdit, QtCore.SIGNAL(u'lostFocus()'), self.validate) |
4807 | |
4808 | QtCore.QObject.connect(self.VerseListView, |
4809 | - QtCore.SIGNAL("itemDoubleClicked(QListWidgetItem*)"), self.onVerseListViewSelected) |
4810 | + QtCore.SIGNAL(u'itemDoubleClicked(QListWidgetItem*)'), self.onVerseListViewSelected) |
4811 | QtCore.QObject.connect(self.VerseListView, |
4812 | - QtCore.SIGNAL("itemClicked(QListWidgetItem*)"), self.onVerseListViewPressed) |
4813 | + QtCore.SIGNAL(u'itemClicked(QListWidgetItem*)'), self.onVerseListViewPressed) |
4814 | # Create other objects and forms |
4815 | self.custommanager = custommanager |
4816 | self.initialise() |
4817 | @@ -60,8 +60,8 @@ |
4818 | self.DeleteButton.setEnabled(False) |
4819 | self.EditButton.setEnabled(False) |
4820 | self.SaveButton.setEnabled(False) |
4821 | - self.TitleEdit.setText('') |
4822 | - self.CreditEdit.setText('') |
4823 | + self.TitleEdit.setText(u'') |
4824 | + self.CreditEdit.setText(u'') |
4825 | self.VerseTextEdit.clear() |
4826 | self.VerseListView.clear() |
4827 | #make sure we have a new item |
4828 | @@ -86,7 +86,7 @@ |
4829 | verseList = songXML.get_verses() |
4830 | for verse in verseList: |
4831 | self.VerseListView.addItem(verse[1]) |
4832 | - theme = str(self.customSlide.theme_name) |
4833 | + theme = unicode(self.customSlide.theme_name) |
4834 | id = self.ThemecomboBox.findText(theme, QtCore.Qt.MatchExactly) |
4835 | if id == -1: |
4836 | id = 0 # Not Found |
4837 | @@ -103,7 +103,7 @@ |
4838 | sxml.add_lyrics_to_song() |
4839 | count = 1 |
4840 | for i in range (0, self.VerseListView.count()): |
4841 | - sxml.add_verse_to_lyrics(u'custom', str(count), str(self.VerseListView.item(i).text())) |
4842 | + sxml.add_verse_to_lyrics(u'custom', unicode(count), unicode(self.VerseListView.item(i).text())) |
4843 | count += 1 |
4844 | self.customSlide.title = unicode(self.TitleEdit.displayText()) |
4845 | self.customSlide.text = unicode(sxml.extract_xml()) |
4846 | @@ -167,12 +167,12 @@ |
4847 | self.valid = True |
4848 | if len(self.TitleEdit.displayText()) == 0: |
4849 | invalid += 1 |
4850 | - self.TitleLabel.setStyleSheet('color: red') |
4851 | + self.TitleLabel.setStyleSheet(u'color: red') |
4852 | else: |
4853 | - self.TitleLabel.setStyleSheet('color: black') |
4854 | + self.TitleLabel.setStyleSheet(u'color: black') |
4855 | |
4856 | if self.VerseListView.count() == 0: # must have 1 slide |
4857 | invalid += 1 |
4858 | |
4859 | if invalid == 1: |
4860 | - self.valid = False |
4861 | + self.valid = False |
4862 | \ No newline at end of file |
4863 | |
4864 | === modified file 'openlp/plugins/custom/lib/customserviceitem.py' |
4865 | --- openlp/plugins/custom/lib/customserviceitem.py 2009-05-21 16:07:01 +0000 |
4866 | +++ openlp/plugins/custom/lib/customserviceitem.py 2009-06-16 18:21:24 +0000 |
4867 | @@ -51,7 +51,7 @@ |
4868 | """ |
4869 | Init Method |
4870 | """ |
4871 | - log.info("init") |
4872 | + log.info(u'init') |
4873 | self.imgs=TextListData() |
4874 | # self.slide_controller=controller |
4875 | # self.slide_controller.ControllerContents=QtGui.QListView() |
4876 | @@ -67,12 +67,12 @@ |
4877 | """ |
4878 | # render the "image chooser first" |
4879 | # for f in self.imgs: |
4880 | -# fl , nm = os.path.split(str(f)) |
4881 | +# fl , nm = os.path.split(unicode(f)) |
4882 | # c = self.slide_controller.rowCount() |
4883 | # self.slide_controller.setRowCount(c+1) |
4884 | -# twi = QtGui.QTableWidgetItem(str(f)) |
4885 | +# twi = QtGui.QTableWidgetItem(unicode(f)) |
4886 | # self.slide_controller.setItem(c , 0, twi) |
4887 | -# twi = QtGui.QTableWidgetItem(str(nm)) |
4888 | +# twi = QtGui.QTableWidgetItem(unicode(nm)) |
4889 | # self.slide_controller.setItem(c , 1, twi) |
4890 | # self.slide_controller.setRowHeight(c, 80) |
4891 | |
4892 | @@ -89,11 +89,11 @@ |
4893 | """ |
4894 | append an image to the list |
4895 | """ |
4896 | - if type(data)==type("string"): |
4897 | - log.info("add filename:"+data) |
4898 | + if type(data)==type(u'string'): |
4899 | + log.info(u'add filename:'+data) |
4900 | self.imgs.addRow(data) |
4901 | else: # it's another service item to be merged in |
4902 | - log.info("add Item..."+str(data)) |
4903 | + log.info(u'add Item...'+unicode(data)) |
4904 | for filename in data.imgs.get_file_list(): |
4905 | self.add(filename) |
4906 | |
4907 | @@ -102,17 +102,16 @@ |
4908 | """ |
4909 | Turn the image list into a set of filenames for storage in the oos file |
4910 | """ |
4911 | - log.info("Get oos text") |
4912 | - log.info(str(self.imgs)) |
4913 | - log.info(str(self.imgs.get_file_list())) |
4914 | + log.info(u'Get oos text') |
4915 | + log.info(unicode(self.imgs)) |
4916 | + log.info(unicode(self.imgs.get_file_list())) |
4917 | return '\n'.join(self.imgs.get_file_list()) |
4918 | |
4919 | def set_from_oos(self, text): |
4920 | """ |
4921 | get text from the OOS file and setup the internal structure |
4922 | """ |
4923 | - log.info("Set from OOS:"+text) |
4924 | - files=text.split('\n') |
4925 | + log.info(u'Set from OOS:'+text) |
4926 | + files=text.split(u'\n') |
4927 | for f in files: |
4928 | self.imgs.addRow(f) |
4929 | - |
4930 | |
4931 | === modified file 'openlp/plugins/custom/lib/mediaitem.py' |
4932 | --- openlp/plugins/custom/lib/mediaitem.py 2009-06-07 19:34:24 +0000 |
4933 | +++ openlp/plugins/custom/lib/mediaitem.py 2009-06-16 18:21:24 +0000 |
4934 | @@ -152,7 +152,7 @@ |
4935 | self.onSearchTextButtonClick() |
4936 | |
4937 | def onSearchTextButtonClick(self): |
4938 | - search_keywords = str(self.SearchTextEdit.displayText()) |
4939 | + search_keywords = unicode(self.SearchTextEdit.displayText()) |
4940 | search_results = [] |
4941 | search_type = self.SearchTypeComboBox.currentText() |
4942 | search_results = self.Custommanager.search_Custom_lyrics(search_keywords) |
4943 | @@ -221,4 +221,4 @@ |
4944 | service_item.title = title |
4945 | for slide in raw_slides: |
4946 | service_item.add_from_text(slide[:30], slide) |
4947 | - service_item.raw_footer = raw_footer |
4948 | + service_item.raw_footer = raw_footer |
4949 | \ No newline at end of file |
4950 | |
4951 | === modified file 'openlp/plugins/custom/lib/tables.py' |
4952 | --- openlp/plugins/custom/lib/tables.py 2009-03-07 09:20:26 +0000 |
4953 | +++ openlp/plugins/custom/lib/tables.py 2009-06-16 18:21:24 +0000 |
4954 | @@ -22,10 +22,10 @@ |
4955 | from openlp.plugins.custom.lib.meta import metadata |
4956 | |
4957 | # Definition of the "songs" table |
4958 | -custom_slide_table = Table('custom_slide', metadata, |
4959 | - Column('id', types.Integer(), primary_key=True), |
4960 | - Column('title', types.Unicode(255), nullable=False), |
4961 | - Column('text', types.UnicodeText, nullable=False), |
4962 | - Column('credits', types.UnicodeText), |
4963 | - Column('theme_name', types.Unicode(128)) |
4964 | -) |
4965 | +custom_slide_table = Table(u'custom_slide', metadata, |
4966 | + Column(u'id', types.Integer(), primary_key=True), |
4967 | + Column(u'title', types.Unicode(255), nullable=False), |
4968 | + Column(u'text', types.UnicodeText, nullable=False), |
4969 | + Column(u'credits', types.UnicodeText), |
4970 | + Column(u'theme_name', types.Unicode(128)) |
4971 | +) |
4972 | \ No newline at end of file |
4973 | |
4974 | === modified file 'openlp/plugins/custom/lib/textlistdata.py' |
4975 | --- openlp/plugins/custom/lib/textlistdata.py 2009-06-03 15:38:14 +0000 |
4976 | +++ openlp/plugins/custom/lib/textlistdata.py 2009-06-16 18:21:24 +0000 |
4977 | @@ -42,7 +42,7 @@ |
4978 | |
4979 | def insertRow(self, row, id, title): |
4980 | self.beginInsertRows(QtCore.QModelIndex(),row,row) |
4981 | - log.debug("insert row %d:%s for id %d" % (row,title, id)) |
4982 | + log.debug(u'insert row %d:%s for id %d' % (row,title, id)) |
4983 | self.items.insert(row, (id, title)) |
4984 | self.endInsertRows() |
4985 | |
4986 | |
4987 | === modified file 'openlp/plugins/images/lib/imageserviceitem.py' |
4988 | --- openlp/plugins/images/lib/imageserviceitem.py 2009-05-22 18:30:25 +0000 |
4989 | +++ openlp/plugins/images/lib/imageserviceitem.py 2009-06-16 18:21:24 +0000 |
4990 | @@ -42,13 +42,13 @@ |
4991 | |
4992 | """ |
4993 | global log |
4994 | - log=logging.getLogger("ImageServiceItem") |
4995 | - log.info("ImageServiceItem loaded") |
4996 | + log=logging.getLogger(u'ImageServiceItem') |
4997 | + log.info(u'ImageServiceItem loaded') |
4998 | def __init__(self, controller): |
4999 | """ |
5000 | Init Method |
Mass Unicode conversion
Bug fixing afterwards