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; windowobject *self;
object *args; object *args;
{ {
object *v;
TEXTATTR saveattr, winattr; TEXTATTR saveattr, winattr;
object *str;
if (!getstrarg(args, &str))
return NULL;
wgettextattr(&saveattr); wgettextattr(&saveattr);
wgetwintextattr(self->w_win, &winattr); wgetwintextattr(self->w_win, &winattr);
wsettextattr(&winattr); wsettextattr(&winattr);
wsetfont(getstringvalue(str)); v = drawing_setfont((drawingobject *)NULL, args);
wgettextattr(&winattr); wgettextattr(&winattr);
wsetwintextattr(self->w_win, &winattr); wsetwintextattr(self->w_win, &winattr);
wsettextattr(&saveattr); wsettextattr(&saveattr);
INCREF(None); return v;
return None;
} }
static struct methodlist window_methods[] = { static struct methodlist window_methods[] = {