Fixed duplicate Image plugin loading

Fixed error in Custom Plugin stopping it load
This commit is contained in:
Tim Bentley 2009-03-25 20:30:48 +00:00
parent e2715e0358
commit 381afda908
4 changed files with 11 additions and 12 deletions

View File

@ -33,7 +33,7 @@ class EventManager(object):
def __init__(self):
self.endpoints=[]
log.info(u'Starting')
log.info(u'Initialising')
def register(self, plugin):
log.debug(u'plugin %s registered with EventManager'%plugin)

View File

@ -81,13 +81,13 @@ class PluginManager(object):
try:
plugin = p(self.plugin_helpers)
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))
if plugin.check_pre_conditions():
log.debug("Appending "+str(p))
plugin_objects.append(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)
def order_by_weight(self, x, y):

View File

@ -37,12 +37,11 @@ class CustomPlugin(Plugin):
Plugin.__init__(self, u'Custom', u'1.9.0', plugin_helpers)
self.weight = -5
self.custommanager = CustomManager(self.config)
self.edit_custom_form = EditCustomForm(self.custommanager, self)
self.edit_custom_form = EditCustomForm(self.custommanager)
# Create the plugin icon
self.icon = QtGui.QIcon()
self.icon.addPixmap(QtGui.QPixmap(':/media/media_custom.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.preview_service_item = CustomServiceItem(self.preview_controller)
self.live_service_item = CustomServiceItem(self.live_controller)