mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
Use the Carbon scrap manager interface if the old interface isn't available.
This commit is contained in:
parent
420ed40344
commit
ad8381a8f0
3 changed files with 22 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue