mirror of
https://github.com/python/cpython.git
synced 2025-10-22 14:42:22 +00:00
Fix window.setfont() to call drawing_setfont internally.
This commit is contained in:
parent
324aa79f66
commit
db46c0e4f8
1 changed files with 3 additions and 6 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue