openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #09830
[Merge] lp:~orangeshirt/openlp/bugfixes into lp:openlp
Armin Köhler has proposed merging lp:~orangeshirt/openlp/bugfixes into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #793091 in OpenLP: "Bible Upgrade does not work for disabled plugins"
https://bugs.launchpad.net/openlp/+bug/793091
For more details, see:
https://code.launchpad.net/~orangeshirt/openlp/bugfixes/+merge/63500
Fix Bug #793091 - if plugin changed status from inactive to active plugin.appStartup now is called
--
https://code.launchpad.net/~orangeshirt/openlp/bugfixes/+merge/63500
Your team OpenLP Core is requested to review the proposed merge of lp:~orangeshirt/openlp/bugfixes into lp:openlp.
=== modified file 'openlp/core/lib/plugin.py'
--- openlp/core/lib/plugin.py 2011-05-28 18:47:14 +0000
+++ openlp/core/lib/plugin.py 2011-06-05 18:52:28 +0000
@@ -300,6 +300,12 @@
if self.mediaItem:
self.mediadock.remove_dock(self.mediaItem)
+ def appStartup(self):
+ """
+ Perform tasks on application starup
+ """
+ pass
+
def usesTheme(self, theme):
"""
Called to find out if a plugin is currently using a theme.
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2011-06-02 06:16:45 +0000
+++ openlp/core/ui/mainwindow.py 2011-06-05 18:52:28 +0000
@@ -655,7 +655,7 @@
# Give all the plugins a chance to perform some tasks at startup
Receiver.send_message(u'openlp_process_events')
for plugin in self.pluginManager.plugins:
- if plugin.isActive() and hasattr(plugin, u'appStartup'):
+ if plugin.isActive():
Receiver.send_message(u'openlp_process_events')
plugin.appStartup()
Receiver.send_message(u'openlp_process_events')
=== modified file 'openlp/core/ui/pluginform.py'
--- openlp/core/ui/pluginform.py 2011-05-28 18:47:14 +0000
+++ openlp/core/ui/pluginform.py 2011-06-05 18:52:28 +0000
@@ -132,6 +132,7 @@
Receiver.send_message(u'cursor_busy')
self.activePlugin.toggleStatus(PluginStatus.Active)
Receiver.send_message(u'cursor_normal')
+ self.activePlugin.appStartup()
else:
self.activePlugin.toggleStatus(PluginStatus.Inactive)
status_text = unicode(
Follow ups