unregister->deregister fix #488

This commit is contained in:
Martijn Voncken 2008-09-23 19:20:24 +00:00
parent 8a00b046d5
commit 35aa1aaec2
6 changed files with 17 additions and 17 deletions

View File

@ -116,7 +116,7 @@ class WebUI(ui.UI):
config_page_manager.register('plugins','blocklist',BlockListCfgForm)
def disable(self):
config_page_manager.unregister('blocklist')
config_page_manager.deregister('blocklist')

View File

@ -53,8 +53,8 @@ class WebUI(ui.UI):
config.register()
def disable(self):
pages.unregister()
config.unregister()
pages.deregister()
config.deregister()

View File

@ -134,10 +134,10 @@ def register():
api.config_page_manager.register('label','label_update',LabelUpdateCfgForm)
api.config_page_manager.register('label','label_add',LabelAddCfgForm)
def unregister():
api.config_page_manager.unregister('label_general')
api.config_page_manager.unregister('label_update')
api.config_page_manager.unregister('label_add')
def deregister():
api.config_page_manager.deregister('label_general')
api.config_page_manager.deregister('label_update')
api.config_page_manager.deregister('label_add')

View File

@ -62,10 +62,10 @@ def register():
api.menu_manager.register_toolbar_item("label",_("Label"), "label.png" ,2,
"GET","/torrent/label/", True)
def unregister():
api.render.unregister_template_path(template_dir)
api.page_manager.unregister_page('/torrent/label/(.*)')
api.menu_manager.unregister_toolbar_item("label")
def deregister():
api.render.deregister_template_path(template_dir)
api.page_manager.deregister_page('/torrent/label/(.*)')
api.menu_manager.deregister_toolbar_item("label")

View File

@ -78,7 +78,7 @@ class MenuManager(component.Component):
def register_toolbar_item(self, id, title, image, flag, method, url, important):
self.toolbar_items.append((id, title, image, flag, method, url, important))
def unregister_toolbar_item(self, item_id):
def deregister_toolbar_item(self, item_id):
for (i, toolbar) in enumerate(admin_pages):
if toolbar[0] == item_id:
del self.toolbar_items[i]
@ -87,7 +87,7 @@ class MenuManager(component.Component):
def register_admin_page(self, id, title, url):
self.admin_pages.append((id, title, url))
def unregister_admin_page(page_id):
def deregister_admin_page(page_id):
for (i, (id, title, url)) in list(enumerate(admin_pages)):
if id == page_id:
del self.admin_pages[i]
@ -97,7 +97,7 @@ class MenuManager(component.Component):
def register_detail_tab(self, id, title, page):
self.detail_tabs.append((id, title, page))
def unregister_detail_tab(self, tab_id):
def deregister_detail_tab(self, tab_id):
for (i, (id, title, tab)) in list(enumerate(detail_tabs)):
if id == tab_id:
del self.detail_tabs[i]
@ -122,7 +122,7 @@ class PageManager(component.Component):
self.urls.append(klass.__name__)
self.page_classes[klass.__name__] = klass
def unregister_page(self, url):
def deregister_page(self, url):
raise NotImplemenetedError()
#self.page_classes[klass.__name__] = None
@ -174,7 +174,7 @@ class ConfigPageManager(component.Component):
form.group = group
self.blocks[name] = form
def unregister(self, name):
def deregister(self, name):
del self.blocks[name]
class PluginApi(component.Component):

View File

@ -73,7 +73,7 @@ class subclassed_render(object):
self.plugin_renderers.append(template.render(path , cache=False))
@logcall
def unregister_template_path(self, path):
def deregister_template_path(self, path):
for i, renderer in list(ennumerate(self.plugin_renderers)):
if renderer.loc == path:
del self.plugin_renderers[i]