This is the same as the previous patch series with one cosmetic
improvement: I've now made user URLs sort last, so that the
distinction between user URLs and cygwin.com mirrors is visually more
clear.
Ken Brown (5):
Add checkbox IDC_ALLOW_USER_URL to IDD_SITE dialog
Set the initial state of ID
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 +
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| 15 +++
3 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/res.rc b/res.rc
index a4d7e70..b5dcb3e 100644
--- a/res.rc
Also fix load_site_list() so that when a mirror replaces an existing
entry, the sort order is updated.
Change site_list_type::operator== to compare URLs instead of sort
keys, since the key of a user URL no longer depends solely on the URL.
Introduce a new helper function merge_site().
---
site.c
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
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 0222ec9..9
---
site.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/site.cc b/site.cc
index 641a6bb..64e56a8 100644
--- a/site.cc
+++ b/site.cc
@@ -759,7 +759,9 @@ bool SitePage::OnMessageCmd (int id, HWND hwndctl, UINT
code)
{
case IDC_EDIT_USER_URL:
{
- //
On 2017-11-27 10:04, Ken Brown wrote:
> My cygport file is attached.
GTG; package is yours now. Thanks!
--
Yaakov
signature.asc
Description: OpenPGP digital signature
On 12/4/2017 10:18 AM, Ken Brown wrote:
This is the same as the previous patch series with one cosmetic
improvement: I've now made user URLs sort last, so that the
distinction between user URLs and cygwin.com mirrors is visually more
clear.
Sorry for repeatedly responding to myself, but I think