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
899adda8
Commit
899adda8
authored
Jan 10, 2001
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added nicer error message if attempt is made to cut/copy with no
items selected (bug 1831).
parent
7b89fc65
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
lib/python/OFS/CopySupport.py
lib/python/OFS/CopySupport.py
+20
-3
No files found.
lib/python/OFS/CopySupport.py
View file @
899adda8
...
...
@@ -83,7 +83,7 @@
#
##############################################################################
__doc__
=
"""Copy interface"""
__version__
=
'$Revision: 1.6
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.6
2
$'
[
11
:
-
2
]
import
sys
,
string
,
Globals
,
Moniker
,
tempfile
,
ExtensionClass
from
marshal
import
loads
,
dumps
...
...
@@ -123,8 +123,13 @@ class CopyContainer(ExtensionClass.Base):
def
manage_CopyContainerAllItems
(
self
,
REQUEST
):
return
map
(
lambda
i
,
s
=
self
:
s
.
_getOb
(
i
),
tuple
(
REQUEST
[
'ids'
]))
def
manage_cutObjects
(
self
,
ids
,
REQUEST
=
None
):
def
manage_cutObjects
(
self
,
ids
=
None
,
REQUEST
=
None
):
"""Put a reference to the objects named in ids in the clip board"""
if
ids
is
None
and
REQUEST
is
not
None
:
return
eNoItemsSpecified
elif
ids
is
None
:
raise
ValueError
,
'ids must be specified'
if
type
(
ids
)
is
type
(
''
):
ids
=
[
ids
]
oblist
=
[]
...
...
@@ -142,8 +147,13 @@ class CopyContainer(ExtensionClass.Base):
return
self
.
manage_main
(
self
,
REQUEST
,
cb_dataValid
=
1
)
return
cp
def
manage_copyObjects
(
self
,
ids
,
REQUEST
=
None
,
RESPONSE
=
None
):
def
manage_copyObjects
(
self
,
ids
=
None
,
REQUEST
=
None
,
RESPONSE
=
None
):
"""Put a reference to the objects named in ids in the clip board"""
if
ids
is
None
and
REQUEST
is
not
None
:
return
eNoItemsSpecified
elif
ids
is
None
:
raise
ValueError
,
'ids must be specified'
if
type
(
ids
)
is
type
(
''
):
ids
=
[
ids
]
oblist
=
[]
...
...
@@ -549,3 +559,10 @@ eNotSupported=fMessageDialog(
title
=
'Not Supported'
,
message
=
'The item <EM>%s</EM> does not support this operation.'
,
action
=
'manage_main'
,)
eNoItemsSpecified
=
MessageDialog
(
title
=
'No items specified'
,
message
=
'You must select one or more items to perform '
\
'this operation.'
,
action
=
'manage_main'
)
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