diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2002-02-27 22:28:23 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2002-02-27 22:28:23 (GMT) |
commit | d4d4413252e74b4086a156bb14ad6df7f545cd37 (patch) | |
tree | 0e68baa13da29c42d9341a4345840457ea55be54 | |
parent | 1c649933f82542f4c84aa794a7c70ce355a61958 (diff) | |
download | cpython-d4d4413252e74b4086a156bb14ad6df7f545cd37.zip cpython-d4d4413252e74b4086a156bb14ad6df7f545cd37.tar.gz cpython-d4d4413252e74b4086a156bb14ad6df7f545cd37.tar.bz2 |
Backport of 1.12:
Use the Carbon scrap manager interface if the old interface isn't available.
-rw-r--r-- | Mac/Tools/IDE/Wlists.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Mac/Tools/IDE/Wlists.py b/Mac/Tools/IDE/Wlists.py index 14edeb8..57e8924 100644 --- a/Mac/Tools/IDE/Wlists.py +++ b/Mac/Tools/IDE/Wlists.py @@ -176,8 +176,13 @@ class List(Wbase.SelectableWidget): selitems.append(str(self.items[i])) text = string.join(selitems, '\r') if text: - Scrap.ZeroScrap() - Scrap.PutScrap('TEXT', text) + if hasattr(Scrap, 'PutScrap'): + Scrap.ZeroScrap() + Scrap.PutScrap('TEXT', text) + else: + Scrap.ClearCurrentScrap() + sc = Scrap.GetCurrentScrap() + sc.PutScrapFlavor('TEXT', 0, text) def can_copy(self, *args): return len(self.getselection()) <> 0 |