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
=== modified file 'openlp/core/lib/pluginmanager.py'
--- openlp/core/lib/pluginmanager.py 2009-09-18 17:37:11 +0000
+++ openlp/core/lib/pluginmanager.py 2009-09-19 23:05:30 +0000
@@ -85,7 +85,8 @@
85 modulename = modulename[len(prefix) + 1:]85 modulename = modulename[len(prefix) + 1:]
86 modulename = modulename.replace(os.path.sep, '.')86 modulename = modulename.replace(os.path.sep, '.')
87 # import the modules87 # import the modules
88 log.debug(u'Importing %s from %s. Depth %d', modulename, path, thisdepth)88 log.debug(u'Importing %s from %s. Depth %d',
89 modulename, path, thisdepth)
89 try:90 try:
90 __import__(modulename, globals(), locals(), [])91 __import__(modulename, globals(), locals(), [])
91 except ImportError, e:92 except ImportError, e:
@@ -131,8 +132,10 @@
131 if plugin.status == PluginStatus.Active:132 if plugin.status == PluginStatus.Active:
132 media_manager_item = plugin.get_media_manager_item()133 media_manager_item = plugin.get_media_manager_item()
133 if media_manager_item is not None:134 if media_manager_item is not None:
134 log.debug(u'Inserting media manager item from %s' % plugin.name)135 log.debug(u'Inserting media manager item from %s' % \
135 mediatoolbox.addItem(media_manager_item, plugin.icon, media_manager_item.title)136 plugin.name)
137 mediatoolbox.addItem(media_manager_item, plugin.icon,
138 media_manager_item.title)
136139
137 def hook_settings_tabs(self, settingsform=None):140 def hook_settings_tabs(self, settingsform=None):
138 """141 """
139142
=== modified file 'openlp/core/lib/renderer.py'
--- openlp/core/lib/renderer.py 2009-09-15 19:06:40 +0000
+++ openlp/core/lib/renderer.py 2009-09-19 23:05:30 +0000
@@ -31,7 +31,7 @@
31class Renderer(object):31class Renderer(object):
32 """32 """
33 Genarates a pixmap image of a array of text. The Text is formatted to33 Genarates a pixmap image of a array of text. The Text is formatted to
34 make sure it fits on the screen and if not extra frames a generated.34 make sure it fits on the screen and if not extra frames are generated.
35 """35 """
36 global log36 global log
37 log = logging.getLogger(u'Renderer')37 log = logging.getLogger(u'Renderer')
3838
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2009-09-19 21:45:50 +0000
+++ openlp/core/ui/mainwindow.py 2009-09-19 23:05:30 +0000
@@ -629,23 +629,25 @@
629 if ret == QtGui.QMessageBox.Save:629 if ret == QtGui.QMessageBox.Save:
630 self.ServiceManagerContents.onSaveService()630 self.ServiceManagerContents.onSaveService()
631 self.mainDisplay.close()631 self.mainDisplay.close()
632 self.ServiceManagerContents.cleanUp()
633 self.cleanUp()632 self.cleanUp()
634 event.accept()633 event.accept()
635 elif ret == QtGui.QMessageBox.Discard:634 elif ret == QtGui.QMessageBox.Discard:
636 self.mainDisplay.close()635 self.mainDisplay.close()
637 self.ServiceManagerContents.cleanUp()
638 self.cleanUp()636 self.cleanUp()
639 event.accept()637 event.accept()
640 else:638 else:
641 event.ignore()639 event.ignore()
642 else:640 else:
643 self.mainDisplay.close()641 self.mainDisplay.close()
644 self.ServiceManagerContents.cleanUp()
645 self.cleanUp()642 self.cleanUp()
646 event.accept()643 event.accept()
647644
648 def cleanUp(self):645 def cleanUp(self):
646 """
647 Runs all the cleanup code before OpenLP shuts down
648 """
649 # Clean temporary files used by services
650 self.ServiceManagerContents.cleanUp()
649 # Call the cleanup method to shutdown plugins.651 # Call the cleanup method to shutdown plugins.
650 log.info(u'cleanup plugins')652 log.info(u'cleanup plugins')
651 self.plugin_manager.finalise_plugins()653 self.plugin_manager.finalise_plugins()
652654
=== modified file 'openlp/plugins/plugin.txt'
--- openlp/plugins/plugin.txt 2009-09-19 21:45:50 +0000
+++ openlp/plugins/plugin.txt 2009-09-19 23:05:30 +0000
@@ -21,7 +21,7 @@
21* Render their display (on the projection screen and in a "shrunken form"21* Render their display (on the projection screen and in a "shrunken form"
22 for preview purposes)22 for preview purposes)
2323
24These plugins need to be part of an service. This means they need to 24These plugins need to be part of a service. This means they need to
25* Be able to tell the service manager code what to put in the service for their25* Be able to tell the service manager code what to put in the service for their
26 "bit"26 "bit"
27* Have a "tab" in the media manager, which they can render on request27* Have a "tab" in the media manager, which they can render on request
@@ -47,7 +47,7 @@
47actually form a plugin...47actually form a plugin...
4848
49Each service entry may be made up of multiple plugins (to do text on video), so49Each service entry may be made up of multiple plugins (to do text on video), so
50each plugin that contributes to an service item will need a "layering"50each plugin that contributes to a service item will need a "layering"
51priority.51priority.
5252
53Plugin management53Plugin management
@@ -62,7 +62,7 @@
62spaces made in the prefs UI as required, and in the media manager.62spaces made in the prefs UI as required, and in the media manager.
6363
64The service manager can find out what plugins it has available (we need to64The service manager can find out what plugins it has available (we need to
65report missing plugins when an service is loaded).65report missing plugins when a service is loaded).
6666
67The display manager will get a ref to a/some plugin(s) from the service67The display manager will get a ref to a/some plugin(s) from the service
68manager when each service item is made live, and can then call on each to68manager when each service item is made live, and can then call on each to