From: owen Date: Sat, 5 Feb 2005 14:50:42 +0000 (+0000) Subject: Implement refreshing the whole dialogue box with dlg_refresh, so that X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/d46a9154e9a0e15f9e4561a1f7f563e21f211208?hp=99c654164f1b7c4dd8d05d44d9b57d0cdf01510a Implement refreshing the whole dialogue box with dlg_refresh, so that if you load a session all the panels in the configuration dialogue reflect the new settings. However, there's a glitch which paints a white rectangle between the Saved Sessions listbox and the Close-on-exit radios. git-svn-id: svn://svn.tartarus.org/sgt/putty@5256 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/mac/macctrls.c b/mac/macctrls.c index 55614531..450b1cd1 100644 --- a/mac/macctrls.c +++ b/mac/macctrls.c @@ -1409,9 +1409,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);