Changeset 354
- Timestamp:
- 09/19/06 12:09:45 (5 years ago)
- Location:
- z3wingdbg/trunk
- Files:
-
- 2 modified
-
configure.zcml (modified) (1 diff)
-
interfaces.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
z3wingdbg/trunk/configure.zcml
r319 r354 5 5 <!-- vocabulary --> 6 6 <utility 7 provides="zope.schema.interfaces.IVocabularyFactory" 8 component=".interfaces.getServerTypesVocabulary" 7 component=".interfaces.ServerTypesVocabulary" 9 8 name="z3wingdbg.servertypes" 10 9 /> -
z3wingdbg/trunk/interfaces.py
r341 r354 5 5 from zope.component.interfaces import IFactory 6 6 from zope.i18n import MessageFactory 7 8 from zope.app.component.vocabulary import UtilityVocabulary 7 9 8 10 _ = MessageFactory('z3wingdbg') … … 292 294 293 295 # Vocabularies 294 def getServerTypesVocabulary(context):295 """List all available debug server types"""296 types = component.getUtilitiesFor(IDebugServerFactory)297 return schema.vocabulary.SimpleVocabulary.fromValues(t[0] for t in types)296 class ServerTypesVocabulary(UtilityVocabulary): 297 interface.classProvides(schema.interfaces.IVocabularyFactory) 298 interface = IDebugServerFactory 299 nameOnly = True
