5 for i, r in enumerate(self):
6 if r.weight > item.weight:
12 def find_by_name(self, name):
14 if i.name and (i.name == name):
17 def remove_by_name(self, name):
18 for i, r in enumerate(self):
19 if r.name and (r.name == name):
23 HEAD_CONTENT = 'HEAD_CONTENT'
24 HEADER_LINKS = 'HEADER_LINKS'
25 PAGE_TOP_TABS = 'PAGE_TOP_TABS'
26 FOOTER_LINKS = 'FOOTER_LINKS'
27 PROFILE_TABS = 'PROFILE_TABS'
29 USER_MENU = 'USER_MENU'
33 HEAD_CONTENT: Registry(),
34 HEADER_LINKS: Registry(),
35 PAGE_TOP_TABS: Registry(),
36 FOOTER_LINKS: Registry(),
37 PROFILE_TABS: Registry(),
39 USER_MENU: Registry(),
43 def register(registry, *ui_objects):
44 if not registry in __CONTAINER:
45 raise('unknown registry')
47 for ui_object in ui_objects:
48 __CONTAINER[registry].add(ui_object)
50 def get_registry_by_name(name):
53 if not name in __CONTAINER:
54 raise('unknown registry')
56 return __CONTAINER[name]
60 from ui_objects import *