Merge lp:~meths/openlp/trivialfixes into lp:openlp

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

Approved

review: Approve
lp:~meths/openlp/trivialfixes updated
558. By Jon Tibble

Cleanup code and fixes

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openlp/core/lib/pluginmanager.py'
2--- openlp/core/lib/pluginmanager.py 2009-09-18 17:37:11 +0000
3+++ openlp/core/lib/pluginmanager.py 2009-09-19 23:05:30 +0000
4@@ -85,7 +85,8 @@
5 modulename = modulename[len(prefix) + 1:]
6 modulename = modulename.replace(os.path.sep, '.')
7 # import the modules
8- log.debug(u'Importing %s from %s. Depth %d', modulename, path, thisdepth)
9+ log.debug(u'Importing %s from %s. Depth %d',
10+ modulename, path, thisdepth)
11 try:
12 __import__(modulename, globals(), locals(), [])
13 except ImportError, e:
14@@ -131,8 +132,10 @@
15 if plugin.status == PluginStatus.Active:
16 media_manager_item = plugin.get_media_manager_item()
17 if media_manager_item is not None:
18- log.debug(u'Inserting media manager item from %s' % plugin.name)
19- mediatoolbox.addItem(media_manager_item, plugin.icon, media_manager_item.title)
20+ log.debug(u'Inserting media manager item from %s' % \
21+ plugin.name)
22+ mediatoolbox.addItem(media_manager_item, plugin.icon,
23+ media_manager_item.title)
24
25 def hook_settings_tabs(self, settingsform=None):
26 """
27
28=== modified file 'openlp/core/lib/renderer.py'
29--- openlp/core/lib/renderer.py 2009-09-15 19:06:40 +0000
30+++ openlp/core/lib/renderer.py 2009-09-19 23:05:30 +0000
31@@ -31,7 +31,7 @@
32 class Renderer(object):
33 """
34 Genarates a pixmap image of a array of text. The Text is formatted to
35- make sure it fits on the screen and if not extra frames a generated.
36+ make sure it fits on the screen and if not extra frames are generated.
37 """
38 global log
39 log = logging.getLogger(u'Renderer')
40
41=== modified file 'openlp/core/ui/mainwindow.py'
42--- openlp/core/ui/mainwindow.py 2009-09-19 21:45:50 +0000
43+++ openlp/core/ui/mainwindow.py 2009-09-19 23:05:30 +0000
44@@ -629,23 +629,25 @@
45 if ret == QtGui.QMessageBox.Save:
46 self.ServiceManagerContents.onSaveService()
47 self.mainDisplay.close()
48- self.ServiceManagerContents.cleanUp()
49 self.cleanUp()
50 event.accept()
51 elif ret == QtGui.QMessageBox.Discard:
52 self.mainDisplay.close()
53- self.ServiceManagerContents.cleanUp()
54 self.cleanUp()
55 event.accept()
56 else:
57 event.ignore()
58 else:
59 self.mainDisplay.close()
60- self.ServiceManagerContents.cleanUp()
61 self.cleanUp()
62 event.accept()
63
64 def cleanUp(self):
65+ """
66+ Runs all the cleanup code before OpenLP shuts down
67+ """
68+ # Clean temporary files used by services
69+ self.ServiceManagerContents.cleanUp()
70 # Call the cleanup method to shutdown plugins.
71 log.info(u'cleanup plugins')
72 self.plugin_manager.finalise_plugins()
73
74=== modified file 'openlp/plugins/plugin.txt'
75--- openlp/plugins/plugin.txt 2009-09-19 21:45:50 +0000
76+++ openlp/plugins/plugin.txt 2009-09-19 23:05:30 +0000
77@@ -21,7 +21,7 @@
78 * Render their display (on the projection screen and in a "shrunken form"
79 for preview purposes)
80
81-These plugins need to be part of an service. This means they need to
82+These plugins need to be part of a service. This means they need to
83 * Be able to tell the service manager code what to put in the service for their
84 "bit"
85 * Have a "tab" in the media manager, which they can render on request
86@@ -47,7 +47,7 @@
87 actually form a plugin...
88
89 Each service entry may be made up of multiple plugins (to do text on video), so
90-each plugin that contributes to an service item will need a "layering"
91+each plugin that contributes to a service item will need a "layering"
92 priority.
93
94 Plugin management
95@@ -62,7 +62,7 @@
96 spaces made in the prefs UI as required, and in the media manager.
97
98 The service manager can find out what plugins it has available (we need to
99-report missing plugins when an service is loaded).
100+report missing plugins when a service is loaded).
101
102 The display manager will get a ref to a/some plugin(s) from the service
103 manager when each service item is made live, and can then call on each to