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

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

Ok then, time for another merge.
Lots of goddies this time. Mostly "style police" cleanups but some bug fixes as well.
Images in themes seem to work now as well as theme selection controlled from the settings.

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

A BFA.

(Big Fat Approve)

review: Approve
Revision history for this message
Tim Bentley (trb143) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openlp.pyw'
2--- openlp.pyw 2009-05-11 05:09:43 +0000
3+++ openlp.pyw 2009-05-20 20:17:20 +0000
4@@ -4,7 +4,7 @@
5 """
6 OpenLP - Open Source Lyrics Projection
7 Copyright (c) 2008 Raoul Snyman
8-Portions copyright (c) 2008 Martin Thompson, Tim Bentley,
9+Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley,
10
11 This program is free software; you can redistribute it and/or modify it under
12 the terms of the GNU General Public License as published by the Free Software
13@@ -26,17 +26,15 @@
14 from openlp.core.lib import Receiver
15
16 logging.basicConfig(level=logging.DEBUG,
17- format=u'%(asctime)s %(msecs)d %(name)-12s %(levelname)-8s %(message)s',
18- datefmt=u'%m-%d %H:%M:%S',
19- filename=u'openlp.log',
20- filemode=u'w')
21+ format=u'%(asctime)s %(msecs)d %(name)-12s %(levelname)-8s %(message)s',
22+ datefmt=u'%m-%d %H:%M:%S', filename=u'openlp.log', filemode=u'w')
23
24 from openlp.core.resources import *
25 from openlp.core.ui import MainWindow, SplashScreen
26
27 class OpenLP(QtGui.QApplication):
28 global log
29- log=logging.getLogger(u'OpenLP Application')
30+ log = logging.getLogger(u'OpenLP Application')
31 log.info(u'Application Loaded')
32
33 def run(self):
34@@ -56,15 +54,16 @@
35 screens.append({u'number': screen,
36 u'size': self.desktop().availableGeometry(screen),
37 u'primary': (self.desktop().primaryScreen() == screen)})
38- log.info(u'Screen %d found with resolution %s', screen, self.desktop().availableGeometry(screen))
39+ log.info(u'Screen %d found with resolution %s',
40+ screen, self.desktop().availableGeometry(screen))
41 # start the main app window
42- self.main_window = MainWindow(screens)
43- self.main_window.show()
44+ self.mainWindow = MainWindow(screens)
45+ self.mainWindow.show()
46 # now kill the splashscreen
47- self.splash.finish(self.main_window.main_window)
48+ self.splash.finish(self.mainWindow.mainWindow)
49 sys.exit(app.exec_())
50
51-if __name__ == '__main__':
52+if __name__ == u'__main__':
53 app = OpenLP(sys.argv)
54 app.run()
55
56
57=== modified file 'openlp/__init__.py'
58--- openlp/__init__.py 2009-05-13 19:47:25 +0000
59+++ openlp/__init__.py 2009-05-21 05:15:51 +0000
60@@ -1,7 +1,7 @@
61 """
62 OpenLP - Open Source Lyrics Projection
63 Copyright (c) 2008 Raoul Snyman
64-Portions copyright (c) 2008 Martin Thompson, Tim Bentley
65+Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley
66
67 This program is free software; you can redistribute it and/or modify it under
68 the terms of the GNU General Public License as published by the Free Software
69@@ -15,24 +15,3 @@
70 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
71 Place, Suite 330, Boston, MA 02111-1307 USA
72 """
73-import types
74-from PyQt4 import QtCore, QtGui
75-
76-__all__ = ['convertStringToBoolean','buildIcon',]
77-
78-def convertStringToBoolean(stringvalue):
79- return stringvalue.strip().lower() in (u'true', u'yes', u'y')
80-
81-def buildIcon(icon):
82- ButtonIcon = None
83- if type(icon) is QtGui.QIcon:
84- ButtonIcon = icon
85- elif type(icon) is types.StringType or type(icon) is types.UnicodeType:
86- ButtonIcon = QtGui.QIcon()
87- if icon.startswith(u':/'):
88- ButtonIcon.addPixmap(QtGui.QPixmap(icon), QtGui.QIcon.Normal,
89- QtGui.QIcon.Off)
90- else:
91- ButtonIcon.addPixmap(QtGui.QPixmap.fromImage(QImage(icon)),
92- QtGui.QIcon.Normal, QtGui.QIcon.Off)
93- return ButtonIcon
94
95=== modified file 'openlp/core/__init__.py'
96--- openlp/core/__init__.py 2009-04-20 18:22:42 +0000
97+++ openlp/core/__init__.py 2009-05-21 05:15:51 +0000
98@@ -17,16 +17,8 @@
99 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
100 Place, Suite 330, Boston, MA 02111-1307 USA
101 """
102-from PyQt4 import QtCore, QtGui
103-
104 from settingsmanager import SettingsManager
105 from openlp.core.lib.pluginmanager import PluginManager
106
107-__all__ = ['SettingsManager', 'PluginManager', 'translate',
108- 'fileToXML' ]
109-
110-def translate(context, text):
111- return QtGui.QApplication.translate(context, text, None, QtGui.QApplication.UnicodeUTF8)
112-
113-def fileToXML(xmlfile):
114- return open(xmlfile).read()
115+__all__ = ['SettingsManager', 'PluginManager' ]
116+
117
118=== modified file 'openlp/core/lib/__init__.py'
119--- openlp/core/lib/__init__.py 2009-04-22 19:46:10 +0000
120+++ openlp/core/lib/__init__.py 2009-05-22 18:30:25 +0000
121@@ -17,6 +17,46 @@
122 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
123 Place, Suite 330, Boston, MA 02111-1307 USA
124 """
125+import types
126+from PyQt4 import QtCore, QtGui
127+
128+def translate(context, text):
129+ return QtGui.QApplication.translate(context, text, None, QtGui.QApplication.UnicodeUTF8)
130+
131+def file_to_xml(xmlfile):
132+ return open(xmlfile).read()
133+
134+def str_to_bool(stringvalue):
135+ return stringvalue.strip().lower() in (u'true', u'yes', u'y')
136+
137+def buildIcon(icon):
138+ ButtonIcon = None
139+ if type(icon) is QtGui.QIcon:
140+ ButtonIcon = icon
141+ elif type(icon) is types.StringType or type(icon) is types.UnicodeType:
142+ ButtonIcon = QtGui.QIcon()
143+ if icon.startswith(u':/'):
144+ ButtonIcon.addPixmap(QtGui.QPixmap(icon), QtGui.QIcon.Normal,
145+ QtGui.QIcon.Off)
146+ else:
147+ ButtonIcon.addPixmap(QtGui.QPixmap.fromImage(QImage(icon)),
148+ QtGui.QIcon.Normal, QtGui.QIcon.Off)
149+ return ButtonIcon
150+
151+def contextMenuAction(base, icon, text, slot):
152+ """
153+ Utility method to help build context menus for plugins
154+ """
155+ action = QtGui.QAction(text, base)
156+ action .setIcon(buildIcon(icon))
157+ QtCore.QObject.connect(action, QtCore.SIGNAL("triggered()"), slot)
158+ return action
159+
160+def contextMenuSeparator(base):
161+ action = QtGui.QAction("", base)
162+ action.setSeparator(True)
163+ return action
164+
165 from pluginconfig import PluginConfig
166 from plugin import Plugin
167 from settingstab import SettingsTab
168@@ -35,6 +75,11 @@
169 from renderer import Renderer
170 from rendermanager import RenderManager
171
172-__all__ = ['Renderer','PluginConfig', 'Plugin', 'SettingsTab', 'MediaManagerItem', 'Event', 'EventType'
173- 'XmlRootClass', 'ServiceItem', 'Receiver', 'OpenLPToolbar', 'SongXMLBuilder',
174- 'SongXMLParser', 'EventManager', 'ThemeXML', 'RenderManager']
175+#__all__ = ['Renderer','PluginConfig', 'Plugin', 'SettingsTab', 'MediaManagerItem', 'Event', 'EventType'
176+# 'XmlRootClass', 'ServiceItem', 'Receiver', 'OpenLPToolbar', 'SongXMLBuilder',
177+# 'SongXMLParser', 'EventManager', 'ThemeXML', 'RenderManager']
178+
179+__all__ = [ 'translate', 'file_to_xml', 'str_to_bool', 'contextMenuAction', 'contextMenuSeparator']
180+
181+
182+
183
184=== modified file 'openlp/core/lib/event.py'
185--- openlp/core/lib/event.py 2009-05-16 16:38:03 +0000
186+++ openlp/core/lib/event.py 2009-05-20 20:17:20 +0000
187@@ -44,6 +44,7 @@
188 #PreviewBeforeShow = 13
189 #PreviewAfterShow = 14
190
191+#Theme Related Events
192 ThemeListChanged = 15
193
194
195
196=== modified file 'openlp/core/lib/eventmanager.py'
197--- openlp/core/lib/eventmanager.py 2009-05-16 16:38:03 +0000
198+++ openlp/core/lib/eventmanager.py 2009-05-20 20:17:20 +0000
199@@ -29,10 +29,10 @@
200
201 """
202 global log
203- log=logging.getLogger(u'EventManager')
204+ log = logging.getLogger(u'EventManager')
205
206 def __init__(self):
207- self.endpoints=[]
208+ self.endpoints = []
209 log.info(u'Initialising')
210
211 def register(self, plugin):
212
213=== modified file 'openlp/core/lib/eventreceiver.py'
214--- openlp/core/lib/eventreceiver.py 2009-03-10 16:46:25 +0000
215+++ openlp/core/lib/eventreceiver.py 2009-05-20 20:17:20 +0000
216@@ -2,7 +2,7 @@
217 """
218 OpenLP - Open Source Lyrics Projection
219 Copyright (c) 2008 Raoul Snyman
220-Portions copyright (c) 2008 Martin Thompson, Tim Bentley,
221+Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley,
222
223 This program is free software; you can redistribute it and/or modify it under
224 the terms of the GNU General Public License as published by the Free Software
225@@ -17,15 +17,15 @@
226 Place, Suite 330, Boston, MA 02111-1307 USA
227 """
228
229-from PyQt4.QtCore import *
230+from PyQt4 import QtCore
231
232-class EventReceiver(QObject):
233+class EventReceiver(QtCore.QObject):
234 """
235 Class to allow events to be passed from different parts of the system.
236 This is a private class and should not be used directly but via the Receiver class
237 """
238 def __init__(self):
239- QObject.__init__(self)
240+ QtCore.QObject.__init__(self)
241
242 def send_message(self, event, msg=None):
243 self.emit(SIGNAL(event), msg)
244
245=== modified file 'openlp/core/lib/mediamanageritem.py'
246--- openlp/core/lib/mediamanageritem.py 2009-05-13 19:47:25 +0000
247+++ openlp/core/lib/mediamanageritem.py 2009-05-20 20:17:20 +0000
248@@ -64,7 +64,7 @@
249 item.
250 """
251 if self.Toolbar is None:
252- self.Toolbar=OpenLPToolbar(self)
253+ self.Toolbar = OpenLPToolbar(self)
254 self.PageLayout.addWidget(self.Toolbar)
255
256 def addToolbarButton(self, title, tooltip, icon, slot=None, objectname=None):
257@@ -82,7 +82,7 @@
258 self.Toolbar.addSeparator()
259
260 def contextMenuSeparator(self, base):
261- action = QtGui.QAction("", base)
262+ action = QtGui.QAction(u'', base)
263 action.setSeparator(True)
264 return action
265
266@@ -94,7 +94,7 @@
267 ButtonIcon = icon
268 elif type(icon) is types.StringType:
269 ButtonIcon = QtGui.QIcon()
270- if icon.startswith(':/'):
271+ if icon.startswith(u':/'):
272 ButtonIcon.addPixmap(QtGui.QPixmap(icon), QtGui.QIcon.Normal,
273 QtGui.QIcon.Off)
274 else:
275@@ -103,6 +103,6 @@
276
277 action = QtGui.QAction(text, base)
278 action .setIcon(ButtonIcon)
279- QtCore.QObject.connect(action, QtCore.SIGNAL("triggered()"), slot)
280+ QtCore.QObject.connect(action, QtCore.SIGNAL(u'triggered()'), slot)
281 return action
282
283
284=== modified file 'openlp/core/lib/plugin.py'
285--- openlp/core/lib/plugin.py 2009-05-02 18:56:27 +0000
286+++ openlp/core/lib/plugin.py 2009-05-20 20:17:20 +0000
287@@ -80,7 +80,7 @@
288 if name is not None:
289 self.name = name
290 else:
291- self.name = 'Plugin'
292+ self.name = u'Plugin'
293 if version is not None:
294 self.version = version
295 self.icon = None
296@@ -88,12 +88,12 @@
297 self.weight = 0
298 # Set up logging
299 self.log = logging.getLogger(self.name)
300- self.preview_controller=plugin_helpers[u'preview']
301- self.live_controller=plugin_helpers[u'live']
302- self.theme_manager=plugin_helpers[u'theme']
303- self.event_manager=plugin_helpers[u'event']
304- self.render_manager=plugin_helpers[u'render']
305- self.service_manager=plugin_helpers[u'service']
306+ self.preview_controller = plugin_helpers[u'preview']
307+ self.live_controller = plugin_helpers[u'live']
308+ self.theme_manager = plugin_helpers[u'theme']
309+ self.event_manager = plugin_helpers[u'event']
310+ self.render_manager = plugin_helpers[u'render']
311+ self.service_manager = plugin_helpers[u'service']
312
313 def check_pre_conditions(self):
314 """
315
316=== modified file 'openlp/core/lib/pluginconfig.py'
317--- openlp/core/lib/pluginconfig.py 2009-03-15 19:31:33 +0000
318+++ openlp/core/lib/pluginconfig.py 2009-05-20 20:17:20 +0000
319@@ -37,12 +37,12 @@
320 Get a configuration value from the configuration registry.
321 """
322 return ConfigHelper.get_config(self.section, key, default)
323-
324+
325 def delete_config(self, key):
326 """
327 Delete a configuration value from the configuration registry.
328 """
329- return ConfigHelper.delete_config(self.section, key)
330+ return ConfigHelper.delete_config(self.section, key)
331
332 def set_config(self, key, value):
333 """
334@@ -64,26 +64,28 @@
335
336 def set_data_path(self, path):
337 return self.set_config(u'data path', os.path.basename(path))
338-
339+
340 def get_files(self, suffix=None):
341- returnfiles = []
342 #suffix = self.get_config("suffix name", default_suffixes)
343 try:
344- files = os.listdir(self.get_data_path())
345+ files = os.listdir(self.get_data_path())
346 except:
347- return returnfiles
348+ return []
349 if suffix != None:
350+ return_files = []
351 for f in files:
352 if f.find('.') != -1:
353 nme = f.split('.')
354 bname = nme[0]
355 sfx = nme[1].lower()
356 sfx = sfx.lower()
357- if suffix.find(sfx) > -1 : # only load files with the correct suffix
358- returnfiles.append(f)
359- return returnfiles
360+ # only load files with the correct suffix
361+ if suffix.find(sfx) > -1 :
362+ return_files.append(f)
363+ return return_files
364 else:
365- return files # no filtering required
366+ # no filtering required
367+ return files
368
369 def load_list(self, name):
370 """
371
372=== modified file 'openlp/core/lib/pluginmanager.py'
373--- openlp/core/lib/pluginmanager.py 2009-04-20 18:22:42 +0000
374+++ openlp/core/lib/pluginmanager.py 2009-05-20 20:17:20 +0000
375@@ -29,7 +29,7 @@
376 and executes all the hooks, as and when necessary.
377 """
378 global log
379- log=logging.getLogger(u'PluginMgr')
380+ log = logging.getLogger(u'PluginMgr')
381 log.info(u'Plugin manager loaded')
382
383 def __init__(self, dir):
384@@ -42,25 +42,26 @@
385 log.debug("Inserting %s into sys.path", dir)
386 sys.path.insert(0, dir)
387 self.basepath = os.path.abspath(dir)
388- log.debug("Base path %s ", self.basepath)
389+ log.debug(u'Base path %s ', self.basepath)
390 self.plugins = []
391 # this has to happen after the UI is sorted self.find_plugins(dir)
392- log.info("Plugin manager done init")
393+ log.info(u'Plugin manager done init')
394
395- def find_plugins(self, dir, plugin_helpers, eventmanager): # TODO shouldn't dir come from self.basepath
396+ def find_plugins(self, dir, plugin_helpers, eventmanager):
397 """
398 Scan the directory dir for objects inheriting from openlp.plugin
399 """
400 self.plugin_helpers = plugin_helpers
401- startdepth=len(os.path.abspath(dir).split(os.sep))
402- log.debug("find plugins %s at depth %d" %( str(dir), startdepth))
403+ startdepth = len(os.path.abspath(dir).split(os.sep))
404+ log.debug(u'find plugins %s at depth %d' %( str(dir), startdepth))
405
406 for root, dirs, files in os.walk(dir):
407 for name in files:
408- if name.endswith(".py") and not name.startswith("__"):
409+ if name.endswith(u'.py') and not name.startswith(u'__'):
410 path = os.path.abspath(os.path.join(root, name))
411- thisdepth=len(path.split(os.sep))
412- if thisdepth-startdepth > 2: # skip anything lower down
413+ thisdepth = len(path.split(os.sep))
414+ if thisdepth-startdepth > 2:
415+ # skip anything lower down
416 continue
417 modulename, pyext = os.path.splitext(path)
418 prefix = os.path.commonprefix([self.basepath, path])
419@@ -68,11 +69,11 @@
420 modulename = modulename[len(prefix) + 1:]
421 modulename = modulename.replace(os.path.sep, '.')
422 # import the modules
423- log.debug("Importing %s from %s. Depth %d" % (modulename, path, thisdepth))
424+ log.debug(u'Importing %s from %s. Depth %d' % (modulename, path, thisdepth))
425 try:
426 __import__(modulename, globals(), locals(), [])
427 except ImportError, e:
428- log.error("Failed to import module %s on path %s for reason %s", modulename, path, e.message)
429+ log.error(u'Failed to import module %s on path %s for reason %s', modulename, path, e.message)
430 self.plugin_classes = Plugin.__subclasses__()
431 self.plugins = []
432 plugin_objects = []
433@@ -80,9 +81,9 @@
434 try:
435 plugin = p(self.plugin_helpers)
436 log.debug(u'loaded plugin %s with helpers'%str(p))
437- log.debug("Plugin="+str(p))
438+ log.debug(u'Plugin: %s', str(p))
439 if plugin.check_pre_conditions():
440- log.debug("Appending "+str(p))
441+ log.debug(u'Appending %s ', str(p))
442 plugin_objects.append(plugin)
443 eventmanager.register(plugin)
444 except TypeError:
445@@ -100,7 +101,7 @@
446 for plugin in self.plugins:
447 media_manager_item = plugin.get_media_manager_item()
448 if media_manager_item is not None:
449- log.debug('Inserting media manager item from %s' % plugin.name)
450+ log.debug(u'Inserting media manager item from %s' % plugin.name)
451 mediatoolbox.addItem(media_manager_item, plugin.icon, media_manager_item.title)
452
453 def hook_settings_tabs(self, settingsform=None):
454@@ -111,10 +112,10 @@
455 for plugin in self.plugins:
456 settings_tab = plugin.get_settings_tab()
457 if settings_tab is not None:
458- log.debug('Inserting settings tab item from %s' % plugin.name)
459+ log.debug(u'Inserting settings tab item from %s' % plugin.name)
460 settingsform.addTab(settings_tab)
461 else:
462- log.debug('No settings in %s' % plugin.name)
463+ log.debug(u'No settings in %s' % plugin.name)
464
465 def hook_import_menu(self, import_menu):
466 """
467@@ -132,15 +133,6 @@
468 for plugin in self.plugins:
469 plugin.add_export_menu_item(export_menu)
470
471- def hook_handle_event(self, eventmanager):
472- for plugin in self.plugins:
473- handle_event = plugin.handle_event(None)
474- print plugin, handle_event
475-# if settings_tab is not None:
476-# log.debug('Inserting settings tab item from %s' % plugin.name)
477-# settingsform.addTab(settings_tab)
478-# else:
479-# log.debug('No settings in %s' % plugin.name)
480 def initialise_plugins(self):
481 """
482 Loop through all the plugins and give them an opportunity to add an item
483
484=== modified file 'openlp/core/lib/renderer.py'
485--- openlp/core/lib/renderer.py 2009-05-19 16:27:01 +0000
486+++ openlp/core/lib/renderer.py 2009-05-30 18:44:16 +0000
487@@ -177,13 +177,11 @@
488 painter.drawPath(rectPath)
489
490 elif self._theme.background_type== u'image': # image
491- r = self._frame.rect()
492- log.debug(u'Image size details %d %d %d %d ', r.x(), r.y(), r.width(),r.height())
493- #log.debug(u' Background Parameter %d ', self._theme.background_color1)
494- #if self._theme.background_color1 is not None:
495- # p.fillRect(self._frame.rect(), self._theme.background_borderColor)
496+ #r = self._frame.rect()
497+ #log.debug(u'Image size details %d %d %d %d ', r.x(), r.y(), r.width(),r.height())
498 if self.bg_image is not None:
499- painter.drawPixmap(self.background_offsetx,self.background_offsety, self.bg_image)
500+ #painter.drawPixmap(self.background_offsetx,self.background_offsety, self.bg_image)
501+ painter.drawPixmap(0 ,0 , self.bg_image)
502 else:
503 painter.fillRect(self._frame.rect(), QtGui.QColor(u'#000000'))
504 painter.end()
505@@ -204,24 +202,29 @@
506 bboxes = []
507 for line in lines:
508 bboxes.append(self._render_single_line(line, footer))
509+ #print line, bboxes
510
511 numlines = len(lines)
512 bottom = self._rect.bottom()
513- for ratio in (numlines, numlines/2, numlines/3, numlines/4):
514- good = 1
515- startline = 0
516- endline = startline + ratio
517- while (endline <= numlines):
518- by = 0
519- for (x, y) in bboxes[startline:endline]:
520- by += y
521- if by > bottom:
522- good=0
523- break
524- startline += ratio
525- endline = startline+ratio
526- if good == 1:
527+ #for ratio in (numlines): #, numlines/2, numlines/3, numlines/4):
528+ ratio = numlines
529+ good = 1
530+ startline = 0
531+ endline = startline + ratio
532+ while (endline <= numlines):
533+ by = 0
534+ for (x, y) in bboxes[startline:endline]:
535+ by += y
536+ #print by
537+ #print by , bottom
538+ if by > bottom:
539+ good=0
540 break
541+ startline += ratio
542+ endline = startline+ratio
543+# if good == 1:
544+# break
545+ #print "---------"
546
547 retval = []
548 numlines_per_page = ratio
549
550=== modified file 'openlp/core/lib/rendermanager.py'
551--- openlp/core/lib/rendermanager.py 2009-05-18 19:47:18 +0000
552+++ openlp/core/lib/rendermanager.py 2009-05-22 18:30:25 +0000
553@@ -63,6 +63,7 @@
554 self.renderer = Renderer()
555 self.calculate_default(self.screen_list[self.current_display]['size'])
556 self.theme = u''
557+ self.service_theme = u''
558
559 def set_global_theme(self, global_theme, global_style = u'Global'):
560 self.global_theme = global_theme
561@@ -83,11 +84,13 @@
562 else:
563 if theme is not None:
564 self.theme = theme
565- elif self.global_style == u'Service':
566+ elif self.global_style == u'Song' or self.global_style == u'Service':
567 if self.service_theme == u'':
568 self.theme = self.global_theme
569 else:
570 self.theme = self.service_theme
571+ else:
572+ self.theme = self.global_theme
573
574 if self.theme is not self.renderer.theme_name:
575 log.debug(u'theme is now %s', self.theme)
576@@ -117,7 +120,7 @@
577
578 def generate_preview(self, themedata):
579 log.debug(u'generate preview')
580- self.calculate_default(QtCore.QSize(800, 600))
581+ self.calculate_default(QtCore.QSize(1024, 768))
582 self.renderer.set_theme(themedata)
583 self.build_text_rectangle(themedata)
584
585
586=== modified file 'openlp/core/lib/serviceitem.py'
587--- openlp/core/lib/serviceitem.py 2009-05-17 15:24:02 +0000
588+++ openlp/core/lib/serviceitem.py 2009-05-22 18:30:25 +0000
589@@ -19,10 +19,8 @@
590 """
591 import logging
592 import time
593-from openlp import buildIcon
594-from PyQt4.QtCore import *
595-from PyQt4.QtGui import *
596-
597+from openlp.core.lib import buildIcon
598+from PyQt4 import QtCore, QtGui
599
600 class ServiceItem():
601 """
602@@ -44,6 +42,8 @@
603 self.items = []
604 self.iconic_representation = None
605 self.raw_slides = None
606+ self.frame_titles = []
607+ self.command_files = []
608 self.frames = []
609 self.raw_footer = None
610 self.theme = None
611@@ -62,11 +62,14 @@
612 else:
613 self.render_manager.set_override_theme(self.theme)
614 log.debug(u'Formatting slides')
615- if len(self.frames) == 0 :
616+ if len(self.frames) == 0 and len(self.raw_slides) > 0 :
617 for slide in self.raw_slides:
618 formated = self.render_manager.format_slide(slide, False)
619 frame = self.render_manager.generate_slide(formated, self.raw_footer)
620- self.frames.append({u'formatted': formated, u'image': frame})
621+ self.frames.append({u'title': formated, u'image': frame})
622+ else:
623+ if len(self.command_files) > 0:
624+ pass
625
626
627 def get_parent_node(self):
628
629=== modified file 'openlp/core/lib/themexmlhandler.py'
630--- openlp/core/lib/themexmlhandler.py 2009-05-16 19:47:30 +0000
631+++ openlp/core/lib/themexmlhandler.py 2009-05-22 05:14:55 +0000
632@@ -22,7 +22,7 @@
633 For XML Schema see wiki.openlp.org
634 """
635 import os, os.path
636-from openlp import convertStringToBoolean
637+from openlp.core.lib import str_to_bool
638 from xml.dom.minidom import Document
639 from xml.etree.ElementTree import ElementTree, XML, dump
640
641@@ -69,12 +69,14 @@
642 # Create the minidom document
643 self.theme_xml = Document()
644
645- def extend_filename(self, path):
646+ def extend_image_filename(self, path):
647+ """
648+ Add the path name to the image name so the background can be rendered.
649+ """
650 if self.background_filename is not None:
651 self.background_filename = os.path.join(path, self.theme_name, self.background_filename)
652
653 def new_document(self, name):
654- # Create the <song> base element
655 self.theme = self.theme_xml.createElement(u'theme')
656 self.theme_xml.appendChild(self.theme)
657 self.theme.setAttribute(u'version', u'1.0')
658@@ -85,89 +87,92 @@
659 self.theme.appendChild(self.name)
660
661 def add_background_transparent(self):
662- # Create the main <lyrics> element
663+ """
664+ Add a transparent background.
665+ """
666 background = self.theme_xml.createElement(u'background')
667 background.setAttribute(u'mode', u'transparent')
668 self.theme.appendChild(background)
669
670 def add_background_solid(self, bkcolor):
671+ """
672+ Add a Solid background.
673+ """
674 background = self.theme_xml.createElement(u'background')
675 background.setAttribute(u'mode', u'opaque')
676 background.setAttribute(u'type', u'solid')
677 self.theme.appendChild(background)
678
679- color = self.theme_xml.createElement(u'color')
680- bkc = self.theme_xml.createTextNode(bkcolor)
681- color.appendChild(bkc)
682- background.appendChild(color)
683+ self.child_element(background, u'color', bkcolor)
684
685 def add_background_gradient(self, startcolor, endcolor, direction):
686+ """
687+ Add a gradient background.
688+ """
689 background = self.theme_xml.createElement(u'background')
690 background.setAttribute(u'mode', u'opaque')
691 background.setAttribute(u'type', u'gradient')
692 self.theme.appendChild(background)
693
694- color = self.theme_xml.createElement(u'startColor')
695- bkc = self.theme_xml.createTextNode(startcolor)
696- color.appendChild(bkc)
697- background.appendChild(color)
698-
699- color = self.theme_xml.createElement(u'endColor')
700- bkc = self.theme_xml.createTextNode(endcolor)
701- color.appendChild(bkc)
702- background.appendChild(color)
703-
704- color = self.theme_xml.createElement(u'direction')
705- bkc = self.theme_xml.createTextNode(direction)
706- color.appendChild(bkc)
707- background.appendChild(color)
708+ # Create startColor element
709+ self.child_element(background, u'startColor', startcolor)
710+ # Create endColor element
711+ self.child_element(background, u'endColor', endcolor)
712+ # Create direction element
713+ self.child_element(background, u'direction', direction)
714
715 def add_background_image(self, filename):
716+ """
717+ Add a image background.
718+ """
719 background = self.theme_xml.createElement(u'background')
720 background.setAttribute(u'mode', u'opaque')
721 background.setAttribute(u'type', u'image')
722 self.theme.appendChild(background)
723
724- color = self.theme_xml.createElement(u'filename')
725- bkc = self.theme_xml.createCDATASection(filename)
726- color.appendChild(bkc)
727- background.appendChild(color)
728+ #Create Filename element
729+ self.child_element(background, u'filename', filename)
730
731 def add_font(self, name, color, proportion, override, fonttype=u'main', xpos=0, ypos=0 ,width=0, height=0):
732+ """
733+ Add a Font.
734+ """
735 background = self.theme_xml.createElement(u'font')
736 background.setAttribute(u'type',fonttype)
737 self.theme.appendChild(background)
738
739- element = self.theme_xml.createElement(u'name')
740- fn = self.theme_xml.createTextNode(name)
741- element.appendChild(fn)
742- background.appendChild(element)
743-
744- element = self.theme_xml.createElement(u'color')
745- fn = self.theme_xml.createTextNode(color)
746- element.appendChild(fn)
747- background.appendChild(element)
748-
749- element = self.theme_xml.createElement(u'proportion')
750- fn = self.theme_xml.createTextNode(proportion)
751- element.appendChild(fn)
752- background.appendChild(element)
753-
754+ #Create Font name element
755+ self.child_element(background, u'name', name)
756+
757+ #Create Font color element
758+ self.child_element(background, u'color', color)
759+
760+ #Create Proportion name element
761+ self.child_element(background, u'proportion', proportion)
762+
763+ #Create Proportion name element
764+ self.child_element(background, u'proportion', proportion)
765+
766+ #Create Location element
767 element = self.theme_xml.createElement(u'location')
768 element.setAttribute(u'override',override)
769
770 if override == u'True':
771- element.setAttribute(u'x',xpos)
772- element.setAttribute(u'y',ypos)
773- element.setAttribute(u'width',width)
774- element.setAttribute(u'height',height)
775+ element.setAttribute(u'x', xpos)
776+ element.setAttribute(u'y', ypos)
777+ element.setAttribute(u'width', width)
778+ element.setAttribute(u'height', height)
779 background.appendChild(element)
780
781 def add_display(self, shadow, shadowColor, outline, outlineColor, horizontal, vertical, wrap):
782+ """
783+ Add a Display options.
784+ """
785 background = self.theme_xml.createElement(u'display')
786 self.theme.appendChild(background)
787
788 tagElement = self.theme_xml.createElement(u'shadow')
789+
790 tagElement.setAttribute(u'color',shadowColor)
791 tagValue = self.theme_xml.createTextNode(shadow)
792 tagElement.appendChild(tagValue)
793@@ -194,15 +199,15 @@
794 tagElement.appendChild(tagValue)
795 background.appendChild(tagElement)
796
797- def child_element(self, tag, value):
798- tagElement = self.theme_xml.createElement(tag)
799- tagValue = self.theme_xml.createTextNode(value)
800- tagElement.appendChild(ftagValue)
801- self.background.appendChild(tagElement)
802+ def child_element(self, element, tag, value):
803+ child = self.theme_xml.createElement(tag)
804+ child.appendChild(self.theme_xml.createTextNode(value))
805+ element.appendChild(child)
806+ return child
807
808 def dump_xml(self):
809 # Debugging aid to see what we have
810- print self.theme_xml.toprettyxml(indent=" ")
811+ print self.theme_xml.toprettyxml(indent=u' ')
812
813 def extract_xml(self):
814 # Print our newly created XML
815@@ -211,18 +216,19 @@
816 def parse(self, xml):
817 self.baseParseXml()
818 self.parse_xml(xml)
819+ self.theme_filename_extended = False
820
821 def baseParseXml(self):
822 self.parse_xml(blankthemexml)
823
824 def parse_xml(self, xml):
825 theme_xml = ElementTree(element=XML(xml))
826- iter=theme_xml.getiterator()
827+ iter = theme_xml.getiterator()
828 master = u''
829 for element in iter:
830 #print element.tag, element.text
831 if len(element.getchildren()) > 0:
832- master= element.tag + u'_'
833+ master = element.tag + u'_'
834 if len(element.attrib) > 0:
835 #print "D", element.tag , element.attrib
836 for e in element.attrib.iteritems():
837@@ -231,18 +237,18 @@
838 master += e[1] + u'_'
839 elif master == u'display_' and (element.tag == u'shadow' or element.tag == u'outline'):
840 #print "b", master, element.tag, element.text, e[0], e[1]
841- et = convertStringToBoolean(element.text)
842+ et = str_to_bool(element.text)
843 setattr(self, master + element.tag , et)
844- setattr(self, master + element.tag +u'_'+ e[0], e[1])
845+ setattr(self, master + element.tag + u'_'+ e[0], e[1])
846 else:
847 field = master + e[0]
848 e1 = e[1]
849 if e[1] == u'True' or e[1] == u'False':
850- e1 = convertStringToBoolean(e[1])
851+ e1 = str_to_bool(e[1])
852 setattr(self, field, e1)
853 else:
854 #print "c", element.tag, element.text
855- if element.tag is not None :
856+ if element.tag is not None:
857 field = master + element.tag
858 setattr(self, field, element.text)
859
860@@ -250,5 +256,5 @@
861 s = u''
862 for k in dir(self):
863 if k[0:1] != u'_':
864- s+= u'%30s : %s\n' %(k,getattr(self,k))
865+ s += u'%30s : %s\n' %(k,getattr(self,k))
866 return s
867
868=== modified file 'openlp/core/lib/xmlrootclass.py'
869--- openlp/core/lib/xmlrootclass.py 2008-12-10 21:40:19 +0000
870+++ openlp/core/lib/xmlrootclass.py 2009-05-20 20:17:20 +0000
871@@ -22,13 +22,9 @@
872 import sys
873 import os
874 from types import StringType, NoneType, UnicodeType
875-sys.path.append(os.path.abspath("./../.."))
876+sys.path.append(os.path.abspath(u'./../..'))
877
878-ver = platform.python_version()
879-if ver >= '2.5':
880- from xml.etree.ElementTree import ElementTree, XML
881-else:
882- from elementtree import ElementTree, XML
883+from xml.etree.ElementTree import ElementTree, XML
884
885
886 class XmlRootClass(object):
887@@ -47,23 +43,27 @@
888 xml (string) -- formatted as xml tags and values
889 rootTag -- main tag of the xml
890 """
891- root=ElementTree(element=XML(xml))
892- iter=root.getiterator()
893+ root = ElementTree(element=XML(xml))
894+ iter = root.getiterator()
895 for element in iter:
896 if element.tag != rootTag:
897- t=element.text
898+ t = element.text
899 #print element.tag, t, type(t)
900- if type(t) == NoneType: # easy!
901+ if type(t) == NoneType:
902+ # easy!
903 val=t
904 elif type(t) == UnicodeType :
905 val=t
906- elif type(t) == StringType: # strings need special handling to sort the colours out
907+ elif type(t) == StringType:
908+ # strings need special handling to sort the colours out
909 #print "str",
910- if t[0] == "$": # might be a hex number
911+ if t[0] == '$':
912+ # might be a hex number
913 #print "hex",
914 try:
915- val=int(t[1:], 16)
916- except ValueError: # nope
917+ val = int(t[1:], 16)
918+ except ValueError:
919+ # nope
920 #print "nope",
921 pass
922 else:
923@@ -74,9 +74,9 @@
924 except ValueError:
925 #print "give up",
926 val=t
927- if hasattr(self, "post_tag_hook"):
928+ if hasattr(self, u'post_tag_hook'):
929 (element.tag, val) = self.post_tag_hook(element.tag, val)
930- setattr(self,element.tag, val)
931+ setattr(self, element.tag, val)
932 pass
933
934 def __str__(self):
935@@ -88,15 +88,15 @@
936 """
937 l = []
938 for k in dir(self):
939- if not k.startswith("_"):
940- l.append("%30s : %s" %(k,getattr(self,k)))
941- return "\n".join(l)
942+ if not k.startswith(u'_'):
943+ l.append(u'%30s : %s' %(k,getattr(self,k)))
944+ return u'\n'.join(l)
945
946 def _get_as_string(self):
947 """Return one string with all public attributes"""
948 s=""
949 for k in dir(self):
950- if not k.startswith("_"):
951- s+= "_%s_" %(getattr(self,k))
952+ if not k.startswith(u'_'):
953+ s+= u'_%s_' %(getattr(self,k))
954 return s
955
956
957=== modified file 'openlp/core/ui/about.py'
958--- openlp/core/ui/about.py 2009-05-01 22:26:43 +0000
959+++ openlp/core/ui/about.py 2009-05-22 18:30:25 +0000
960@@ -19,135 +19,129 @@
961 """
962
963 from PyQt4 import QtCore, QtGui
964-from PyQt4.QtGui import QDialog
965-
966-from openlp.core import translate
967-from openlp.core.resources import *
968-
969-class AboutForm(QDialog):
970+
971+from openlp.core.lib import translate
972+
973+class AboutForm(QtGui.QDialog):
974
975 def __init__(self, parent=None):
976- QDialog.__init__(self, parent)
977+ QtGui.QDialog.__init__(self, parent)
978 self.setupUi(self)
979
980 def setupUi(self, AboutForm):
981- AboutForm.setObjectName("AboutForm")
982+ AboutForm.setObjectName(u'AboutForm')
983 AboutForm.resize(470, 481)
984 icon = QtGui.QIcon()
985- icon.addPixmap(QtGui.QPixmap(":/icon/openlp-logo-16x16.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
986+ icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
987 AboutForm.setWindowIcon(icon)
988 AboutFormLayout = QtGui.QVBoxLayout(AboutForm)
989 AboutFormLayout.setSpacing(8)
990 AboutFormLayout.setMargin(8)
991- AboutFormLayout.setObjectName("AboutDialogLayout")
992+ AboutFormLayout.setObjectName(u'AboutDialogLayout')
993 self.Logo = QtGui.QLabel(AboutForm)
994 self.Logo.setAutoFillBackground(False)
995- self.Logo.setStyleSheet("background-color: rgb(255, 255, 255);")
996+ self.Logo.setStyleSheet(u'background-color: rgb(255, 255, 255);')
997 self.Logo.setFrameShape(QtGui.QFrame.StyledPanel)
998 self.Logo.setLineWidth(1)
999- self.Logo.setPixmap(QtGui.QPixmap(":/graphics/openlp-about-logo.png"))
1000+ self.Logo.setPixmap(QtGui.QPixmap(u':/graphics/openlp-about-logo.png'))
1001 self.Logo.setScaledContents(False)
1002 self.Logo.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
1003- self.Logo.setObjectName("Logo")
1004+ self.Logo.setObjectName(u'Logo')
1005 AboutFormLayout.addWidget(self.Logo)
1006 self.AboutNotebook = QtGui.QTabWidget(AboutForm)
1007- self.AboutNotebook.setObjectName("AboutNotebook")
1008+ self.AboutNotebook.setObjectName(u'AboutNotebook')
1009 self.LicenseTab = QtGui.QWidget()
1010- self.LicenseTab.setObjectName("LicenseTab")
1011+ self.LicenseTab.setObjectName(u'LicenseTab')
1012 self.LicenseTabLayout = QtGui.QVBoxLayout(self.LicenseTab)
1013 self.LicenseTabLayout.setSpacing(8)
1014 self.LicenseTabLayout.setMargin(8)
1015- self.LicenseTabLayout.setObjectName("LicenseTabLayout")
1016+ self.LicenseTabLayout.setObjectName(u'LicenseTabLayout')
1017 self.CopyrightLabel = QtGui.QLabel(self.LicenseTab)
1018- self.CopyrightLabel.setObjectName("CopyrightLabel")
1019+ self.CopyrightLabel.setObjectName(u'CopyrightLabel')
1020 self.LicenseTabLayout.addWidget(self.CopyrightLabel)
1021 self.AboutAuthors = QtGui.QLabel(self.LicenseTab)
1022 self.AboutAuthors.setAlignment(QtCore.Qt.AlignJustify|QtCore.Qt.AlignVCenter)
1023 self.AboutAuthors.setWordWrap(True)
1024- self.AboutAuthors.setObjectName("AboutAuthors")
1025+ self.AboutAuthors.setObjectName(u'AboutAuthors')
1026 self.LicenseTabLayout.addWidget(self.AboutAuthors)
1027 self.License1Label = QtGui.QLabel(self.LicenseTab)
1028 self.License1Label.setAlignment(QtCore.Qt.AlignJustify|QtCore.Qt.AlignVCenter)
1029 self.License1Label.setWordWrap(True)
1030- self.License1Label.setObjectName("License1Label")
1031+ self.License1Label.setObjectName(u'License1Label')
1032 self.LicenseTabLayout.addWidget(self.License1Label)
1033 self.License2Label = QtGui.QLabel(self.LicenseTab)
1034 self.License2Label.setAlignment(QtCore.Qt.AlignJustify|QtCore.Qt.AlignVCenter)
1035 self.License2Label.setWordWrap(True)
1036- self.License2Label.setObjectName("License2Label")
1037+ self.License2Label.setObjectName(u'License2Label')
1038 self.LicenseTabLayout.addWidget(self.License2Label)
1039 self.License3Label = QtGui.QLabel(self.LicenseTab)
1040 self.License3Label.setAlignment(QtCore.Qt.AlignJustify|QtCore.Qt.AlignVCenter)
1041 self.License3Label.setWordWrap(True)
1042- self.License3Label.setObjectName("License3Label")
1043+ self.License3Label.setObjectName(u'License3Label')
1044 self.LicenseTabLayout.addWidget(self.License3Label)
1045- self.AboutNotebook.addTab(self.LicenseTab, "License")
1046+ self.AboutNotebook.addTab(self.LicenseTab, u'License')
1047 self.CreditsTab = QtGui.QWidget()
1048- self.CreditsTab.setObjectName("CreditsTab")
1049+ self.CreditsTab.setObjectName(u'CreditsTab')
1050 self.CreditsTabLayout = QtGui.QVBoxLayout(self.CreditsTab)
1051 self.CreditsTabLayout.setSpacing(0) #
1052 self.CreditsTabLayout.setMargin(8) #
1053- self.CreditsTabLayout.setObjectName("CreditsTabLayout")
1054+ self.CreditsTabLayout.setObjectName(u'CreditsTabLayout')
1055 self.CreditsTextEdit = QtGui.QTextEdit(self.CreditsTab)
1056 self.CreditsTextEdit.setReadOnly(True)
1057- self.CreditsTextEdit.setObjectName("CreditsTextEdit")
1058+ self.CreditsTextEdit.setObjectName(u'CreditsTextEdit')
1059 self.CreditsTabLayout.addWidget(self.CreditsTextEdit)
1060- self.AboutNotebook.addTab(self.CreditsTab, "Credits")
1061+ self.AboutNotebook.addTab(self.CreditsTab, u'Credits')
1062 AboutFormLayout.addWidget(self.AboutNotebook)
1063 self.ButtonWidget = QtGui.QWidget(AboutForm)
1064- self.ButtonWidget.setObjectName("ButtonWidget")
1065+ self.ButtonWidget.setObjectName(u'ButtonWidget')
1066 self.ButtonWidgetLayout = QtGui.QHBoxLayout(self.ButtonWidget)
1067 self.ButtonWidgetLayout.setSpacing(8)
1068 self.ButtonWidgetLayout.setMargin(0)
1069- self.ButtonWidgetLayout.setObjectName("ButtonWidgetLayout")
1070+ self.ButtonWidgetLayout.setObjectName(u'ButtonWidgetLayout')
1071 spacerItem = QtGui.QSpacerItem(275, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
1072 self.ButtonWidgetLayout.addItem(spacerItem)
1073 self.ContributeButton = QtGui.QPushButton(self.ButtonWidget)
1074- self.ContributeButton.setObjectName("ContributeButton")
1075+ self.ContributeButton.setObjectName(u'ContributeButton')
1076 self.ButtonWidgetLayout.addWidget(self.ContributeButton)
1077 self.CloseButton = QtGui.QPushButton(self.ButtonWidget)
1078- self.CloseButton.setObjectName("CloseButton")
1079+ self.CloseButton.setObjectName(u'CloseButton')
1080 self.ButtonWidgetLayout.addWidget(self.CloseButton)
1081 AboutFormLayout.addWidget(self.ButtonWidget)
1082 self.extContributeItem = QtGui.QAction(AboutForm)
1083- self.extContributeItem.setObjectName("extContributeItem")
1084+ self.extContributeItem.setObjectName(u'extContributeItem')
1085
1086 self.retranslateUi(AboutForm)
1087 self.AboutNotebook.setCurrentIndex(0)
1088- QtCore.QObject.connect(self.CloseButton, QtCore.SIGNAL("clicked()"), AboutForm.close)
1089+ QtCore.QObject.connect(self.CloseButton, QtCore.SIGNAL(u'clicked()'), AboutForm.close)
1090 QtCore.QMetaObject.connectSlotsByName(AboutForm)
1091
1092- QtCore.QObject.connect(self.ContributeButton, QtCore.SIGNAL("clicked()"), self.onContributeButtonClicked)
1093+ QtCore.QObject.connect(self.ContributeButton, QtCore.SIGNAL(u'clicked()'), self.onContributeButtonClicked)
1094
1095 def retranslateUi(self, AboutForm):
1096- AboutForm.setWindowTitle(translate("AboutDialog", "About openlp.org",))
1097- self.CopyrightLabel.setText(translate("AboutDialog", "Copyright © 2004-2009 openlp.org Foundation"))
1098- self.AboutAuthors.setText(translate("AboutDialog", "openlp.org is written and maintained by volunteers. If you would like to see more free Christian software being written, please consider contributing by using the button below."))
1099- self.License1Label.setText(translate("AboutDialog", "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version."))
1100- self.License2Label.setText(translate("AboutDialog", "You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA."))
1101- self.License3Label.setText(translate("AboutDialog", "This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details."))
1102- self.AboutNotebook.setTabText(self.AboutNotebook.indexOf(self.LicenseTab), QtGui.QApplication.translate("AboutDialog", "License", None, QtGui.QApplication.UnicodeUTF8))
1103- self.CreditsTextEdit.setPlainText(translate("AboutDialog", "Project Lead\n"
1104-" Raoul \"superfly\" Snyman\n"
1105-"\n"
1106-"Developers\n"
1107-" Tim \"TRB143\" Bentley\n"
1108-" Jonathan \"gushie\" Corwin\n"
1109-" Scott \"sguerrieri\" Guerrieri\n"
1110-" Raoul \"superfly\" Snyman\n"
1111-" Martin \"mijiti\" Thompson\n"
1112-" Carsten \"catini\" Tingaard"))
1113- self.AboutNotebook.setTabText(self.AboutNotebook.indexOf(self.CreditsTab), translate("AboutDialog", "Credits"))
1114- self.ContributeButton.setText(translate("AboutDialog", "Contribute"))
1115- self.CloseButton.setText(translate("AboutDialog", "Close"))
1116- self.extContributeItem.setText(translate("AboutDialog", "&Contribute"))
1117+ AboutForm.setWindowTitle(translate(u'AboutDialog', u'About openlp.org',))
1118+ self.CopyrightLabel.setText(translate(u'AboutDialog', u'Copyright © 2004-2009 openlp.org Foundation'))
1119+ self.AboutAuthors.setText(translate(u'AboutDialog', u'openlp.org is written and maintained by volunteers. If you would like to see more free Christian software being written, please consider contributing by using the button below.'))
1120+ self.License1Label.setText(translate(u'AboutDialog', u'This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.'))
1121+ self.License2Label.setText(translate(u'AboutDialog', u'You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.'))
1122+ self.License3Label.setText(translate(u'AboutDialog', u'This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.'))
1123+ self.AboutNotebook.setTabText(self.AboutNotebook.indexOf(self.LicenseTab), translate(u'AboutDialog', u'License'))
1124+ self.CreditsTextEdit.setPlainText(translate(u'AboutDialog',
1125+ u'Project Lead\n'
1126+ u' Raoul \"superfly\" Snyman\n'
1127+ u'\n'
1128+ u'Developers\n'
1129+ u' Tim \"TRB143\" Bentley\n'
1130+ u' Jonathan \"gushie\" Corwin\n'
1131+ u' Scott \"sguerrieri\" Guerrieri\n'
1132+ u' Raoul \"superfly\" Snyman\n'
1133+ u' Martin \"mijiti\" Thompson\n'
1134+ u' Carsten \"catini\" Tingaard'))
1135+ self.AboutNotebook.setTabText(self.AboutNotebook.indexOf(self.CreditsTab), translate(u'AboutDialog', u'Credits'))
1136+ self.ContributeButton.setText(translate(u'AboutDialog', u'Contribute'))
1137+ self.CloseButton.setText(translate(u'AboutDialog', u'Close'))
1138+ self.extContributeItem.setText(translate(u'AboutDialog', u'&Contribute'))
1139
1140 def onContributeButtonClicked(self):
1141- ''' This routine will open the default
1142- web-browser to the contribute page
1143- of openlp.org as did the original
1144- button on the About form
1145- '''
1146 import webbrowser
1147 url = "http://www.openlp.org/en/documentation/introduction/contributing.html"
1148 webbrowser.open_new(url)
1149
1150=== modified file 'openlp/core/ui/alertform.py'
1151--- openlp/core/ui/alertform.py 2009-05-01 22:26:43 +0000
1152+++ openlp/core/ui/alertform.py 2009-05-20 20:17:20 +0000
1153@@ -19,17 +19,14 @@
1154 """
1155 import logging
1156 from PyQt4 import QtCore, QtGui
1157-from PyQt4.QtGui import QDialog
1158-
1159-from openlp.core import translate
1160-from openlp.core.resources import *
1161-
1162-class AlertForm(QDialog):
1163+from openlp.core.lib import translate
1164+
1165+class AlertForm(QtGui.QDialog):
1166 global log
1167 log=logging.getLogger(u'AlertForm')
1168
1169 def __init__(self, parent=None):
1170- QDialog.__init__(self, parent)
1171+ QtGui.QDialog.__init__(self, parent)
1172 self.setupUi(self)
1173 log.info(u'Defined')
1174
1175
1176=== modified file 'openlp/core/ui/alertstab.py'
1177--- openlp/core/ui/alertstab.py 2009-03-05 20:31:17 +0000
1178+++ openlp/core/ui/alertstab.py 2009-05-20 20:17:20 +0000
1179@@ -19,11 +19,8 @@
1180 """
1181
1182 from PyQt4 import QtCore, QtGui
1183-from PyQt4.QtGui import QColor, QFont
1184
1185-from openlp.core import translate
1186-from openlp.core.lib import SettingsTab
1187-from openlp.core.resources import *
1188+from openlp.core.lib import SettingsTab, translate
1189
1190 class AlertsTab(SettingsTab):
1191 """
1192@@ -175,7 +172,7 @@
1193 self.timeout = int(self.config.get_config('timeout', 5))
1194 self.font_color = str(self.config.get_config('font color', u'#ffffff'))
1195 self.bg_color = str(self.config.get_config('background color', u'#660000'))
1196- self.font_face = str(self.config.get_config('font face', QFont().family()))
1197+ self.font_face = str(self.config.get_config('font face', QtGui.QFont().family()))
1198 self.TimeoutSpinBox.setValue(self.timeout)
1199 self.FontColorButton.setStyleSheet('background-color: %s' % self.font_color)
1200 self.BackgroundColorButton.setStyleSheet('background-color: %s' % self.bg_color)
1201@@ -192,7 +189,7 @@
1202 self.config.set_config('timeout', str(self.timeout))
1203
1204 def updateDisplay(self):
1205- font = QFont()
1206+ font = QtGui.QFont()
1207 font.setFamily(self.FontComboBox.currentFont().family())
1208 font.setBold(True)
1209 font.setPointSize(16)
1210
1211=== modified file 'openlp/core/ui/amendthemedialog.py'
1212--- openlp/core/ui/amendthemedialog.py 2009-05-01 22:26:43 +0000
1213+++ openlp/core/ui/amendthemedialog.py 2009-05-22 18:30:25 +0000
1214@@ -456,7 +456,7 @@
1215 self.ThemePreviewLayout.setSpacing(8)
1216 self.ThemePreviewLayout.setMargin(8)
1217 self.ThemePreviewLayout.setObjectName("ThemePreviewLayout")
1218- spacerItem7 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
1219+ spacerItem7 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
1220 self.ThemePreviewLayout.addItem(spacerItem7)
1221 self.ThemePreview = QtGui.QLabel(self.PreviewGroupBox)
1222 sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
1223@@ -464,14 +464,14 @@
1224 sizePolicy.setVerticalStretch(0)
1225 sizePolicy.setHeightForWidth(self.ThemePreview.sizePolicy().hasHeightForWidth())
1226 self.ThemePreview.setSizePolicy(sizePolicy)
1227- self.ThemePreview.setMinimumSize(QtCore.QSize(300, 225))
1228+ self.ThemePreview.setMaximumSize(QtCore.QSize(300, 225))
1229 self.ThemePreview.setFrameShape(QtGui.QFrame.WinPanel)
1230 self.ThemePreview.setFrameShadow(QtGui.QFrame.Sunken)
1231 self.ThemePreview.setLineWidth(1)
1232 self.ThemePreview.setScaledContents(True)
1233 self.ThemePreview.setObjectName("ThemePreview")
1234 self.ThemePreviewLayout.addWidget(self.ThemePreview)
1235- spacerItem8 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
1236+ spacerItem8 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
1237 self.ThemePreviewLayout.addItem(spacerItem8)
1238 self.AmendThemeLayout.addWidget(self.PreviewGroupBox)
1239 self.ThemeButtonBox = QtGui.QDialogButtonBox(AmendThemeDialog)
1240@@ -517,7 +517,7 @@
1241 AmendThemeDialog.setTabOrder(self.HorizontalComboBox, self.VerticalComboBox)
1242
1243 def retranslateUi(self, AmendThemeDialog):
1244- AmendThemeDialog.setWindowTitle(QtGui.QApplication.translate("AmendThemeDialog", "Theme Maintance", None, QtGui.QApplication.UnicodeUTF8))
1245+ AmendThemeDialog.setWindowTitle(QtGui.QApplication.translate("AmendThemeDialog", "Theme Maintenance", None, QtGui.QApplication.UnicodeUTF8))
1246 self.ThemeNameLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Theme Name:", None, QtGui.QApplication.UnicodeUTF8))
1247 self.BackgroundLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Background:", None, QtGui.QApplication.UnicodeUTF8))
1248 self.BackgroundComboBox.setItemText(0, QtGui.QApplication.translate("AmendThemeDialog", "Opaque", None, QtGui.QApplication.UnicodeUTF8))
1249
1250=== modified file 'openlp/core/ui/amendthemeform.py'
1251--- openlp/core/ui/amendthemeform.py 2009-05-16 19:47:30 +0000
1252+++ openlp/core/ui/amendthemeform.py 2009-05-22 05:14:55 +0000
1253@@ -21,9 +21,7 @@
1254 import os, os.path
1255
1256 from PyQt4 import QtCore, QtGui
1257-from PyQt4.QtGui import QColor, QFont
1258-from openlp.core.lib import ThemeXML, Renderer
1259-from openlp.core import fileToXML, translate
1260+from openlp.core.lib import ThemeXML, Renderer, file_to_xml, translate
1261
1262 from amendthemedialog import Ui_AmendThemeDialog
1263
1264@@ -34,7 +32,9 @@
1265 def __init__(self, thememanager, parent=None):
1266 QtGui.QDialog.__init__(self, parent)
1267 self.thememanager = thememanager
1268- self.theme = ThemeXML() # Needed here as UI setup generates Events
1269+ # Needed here as UI setup generates Events
1270+ self.path = None
1271+ self.theme = ThemeXML()
1272 self.setupUi(self)
1273
1274 #define signals
1275@@ -113,15 +113,15 @@
1276 else:
1277 (path, filename) =os.path.split(str(self.theme.background_filename))
1278 new_theme.add_background_image(filename)
1279- save_to= os.path.join(self.path, theme_name,filename )
1280+ save_to= os.path.join(self.path, theme_name, filename )
1281 save_from = self.theme.background_filename
1282
1283 new_theme.add_font(str(self.theme.font_main_name), str(self.theme.font_main_color),
1284- str(self.theme.font_main_proportion), str(self.theme.font_main_override),u'main',
1285+ str(self.theme.font_main_proportion), str(self.theme.font_main_override), u'main',
1286 str(self.theme.font_main_x), str(self.theme.font_main_y), str(self.theme.font_main_width),
1287 str(self.theme.font_main_height))
1288 new_theme.add_font(str(self.theme.font_footer_name), str(self.theme.font_footer_color),
1289- str(self.theme.font_footer_proportion), str(self.theme.font_footer_override),u'footer',
1290+ str(self.theme.font_footer_proportion), str(self.theme.font_footer_override), u'footer',
1291 str(self.theme.font_footer_x), str(self.theme.font_footer_y), str(self.theme.font_footer_width),
1292 str(self.theme.font_footer_height) )
1293 new_theme.add_display(str(self.theme.display_shadow), str(self.theme.display_shadow_color),
1294@@ -134,17 +134,15 @@
1295 self.thememanager.saveTheme(theme_name, theme, save_from, save_to)
1296 return QtGui.QDialog.accept(self)
1297
1298- def themePath(self, path):
1299- self.path = path
1300-
1301 def loadTheme(self, theme):
1302- log.debug(u'LoadTheme %s ', theme)
1303+ log.debug(u'LoadTheme %s', theme)
1304 if theme == None:
1305 self.theme.parse(self.baseTheme())
1306 else:
1307- xml_file = os.path.join(self.path, theme, theme+u'.xml')
1308- xml = fileToXML(xml_file)
1309+ xml_file = os.path.join(self.path, theme, theme + u'.xml')
1310+ xml = file_to_xml(xml_file)
1311 self.theme.parse(xml)
1312+ self.theme.extend_image_filename(self.path)
1313 self.allowPreview = False
1314 self.paintUi(self.theme)
1315 self.allowPreview = True
1316@@ -165,10 +163,10 @@
1317
1318 def onFontMainColorPushButtonClicked(self):
1319 self.theme.font_main_color = QtGui.QColorDialog.getColor(
1320- QColor(self.theme.font_main_color), self).name()
1321+ QtGui.QColor(self.theme.font_main_color), self).name()
1322
1323 self.FontMainColorPushButton.setStyleSheet(
1324- 'background-color: %s' % str(self.theme.font_main_color))
1325+ u'background-color: %s' % str(self.theme.font_main_color))
1326 self.previewTheme(self.theme)
1327
1328 def onFontMainSizeSpinBoxChanged(self, value):
1329@@ -218,7 +216,7 @@
1330
1331 def onFontFooterColorPushButtonClicked(self):
1332 self.theme.font_footer_color = QtGui.QColorDialog.getColor(
1333- QColor(self.theme.font_footer_color), self).name()
1334+ QtGui.QColor(self.theme.font_footer_color), self).name()
1335
1336 self.FontFooterColorPushButton.setStyleSheet(
1337 'background-color: %s' % str(self.theme.font_footer_color))
1338@@ -307,22 +305,22 @@
1339 def onColor1PushButtonClicked(self):
1340 if self.theme.background_type == u'solid':
1341 self.theme.background_color = QtGui.QColorDialog.getColor(
1342- QColor(self.theme.background_color), self).name()
1343+ QtGui.QColor(self.theme.background_color), self).name()
1344 self.Color1PushButton.setStyleSheet(
1345- 'background-color: %s' % str(self.theme.background_color))
1346+ u'background-color: %s' % str(self.theme.background_color))
1347 else:
1348 self.theme.background_startColor = QtGui.QColorDialog.getColor(
1349- QColor(self.theme.background_startColor), self).name()
1350+ QtGui.QColor(self.theme.background_startColor), self).name()
1351 self.Color1PushButton.setStyleSheet(
1352- 'background-color: %s' % str(self.theme.background_startColor))
1353+ u'background-color: %s' % str(self.theme.background_startColor))
1354
1355 self.previewTheme(self.theme)
1356
1357 def onColor2PushButtonClicked(self):
1358 self.theme.background_endColor = QtGui.QColorDialog.getColor(
1359- QColor(self.theme.background_endColor), self).name()
1360+ QtGui.QColor(self.theme.background_endColor), self).name()
1361 self.Color2PushButton.setStyleSheet(
1362- 'background-color: %s' % str(self.theme.background_endColor))
1363+ u'background-color: %s' % str(self.theme.background_endColor))
1364
1365 self.previewTheme(self.theme)
1366 #
1367@@ -338,9 +336,9 @@
1368
1369 def onOutlineColorPushButtonClicked(self):
1370 self.theme.display_outline_color = QtGui.QColorDialog.getColor(
1371- QColor(self.theme.display_outline_color), self).name()
1372+ QtGui.QColor(self.theme.display_outline_color), self).name()
1373 self.OutlineColorPushButton.setStyleSheet(
1374- 'background-color: %s' % str(self.theme.display_outline_color))
1375+ u'background-color: %s' % str(self.theme.display_outline_color))
1376 self.previewTheme(self.theme)
1377
1378 def onShadowCheckBoxChanged(self, value):
1379@@ -353,9 +351,9 @@
1380
1381 def onShadowColorPushButtonClicked(self):
1382 self.theme.display_shadow_color = QtGui.QColorDialog.getColor(
1383- QColor(self.theme.display_shadow_color), self).name()
1384+ QtGui.QColor(self.theme.display_shadow_color), self).name()
1385 self.ShadowColorPushButton.setStyleSheet(
1386- 'background-color: %s' % str(self.theme.display_shadow_color))
1387+ u'background-color: %s' % str(self.theme.display_shadow_color))
1388 self.previewTheme(self.theme)
1389
1390 def onHorizontalComboBoxSelected(self, currentIndex):
1391@@ -375,8 +373,8 @@
1392 newtheme = ThemeXML()
1393 newtheme.new_document(u'New Theme')
1394 newtheme.add_background_solid(str(u'#000000'))
1395- newtheme.add_font(str(QFont().family()), str(u'#FFFFFF'), str(30), u'False')
1396- newtheme.add_font(str(QFont().family()), str(u'#FFFFFF'), str(12), u'False', u'footer')
1397+ newtheme.add_font(str(QtGui.QFont().family()), str(u'#FFFFFF'), str(30), u'False')
1398+ newtheme.add_font(str(QtGui.QFont().family()), str(u'#FFFFFF'), str(12), u'False', u'footer')
1399 newtheme.add_display(u'False', str(u'#FFFFFF'), u'False', str(u'#FFFFFF'),
1400 str(0), str(0), str(0))
1401
1402@@ -415,9 +413,9 @@
1403 self.FontFooterWidthSpinBox.setValue(int(self.theme.font_footer_width))
1404 self.FontFooterHeightSpinBox.setValue(int(self.theme.font_footer_height))
1405 self.FontMainColorPushButton.setStyleSheet(
1406- 'background-color: %s' % str(theme.font_main_color))
1407+ u'background-color: %s' % str(theme.font_main_color))
1408 self.FontFooterColorPushButton.setStyleSheet(
1409- 'background-color: %s' % str(theme.font_footer_color))
1410+ u'background-color: %s' % str(theme.font_footer_color))
1411
1412 if self.theme.font_main_override == False:
1413 self.FontMainDefaultCheckBox.setChecked(True)
1414@@ -430,9 +428,9 @@
1415 self.FontFooterDefaultCheckBox.setChecked(False)
1416
1417 self.OutlineColorPushButton.setStyleSheet(
1418- 'background-color: %s' % str(theme.display_outline_color))
1419+ u'background-color: %s' % str(theme.display_outline_color))
1420 self.ShadowColorPushButton.setStyleSheet(
1421- 'background-color: %s' % str(theme.display_shadow_color))
1422+ u'background-color: %s' % str(theme.display_shadow_color))
1423
1424 if self.theme.display_outline:
1425 self.OutlineCheckBox.setChecked(True)
1426@@ -454,7 +452,7 @@
1427 def stateChanging(self, theme):
1428 if theme.background_type == u'solid':
1429 self.Color1PushButton.setStyleSheet(
1430- 'background-color: %s' % str(theme.background_color))
1431+ u'background-color: %s' % str(theme.background_color))
1432 self.Color1Label.setText(translate(u'ThemeManager', u'Background Color:'))
1433 self.Color1Label.setVisible(True)
1434 self.Color1PushButton.setVisible(True)
1435@@ -467,9 +465,9 @@
1436 self.GradientComboBox.setVisible(False)
1437 elif theme.background_type == u'gradient':
1438 self.Color1PushButton.setStyleSheet(
1439- 'background-color: %s' % str(theme.background_startColor))
1440+ u'background-color: %s' % str(theme.background_startColor))
1441 self.Color2PushButton.setStyleSheet(
1442- 'background-color: %s' % str(theme.background_endColor))
1443+ u'background-color: %s' % str(theme.background_endColor))
1444 self.Color1Label.setText(translate(u'ThemeManager', u'First Color:'))
1445 self.Color2Label.setText(translate(u'ThemeManager', u'Second Color:'))
1446 self.Color1Label.setVisible(True)
1447
1448=== modified file 'openlp/core/ui/generaltab.py'
1449--- openlp/core/ui/generaltab.py 2009-05-01 11:50:09 +0000
1450+++ openlp/core/ui/generaltab.py 2009-05-20 20:17:20 +0000
1451@@ -20,9 +20,7 @@
1452
1453 from PyQt4 import QtCore, QtGui
1454
1455-from openlp.core import translate
1456-from openlp.core.lib import SettingsTab
1457-from openlp.core.resources import *
1458+from openlp.core.lib import SettingsTab, translate
1459
1460 class GeneralTab(SettingsTab):
1461 """
1462
1463=== modified file 'openlp/core/ui/maindisplay.py'
1464--- openlp/core/ui/maindisplay.py 2009-05-18 19:04:25 +0000
1465+++ openlp/core/ui/maindisplay.py 2009-05-20 20:17:20 +0000
1466@@ -20,7 +20,7 @@
1467
1468 from PyQt4 import QtCore, QtGui
1469
1470-from openlp.core import translate
1471+from openlp.core.lib import translate
1472
1473 class MainDisplay(QtGui.QWidget):
1474
1475
1476=== modified file 'openlp/core/ui/mainwindow.py'
1477--- openlp/core/ui/mainwindow.py 2009-05-18 19:04:25 +0000
1478+++ openlp/core/ui/mainwindow.py 2009-05-20 20:17:20 +0000
1479@@ -21,29 +21,28 @@
1480 import logging
1481 from time import sleep
1482
1483-from PyQt4 import *
1484 from PyQt4 import QtCore, QtGui
1485
1486 from openlp.core.ui import AboutForm, SettingsForm, AlertForm, \
1487 SlideController, ServiceManager, ThemeManager, MainDisplay
1488-from openlp.core.lib import Plugin, MediaManagerItem, SettingsTab, EventManager, RenderManager
1489+from openlp.core.lib import Plugin, MediaManagerItem, SettingsTab, EventManager, RenderManager, translate
1490
1491-from openlp.core import PluginManager, translate
1492+from openlp.core import PluginManager
1493
1494 class MainWindow(object):
1495 global log
1496- log=logging.getLogger(u'MainWindow')
1497+ log = logging.getLogger(u'MainWindow')
1498 log.info(u'MainWindow loaded')
1499
1500 def __init__(self, screens):
1501- self.main_window = QtGui.QMainWindow()
1502- self.main_window.__class__.closeEvent = self.onCloseEvent
1503- self.main_display = MainDisplay(None, screens)
1504- self.screen_list = screens
1505+ self.mainWindow = QtGui.QMainWindow()
1506+ self.mainWindow.__class__.closeEvent = self.onCloseEvent
1507+ self.mainDisplay = MainDisplay(None, screens)
1508+ self.screenList = screens
1509 self.EventManager = EventManager()
1510- self.alert_form = AlertForm()
1511- self.about_form = AboutForm()
1512- self.settings_form = SettingsForm(self.screen_list, self)
1513+ self.alertForm = AlertForm()
1514+ self.aboutForm = AboutForm()
1515+ self.settingsForm = SettingsForm(self.screenList, self)
1516
1517 pluginpath = os.path.split(os.path.abspath(__file__))[0]
1518 pluginpath = os.path.abspath(os.path.join(pluginpath, u'..', u'..', u'plugins'))
1519@@ -55,7 +54,7 @@
1520 #warning cyclic dependency
1521 #RenderManager needs to call ThemeManager and
1522 #ThemeManager needs to call RenderManager
1523- self.RenderManager = RenderManager(self.ThemeManagerContents, self.screen_list)
1524+ self.RenderManager = RenderManager(self.ThemeManagerContents, self.screenList)
1525
1526 log.info(u'Load Plugins')
1527 self.plugin_helpers[u'preview'] = self.PreviewController
1528@@ -75,7 +74,7 @@
1529
1530 # Find and insert settings tabs
1531 log.info(u'hook settings')
1532- self.plugin_manager.hook_settings_tabs(self.settings_form)
1533+ self.plugin_manager.hook_settings_tabs(self.settingsForm)
1534
1535 # Call the hook method to pull in import menus.
1536 log.info(u'hook menus')
1537@@ -107,29 +106,29 @@
1538
1539 # Initialise SlideControllers
1540 log.info(u'Set Up SlideControllers')
1541- self.LiveController.mainDisplay = self.main_display
1542+ self.LiveController.mainDisplay = self.mainDisplay
1543
1544 def onCloseEvent(self, event):
1545 """
1546 Hook to close the main window and display windows on exit
1547 """
1548- self.main_display.close()
1549+ self.mainDisplay.close()
1550 event.accept()
1551
1552 def setupUi(self):
1553- self.main_window.setObjectName(u'main_window')
1554- self.main_window.resize(1087, 847)
1555+ self.mainWindow.setObjectName(u'mainWindow')
1556+ self.mainWindow.resize(1087, 847)
1557 sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
1558 QtGui.QSizePolicy.Expanding)
1559 sizePolicy.setHorizontalStretch(0)
1560 sizePolicy.setVerticalStretch(0)
1561- sizePolicy.setHeightForWidth(self.main_window.sizePolicy().hasHeightForWidth())
1562- self.main_window.setSizePolicy(sizePolicy)
1563+ sizePolicy.setHeightForWidth(self.mainWindow.sizePolicy().hasHeightForWidth())
1564+ self.mainWindow.setSizePolicy(sizePolicy)
1565 main_icon = QtGui.QIcon()
1566 main_icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'),
1567 QtGui.QIcon.Normal, QtGui.QIcon.Off)
1568- self.main_window.setWindowIcon(main_icon)
1569- self.MainContent = QtGui.QWidget(self.main_window)
1570+ self.mainWindow.setWindowIcon(main_icon)
1571+ self.MainContent = QtGui.QWidget(self.mainWindow)
1572 sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
1573 sizePolicy.setHorizontalStretch(0)
1574 sizePolicy.setVerticalStretch(0)
1575@@ -140,14 +139,14 @@
1576 self.MainContentLayout.setSpacing(0)
1577 self.MainContentLayout.setMargin(0)
1578 self.MainContentLayout.setObjectName(u'MainContentLayout')
1579- self.main_window.setCentralWidget(self.MainContent)
1580+ self.mainWindow.setCentralWidget(self.MainContent)
1581 self.ControlSplitter = QtGui.QSplitter(self.MainContent)
1582 self.ControlSplitter.setOrientation(QtCore.Qt.Horizontal)
1583 self.ControlSplitter.setObjectName(u'ControlSplitter')
1584 self.MainContentLayout.addWidget(self.ControlSplitter)
1585 self.PreviewController = SlideController(self.ControlSplitter, False)
1586 self.LiveController = SlideController(self.ControlSplitter, True)
1587- self.MenuBar = QtGui.QMenuBar(self.main_window)
1588+ self.MenuBar = QtGui.QMenuBar(self.mainWindow)
1589 self.MenuBar.setGeometry(QtCore.QRect(0, 0, 1087, 27))
1590 self.MenuBar.setObjectName(u'MenuBar')
1591 self.FileMenu = QtGui.QMenu(self.MenuBar)
1592@@ -169,11 +168,11 @@
1593 self.ToolsMenu.setObjectName(u'ToolsMenu')
1594 self.HelpMenu = QtGui.QMenu(self.MenuBar)
1595 self.HelpMenu.setObjectName(u'HelpMenu')
1596- self.main_window.setMenuBar(self.MenuBar)
1597- self.StatusBar = QtGui.QStatusBar(self.main_window)
1598+ self.mainWindow.setMenuBar(self.MenuBar)
1599+ self.StatusBar = QtGui.QStatusBar(self.mainWindow)
1600 self.StatusBar.setObjectName(u'StatusBar')
1601- self.main_window.setStatusBar(self.StatusBar)
1602- self.MediaManagerDock = QtGui.QDockWidget(self.main_window)
1603+ self.mainWindow.setStatusBar(self.StatusBar)
1604+ self.MediaManagerDock = QtGui.QDockWidget(self.mainWindow)
1605 sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
1606 sizePolicy.setHorizontalStretch(0)
1607 sizePolicy.setVerticalStretch(0)
1608@@ -202,9 +201,9 @@
1609
1610 self.MediaManagerLayout.addWidget(self.MediaToolBox)
1611 self.MediaManagerDock.setWidget(self.MediaManagerContents)
1612- self.main_window.addDockWidget(QtCore.Qt.DockWidgetArea(1), self.MediaManagerDock)
1613+ self.mainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(1), self.MediaManagerDock)
1614 #Sevice Manager Defined
1615- self.ServiceManagerDock = QtGui.QDockWidget(self.main_window)
1616+ self.ServiceManagerDock = QtGui.QDockWidget(self.mainWindow)
1617 ServiceManagerIcon = QtGui.QIcon()
1618 ServiceManagerIcon.addPixmap(QtGui.QPixmap(u':/system/system_servicemanager.png'),
1619 QtGui.QIcon.Normal, QtGui.QIcon.Off)
1620@@ -213,9 +212,9 @@
1621 self.ServiceManagerDock.setObjectName(u'ServiceManagerDock')
1622 self.ServiceManagerContents = ServiceManager(self)
1623 self.ServiceManagerDock.setWidget(self.ServiceManagerContents)
1624- self.main_window.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.ServiceManagerDock)
1625+ self.mainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.ServiceManagerDock)
1626 #Theme Manager Defined
1627- self.ThemeManagerDock = QtGui.QDockWidget(self.main_window)
1628+ self.ThemeManagerDock = QtGui.QDockWidget(self.mainWindow)
1629 ThemeManagerIcon = QtGui.QIcon()
1630 ThemeManagerIcon.addPixmap(QtGui.QPixmap(u':/system/system_thememanager.png'),
1631 QtGui.QIcon.Normal, QtGui.QIcon.Off)
1632@@ -226,96 +225,96 @@
1633 self.ThemeManagerContents = ThemeManager(self)
1634
1635 self.ThemeManagerDock.setWidget(self.ThemeManagerContents)
1636- self.main_window.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.ThemeManagerDock)
1637+ self.mainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.ThemeManagerDock)
1638
1639- self.FileNewItem = QtGui.QAction(self.main_window)
1640+ self.FileNewItem = QtGui.QAction(self.mainWindow)
1641 self.FileNewItem.setIcon(
1642 self.ServiceManagerContents.Toolbar.getIconFromTitle(u'New Service'))
1643 self.FileNewItem.setObjectName(u'FileNewItem')
1644- self.FileOpenItem = QtGui.QAction(self.main_window)
1645+ self.FileOpenItem = QtGui.QAction(self.mainWindow)
1646 self.FileOpenItem.setIcon(
1647 self.ServiceManagerContents.Toolbar.getIconFromTitle(u'Open Service'))
1648 self.FileOpenItem.setObjectName(u'FileOpenItem')
1649- self.FileSaveItem = QtGui.QAction(self.main_window)
1650+ self.FileSaveItem = QtGui.QAction(self.mainWindow)
1651 self.FileSaveItem.setIcon(
1652 self.ServiceManagerContents.Toolbar.getIconFromTitle(u'Save Service'))
1653 self.FileSaveItem.setObjectName(u'FileSaveItem')
1654- self.FileSaveAsItem = QtGui.QAction(self.main_window)
1655+ self.FileSaveAsItem = QtGui.QAction(self.mainWindow)
1656 self.FileSaveAsItem.setObjectName(u'FileSaveAsItem')
1657- self.FileExitItem = QtGui.QAction(self.main_window)
1658+ self.FileExitItem = QtGui.QAction(self.mainWindow)
1659 ExitIcon = QtGui.QIcon()
1660 ExitIcon.addPixmap(QtGui.QPixmap(u':/system/system_exit.png'),
1661 QtGui.QIcon.Normal, QtGui.QIcon.Off)
1662 self.FileExitItem.setIcon(ExitIcon)
1663 self.FileExitItem.setObjectName(u'FileExitItem')
1664- self.ImportThemeItem = QtGui.QAction(self.main_window)
1665+ self.ImportThemeItem = QtGui.QAction(self.mainWindow)
1666 self.ImportThemeItem.setObjectName(u'ImportThemeItem')
1667- self.ImportLanguageItem = QtGui.QAction(self.main_window)
1668+ self.ImportLanguageItem = QtGui.QAction(self.mainWindow)
1669 self.ImportLanguageItem.setObjectName(u'ImportLanguageItem')
1670- self.ExportThemeItem = QtGui.QAction(self.main_window)
1671+ self.ExportThemeItem = QtGui.QAction(self.mainWindow)
1672 self.ExportThemeItem.setObjectName(u'ExportThemeItem')
1673- self.ExportLanguageItem = QtGui.QAction(self.main_window)
1674+ self.ExportLanguageItem = QtGui.QAction(self.mainWindow)
1675 self.ExportLanguageItem.setObjectName(u'ExportLanguageItem')
1676- self.actionLook_Feel = QtGui.QAction(self.main_window)
1677+ self.actionLook_Feel = QtGui.QAction(self.mainWindow)
1678 self.actionLook_Feel.setObjectName(u'actionLook_Feel')
1679- self.OptionsSettingsItem = QtGui.QAction(self.main_window)
1680+ self.OptionsSettingsItem = QtGui.QAction(self.mainWindow)
1681 SettingsIcon = QtGui.QIcon()
1682 SettingsIcon.addPixmap(QtGui.QPixmap(u':/system/system_settings.png'),
1683 QtGui.QIcon.Normal, QtGui.QIcon.Off)
1684 self.OptionsSettingsItem.setIcon(SettingsIcon)
1685 self.OptionsSettingsItem.setObjectName(u'OptionsSettingsItem')
1686- self.ViewMediaManagerItem = QtGui.QAction(self.main_window)
1687+ self.ViewMediaManagerItem = QtGui.QAction(self.mainWindow)
1688 self.ViewMediaManagerItem.setCheckable(True)
1689 self.ViewMediaManagerItem.setChecked(True)
1690 self.ViewMediaManagerItem.setIcon(icon)
1691 self.ViewMediaManagerItem.setObjectName(u'ViewMediaManagerItem')
1692- self.ViewThemeManagerItem = QtGui.QAction(self.main_window)
1693+ self.ViewThemeManagerItem = QtGui.QAction(self.mainWindow)
1694 self.ViewThemeManagerItem.setCheckable(True)
1695 self.ViewThemeManagerItem.setChecked(True)
1696 self.ViewThemeManagerItem.setIcon(ThemeManagerIcon)
1697 self.ViewThemeManagerItem.setObjectName(u'ViewThemeManagerItem')
1698- self.ViewServiceManagerItem = QtGui.QAction(self.main_window)
1699+ self.ViewServiceManagerItem = QtGui.QAction(self.mainWindow)
1700 self.ViewServiceManagerItem.setCheckable(True)
1701 self.ViewServiceManagerItem.setChecked(True)
1702 self.ViewServiceManagerItem.setIcon(ServiceManagerIcon)
1703 self.ViewServiceManagerItem.setObjectName(u'ViewServiceManagerItem')
1704- self.ToolsAlertItem = QtGui.QAction(self.main_window)
1705+ self.ToolsAlertItem = QtGui.QAction(self.mainWindow)
1706 AlertIcon = QtGui.QIcon()
1707 AlertIcon.addPixmap(QtGui.QPixmap(u':/tools/tools_alert.png'),
1708 QtGui.QIcon.Normal, QtGui.QIcon.Off)
1709 self.ToolsAlertItem.setIcon(AlertIcon)
1710 self.ToolsAlertItem.setObjectName(u'ToolsAlertItem')
1711- self.HelpDocumentationItem = QtGui.QAction(self.main_window)
1712+ self.HelpDocumentationItem = QtGui.QAction(self.mainWindow)
1713 ContentsIcon = QtGui.QIcon()
1714 ContentsIcon.addPixmap(QtGui.QPixmap(u':/system/system_help_contents.png'),
1715 QtGui.QIcon.Normal, QtGui.QIcon.Off)
1716 self.HelpDocumentationItem.setIcon(ContentsIcon)
1717 self.HelpDocumentationItem.setObjectName(u'HelpDocumentationItem')
1718- self.HelpAboutItem = QtGui.QAction(self.main_window)
1719+ self.HelpAboutItem = QtGui.QAction(self.mainWindow)
1720 AboutIcon = QtGui.QIcon()
1721 AboutIcon.addPixmap(QtGui.QPixmap(u':/system/system_about.png'),
1722 QtGui.QIcon.Normal, QtGui.QIcon.Off)
1723 self.HelpAboutItem.setIcon(AboutIcon)
1724 self.HelpAboutItem.setObjectName(u'HelpAboutItem')
1725- self.HelpOnlineHelpItem = QtGui.QAction(self.main_window)
1726+ self.HelpOnlineHelpItem = QtGui.QAction(self.mainWindow)
1727 self.HelpOnlineHelpItem.setObjectName(u'HelpOnlineHelpItem')
1728- self.HelpWebSiteItem = QtGui.QAction(self.main_window)
1729+ self.HelpWebSiteItem = QtGui.QAction(self.mainWindow)
1730 self.HelpWebSiteItem.setObjectName(u'HelpWebSiteItem')
1731- self.LanguageTranslateItem = QtGui.QAction(self.main_window)
1732+ self.LanguageTranslateItem = QtGui.QAction(self.mainWindow)
1733 self.LanguageTranslateItem.setObjectName(u'LanguageTranslateItem')
1734- self.LanguageEnglishItem = QtGui.QAction(self.main_window)
1735+ self.LanguageEnglishItem = QtGui.QAction(self.mainWindow)
1736 self.LanguageEnglishItem.setObjectName(u'LanguageEnglishItem')
1737- self.ToolsAddToolItem = QtGui.QAction(self.main_window)
1738+ self.ToolsAddToolItem = QtGui.QAction(self.mainWindow)
1739 AddToolIcon = QtGui.QIcon()
1740 AddToolIcon.addPixmap(QtGui.QPixmap(u':/tools/tools_add.png'),
1741 QtGui.QIcon.Normal, QtGui.QIcon.Off)
1742 self.ToolsAddToolItem.setIcon(AddToolIcon)
1743 self.ToolsAddToolItem.setObjectName(u'ToolsAddToolItem')
1744- self.action_Preview_Panel = QtGui.QAction(self.main_window)
1745+ self.action_Preview_Panel = QtGui.QAction(self.mainWindow)
1746 self.action_Preview_Panel.setCheckable(True)
1747 self.action_Preview_Panel.setChecked(True)
1748 self.action_Preview_Panel.setObjectName(u'action_Preview_Panel')
1749- self.ModeLiveItem = QtGui.QAction(self.main_window)
1750+ self.ModeLiveItem = QtGui.QAction(self.mainWindow)
1751 self.ModeLiveItem.setObjectName(u'ModeLiveItem')
1752 self.FileImportMenu.addAction(self.ImportThemeItem)
1753 self.FileImportMenu.addAction(self.ImportLanguageItem)
1754@@ -361,7 +360,7 @@
1755 self.retranslateUi()
1756 self.MediaToolBox.setCurrentIndex(0)
1757 QtCore.QObject.connect(self.FileExitItem,
1758- QtCore.SIGNAL(u'triggered()'), self.main_window.close)
1759+ QtCore.SIGNAL(u'triggered()'), self.mainWindow.close)
1760 QtCore.QObject.connect(self.ViewMediaManagerItem,
1761 QtCore.SIGNAL(u'triggered(bool)'), self.MediaManagerDock.setVisible)
1762 QtCore.QObject.connect(self.ViewServiceManagerItem,
1763@@ -382,103 +381,103 @@
1764 QtCore.SIGNAL(u'triggered()'), self.onToolsAlertItemClicked)
1765 QtCore.QObject.connect(self.OptionsSettingsItem,
1766 QtCore.SIGNAL(u'triggered()'), self.onOptionsSettingsItemClicked)
1767- QtCore.QMetaObject.connectSlotsByName(self.main_window)
1768+ QtCore.QMetaObject.connectSlotsByName(self.mainWindow)
1769
1770
1771 def retranslateUi(self):
1772- self.main_window.setWindowTitle(translate(u'main_window', u'openlp.org 2.0'))
1773- self.FileMenu.setTitle(translate(u'main_window', u'&File'))
1774- self.FileImportMenu.setTitle(translate(u'main_window', u'&Import'))
1775- self.FileExportMenu.setTitle(translate(u'main_window', u'&Export'))
1776- self.OptionsMenu.setTitle(translate(u'main_window', u'&Options'))
1777- self.OptionsViewMenu.setTitle(translate(u'main_window', u'&View'))
1778- self.ViewModeMenu.setTitle(translate(u'main_window', u'M&ode'))
1779- self.OptionsLanguageMenu.setTitle(translate(u'main_window', u'&Language'))
1780- self.ToolsMenu.setTitle(translate(u'main_window', u'&Tools'))
1781- self.HelpMenu.setTitle(translate(u'main_window', u'&Help'))
1782- self.MediaManagerDock.setWindowTitle(translate(u'main_window', u'Media Manager'))
1783- self.ServiceManagerDock.setWindowTitle(translate(u'main_window', u'Service Manager'))
1784-# self.ServiceManagerContents.MoveTopButton.setText(translate(u'main_window', u'Move To Top'))
1785-# self.ServiceManagerContents.MoveUpButton.setText(translate(u'main_window', u'Move Up'))
1786-# self.ServiceManagerContents.MoveDownButton.setText(translate(u'main_window', u'Move Down'))
1787-# self.ServiceManagerContents.MoveBottomButton.setText(translate(u'main_window', u'Move To Bottom'))
1788-# self.ServiceManagerContents.NewItem.setText(translate(u'main_window', u'New Service'))
1789-# self.ServiceManagerContents.OpenItem.setText(translate(u'main_window', u'Open Service'))
1790-# self.ServiceManagerContents.SaveItem.setText(translate(u'main_window', u'Save Service'))
1791-# self.ServiceManagerContents.ThemeComboBox.setItemText(0, translate(u'main_window', u'African Sunset'))
1792-# self.ServiceManagerContents.ThemeComboBox.setItemText(1, translate(u'main_window', u'Snowy Mountains'))
1793-# self.ServiceManagerContents.ThemeComboBox.setItemText(2, translate(u'main_window', u'Wilderness'))
1794- self.ThemeManagerDock.setWindowTitle(translate(u'main_window', u'Theme Manager'))
1795-# self.ThemeNewItem.setText(translate(u'main_window', u'New Theme'))
1796-# self.ThemeEditItem.setText(translate(u'main_window', u'Edit Theme'))
1797-# self.ThemeDeleteButton.setText(translate(u'main_window', u'Delete Theme'))
1798-# self.ThemeImportButton.setText(translate(u'main_window', u'Import Theme'))
1799-# self.ThemeExportButton.setText(translate(u'main_window', u'Export Theme'))
1800- self.FileNewItem.setText(translate(u'main_window', u'&New'))
1801- self.FileNewItem.setToolTip(translate(u'main_window', u'New Service'))
1802- self.FileNewItem.setStatusTip(translate(u'main_window', u'Create a new Service'))
1803- self.FileNewItem.setShortcut(translate(u'main_window', u'Ctrl+N'))
1804- self.FileOpenItem.setText(translate(u'main_window', u'&Open'))
1805- self.FileOpenItem.setToolTip(translate(u'main_window', u'Open Service'))
1806- self.FileOpenItem.setStatusTip(translate(u'main_window', u'Open an existing service'))
1807- self.FileOpenItem.setShortcut(translate(u'main_window', u'Ctrl+O'))
1808- self.FileSaveItem.setText(translate(u'main_window', u'&Save'))
1809- self.FileSaveItem.setToolTip(translate(u'main_window', u'Save Service'))
1810- self.FileSaveItem.setStatusTip(translate(u'main_window', u'Save the current service to disk'))
1811- self.FileSaveItem.setShortcut(translate(u'main_window', u'Ctrl+S'))
1812- self.FileSaveAsItem.setText(translate(u'main_window', u'Save &As...'))
1813- self.FileSaveAsItem.setToolTip(translate(u'main_window', u'Save Service As'))
1814- self.FileSaveAsItem.setStatusTip(translate(u'main_window', u'Save the current service under a new name'))
1815- self.FileSaveAsItem.setShortcut(translate(u'main_window', u'F12'))
1816- self.FileExitItem.setText(translate(u'main_window', u'E&xit'))
1817- self.FileExitItem.setStatusTip(translate(u'main_window', u'Quit OpenLP 2.0'))
1818- self.FileExitItem.setShortcut(translate(u'main_window', u'Alt+F4'))
1819- self.ImportThemeItem.setText(translate(u'main_window', u'&Theme'))
1820- self.ImportLanguageItem.setText(translate(u'main_window', u'&Language'))
1821- self.ExportThemeItem.setText(translate(u'main_window', u'&Theme'))
1822- self.ExportLanguageItem.setText(translate(u'main_window', u'&Language'))
1823- self.actionLook_Feel.setText(translate(u'main_window', u'Look && &Feel'))
1824- self.OptionsSettingsItem.setText(translate(u'main_window', u'&Settings'))
1825- self.ViewMediaManagerItem.setText(translate(u'main_window', u'&Media Manager'))
1826- self.ViewMediaManagerItem.setToolTip(translate(u'main_window', u'Toggle Media Manager'))
1827- self.ViewMediaManagerItem.setStatusTip(translate(u'main_window', u'Toggle the visibility of the Media Manager'))
1828- self.ViewMediaManagerItem.setShortcut(translate(u'main_window', u'F8'))
1829- self.ViewThemeManagerItem.setText(translate(u'main_window', u'&Theme Manager'))
1830- self.ViewThemeManagerItem.setToolTip(translate(u'main_window', u'Toggle Theme Manager'))
1831- self.ViewThemeManagerItem.setStatusTip(translate(u'main_window', u'Toggle the visibility of the Theme Manager'))
1832- self.ViewThemeManagerItem.setShortcut(translate(u'main_window', u'F10'))
1833- self.ViewServiceManagerItem.setText(translate(u'main_window', u'&Service Manager'))
1834- self.ViewServiceManagerItem.setToolTip(translate(u'main_window', u'Toggle Service Manager'))
1835- self.ViewServiceManagerItem.setStatusTip(translate(u'main_window', u'Toggle the visibility of the Service Manager'))
1836- self.ViewServiceManagerItem.setShortcut(translate(u'main_window', u'F9'))
1837- self.ToolsAlertItem.setText(translate(u'main_window', u'&Alert'))
1838- self.ToolsAlertItem.setStatusTip(translate(u'main_window', u'Show an alert message'))
1839- self.ToolsAlertItem.setShortcut(translate(u'main_window', u'F7'))
1840- self.HelpDocumentationItem.setText(translate(u'main_window', u'&User Guide'))
1841- self.HelpAboutItem.setText(translate(u'main_window', u'&About'))
1842- self.HelpAboutItem.setStatusTip(translate(u'main_window', u'More information about OpenLP'))
1843- self.HelpAboutItem.setShortcut(translate(u'main_window', u'Ctrl+F1'))
1844- self.HelpOnlineHelpItem.setText(translate(u'main_window', u'&Online Help'))
1845- self.HelpWebSiteItem.setText(translate(u'main_window', u'&Web Site'))
1846- self.LanguageTranslateItem.setText(translate(u'main_window', u'&Translate'))
1847- self.LanguageTranslateItem.setStatusTip(translate(u'main_window', u'Translate the interface to your language'))
1848- self.LanguageEnglishItem.setText(translate(u'main_window', u'English'))
1849- self.LanguageEnglishItem.setStatusTip(translate(u'main_window', u'Set the interface language to English'))
1850- self.ToolsAddToolItem.setText(translate(u'main_window', u'&Add Tool...'))
1851- self.ToolsAddToolItem.setStatusTip(translate(u'main_window', u'Add an application to the list of tools'))
1852- self.action_Preview_Panel.setText(translate(u'main_window', u'&Preview Pane'))
1853- self.ModeLiveItem.setText(translate(u'main_window', u'&Live'))
1854+ self.mainWindow.setWindowTitle(translate(u'mainWindow', u'openlp.org 2.0'))
1855+ self.FileMenu.setTitle(translate(u'mainWindow', u'&File'))
1856+ self.FileImportMenu.setTitle(translate(u'mainWindow', u'&Import'))
1857+ self.FileExportMenu.setTitle(translate(u'mainWindow', u'&Export'))
1858+ self.OptionsMenu.setTitle(translate(u'mainWindow', u'&Options'))
1859+ self.OptionsViewMenu.setTitle(translate(u'mainWindow', u'&View'))
1860+ self.ViewModeMenu.setTitle(translate(u'mainWindow', u'M&ode'))
1861+ self.OptionsLanguageMenu.setTitle(translate(u'mainWindow', u'&Language'))
1862+ self.ToolsMenu.setTitle(translate(u'mainWindow', u'&Tools'))
1863+ self.HelpMenu.setTitle(translate(u'mainWindow', u'&Help'))
1864+ self.MediaManagerDock.setWindowTitle(translate(u'mainWindow', u'Media Manager'))
1865+ self.ServiceManagerDock.setWindowTitle(translate(u'mainWindow', u'Service Manager'))
1866+# self.ServiceManagerContents.MoveTopButton.setText(translate(u'mainWindow', u'Move To Top'))
1867+# self.ServiceManagerContents.MoveUpButton.setText(translate(u'mainWindow', u'Move Up'))
1868+# self.ServiceManagerContents.MoveDownButton.setText(translate(u'mainWindow', u'Move Down'))
1869+# self.ServiceManagerContents.MoveBottomButton.setText(translate(u'mainWindow', u'Move To Bottom'))
1870+# self.ServiceManagerContents.NewItem.setText(translate(u'mainWindow', u'New Service'))
1871+# self.ServiceManagerContents.OpenItem.setText(translate(u'mainWindow', u'Open Service'))
1872+# self.ServiceManagerContents.SaveItem.setText(translate(u'mainWindow', u'Save Service'))
1873+# self.ServiceManagerContents.ThemeComboBox.setItemText(0, translate(u'mainWindow', u'African Sunset'))
1874+# self.ServiceManagerContents.ThemeComboBox.setItemText(1, translate(u'mainWindow', u'Snowy Mountains'))
1875+# self.ServiceManagerContents.ThemeComboBox.setItemText(2, translate(u'mainWindow', u'Wilderness'))
1876+ self.ThemeManagerDock.setWindowTitle(translate(u'mainWindow', u'Theme Manager'))
1877+# self.ThemeNewItem.setText(translate(u'mainWindow', u'New Theme'))
1878+# self.ThemeEditItem.setText(translate(u'mainWindow', u'Edit Theme'))
1879+# self.ThemeDeleteButton.setText(translate(u'mainWindow', u'Delete Theme'))
1880+# self.ThemeImportButton.setText(translate(u'mainWindow', u'Import Theme'))
1881+# self.ThemeExportButton.setText(translate(u'mainWindow', u'Export Theme'))
1882+ self.FileNewItem.setText(translate(u'mainWindow', u'&New'))
1883+ self.FileNewItem.setToolTip(translate(u'mainWindow', u'New Service'))
1884+ self.FileNewItem.setStatusTip(translate(u'mainWindow', u'Create a new Service'))
1885+ self.FileNewItem.setShortcut(translate(u'mainWindow', u'Ctrl+N'))
1886+ self.FileOpenItem.setText(translate(u'mainWindow', u'&Open'))
1887+ self.FileOpenItem.setToolTip(translate(u'mainWindow', u'Open Service'))
1888+ self.FileOpenItem.setStatusTip(translate(u'mainWindow', u'Open an existing service'))
1889+ self.FileOpenItem.setShortcut(translate(u'mainWindow', u'Ctrl+O'))
1890+ self.FileSaveItem.setText(translate(u'mainWindow', u'&Save'))
1891+ self.FileSaveItem.setToolTip(translate(u'mainWindow', u'Save Service'))
1892+ self.FileSaveItem.setStatusTip(translate(u'mainWindow', u'Save the current service to disk'))
1893+ self.FileSaveItem.setShortcut(translate(u'mainWindow', u'Ctrl+S'))
1894+ self.FileSaveAsItem.setText(translate(u'mainWindow', u'Save &As...'))
1895+ self.FileSaveAsItem.setToolTip(translate(u'mainWindow', u'Save Service As'))
1896+ self.FileSaveAsItem.setStatusTip(translate(u'mainWindow', u'Save the current service under a new name'))
1897+ self.FileSaveAsItem.setShortcut(translate(u'mainWindow', u'F12'))
1898+ self.FileExitItem.setText(translate(u'mainWindow', u'E&xit'))
1899+ self.FileExitItem.setStatusTip(translate(u'mainWindow', u'Quit OpenLP 2.0'))
1900+ self.FileExitItem.setShortcut(translate(u'mainWindow', u'Alt+F4'))
1901+ self.ImportThemeItem.setText(translate(u'mainWindow', u'&Theme'))
1902+ self.ImportLanguageItem.setText(translate(u'mainWindow', u'&Language'))
1903+ self.ExportThemeItem.setText(translate(u'mainWindow', u'&Theme'))
1904+ self.ExportLanguageItem.setText(translate(u'mainWindow', u'&Language'))
1905+ self.actionLook_Feel.setText(translate(u'mainWindow', u'Look && &Feel'))
1906+ self.OptionsSettingsItem.setText(translate(u'mainWindow', u'&Settings'))
1907+ self.ViewMediaManagerItem.setText(translate(u'mainWindow', u'&Media Manager'))
1908+ self.ViewMediaManagerItem.setToolTip(translate(u'mainWindow', u'Toggle Media Manager'))
1909+ self.ViewMediaManagerItem.setStatusTip(translate(u'mainWindow', u'Toggle the visibility of the Media Manager'))
1910+ self.ViewMediaManagerItem.setShortcut(translate(u'mainWindow', u'F8'))
1911+ self.ViewThemeManagerItem.setText(translate(u'mainWindow', u'&Theme Manager'))
1912+ self.ViewThemeManagerItem.setToolTip(translate(u'mainWindow', u'Toggle Theme Manager'))
1913+ self.ViewThemeManagerItem.setStatusTip(translate(u'mainWindow', u'Toggle the visibility of the Theme Manager'))
1914+ self.ViewThemeManagerItem.setShortcut(translate(u'mainWindow', u'F10'))
1915+ self.ViewServiceManagerItem.setText(translate(u'mainWindow', u'&Service Manager'))
1916+ self.ViewServiceManagerItem.setToolTip(translate(u'mainWindow', u'Toggle Service Manager'))
1917+ self.ViewServiceManagerItem.setStatusTip(translate(u'mainWindow', u'Toggle the visibility of the Service Manager'))
1918+ self.ViewServiceManagerItem.setShortcut(translate(u'mainWindow', u'F9'))
1919+ self.ToolsAlertItem.setText(translate(u'mainWindow', u'&Alert'))
1920+ self.ToolsAlertItem.setStatusTip(translate(u'mainWindow', u'Show an alert message'))
1921+ self.ToolsAlertItem.setShortcut(translate(u'mainWindow', u'F7'))
1922+ self.HelpDocumentationItem.setText(translate(u'mainWindow', u'&User Guide'))
1923+ self.HelpAboutItem.setText(translate(u'mainWindow', u'&About'))
1924+ self.HelpAboutItem.setStatusTip(translate(u'mainWindow', u'More information about OpenLP'))
1925+ self.HelpAboutItem.setShortcut(translate(u'mainWindow', u'Ctrl+F1'))
1926+ self.HelpOnlineHelpItem.setText(translate(u'mainWindow', u'&Online Help'))
1927+ self.HelpWebSiteItem.setText(translate(u'mainWindow', u'&Web Site'))
1928+ self.LanguageTranslateItem.setText(translate(u'mainWindow', u'&Translate'))
1929+ self.LanguageTranslateItem.setStatusTip(translate(u'mainWindow', u'Translate the interface to your language'))
1930+ self.LanguageEnglishItem.setText(translate(u'mainWindow', u'English'))
1931+ self.LanguageEnglishItem.setStatusTip(translate(u'mainWindow', u'Set the interface language to English'))
1932+ self.ToolsAddToolItem.setText(translate(u'mainWindow', u'&Add Tool...'))
1933+ self.ToolsAddToolItem.setStatusTip(translate(u'mainWindow', u'Add an application to the list of tools'))
1934+ self.action_Preview_Panel.setText(translate(u'mainWindow', u'&Preview Pane'))
1935+ self.ModeLiveItem.setText(translate(u'mainWindow', u'&Live'))
1936
1937 def show(self):
1938- self.main_window.showMaximized()
1939- self.main_display.setup(0)
1940- self.main_display.show()
1941+ self.mainWindow.showMaximized()
1942+ self.mainDisplay.setup(0)
1943+ self.mainDisplay.show()
1944
1945 def onHelpAboutItemClicked(self):
1946- self.about_form.exec_()
1947+ self.aboutForm.exec_()
1948
1949 def onToolsAlertItemClicked(self):
1950- self.alert_form.exec_()
1951+ self.alertForm.exec_()
1952
1953 def onOptionsSettingsItemClicked(self):
1954- self.settings_form.exec_()
1955+ self.settingsForm.exec_()
1956
1957=== modified file 'openlp/core/ui/servicemanager.py'
1958--- openlp/core/ui/servicemanager.py 2009-05-18 19:04:25 +0000
1959+++ openlp/core/ui/servicemanager.py 2009-05-22 18:30:25 +0000
1960@@ -21,13 +21,7 @@
1961 import logging
1962
1963 from PyQt4 import QtCore, QtGui
1964-from openlp.core.lib import PluginConfig
1965-from openlp.core.lib import OpenLPToolbar
1966-from openlp.core.lib import ServiceItem
1967-from openlp.core.lib import RenderManager
1968-from openlp.core import translate
1969-from openlp import buildIcon
1970-from openlp.core.lib import Event, EventType, EventManager
1971+from openlp.core.lib import PluginConfig, OpenLPToolbar, ServiceItem, RenderManager, Event, EventType, EventManager, translate, buildIcon, contextMenuAction, contextMenuSeparator
1972
1973 class ServiceManager(QtGui.QWidget):
1974
1975@@ -38,12 +32,12 @@
1976 Also handles the UI tasks of moving things up and down etc.
1977 """
1978 global log
1979- log=logging.getLogger(u'ServiceManager')
1980+ log = logging.getLogger(u'ServiceManager')
1981
1982 def __init__(self, parent):
1983 QtGui.QWidget.__init__(self)
1984- self.parent=parent
1985- self.serviceItems=[]
1986+ self.parent = parent
1987+ self.serviceItems = []
1988 self.Layout = QtGui.QVBoxLayout(self)
1989 self.Layout.setSpacing(0)
1990 self.Layout.setMargin(0)
1991@@ -57,15 +51,15 @@
1992 self.Toolbar.addToolbarButton(u'Move to bottom', u':/services/service_bottom.png',
1993 translate(u'ServiceManager', u'Move to end'), self.onServiceEnd)
1994 self.Toolbar.addSeparator()
1995+ self.Toolbar.addToolbarButton(u'Delete From Service', u':/services/service_delete.png',
1996+ translate(u'ServiceManager', u'Delete From Service'), self.onDeleteFromService)
1997 self.Toolbar.addToolbarButton(u'New Service', u':/services/service_new.png',
1998 translate(u'ServiceManager', u'Create a new Service'), self.onNewService)
1999- self.Toolbar.addToolbarButton(u'Delete From Service', u':/services/service_delete.png',
2000- translate(u'ServiceManager', u'Delete From Service'), self.onDeleteFromService)
2001+ self.Toolbar.addToolbarButton(u'Open Service', u':/services/service_open.png',
2002+ translate(u'ServiceManager', u'Load Existing'), self.onLoadService)
2003 self.Toolbar.addSeparator()
2004 self.Toolbar.addToolbarButton(u'Save Service', u':/services/service_save.png',
2005 translate(u'ServiceManager', u'Save Service'), self.onSaveService)
2006- self.Toolbar.addToolbarButton(u'Load Service', u':/services/service_open.png',
2007- translate(u'ServiceManager', u'Load Existing'), self.onLoadService)
2008
2009 self.Toolbar.addSeparator()
2010 self.ThemeComboBox = QtGui.QComboBox(self.Toolbar)
2011@@ -87,14 +81,14 @@
2012
2013 self.ServiceManagerList.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
2014
2015- self.ServiceManagerList.addAction(self.contextMenuAction(
2016+ self.ServiceManagerList.addAction(contextMenuAction(
2017 self.ServiceManagerList, ':/system/system_preview.png',
2018 translate(u'ServiceManager',u'&Preview Verse'), self.makePreview))
2019- self.ServiceManagerList.addAction(self.contextMenuAction(
2020+ self.ServiceManagerList.addAction(contextMenuAction(
2021 self.ServiceManagerList, ':/system/system_live.png',
2022 translate(u'ServiceManager',u'&Show Live'), self.makeLive))
2023- self.ServiceManagerList.addAction(self.contextMenuSeparator(self.ServiceManagerList))
2024- self.ServiceManagerList.addAction(self.contextMenuAction(
2025+ self.ServiceManagerList.addAction(contextMenuSeparator(self.ServiceManagerList))
2026+ self.ServiceManagerList.addAction(contextMenuAction(
2027 self.ServiceManagerList, ':/services/service_delete',
2028 translate(u'ServiceManager',u'&Remove from Service'), self.onDeleteFromService))
2029
2030@@ -106,20 +100,6 @@
2031 self.config = PluginConfig(u'Main')
2032 self.service_theme = self.config.get_config(u'theme service theme', u'')
2033
2034- def contextMenuAction(self, base, icon, text, slot):
2035- """
2036- Utility method to help build context menus for plugins
2037- """
2038- action = QtGui.QAction(text, base)
2039- action .setIcon(buildIcon(icon))
2040- QtCore.QObject.connect(action, QtCore.SIGNAL("triggered()"), slot)
2041- return action
2042-
2043- def contextMenuSeparator(self, base):
2044- action = QtGui.QAction("", base)
2045- action.setSeparator(True)
2046- return action
2047-
2048 def onServiceTop(self):
2049 pass
2050
2051@@ -160,7 +140,7 @@
2052 count = 0
2053 for frame in item.frames:
2054 treewidgetitem1 = QtGui.QTreeWidgetItem(treewidgetitem)
2055- text = frame[u'formatted'][0]
2056+ text = frame[u'title'][0]
2057 treewidgetitem1.setText(0,text[:30])
2058 treewidgetitem1.setData(0, QtCore.Qt.UserRole,QtCore.QVariant(count))
2059 count = count + 1
2060@@ -199,7 +179,7 @@
2061 Handle the release of the event and trigger the plugin
2062 to add the data
2063 """
2064- link=event.mimeData()
2065+ link = event.mimeData()
2066 if link.hasText():
2067 plugin = event.mimeData().text()
2068 self.EventManager.post_event(Event(EventType.LoadServiceItem, plugin))
2069@@ -233,7 +213,9 @@
2070 for theme in theme_list:
2071 self.ThemeComboBox.addItem(theme)
2072 id = self.ThemeComboBox.findText(str(self.service_theme), QtCore.Qt.MatchExactly)
2073+ # Not Found
2074 if id == -1:
2075- id = 0 # Not Found
2076+ id = 0
2077 self.service_theme = u''
2078 self.ThemeComboBox.setCurrentIndex(id)
2079+ self.RenderManager.set_service_theme(self.service_theme)
2080
2081=== modified file 'openlp/core/ui/slidecontroller.py'
2082--- openlp/core/ui/slidecontroller.py 2009-05-16 10:24:03 +0000
2083+++ openlp/core/ui/slidecontroller.py 2009-05-20 20:17:20 +0000
2084@@ -22,8 +22,7 @@
2085
2086 from PyQt4 import QtCore, QtGui
2087
2088-from openlp.core.lib import OpenLPToolbar
2089-from openlp.core import translate
2090+from openlp.core.lib import OpenLPToolbar, translate
2091
2092 class SlideData(QtCore.QAbstractListModel):
2093 """
2094
2095=== modified file 'openlp/core/ui/splashscreen.py'
2096--- openlp/core/ui/splashscreen.py 2009-05-01 22:26:43 +0000
2097+++ openlp/core/ui/splashscreen.py 2009-05-20 20:17:20 +0000
2098@@ -20,7 +20,7 @@
2099
2100 from PyQt4 import QtCore, QtGui
2101
2102-from openlp.core import translate
2103+from openlp.core.lib import translate
2104
2105 class SplashScreen(object):
2106 def __init__(self, version):
2107
2108=== modified file 'openlp/core/ui/thememanager.py'
2109--- openlp/core/ui/thememanager.py 2009-05-18 19:47:18 +0000
2110+++ openlp/core/ui/thememanager.py 2009-05-22 05:14:55 +0000
2111@@ -23,23 +23,17 @@
2112 import shutil
2113
2114 from time import sleep
2115-from copy import deepcopy
2116 from xml.etree.ElementTree import ElementTree, XML
2117-from PyQt4 import *
2118 from PyQt4 import QtCore, QtGui
2119-from PyQt4.QtCore import *
2120-from PyQt4.QtGui import *
2121
2122 from openlp.core.ui import AmendThemeForm, ServiceManager
2123-from openlp.core import translate, fileToXML
2124 from openlp.core.theme import Theme
2125-from openlp.core.lib import Event, EventType, EventManager, OpenLPToolbar, ThemeXML, Renderer
2126+from openlp.core.lib import Event, EventType, EventManager, OpenLPToolbar, ThemeXML, Renderer, translate, file_to_xml
2127 from openlp.core.utils import ConfigHelper
2128-from openlp.core.resources import *
2129
2130 import logging
2131
2132-class ThemeData(QAbstractListModel):
2133+class ThemeData(QtCore.QAbstractListModel):
2134 """
2135 Tree of items for an order of Theme.
2136 Includes methods for reading and writing the contents to an OOS file
2137@@ -49,7 +43,7 @@
2138 log=logging.getLogger(u'ThemeData')
2139
2140 def __init__(self):
2141- QAbstractListModel.__init__(self)
2142+ QtCore.QAbstractListModel.__init__(self)
2143 self.items = []
2144 self.rowheight = 50
2145 self.maximagewidth = self.rowheight * 16 / 9.0;
2146@@ -62,36 +56,36 @@
2147 return len(self.items)
2148
2149 def insertRow(self, row, filename):
2150- self.beginInsertRows(QModelIndex(), row, row)
2151+ self.beginInsertRows(QtCore.QModelIndex(), row, row)
2152 log.info(u'insert row %d:%s' % (row, filename))
2153 (prefix, shortfilename) = os.path.split(str(filename))
2154 log.info(u'shortfilename = %s' % shortfilename)
2155 theme = shortfilename.split(u'.')
2156 # create a preview image
2157 if os.path.exists(filename):
2158- preview = QPixmap(str(filename))
2159+ preview = QtGui.QPixmap(str(filename))
2160 width = self.maximagewidth
2161 height = self.rowheight
2162- preview = preview.scaled(width, height, Qt.KeepAspectRatio, Qt.SmoothTransformation)
2163+ preview = preview.scaled(width, height, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
2164 realwidth = preview.width()
2165 realheight = preview.height()
2166 # and move it to the centre of the preview space
2167- pixmap = QPixmap(width, height)
2168- pixmap.fill(Qt.transparent)
2169- painter = QPainter(pixmap)
2170+ pixmap = QtGui.QPixmap(width, height)
2171+ pixmap.fill(QtCore.Qt.transparent)
2172+ painter = QtGui.QPainter(pixmap)
2173 painter.drawPixmap((width - realwidth) / 2, (height - realheight) / 2, preview)
2174 else:
2175 width = self.maximagewidth
2176 height = self.rowheight
2177- pixmap = QPixmap(width, height)
2178- pixmap.fill(Qt.transparent)
2179+ pixmap = QtGui.QtGui.QPixmap(width, height)
2180+ pixmap.fill(QtCore.Qt.transparent)
2181 # finally create the row
2182 self.items.insert(row, (filename, pixmap, shortfilename, theme[0]))
2183 log.info(u'Items: %s' % self.items)
2184 self.endInsertRows()
2185
2186 def removeRow(self, row):
2187- self.beginRemoveRows(QModelIndex(), row, row)
2188+ self.beginRemoveRows(QtCore.QModelIndex(), row, row)
2189 self.items.pop(row)
2190 self.endRemoveRows()
2191
2192@@ -102,16 +96,15 @@
2193 row = index.row()
2194 if row > len(self.items):
2195 # if the last row is selected and deleted, we then get called with an empty row!
2196- return QVariant()
2197- if role == Qt.DisplayRole:
2198+ return QtCore.QVariant()
2199+ if role == QtCore.Qt.DisplayRole:
2200 retval = self.items[row][3]
2201- elif role == Qt.DecorationRole:
2202+ elif role == QtCore.Qt.DecorationRole:
2203 retval = self.items[row][1]
2204 else:
2205- retval = QVariant()
2206- #log.info("Returning"+ str(retval))
2207- if type(retval) is not type(QVariant):
2208- return QVariant(retval)
2209+ retval = QtCore.QVariant()
2210+ if type(retval) is not type(QtCore.QVariant):
2211+ return QtCore.QVariant(retval)
2212 else:
2213 return retval
2214
2215@@ -131,15 +124,15 @@
2216 filelist = [item[3] for item in self.items]
2217 return filelist
2218
2219-class ThemeManager(QWidget):
2220+class ThemeManager(QtGui.QWidget):
2221 """
2222 Manages the orders of Theme.
2223 """
2224 global log
2225- log=logging.getLogger(u'ThemeManager')
2226+ log = logging.getLogger(u'ThemeManager')
2227
2228 def __init__(self, parent):
2229- QWidget.__init__(self)
2230+ QtGui.QWidget.__init__(self)
2231 self.parent = parent
2232 self.Layout = QtGui.QVBoxLayout(self)
2233 self.Layout.setSpacing(0)
2234@@ -174,7 +167,7 @@
2235 self.themelist = []
2236 self.path = os.path.join(ConfigHelper.get_data_path(), u'themes')
2237 self.checkThemesExists(self.path)
2238- self.amendThemeForm.themePath(self.path)
2239+ self.amendThemeForm.path = self.path
2240
2241 def onAddTheme(self):
2242 self.amendThemeForm.loadTheme(None)
2243@@ -224,8 +217,7 @@
2244 self.themeData.addRow(os.path.join(self.path, name))
2245 self.EventManager.post_event(Event(EventType.ThemeListChanged))
2246 self.ServiceManager.updateThemeList(self.getThemes())
2247- self.parent.settings_form.ThemesTab.updateThemeList(self.getThemes())
2248-
2249+ self.parent.settingsForm.ThemesTab.updateThemeList(self.getThemes())
2250
2251 def getThemes(self):
2252 return self.themeData.getList()
2253@@ -234,19 +226,19 @@
2254 log.debug(u'getthemedata for theme %s', themename)
2255 xml_file = os.path.join(self.path, str(themename), str(themename) + u'.xml')
2256 try:
2257- xml = fileToXML(xml_file)
2258+ xml = file_to_xml(xml_file)
2259 except:
2260 newtheme = ThemeXML()
2261 newtheme.new_document(u'New Theme')
2262 newtheme.add_background_solid(str(u'#000000'))
2263- newtheme.add_font(str(QFont().family()), str(u'#FFFFFF'), str(30), u'False')
2264- newtheme.add_font(str(QFont().family()), str(u'#FFFFFF'), str(12), u'False', u'footer')
2265+ newtheme.add_font(str(QtGui.QFont().family()), str(u'#FFFFFF'), str(30), u'False')
2266+ newtheme.add_font(str(QtGui.QFont().family()), str(u'#FFFFFF'), str(12), u'False', u'footer')
2267 newtheme.add_display(u'False', str(u'#FFFFFF'), u'False', str(u'#FFFFFF'),
2268 str(0), str(0), str(0))
2269 xml = newtheme.extract_xml()
2270 theme = ThemeXML()
2271 theme.parse(xml)
2272- theme.extend_filename(self.path)
2273+ theme.extend_image_filename(self.path)
2274 return theme
2275
2276 def checkThemesExists(self, dir):
2277@@ -353,7 +345,7 @@
2278 log.debug(u'generateAndSaveImage %s %s %s', dir, name, theme_xml)
2279 theme = ThemeXML()
2280 theme.parse(theme_xml)
2281- theme.extend_filename(dir)
2282+ theme.extend_image_filename(dir)
2283 frame = self.generateImage(theme)
2284 im = frame.toImage()
2285 samplepathname = os.path.join(self.path, name + u'.png')
2286
2287=== modified file 'openlp/core/ui/themestab.py'
2288--- openlp/core/ui/themestab.py 2009-05-18 19:47:18 +0000
2289+++ openlp/core/ui/themestab.py 2009-05-20 20:17:20 +0000
2290@@ -20,8 +20,7 @@
2291
2292 from PyQt4 import QtCore, QtGui
2293
2294-from openlp.core import translate
2295-from openlp.core.lib import SettingsTab
2296+from openlp.core.lib import SettingsTab, translate
2297
2298 class ThemesTab(SettingsTab):
2299 """
2300
2301=== modified file 'openlp/plugins/bibles/bibleplugin.py'
2302--- openlp/plugins/bibles/bibleplugin.py 2009-05-17 08:25:15 +0000
2303+++ openlp/plugins/bibles/bibleplugin.py 2009-05-21 05:15:51 +0000
2304@@ -21,10 +21,8 @@
2305
2306 from PyQt4 import QtCore, QtGui
2307 from PyQt4.QtCore import *
2308-from PyQt4.QtGui import *
2309
2310-from openlp.core.lib import Plugin, Event
2311-from openlp.core.lib import EventType
2312+from openlp.core.lib import Plugin, Event, EventType, translate
2313
2314 from openlp.plugins.bibles.lib import BibleManager, BiblesTab, BibleMediaItem
2315 from openlp.plugins.bibles.lib.tables import *
2316@@ -59,7 +57,7 @@
2317 self.ImportBibleItem = QtGui.QAction(import_menu)
2318 self.ImportBibleItem.setObjectName("ImportBibleItem")
2319 import_menu.addAction(self.ImportBibleItem)
2320- self.ImportBibleItem.setText(QtGui.QApplication.translate("main_window", "&Bible", None, QtGui.QApplication.UnicodeUTF8))
2321+ self.ImportBibleItem.setText(translate("BiblePlugin", "&Bible"))
2322 # Signals and slots
2323 QtCore.QObject.connect(self.ImportBibleItem, QtCore.SIGNAL("triggered()"), self.onBibleNewClick)
2324
2325@@ -67,8 +65,7 @@
2326 self.ExportBibleItem = QtGui.QAction(export_menu)
2327 self.ExportBibleItem.setObjectName("ExportBibleItem")
2328 export_menu.addAction(self.ExportBibleItem)
2329- self.ExportBibleItem.setText(
2330- QtGui.QApplication.translate("main_window", u'&Bible', None, QtGui.QApplication.UnicodeUTF8))
2331+ self.ExportBibleItem.setText(translate("BiblePlugin", u'&Bible'))
2332
2333 def initialise(self):
2334 pass
2335
2336=== modified file 'openlp/plugins/bibles/lib/biblestab.py'
2337--- openlp/plugins/bibles/lib/biblestab.py 2009-05-18 16:11:59 +0000
2338+++ openlp/plugins/bibles/lib/biblestab.py 2009-05-21 05:15:51 +0000
2339@@ -20,8 +20,7 @@
2340
2341 from PyQt4 import Qt, QtCore, QtGui
2342
2343-from openlp.core import translate
2344-from openlp import convertStringToBoolean
2345+from openlp.core.lib import translate, str_to_bool
2346 from openlp.core.lib import SettingsTab
2347
2348 class BiblesTab(SettingsTab):
2349@@ -187,11 +186,11 @@
2350 self.bible_search = True
2351
2352 def load(self):
2353- self.paragraph_style = convertStringToBoolean(self.config.get_config(u'paragraph style', u'True'))
2354- self.show_new_chapters = convertStringToBoolean(self.config.get_config(u'display new chapter', u"False"))
2355+ self.paragraph_style = str_to_bool(self.config.get_config(u'paragraph style', u'True'))
2356+ self.show_new_chapters = str_to_bool(self.config.get_config(u'display new chapter', u"False"))
2357 self.display_style = int(self.config.get_config(u'display brackets', u'0'))
2358 self.bible_theme = self.config.get_config(u'bible theme', u'0')
2359- self.bible_search = convertStringToBoolean(self.config.get_config(u'search as type', u'True'))
2360+ self.bible_search = str_to_bool(self.config.get_config(u'search as type', u'True'))
2361 if self.paragraph_style:
2362 self.ParagraphRadioButton.setChecked(True)
2363 else:
2364
2365=== modified file 'openlp/plugins/bibles/lib/mediaitem.py'
2366--- openlp/plugins/bibles/lib/mediaitem.py 2009-05-18 16:11:59 +0000
2367+++ openlp/plugins/bibles/lib/mediaitem.py 2009-05-22 19:36:16 +0000
2368@@ -21,10 +21,7 @@
2369
2370 from PyQt4 import QtCore, QtGui
2371
2372-from openlp.core import translate
2373-from openlp.core.lib import MediaManagerItem, Receiver
2374-from openlp.core.lib import ServiceItem
2375-
2376+from openlp.core.lib import ServiceItem, MediaManagerItem, Receiver, translate
2377 from openlp.plugins.bibles.forms import BibleImportForm
2378 from openlp.plugins.bibles.lib import TextListData
2379
2380@@ -57,7 +54,7 @@
2381 This is the custom media manager item for Bibles.
2382 """
2383 global log
2384- log=logging.getLogger(u'BibleMediaItem')
2385+ log = logging.getLogger(u'BibleMediaItem')
2386 log.info(u'Bible Media Item loaded')
2387
2388 def __init__(self, parent, icon, title):
2389@@ -207,7 +204,7 @@
2390 self.BibleListView.setAlternatingRowColors(True)
2391 self.BibleListData = TextListData()
2392 self.BibleListView.setModel(self.BibleListData)
2393- self.BibleListView.setSelectionMode(QtGui.QAbstractItemView.MultiSelection)
2394+ self.BibleListView.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
2395 self.BibleListView.setDragEnabled(True)
2396
2397 self.PageLayout.addWidget(self.BibleListView)
2398@@ -383,7 +380,7 @@
2399 verse = str(self.search_results[0][2])
2400 text = self.search_results[0][3]
2401 if self.parent.bibles_tab.paragraph_style: #Paragraph
2402- text = text + u'\n'
2403+ text = text + u'\n\n'
2404 if self.parent.bibles_tab.display_style == 1:
2405 loc = self.formatVerse(old_chapter, chapter, verse, u'(', u')')
2406 elif self.parent.bibles_tab.display_style == 2:
2407
2408=== modified file 'openlp/plugins/custom/customplugin.py'
2409--- openlp/plugins/custom/customplugin.py 2009-05-16 10:24:03 +0000
2410+++ openlp/plugins/custom/customplugin.py 2009-05-21 16:07:01 +0000
2411@@ -21,10 +21,8 @@
2412
2413 from PyQt4 import QtCore, QtGui
2414
2415-from openlp.core.resources import *
2416-from openlp.core.lib import Plugin, Event
2417-from openlp.core.lib import EventType
2418 from forms import EditCustomForm
2419+from openlp.core.lib import Plugin, Event, EventType
2420 from openlp.plugins.custom.lib import CustomManager, CustomTab, CustomMediaItem, CustomServiceItem
2421
2422
2423
2424=== modified file 'openlp/plugins/custom/forms/editcustomdialog.py'
2425--- openlp/plugins/custom/forms/editcustomdialog.py 2009-05-01 22:26:43 +0000
2426+++ openlp/plugins/custom/forms/editcustomdialog.py 2009-05-21 16:07:01 +0000
2427@@ -8,7 +8,7 @@
2428 # WARNING! All changes made in this file will be lost!
2429
2430 from PyQt4 import QtCore, QtGui
2431-from openlp.core import translate
2432+from openlp.core.lib import translate
2433
2434 class Ui_customEditDialog(object):
2435 def setupUi(self, customEditDialog):
2436
2437=== modified file 'openlp/plugins/custom/lib/customserviceitem.py'
2438--- openlp/plugins/custom/lib/customserviceitem.py 2009-03-17 05:05:04 +0000
2439+++ openlp/plugins/custom/lib/customserviceitem.py 2009-05-21 16:07:01 +0000
2440@@ -19,6 +19,7 @@
2441 """
2442 from PyQt4 import QtCore, QtGui
2443 import logging
2444+
2445 from openlp.core.lib import ServiceItem
2446
2447 from openlp.plugins.custom.lib import TextListData
2448@@ -40,12 +41,12 @@
2449 it simply tells the slide controller to use it???
2450
2451 It contains 1 or more images
2452-
2453+
2454 """
2455 global log
2456 log=logging.getLogger(u'CustomServiceItem')
2457 log.info(u'CustomServiceItem loaded')
2458-
2459+
2460 def __init__(self, controller):
2461 """
2462 Init Method
2463@@ -58,7 +59,7 @@
2464 # c.uniformItemSizes=True
2465 # c.setModel(self.imgs)
2466 # c.setGeometry(0,0,200,200)
2467-
2468+
2469 def render(self):
2470 """
2471 The render method is what the plugin uses to render its meda to the
2472@@ -66,7 +67,7 @@
2473 """
2474 # render the "image chooser first"
2475 # for f in self.imgs:
2476-# fl , nm = os.path.split(str(f))
2477+# fl , nm = os.path.split(str(f))
2478 # c = self.slide_controller.rowCount()
2479 # self.slide_controller.setRowCount(c+1)
2480 # twi = QtGui.QTableWidgetItem(str(f))
2481@@ -74,7 +75,7 @@
2482 # twi = QtGui.QTableWidgetItem(str(nm))
2483 # self.slide_controller.setItem(c , 1, twi)
2484 # self.slide_controller.setRowHeight(c, 80)
2485-
2486+
2487 # render the preview screen here
2488
2489 def get_parent_node(self):
2490@@ -83,7 +84,7 @@
2491 Manager.
2492 """
2493 pass
2494-
2495+
2496 def add(self, data):
2497 """
2498 append an image to the list
2499@@ -95,7 +96,7 @@
2500 log.info("add Item..."+str(data))
2501 for filename in data.imgs.get_file_list():
2502 self.add(filename)
2503-
2504+
2505
2506 def get_oos_text(self):
2507 """
2508@@ -114,4 +115,4 @@
2509 files=text.split('\n')
2510 for f in files:
2511 self.imgs.addRow(f)
2512-
2513+
2514
2515=== modified file 'openlp/plugins/custom/lib/customtab.py'
2516--- openlp/plugins/custom/lib/customtab.py 2009-03-07 09:20:56 +0000
2517+++ openlp/plugins/custom/lib/customtab.py 2009-05-21 16:07:01 +0000
2518@@ -20,9 +20,7 @@
2519
2520 from PyQt4 import QtCore, QtGui
2521
2522-from openlp.core import translate
2523-from openlp.core.lib import SettingsTab
2524-from openlp.core.resources import *
2525+from openlp.core.lib import SettingsTab, translate
2526
2527 class CustomTab(SettingsTab):
2528 """
2529
2530=== modified file 'openlp/plugins/custom/lib/mediaitem.py'
2531--- openlp/plugins/custom/lib/mediaitem.py 2009-05-12 21:06:35 +0000
2532+++ openlp/plugins/custom/lib/mediaitem.py 2009-05-21 16:07:01 +0000
2533@@ -21,11 +21,7 @@
2534
2535 from PyQt4 import QtCore, QtGui
2536
2537-from openlp.core import translate
2538-from openlp.core.lib import MediaManagerItem
2539-from openlp.core.lib import SongXMLParser
2540-from openlp.core.lib import ServiceItem
2541-
2542+from openlp.core.lib import MediaManagerItem, SongXMLParser, ServiceItem, translate
2543 from openlp.plugins.custom.lib import TextListData
2544
2545 class CustomList(QtGui.QListView):
2546
2547=== modified file 'openlp/plugins/custom/lib/textlistdata.py'
2548--- openlp/plugins/custom/lib/textlistdata.py 2009-03-15 06:35:07 +0000
2549+++ openlp/plugins/custom/lib/textlistdata.py 2009-05-21 16:07:01 +0000
2550@@ -1,55 +1,50 @@
2551 import logging
2552
2553-from PyQt4.QtCore import *
2554-from PyQt4.QtGui import *
2555-
2556-
2557-class TextListData(QAbstractListModel):
2558+from PyQt4 import QtCore, QtGui
2559+
2560+class TextListData(QtCore.QAbstractListModel):
2561 """
2562- An abstract list of strings
2563+ An abstract list of strings
2564 """
2565 global log
2566 log=logging.getLogger(u'TextListData')
2567 log.info(u'started')
2568
2569 def __init__(self):
2570- QAbstractListModel.__init__(self)
2571+ QtCore.QAbstractListModel.__init__(self)
2572 self.items=[] # will be a list of (database id , title) tuples
2573
2574 def resetStore(self):
2575 #reset list so can be reloaded
2576- self.items=[]
2577-
2578+ self.items=[]
2579+
2580 def rowCount(self, parent):
2581 return len(self.items)
2582
2583 def insertRow(self, row, id, title):
2584- self.beginInsertRows(QModelIndex(),row,row)
2585- log.debug("insert row %d:%s for id %d"%(row,title, id))
2586+ self.beginInsertRows(QtCore.QModelIndex(),row,row)
2587+ log.debug("insert row %d:%s for id %d" % (row,title, id))
2588 self.items.insert(row, (id, title))
2589 self.endInsertRows()
2590
2591 def removeRow(self, row):
2592- self.beginRemoveRows(QModelIndex(), row,row)
2593+ self.beginRemoveRows(QtCore.QModelIndex(), row,row)
2594 self.items.pop(row)
2595 self.endRemoveRows()
2596
2597 def addRow(self, id, title):
2598 self.insertRow(len(self.items), id, title)
2599-
2600+
2601 def data(self, index, role):
2602 row=index.row()
2603 if row > len(self.items): # if the last row is selected and deleted, we then get called with an empty row!
2604- return QVariant()
2605- if role==Qt.DisplayRole:
2606- retval= self.items[row][1]
2607-# elif role == Qt.ToolTipRole: #not sure if need as it shows the database row number
2608-# retval= self.items[row][0]
2609+ return QtCore.QVariant()
2610+ if role == QtCore.Qt.DisplayRole:
2611+ retval = self.items[row][1]
2612 else:
2613- retval= QVariant()
2614-# log.info("Returning"+ str(retval))
2615- if type(retval) is not type(QVariant):
2616- return QVariant(retval)
2617+ retval = QtCore.QVariant()
2618+ if type(retval) is not type(QtCore.QVariant):
2619+ return QtCore.QVariant(retval)
2620 else:
2621 return retval
2622
2623@@ -60,10 +55,7 @@
2624 def getId(self, index):
2625 row = index.row()
2626 return self.items[row][0]
2627-
2628+
2629 def deleteRow(self, index):
2630 row = index.row()
2631 self.removeRow(row)
2632-
2633-if __name__=="__main__":
2634- sxml=TextListData()
2635
2636=== modified file 'openlp/plugins/images/imageplugin.py'
2637--- openlp/plugins/images/imageplugin.py 2009-05-16 10:24:03 +0000
2638+++ openlp/plugins/images/imageplugin.py 2009-05-21 16:07:01 +0000
2639@@ -21,14 +21,12 @@
2640
2641 from PyQt4 import QtCore, QtGui
2642
2643-from openlp.core.lib import Plugin, Event
2644-from openlp.core.lib import EventType
2645-
2646+from openlp.core.lib import Plugin, Event, EventType
2647 from openlp.plugins.images.lib import ImageMediaItem, ImageServiceItem
2648
2649 class ImagePlugin(Plugin):
2650 global log
2651- log=logging.getLogger(u'ImagePlugin')
2652+ log = logging.getLogger(u'ImagePlugin')
2653 log.info(u'Image Plugin loaded')
2654
2655 def __init__(self, plugin_helpers):
2656
2657=== modified file 'openlp/plugins/images/lib/imageserviceitem.py'
2658--- openlp/plugins/images/lib/imageserviceitem.py 2009-05-09 07:01:33 +0000
2659+++ openlp/plugins/images/lib/imageserviceitem.py 2009-05-22 18:30:25 +0000
2660@@ -17,8 +17,8 @@
2661 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
2662 Place, Suite 330, Boston, MA 02111-1307 USA
2663 """
2664+import logging
2665 from PyQt4 import QtCore, QtGui
2666-import logging
2667 from openlp.core.lib import ServiceItem
2668 from listwithpreviews import ListWithPreviews
2669
2670
2671=== modified file 'openlp/plugins/images/lib/listwithpreviews.py'
2672--- openlp/plugins/images/lib/listwithpreviews.py 2009-05-11 05:09:43 +0000
2673+++ openlp/plugins/images/lib/listwithpreviews.py 2009-05-22 19:36:16 +0000
2674@@ -1,51 +1,74 @@
2675+# -*- coding: utf-8 -*-
2676+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
2677+"""
2678+OpenLP - Open Source Lyrics Projection
2679+Copyright (c) 2008 Raoul Snyman
2680+Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley
2681+
2682+This program is free software; you can redistribute it and/or modify it under
2683+the terms of the GNU General Public License as published by the Free Software
2684+Foundation; version 2 of the License.
2685+
2686+This program is distributed in the hope that it will be useful, but WITHOUT ANY
2687+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
2688+PARTICULAR PURPOSE. See the GNU General Public License for more details.
2689+
2690+You should have received a copy of the GNU General Public License along with
2691+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
2692+Place, Suite 330, Boston, MA 02111-1307 USA
2693+"""
2694 import os
2695 import logging
2696-from PyQt4.QtCore import *
2697-from PyQt4.QtGui import *
2698-class ListWithPreviews(QAbstractListModel):
2699+from PyQt4 import QtCore, QtGui
2700+
2701+
2702+class ListWithPreviews(QtCore.QAbstractListModel):
2703 """
2704 An abstract list of strings and the preview icon to go with them
2705 """
2706 global log
2707- log=logging.getLogger("ListWithPreviews")
2708+ log = logging.getLogger("ListWithPreviews")
2709 log.info("started")
2710
2711 def __init__(self):
2712- QAbstractListModel.__init__(self)
2713- self.items=[] # will be a list of (full filename, QPixmap, shortname) tuples
2714- self.rowheight=50
2715- self.maximagewidth=self.rowheight*16/9.0;
2716+ QtCore.QAbstractListModel.__init__(self)
2717+ self.items = [] # will be a list of (full filename, QPixmap, shortname) tuples
2718+ self.rowheight = 50
2719+ self.maximagewidth = self.rowheight*16/9.0;
2720
2721 def rowCount(self, parent):
2722 return len(self.items)
2723
2724 def insertRow(self, row, filename):
2725- self.beginInsertRows(QModelIndex(),row,row)
2726- log.info("insert row %d:%s"%(row,filename))
2727+ self.beginInsertRows(QtCore.QModelIndex(),row,row)
2728+ log.info("insert row %d:%s"% (row,filename))
2729 # get short filename to display next to image
2730 (prefix, shortfilename) = os.path.split(str(filename))
2731- log.info("shortfilename=%s"%(shortfilename))
2732+ log.info("shortfilename=%s"% (shortfilename))
2733 # create a preview image
2734 if os.path.exists(filename):
2735- preview = QPixmap(str(filename))
2736- w=self.maximagewidth;h=self.rowheight
2737- preview = preview.scaled(w,h, Qt.KeepAspectRatio, Qt.SmoothTransformation)
2738- realw=preview.width(); realh=preview.height()
2739+ preview = QtGui.QPixmap(str(filename))
2740+ w = self.maximagewidth;
2741+ h = self.rowheight
2742+ preview = preview.scaled(w, h, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
2743+ realw = preview.width();
2744+ realh = preview.height()
2745 # and move it to the centre of the preview space
2746- p=QPixmap(w,h)
2747- p.fill(Qt.transparent)
2748- painter=QPainter(p)
2749+ p = QtGui.QPixmap(w,h)
2750+ p.fill(QtCore.Qt.transparent)
2751+ painter = QtGui.QPainter(p)
2752 painter.drawPixmap((w-realw)/2,(h-realh)/2,preview)
2753 else:
2754- w=self.maximagewidth;h=self.rowheight
2755- p=QPixmap(w,h)
2756- p.fill(Qt.transparent)
2757+ w = self.maximagewidth;
2758+ h = self.rowheight
2759+ p = QtGui.QPixmap(w,h)
2760+ p.fill(QtCore.Qt.transparent)
2761 # finally create the row
2762 self.items.insert(row, (filename, p, shortfilename))
2763 self.endInsertRows()
2764
2765 def removeRow(self, row):
2766- self.beginRemoveRows(QModelIndex(), row,row)
2767+ self.beginRemoveRows(QtCore.QModelIndex(), row, row)
2768 self.items.pop(row)
2769 self.endRemoveRows()
2770
2771@@ -53,20 +76,20 @@
2772 self.insertRow(len(self.items), filename)
2773
2774 def data(self, index, role):
2775- row=index.row()
2776- if row > len(self.items): # if the last row is selected and deleted, we then get called with an empty row!
2777- return QVariant()
2778- if role==Qt.DisplayRole:
2779- retval= self.items[row][2]
2780- elif role == Qt.DecorationRole:
2781- retval= self.items[row][1]
2782- elif role == Qt.ToolTipRole:
2783- retval= self.items[row][0]
2784+ row = index.row()
2785+ if row > len(self.items):
2786+ # if the last row is selected and deleted, we then get called with an empty row!
2787+ return QtCore.QVariant()
2788+ if role == QtCore.Qt.DisplayRole:
2789+ retval = self.items[row][2]
2790+ elif role == QtCore.Qt.DecorationRole:
2791+ retval = self.items[row][1]
2792+ elif role == QtCore.Qt.ToolTipRole:
2793+ retval = self.items[row][0]
2794 else:
2795- retval= QVariant()
2796-# log.info("Returning"+ str(retval))
2797- if type(retval) is not type(QVariant):
2798- return QVariant(retval)
2799+ retval = QtCore.QVariant()
2800+ if type(retval) is not type(QtCore.QVariant):
2801+ return QtCore.QVariant(retval)
2802 else:
2803 return retval
2804
2805
2806=== modified file 'openlp/plugins/images/lib/mediaitem.py'
2807--- openlp/plugins/images/lib/mediaitem.py 2009-05-16 10:24:03 +0000
2808+++ openlp/plugins/images/lib/mediaitem.py 2009-05-22 18:30:25 +0000
2809@@ -22,10 +22,7 @@
2810
2811 from PyQt4 import QtCore, QtGui
2812
2813-from openlp.core import translate
2814-from openlp.core.lib import MediaManagerItem
2815-from openlp.core.lib import ServiceItem
2816-
2817+from openlp.core.lib import MediaManagerItem, ServiceItem, translate
2818 from openlp.plugins.images.lib import ListWithPreviews
2819
2820 class ImageList(QtGui.QListView):
2821@@ -156,7 +153,7 @@
2822 for index in indexes:
2823 filename = self.ImageListData.getFilename(index)
2824 frame = QtGui.QPixmap(str(filename))
2825- service_item.frames.append({u'formatted': u'Image', u'image': frame})
2826+ service_item.frames.append({u'title': filename , u'image': frame})
2827
2828 def onImagePreviewClick(self):
2829 log.debug(u'Image Preview Requested')
2830
2831=== modified file 'openlp/plugins/media/lib/mediaitem.py'
2832--- openlp/plugins/media/lib/mediaitem.py 2009-05-18 04:41:49 +0000
2833+++ openlp/plugins/media/lib/mediaitem.py 2009-05-22 18:30:25 +0000
2834@@ -22,8 +22,7 @@
2835
2836 from PyQt4 import QtCore, QtGui
2837
2838-from openlp.core import translate
2839-from openlp.core.lib import MediaManagerItem
2840+from openlp.core.lib import MediaManagerItem, translate
2841
2842 from openlp.plugins.media.lib import MediaTab
2843 from openlp.plugins.media.lib import FileListData
2844@@ -33,7 +32,7 @@
2845 This is the custom media manager item for Media Slides.
2846 """
2847 global log
2848- log=logging.getLogger(u'MediaMediaItem')
2849+ log = logging.getLogger(u'MediaMediaItem')
2850 log.info(u'Media Media Item loaded')
2851
2852 def __init__(self, parent, icon, title):
2853
2854=== modified file 'openlp/plugins/media/lib/mediatab.py'
2855--- openlp/plugins/media/lib/mediatab.py 2009-05-15 05:15:53 +0000
2856+++ openlp/plugins/media/lib/mediatab.py 2009-05-21 05:15:51 +0000
2857@@ -20,9 +20,7 @@
2858
2859 from PyQt4 import QtCore, QtGui
2860
2861-from openlp.core import translate
2862-from openlp import convertStringToBoolean
2863-from openlp.core.lib import SettingsTab
2864+from openlp.core.lib import SettingsTab, str_to_bool, translate
2865
2866 class MediaTab(SettingsTab):
2867 """
2868@@ -67,11 +65,12 @@
2869 def onVMRCheckBoxChanged(self):
2870 use_vmr_mode = self.UseVMRCheckBox.checkState()
2871 self.use_vmr_mode = False
2872- if use_vmr_mode == 2: # we have a set value convert to True/False
2873+ if use_vmr_mode == 2:
2874+ # we have a set value convert to True/False
2875 self.use_vmr_mode = True
2876
2877 def load(self):
2878- self.use_vmr_mode = convertStringToBoolean(self.config.get_config(u'use mode layout', u'False'))
2879+ self.use_vmr_mode = str_to_bool(self.config.get_config(u'use mode layout', u'False'))
2880 if self.use_vmr_mode :
2881 self.UseVMRCheckBox.setChecked(True)
2882
2883
2884=== modified file 'openlp/plugins/media/mediaplugin.py'
2885--- openlp/plugins/media/mediaplugin.py 2009-05-15 05:15:53 +0000
2886+++ openlp/plugins/media/mediaplugin.py 2009-05-21 05:15:51 +0000
2887@@ -20,7 +20,6 @@
2888 import os
2889 from PyQt4 import QtCore, QtGui
2890
2891-from openlp.core.resources import *
2892 from openlp.core.lib import Plugin, MediaManagerItem, SettingsTab
2893 from openlp.plugins.media.lib import MediaTab,MediaMediaItem
2894
2895
2896=== modified file 'openlp/plugins/presentations/lib/mediaitem.py'
2897--- openlp/plugins/presentations/lib/mediaitem.py 2009-05-18 19:04:25 +0000
2898+++ openlp/plugins/presentations/lib/mediaitem.py 2009-05-22 18:30:25 +0000
2899@@ -21,11 +21,7 @@
2900 import os
2901
2902 from PyQt4 import QtCore, QtGui
2903-
2904-from openlp.core import translate
2905-from openlp.core.lib import MediaManagerItem
2906-from openlp.core.resources import *
2907-
2908+from openlp.core.lib import MediaManagerItem, translate
2909 from openlp.plugins.presentations.lib import FileListData
2910
2911 class PresentationMediaItem(MediaManagerItem):
2912
2913=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
2914--- openlp/plugins/songs/lib/mediaitem.py 2009-03-10 16:46:25 +0000
2915+++ openlp/plugins/songs/lib/mediaitem.py 2009-05-22 18:30:25 +0000
2916@@ -21,9 +21,7 @@
2917
2918 from PyQt4 import QtCore, QtGui
2919
2920-from openlp.core import translate
2921-from openlp.core.lib import MediaManagerItem
2922-from openlp.core.resources import *
2923+from openlp.core.lib import MediaManagerItem, translate
2924
2925 from openlp.plugins.songs.forms import EditSongForm
2926
2927@@ -32,7 +30,7 @@
2928 This is the custom media manager item for Songs.
2929 """
2930 global log
2931- log=logging.getLogger("SongMediaItem")
2932+ log = logging.getLogger("SongMediaItem")
2933 log.info("Song Media Item loaded")
2934
2935 def __init__(self, parent, icon, title):
2936
2937=== modified file 'openlp/plugins/songs/lib/songstab.py'
2938--- openlp/plugins/songs/lib/songstab.py 2009-02-28 23:31:24 +0000
2939+++ openlp/plugins/songs/lib/songstab.py 2009-05-21 16:07:01 +0000
2940@@ -20,9 +20,7 @@
2941
2942 from PyQt4 import QtCore, QtGui
2943
2944-from openlp.core import translate
2945-from openlp.core.lib import SettingsTab
2946-from openlp.core.resources import *
2947+from openlp.core.lib import SettingsTab, translate
2948
2949 class SongsTab(SettingsTab):
2950 """
2951
2952=== modified file 'openlp/plugins/songs/songsplugin.py'
2953--- openlp/plugins/songs/songsplugin.py 2009-05-16 16:38:03 +0000
2954+++ openlp/plugins/songs/songsplugin.py 2009-05-22 18:30:25 +0000
2955@@ -21,7 +21,6 @@
2956
2957 from PyQt4 import QtCore, QtGui
2958
2959-from openlp.core.resources import *
2960 from openlp.core.lib import Plugin, Event
2961 from openlp.core.lib import EventType
2962 from openlp.plugins.songs.lib import SongManager, SongsTab, SongMediaItem
2963@@ -31,7 +30,7 @@
2964 class SongsPlugin(Plugin):
2965
2966 global log
2967- log=logging.getLogger(u'SongsPlugin')
2968+ log = logging.getLogger(u'SongsPlugin')
2969 log.info(u'Song Plugin loaded')
2970
2971 def __init__(self, plugin_helpers):
2972@@ -124,7 +123,7 @@
2973 """
2974 Handle the event contained in the event object.
2975 """
2976- log.debug(u'Handle event called with event %s'%event.event_type)
2977+ log.debug(u'Handle event called with event %s' % event.event_type)
2978 if event.event_type == EventType.ThemeListChanged:
2979 log.debug(u'New Theme request received')
2980 #self.edit_custom_form.loadThemes(self.theme_manager.getThemes())