mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +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
|
|
@ -430,7 +430,10 @@ class EditText(Wbase.SelectableWidget, _ScrollWidget):
|
|||
selbegin, selend = self.ted.WEGetSelection()
|
||||
if selbegin == selend:
|
||||
return
|
||||
Scrap.ZeroScrap()
|
||||
if hasattr(Scrap, 'ZeroScrap'):
|
||||
Scrap.ZeroScrap()
|
||||
else:
|
||||
Scrap.ClearCurrentScrap()
|
||||
self.ted.WECopy()
|
||||
self.updatescrollbars()
|
||||
|
||||
|
|
@ -438,7 +441,10 @@ class EditText(Wbase.SelectableWidget, _ScrollWidget):
|
|||
selbegin, selend = self.ted.WEGetSelection()
|
||||
if selbegin == selend:
|
||||
return
|
||||
Scrap.ZeroScrap()
|
||||
if hasattr(Scrap, 'ZeroScrap'):
|
||||
Scrap.ZeroScrap()
|
||||
else:
|
||||
Scrap.ClearCurrentScrap()
|
||||
self.ted.WECut()
|
||||
self.updatescrollbars()
|
||||
self.selview()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue