[Zope3-checkins] CVS: Zope3/src/zope/app - configure.zcml:1.9.2.2 copy.py:1.2.2.7
Sidnei da Silva
sidnei@x3ng.com.br
Wed, 5 Feb 2003 07:43:28 -0500
Update of /cvs-repository/Zope3/src/zope/app
In directory cvs.zope.org:/tmp/cvs-serv24753/src/zope/app
Modified Files:
Tag: paris-copypasterename-branch
configure.zcml copy.py
Log Message:
Trying to get physically located :P
=== Zope3/src/zope/app/configure.zcml 1.9.2.1 => 1.9.2.2 ===
--- Zope3/src/zope/app/configure.zcml:1.9.2.1 Wed Feb 5 06:00:32 2003
+++ Zope3/src/zope/app/configure.zcml Wed Feb 5 07:42:55 2003
@@ -74,10 +74,10 @@
for="*" />
<adapter
- factory="zope.app.copy.AnnotatableUserClipboard"
- provides="zope.app.interfaces.copy.IAnnotatableUserClipboard"
+ factory="zope.app.copy.PrincipalClipboard"
+ provides="zope.app.interfaces.copy.IPrincipalClipboard"
permission="zope.ManageContent"
- for="zope.app.interfaces.services.auth.IAnnotatableUser" />
+ for="zope.app.interfaces.annotation.IAnnotations" />
<include package="zope.app.container" />
<include package="zope.app.content" />
=== Zope3/src/zope/app/copy.py 1.2.2.6 => 1.2.2.7 ===
--- Zope3/src/zope/app/copy.py:1.2.2.6 Wed Feb 5 05:09:11 2003
+++ Zope3/src/zope/app/copy.py Wed Feb 5 07:42:55 2003
@@ -164,17 +164,16 @@
pastetarget = getAdapter(target, IPasteTarget)
return pastetarget.acceptsObject(name, obj)
-class AnnotatableUserClipboard:
+class PrincipalClipboard:
'''Clipboard information consists on tuples of {'action':action, 'target':target}.
'''
- def __init__(self, user):
- self.context = user
- self.annotations = AttributeAnnotations(user)
+ def __init__(self, annotation):
+ self.context = annotation
def clearContents(self):
'''Clear the contents of the clipboard'''
- self.annotations['clipboard'] = ()
+ self.context['clipboard'] = ()
def addItems(self, action, targets):
'''Add new items to the clipboard'''
@@ -182,13 +181,13 @@
actions = []
for target in targets:
actions.append({'action':action, 'target':target})
- self.annotations['clipboard'] = contents + tuple(actions)
+ self.context['clipboard'] = contents + tuple(actions)
def setContents(self, clipboard):
'''Replace the contents of the clipboard by the given value'''
- self.annotations['clipboard'] = clipboard
+ self.context['clipboard'] = clipboard
def getContents(self):
'''Return the contents of the clipboard'''
- return removeAllProxies(self.annotations.get('clipboard', ()))
+ return removeAllProxies(self.context.get('clipboard', ()))