Re: [PATCH setup 1/4] Add checkbox IDC_ALLOW_USER_URL to IDD_SITE dialog

2017-12-03 Thread Ken Brown
On 12/3/2017 10:22 AM, Ken Brown wrote: Enable the "User URL" edit box and "Add" button only if IDC_ALLOW_USER_URL is checked. --- res.rc | 15 --- resource.h | 1 + site.cc| 14 ++ 3 files changed, 23 insertions(+), 7 deletions(-) Sorry, I need to add the

Re: [PATCH setup 0/4] Distinguish between user URLs and cygwin mirrors in UI

2017-12-03 Thread Ken Brown
On 12/3/2017 1:06 PM, Brian Inglis wrote: On 2017-12-03 08:22, Ken Brown wrote: This is a followup to https://cygwin.com/ml/cygwin-apps/2011-04/msg00014.html . In that message Jon suggested splitting site selection into two pages, one for cygwin.com mirrors and one for additional user URLs.

Re: [PATCH setup 0/4] Distinguish between user URLs and cygwin mirrors in UI

2017-12-03 Thread Brian Inglis
On 2017-12-03 08:22, Ken Brown wrote: > This is a followup to > > https://cygwin.com/ml/cygwin-apps/2011-04/msg00014.html . > > In that message Jon suggested splitting site selection into two pages, > one for cygwin.com mirrors and one for additional user URLs. The > latter would be visible on

[PATCH setup 1/4] Add checkbox IDC_ALLOW_USER_URL to IDD_SITE dialog

2017-12-03 Thread Ken Brown
Enable the "User URL" edit box and "Add" button only if IDC_ALLOW_USER_URL is checked. --- res.rc | 15 --- resource.h | 1 + site.cc| 14 ++ 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/res.rc b/res.rc index a4d7e70..b5dcb3e 100644 --- a/res.rc

[PATCH setup 3/4] Adjust site list if IDC_ALLOW_USER_URL is unchecked

2017-12-03 Thread Ken Brown
If the user unchecks the box, remove all sites except for fresh mirrors and selected stale mirrors. Introduce a new function remove_user_urls() to help with this --- site.cc | 35 +++ 1 file changed, 35 insertions(+) diff --git a/site.cc b/site.cc index dbb07d4..d

[PATCH setup 0/4] Distinguish between user URLs and cygwin mirrors in UI

2017-12-03 Thread Ken Brown
This is a followup to https://cygwin.com/ml/cygwin-apps/2011-04/msg00014.html . In that message Jon suggested splitting site selection into two pages, one for cygwin.com mirrors and one for additional user URLs. The latter would be visible only if the user had previously checked a suitable che

[PATCH setup 4/4] Display full URL of non-mirrors in the site list

2017-12-03 Thread Ken Brown
Set displayed_url to full URL in the site_list_type constructor if from_mirrors_lst is false. Modify check_for_user_urls() to change displayed_url back to the short form if a site in all_site_list turns out to be a stale mirror. --- site.cc | 32 +--- 1 file changed, 2

[PATCH setup 2/4] Set the initial state of IDC_ALLOW_USER_URL

2017-12-03 Thread Ken Brown
It starts checked if all_site_list contains a site that is not a cygwin.com mirror. Such a site would have to come from the "last-mirror" user setting, indicating that the user used a non-mirror on the last run. Introduce a new function check_for_user_urls() to help with this. --- site.cc | 26 +