X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/71581f966353977ea2ee12e2ec02ac5905fdcb5d..a8cb2b6e5d990202130377e86280a6e1e3d52c02:/mac/macctrls.c?ds=sidebyside diff --git a/mac/macctrls.c b/mac/macctrls.c index 55614531..fe49392d 100644 --- a/mac/macctrls.c +++ b/mac/macctrls.c @@ -298,6 +298,22 @@ static void macctrl_layoutset(struct mac_layoutstate *curstate, cols[0] = *curstate; ncols = 1; + /* Draw a title, if we have one. */ + if (!s->boxname && s->boxtitle) { + union control c; + c.text.label = dupstr(s->boxtitle); + macctrl_text(mcs, window, &cols[0], &c); + /* FIXME: should be highlighted, centred or boxed */ + } + + /* Start a containing box, if we have a boxname. */ + /* FIXME: draw a box, not just its title */ + if (s->boxname && *s->boxname && s->boxtitle) { + union control c; + c.text.label = dupstr(s->boxtitle); + macctrl_text(mcs, window, &cols[0], &c); + } + for (i = 0; i < s->ncontrols; i++) { union control *ctrl = s->ctrls[i]; @@ -1409,9 +1425,18 @@ void dlg_refresh(union control *ctrl, void *dlg) { struct macctrls *mcs = dlg; union macctrl *mc; + int i; - if (ctrl == NULL) - return; /* FIXME */ + if (ctrl == NULL) { + /* NULL means refresh every control */ + for (i = 0 ; i < mcs->npanels; i++) { + for (mc = mcs->panels[i]; mc != NULL; mc = mc->generic.next) { + ctrlevent(mcs, mc, EVENT_REFRESH); + } + } + return; + } + /* Just refresh a specific control */ mc = findbyctrl(mcs, ctrl); assert(mc != NULL); ctrlevent(mcs, mc, EVENT_REFRESH);