Adapted to new cutbuffer interface.

This commit is contained in:
Guido van Rossum 1990-12-26 15:40:31 +00:00
parent 217a5fa3c3
commit 67c9b8cdad
2 changed files with 8 additions and 8 deletions

View File

@ -19,18 +19,18 @@ def fixsize(w):
def cut(w, m, id):
s = w.text.getfocustext()
if s:
stdwin.setcutbuffer(s)
stdwin.setcutbuffer(0, s)
w.text.replace('')
fixsize(w)
def copy(w, m, id):
s = w.text.getfocustext()
if s:
stdwin.setcutbuffer(s)
stdwin.setcutbuffer(0, s)
fixeditmenu(w)
def paste(w, m, id):
w.text.replace(stdwin.getcutbuffer())
w.text.replace(stdwin.getcutbuffer(0))
fixsize(w)
def addeditmenu(w):
@ -50,7 +50,7 @@ def fixeditmenu(w):
m.enable(1, can_copy)
if not w.readonly:
m.enable(0, can_copy)
m.enable(2, (stdwin.getcutbuffer() <> ''))
m.enable(2, (stdwin.getcutbuffer(0) <> ''))
def draw(w, area): # Draw method
w.text.draw(area)

View File

@ -19,18 +19,18 @@ def fixsize(w):
def cut(w, m, id):
s = w.text.getfocustext()
if s:
stdwin.setcutbuffer(s)
stdwin.setcutbuffer(0, s)
w.text.replace('')
fixsize(w)
def copy(w, m, id):
s = w.text.getfocustext()
if s:
stdwin.setcutbuffer(s)
stdwin.setcutbuffer(0, s)
fixeditmenu(w)
def paste(w, m, id):
w.text.replace(stdwin.getcutbuffer())
w.text.replace(stdwin.getcutbuffer(0))
fixsize(w)
def addeditmenu(w):
@ -50,7 +50,7 @@ def fixeditmenu(w):
m.enable(1, can_copy)
if not w.readonly:
m.enable(0, can_copy)
m.enable(2, (stdwin.getcutbuffer() <> ''))
m.enable(2, (stdwin.getcutbuffer(0) <> ''))
def draw(w, area): # Draw method
w.text.draw(area)