Author: jmorliaguet
Date: Fri Nov 25 11:17:49 2005
New Revision: 1926

Modified:
   cpsskins/branches/jmo-perspectives/elements/display.py
Log:

- using getUtility



Modified: cpsskins/branches/jmo-perspectives/elements/display.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/elements/display.py      (original)
+++ cpsskins/branches/jmo-perspectives/elements/display.py      Fri Nov 25 
11:17:49 2005
@@ -33,7 +33,6 @@
 from cpsskins.relations.tool import RelationTool
 from cpsskins.ontology import hasDisplay, hasDisplayFromPerspective
 from cpsskins.engines.default.displays.storage import IDisplayStorage
-from cpsskins.utils import getThemeManager
 
 class Display(Element):
 
@@ -124,9 +123,7 @@
         return default
 
     def storeDisplay(self, display):
-        tmutil = getThemeManager()
-        theme = tmutil.getThemeInContext(self.context)
-        displays = theme.getStorage(IDisplayStorage)
+        displays = getUtility(IDisplayStorage, context=self.context)
         return displays.add(display)
 
     def cloneDisplay(self, display):
@@ -191,11 +188,7 @@
         """Remove a display.
         """
         context = self.context
-
-        tmutil = getThemeManager()
-        theme = tmutil.getThemeInContext(context)
-        displays = theme.getStorage(IDisplayStorage)
-
+        displays = getUtility(IDisplayStorage, context=context)
         display = IDisplayable(context).getDisplay(perspective)
 
         # Remove the relation
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to