[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZMI - Addable.py:1.1.2.4 zmi.zcml:1.1.2.3
Paul Everitt
paul@zope.com
Thu, 28 Feb 2002 18:25:23 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/ZMI
In directory cvs.zope.org:/tmp/cvs-serv4636
Modified Files:
Tag: Zope-3x-branch
Addable.py zmi.zcml
Log Message:
Changed addables to have methods and protected the methods with
Zope.Public.
=== Zope3/lib/python/Zope/App/ZMI/Addable.py 1.1.2.3 => 1.1.2.4 ===
class Addable:
- def __init__(self, id, title, description):
- self.id=id
- self.title=title
- self.description=description
+ def __init__(self, id, title, description, icon=None):
+ self.__id = id
+ self.__title = title
+ self.__description = description
+ self.__icon = icon
+ def id(self): return self.__id
+ def title(self): return self.__title
+ def description(self): return self.__description
+ def icon(self): return self.__icon
+
def __eq__(self, other):
try:
- i, t, d = other.id, other.title, other.description
+ i, t, d = other.__id, other.__title, other.__description
except AttributeError:
return 0
- return self.id == i and self.title == t and self.description == d
+ return self.__id == i and self.__title == t and self.__description == d
- def __repr__(self):
- return "%(id)s: %(title)s\n\n%(description)s" % self.__dict__
=== Zope3/lib/python/Zope/App/ZMI/zmi.zcml 1.1.2.2 => 1.1.2.3 ===
permission_id="Zope.View"/>
+<security:protectClass name="Zope.App.ZMI.Addable."
+ permission_id="Zope.Public"
+ methods="id, title, description, icon" />
+
<security:protectClass name="Zope.App.ZMI.ZMIViewUtility."
permission_id="Zope.View"
method="getZMIViews"/>