]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Implement refreshing the whole dialogue box with dlg_refresh, so that
authorOwen Dunn <owen@greenend.org.uk>
Sat, 5 Feb 2005 14:50:42 +0000 (14:50 +0000)
committerOwen Dunn <owen@greenend.org.uk>
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.

[originally from svn r5256]

mac/macctrls.c

index 5561453151d14b3db4012848b597ef5f98a69b30..450b1cd1d6b65a56ee4a6c5aeb41257e06289b85 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);