[z3-checkins] r5741 - in z3/Flon/trunk: . Extensions
dreamcatcher at codespeak.net
dreamcatcher at codespeak.net
Wed Jul 28 02:08:55 MEST 2004
Author: dreamcatcher
Date: Wed Jul 28 02:08:55 2004
New Revision: 5741
Modified:
z3/Flon/trunk/Extensions/Install.py
z3/Flon/trunk/config.py
Log:
Forgot to install skin. Oops.
Modified: z3/Flon/trunk/Extensions/Install.py
==============================================================================
--- z3/Flon/trunk/Extensions/Install.py (original)
+++ z3/Flon/trunk/Extensions/Install.py Wed Jul 28 02:08:55 2004
@@ -20,8 +20,10 @@
"""
from cStringIO import StringIO
-from Products.CMFCore.utils import getToolByName
+from Globals import package_home
+from Products.CMFCore.utils import getToolByName, minimalpath
from Products.Flon.tools.interface import InterfaceTool
+from Products.Flon.config import SKINS, GLOBALS
tool_id = InterfaceTool.id
meta_type = InterfaceTool.meta_type
@@ -56,9 +58,36 @@
else:
out.write('Marker action icon was already installed.\n')
+def install_skins(self, out):
+ skins_tool = getToolByName(self, 'portal_skins')
+ out.write('Registering skins\n')
+
+ CONTENT_HOME = package_home(GLOBALS)
+ for skin in SKINS:
+ if skin in skins_tool.objectIds():
+ continue
+
+ skins_tool.manage_addProduct['CMFCore'].manage_addDirectoryView(
+ filepath = minimalpath("%s/%s" % (CONTENT_HOME, skin))
+ )
+
+ out.write('Registered %s Directory View.\n' % skin)
+
+ skins = skins_tool.getSkinPaths()
+
+ for skin_name, skin_path in skins:
+ path_elems = [p.strip() for p in skin_path.split(',')]
+ for skin in SKINS:
+ if skin not in path_elems:
+ path_elems.insert(1, skin)
+ new_path = ', '.join(path_elems)
+ skins_tool.addSkinSelection(skin_name, new_path)
+ out.write('Finished registering skins.\n')
+
def install(self, out=None):
if out is None:
out = StringIO()
install_tool(self, out)
+ install_skins(self, out)
install_actions(self, out)
return out.getvalue()
Modified: z3/Flon/trunk/config.py
==============================================================================
--- z3/Flon/trunk/config.py (original)
+++ z3/Flon/trunk/config.py Wed Jul 28 02:08:55 2004
@@ -19,3 +19,4 @@
$Id: __init__.py,v 1.2 2004/07/14 22:23:16 dreamcatcher Exp $
"""
GLOBALS = globals()
+SKINS = ('flon',)
More information about the z3-checkins
mailing list