Fix window.setfont() to call drawing_setfont internally.
This commit is contained in:
parent
324aa79f66
commit
db46c0e4f8
|
@ -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[] = {
|
||||||
|
|
Loading…
Reference in New Issue