setup (patch): "add url" ui glitch

John Marshall johnm@falch.net
Mon May 6 02:41:00 GMT 2002


Reproducible with the current 2.192.4.26 setup.exe:

1. in the mirror selection dialog, start with no mirrors selected, so
   that the Next button is not active
2. enter a User URL and press Add
3. your new mirror is selected, but Next is not active
4. click on your selected mirror -- it stays selected, and Next magically
   activates

Suggested fix is below (I haven't tested it because I'm not set up to
build setup, but it's Fairly Trivial (tm)).  The "official" in the
comment suggests that this was once intentional, but the behaviour in
step 4 above seems to demonstrate that it doesn't make sense anymore.

2002-05-06  John Marshall  <jmarshall@acm.org>

	* site.cc (SitePage::OnMessageCmd): recalculate navigation
	button activation when "Add" is pressed.
	(SitePage::CheckControlsAndDisableAccordingly): tweak comment.

--- site.cc.orig	Mon May  6 11:09:22 2002
+++ site.cc	Mon May  6 11:29:22 2002
@@ -338,7 +338,7 @@ SitePage::CheckControlsAndDisableAccordi
   // Check that at least one download site is selected.
   if (SendMessage (GetDlgItem (IDC_URL_LIST), LB_GETSELCOUNT, 0, 0) > 0)
     {
-      // At least one official site selected, enable "Next".
+      // At least one site selected, enable "Next".
       ButtonFlags |= PSWIZB_NEXT;
     }
   GetOwner ()->SetButtons (ButtonFlags);
@@ -423,6 +423,7 @@ bool SitePage::OnMessageCmd (int id, HWN
 
 	    // Update the list box.
 	    PopulateListBox ();
+	    CheckControlsAndDisableAccordingly ();
 	    eset (GetHWND (), IDC_EDIT_USER_URL, "");
 	    }
 	  }



More information about the Cygwin-apps mailing list