Fix window.setfont() to call drawing_setfont internally.

This commit is contained in:
Guido van Rossum 1991-04-04 17:26:32 +00:00
parent 324aa79f66
commit db46c0e4f8
1 changed files with 3 additions and 6 deletions

View File

@ -1329,19 +1329,16 @@ window_setfont(self, args)
windowobject *self;
object *args;
{
object *v;
TEXTATTR saveattr, winattr;
object *str;
if (!getstrarg(args, &str))
return NULL;
wgettextattr(&saveattr);
wgetwintextattr(self->w_win, &winattr);
wsettextattr(&winattr);
wsetfont(getstringvalue(str));
v = drawing_setfont((drawingobject *)NULL, args);
wgettextattr(&winattr);
wsetwintextattr(self->w_win, &winattr);
wsettextattr(&saveattr);
INCREF(None);
return None;
return v;
}
static struct methodlist window_methods[] = {