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))
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))
log.debug("Plugin="+str(p))
if plugin.check_pre_conditions():
log.debug("Appending "+str(p))
plugin_objects.append(plugin)
eventmanager.register(plugin)
self.plugins = sorted(plugin_objects, self.order_by_weight)
def order_by_weight(self, x, y):

View File

@ -31,20 +31,19 @@ class CustomPlugin(Plugin):
global log
log=logging.getLogger(u'CustomPlugin')
log.info(u'Custom Plugin loaded')
def __init__(self, plugin_helpers):
# Call the parent constructor
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.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)
self.live_service_item = CustomServiceItem(self.live_controller)
def get_media_manager_item(self):
# Create the CustomManagerItem object

View File

@ -32,7 +32,7 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog):
Constructor
"""
QtGui.QDialog.__init__(self, parent)
#self.parent = parent
#self.parent = parent
self.setupUi(self)
# Connecting signals and slots
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), self.rejected)