[Zope3-checkins] CVS: zopeproducts/zwiki - wiki_icon.gif:1.1 wikipage_icon.gif:1.1 configure.zcml:1.3 zwiki.py:1.3

Stephan Richter srichter@cbu.edu
Sat, 5 Apr 2003 20:01:34 -0500


Update of /cvs-repository/zopeproducts/zwiki
In directory cvs.zope.org:/tmp/cvs-serv24757

Modified Files:
	configure.zcml zwiki.py 
Added Files:
	wiki_icon.gif wikipage_icon.gif 
Log Message:
Added icons.


=== Added File zopeproducts/zwiki/wiki_icon.gif ===
  <Binary-ish file>

=== Added File zopeproducts/zwiki/wikipage_icon.gif ===
  <Binary-ish file>

=== zopeproducts/zwiki/configure.zcml 1.2 => 1.3 ===
--- zopeproducts/zwiki/configure.zcml:1.2	Sat Apr  5 16:38:10 2003
+++ zopeproducts/zwiki/configure.zcml	Sat Apr  5 20:01:03 2003
@@ -88,6 +88,12 @@
       action="Wiki"
       description="A simple Wiki."/>
 
+  <browser:icon
+      name="zmi_icon"
+      for=".interfaces.IWiki"
+      file="wiki_icon.gif"
+      />
+
   <browser:addform
       name="AddWikiPage"
       schema=".interfaces.IWikiPage"
@@ -121,5 +127,10 @@
       name="view.html"
       for=".interfaces.IWikiPage"/>
 
+  <browser:icon
+      name="zmi_icon"
+      for=".interfaces.IWikiPage"
+      file="wikipage_icon.gif"
+      />
 
 </zopeConfigure>


=== zopeproducts/zwiki/zwiki.py 1.2 => 1.3 ===
--- zopeproducts/zwiki/zwiki.py:1.2	Sat Apr  5 16:38:10 2003
+++ zopeproducts/zwiki/zwiki.py	Sat Apr  5 20:01:03 2003
@@ -57,22 +57,20 @@
 
     def __init__(self, context):
         self.context = context
-        annotations = getAdapter(context, IAnnotations)
-        data = annotations.get(HierarchyKey)
-        if not data:
-            annotations[HierarchyKey] = []
+        self.annotations = getAdapter(context, IAnnotations)
+        data = self.annotations.get(HierarchyKey)
+        if data is None:
+            self.annotations[HierarchyKey] = ()
 
     def reparent(self, parents):
         "See zopeproducts.zwiki.interfaces.IWikiPageHierarchy"
         self.parents = parents
 
     def setParents(self, parents):
-        annotations = getAdapter(self.context, IAnnotations)
-        annotations[HierarchyKey] = parents
+        self.annotations[HierarchyKey] = tuple(parents)
         
     def getParents(self):
-        annotations = getAdapter(self.context, IAnnotations)
-        return annotations[HierarchyKey]
+        return self.annotations[HierarchyKey]
 
     parents = property(getParents, setParents)