forked from openlp/openlp
Fixed duplicate Image plugin loading
Fixed error in Custom Plugin stopping it load
This commit is contained in:
parent
e2715e0358
commit
381afda908
@ -33,7 +33,7 @@ class EventManager(object):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.endpoints=[]
|
self.endpoints=[]
|
||||||
log.info(u'Starting')
|
log.info(u'Initialising')
|
||||||
|
|
||||||
def register(self, plugin):
|
def register(self, plugin):
|
||||||
log.debug(u'plugin %s registered with EventManager'%plugin)
|
log.debug(u'plugin %s registered with EventManager'%plugin)
|
||||||
|
@ -81,13 +81,13 @@ class PluginManager(object):
|
|||||||
try:
|
try:
|
||||||
plugin = p(self.plugin_helpers)
|
plugin = p(self.plugin_helpers)
|
||||||
log.debug(u'loaded plugin %s with helpers'%str(p))
|
log.debug(u'loaded plugin %s with helpers'%str(p))
|
||||||
except TypeError:
|
|
||||||
log.error(u'loaded plugin %s has no helpers'%str(p))
|
|
||||||
log.debug("Plugin="+str(p))
|
log.debug("Plugin="+str(p))
|
||||||
if plugin.check_pre_conditions():
|
if plugin.check_pre_conditions():
|
||||||
log.debug("Appending "+str(p))
|
log.debug("Appending "+str(p))
|
||||||
plugin_objects.append(plugin)
|
plugin_objects.append(plugin)
|
||||||
eventmanager.register(plugin)
|
eventmanager.register(plugin)
|
||||||
|
except TypeError:
|
||||||
|
log.error(u'loaded plugin %s has no helpers'%str(p))
|
||||||
self.plugins = sorted(plugin_objects, self.order_by_weight)
|
self.plugins = sorted(plugin_objects, self.order_by_weight)
|
||||||
|
|
||||||
def order_by_weight(self, x, y):
|
def order_by_weight(self, x, y):
|
||||||
|
@ -37,12 +37,11 @@ class CustomPlugin(Plugin):
|
|||||||
Plugin.__init__(self, u'Custom', u'1.9.0', plugin_helpers)
|
Plugin.__init__(self, u'Custom', u'1.9.0', plugin_helpers)
|
||||||
self.weight = -5
|
self.weight = -5
|
||||||
self.custommanager = CustomManager(self.config)
|
self.custommanager = CustomManager(self.config)
|
||||||
self.edit_custom_form = EditCustomForm(self.custommanager, self)
|
self.edit_custom_form = EditCustomForm(self.custommanager)
|
||||||
# Create the plugin icon
|
# Create the plugin icon
|
||||||
self.icon = QtGui.QIcon()
|
self.icon = QtGui.QIcon()
|
||||||
self.icon.addPixmap(QtGui.QPixmap(':/media/media_custom.png'),
|
self.icon.addPixmap(QtGui.QPixmap(':/media/media_custom.png'),
|
||||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
|
|
||||||
self.preview_service_item = CustomServiceItem(self.preview_controller)
|
self.preview_service_item = CustomServiceItem(self.preview_controller)
|
||||||
self.live_service_item = CustomServiceItem(self.live_controller)
|
self.live_service_item = CustomServiceItem(self.live_controller)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user