Implement refreshing the whole dialogue box with dlg_refresh, so that
authorowen <owen@cda61777-01e9-0310-a592-d414129be87e>
Sat, 5 Feb 2005 14:50:42 +0000 (14:50 +0000)
committerowen <owen@cda61777-01e9-0310-a592-d414129be87e>
Sat, 5 Feb 2005 14:50:42 +0000 (14:50 +0000)
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

mac/macctrls.c

index 5561453..450b1cd 100644 (file)
@@ -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);