Changeset 5956 for main/waeup.sirp/trunk/src
- Timestamp:
- 22 Apr 2011, 01:37:43 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/interfaces.py
r5955 r5956 14 14 from waeup.sirp.permissions import RoleSource 15 15 16 class ITheme Provider(Interface):16 class IThemesProvider(Interface): 17 17 """A component that delivers all themes defined. 18 18 … … 37 37 """ 38 38 39 class Theme Source(BasicSourceFactory):39 class ThemesSource(BasicSourceFactory): 40 40 """A source for themes. 41 41 """ … … 43 43 """Get names of themes. 44 44 """ 45 theme _provider = getUtility(IThemeProvider, name="default")46 return [x for x, y in theme _provider()]45 themes_provider = getUtility(IThemesProvider, name="default") 46 return [x for x, y in themes_provider()] 47 47 48 48 def getTitle(self, value): 49 49 """Get a user-presentable description for a theme. 50 50 """ 51 theme _provider = getUtility(IThemeProvider, name="default")52 for name, theme in theme _provider():51 themes_provider = getUtility(IThemesProvider, name="default") 52 for name, theme in themes_provider(): 53 53 if name == value: 54 54 return theme.description 55 55 return u'unnamed' 56 56 57 class Theme SourceBinder(object):57 class ThemesSourceBinder(object): 58 58 """A source binder for the `ThemeSource`. 59 59 … … 77 77 78 78 def __call__(self, context): 79 return Theme Source()79 return ThemesSource() 80 80 81 81 class FatalCSVError(Exception): … … 111 111 title = u'Skin', 112 112 default = u'waeuptheme-gray1.css', 113 source = Theme SourceBinder(),113 source = ThemesSourceBinder(), 114 114 required = True, 115 115 )
Note: See TracChangeset for help on using the changeset viewer.