Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
c32aa00c
Commit
c32aa00c
authored
Mar 06, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a manage_paste.
Made pasteFromClipboard no longer web callable.
parent
c40ace88
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
lib/python/OFS/CopySupport.py
lib/python/OFS/CopySupport.py
+9
-10
No files found.
lib/python/OFS/CopySupport.py
View file @
c32aa00c
"""Copy interface"""
"""Copy interface"""
__version__
=
'$Revision: 1.
9
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
10
$'
[
11
:
-
2
]
import
Globals
,
Moniker
,
rPickle
,
tempfile
import
Globals
,
Moniker
,
rPickle
,
tempfile
from
cPickle
import
loads
,
dumps
from
cPickle
import
loads
,
dumps
...
@@ -9,8 +9,6 @@ from App.Dialogs import MessageDialog
...
@@ -9,8 +9,6 @@ from App.Dialogs import MessageDialog
rPickle
.
register
(
'OFS.Moniker'
,
'Moniker'
,
Moniker
.
Moniker
)
rPickle
.
register
(
'OFS.Moniker'
,
'Moniker'
,
Moniker
.
Moniker
)
class
CopyContainer
:
class
CopyContainer
:
# Interface for containerish objects which allow
# Interface for containerish objects which allow
# objects to be copied into them.
# objects to be copied into them.
...
@@ -29,7 +27,6 @@ class CopyContainer:
...
@@ -29,7 +27,6 @@ class CopyContainer:
return
v
return
v
def
pasteFromClipboard
(
self
,
clip_id
=
''
,
clip_data
=
''
,
REQUEST
=
None
):
def
pasteFromClipboard
(
self
,
clip_id
=
''
,
clip_data
=
''
,
REQUEST
=
None
):
""" """
if
not
clip_data
:
return
eNoData
if
not
clip_data
:
return
eNoData
try
:
moniker
=
rPickle
.
loads
(
unquote
(
clip_data
))
try
:
moniker
=
rPickle
.
loads
(
unquote
(
clip_data
))
...
@@ -46,17 +43,19 @@ class CopyContainer:
...
@@ -46,17 +43,19 @@ class CopyContainer:
obj
=
obj
.
_getCopy
(
self
)
obj
=
obj
.
_getCopy
(
self
)
# Acquire roles from new environment
return
self
.
manage_paste
(
clip_id
,
obj
,
REQUEST
)
try
:
del
obj
.
__roles__
except
:
pass
def
manage_paste
(
self
,
clip_id
,
obj
,
REQUEST
=
None
):
""" """
obj
=
obj
.
_getCopy
(
self
)
obj
.
_setId
(
clip_id
)
obj
.
_setId
(
clip_id
)
self
.
_setObject
(
clip_id
,
obj
)
self
.
_setObject
(
clip_id
,
obj
)
obj
.
_postCopy
(
self
)
obj
.
_postCopy
(
self
)
if
REQUEST
is
not
None
:
return
self
.
manage_main
(
self
,
REQUEST
,
update_menu
=
1
)
return
self
.
manage_main
(
self
,
REQUEST
,
update_menu
=
1
)
return
''
Globals
.
default__class_init__
(
CopyContainer
)
class
CopySource
:
class
CopySource
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment