public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [setup - the official Cygwin setup program] branch master, updated. release_2.909-19-gce21a9a9
@ 2021-11-11 13:26 Jon TURNEY
0 siblings, 0 replies; only message in thread
From: Jon TURNEY @ 2021-11-11 13:26 UTC (permalink / raw)
To: cygwin-apps-cvs
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=ce21a9a994d108c491aeb7dbadfa9ecbdec235f1
commit ce21a9a994d108c491aeb7dbadfa9ecbdec235f1
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Mon May 10 19:42:13 2021 +0100
Push some dynamic download/install dialog text into IDD_DESKTOP DIALOG resource
Move the localizable dialog text which is dynamically modified depending
on install or download mode into the IDD_DESKTOP DIALOG resource, and
show or hide it as appropriate.
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=24f8fc6cf9ae2bf7c7cff5410aff0b8818278910
commit 24f8fc6cf9ae2bf7c7cff5410aff0b8818278910
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Mon May 10 19:01:38 2021 +0100
Push some dynamic download/install dialog text into IDD_CHOOSE DIALOG resource
Move the localizable dialog text which is dynamically modified depending
on install or download mode into the IDD_CHOOSE DIALOG resource, and
show or hide it as appropriate.
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=147fc15d0222e050779b18a209991c258d85944f
commit 147fc15d0222e050779b18a209991c258d85944f
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Fri Oct 1 15:34:53 2021 +0100
Make '--quiet' imply 'download and install packages'
Make '--quiet' imply 'download and install packages', rather than
'whatever source mode was chosen in the last run'. This aligns
behaviour with the help text about installation type.
This can be overriden with '--download' or '--local-install'. Specifying
both already has the meaning 'download and install packages', but let's
not require than in combination with '--quiet' to get definite
behaviour.
Diff:
---
choose.cc | 15 +++++----------
choose.h | 1 -
desktop.cc | 22 +++++++++-------------
res.rc | 14 +++++++++-----
resource.h | 7 ++++++-
source.cc | 6 +++---
6 files changed, 32 insertions(+), 33 deletions(-)
diff --git a/choose.cc b/choose.cc
index 44148283..cc3fa07c 100644
--- a/choose.cc
+++ b/choose.cc
@@ -241,12 +241,6 @@ ChooserPage::Create ()
return PropertyPage::Create (IDD_CHOOSE);
}
-void
-ChooserPage::setPrompt(char const *aString)
-{
- ::SetWindowText (GetDlgItem (IDC_CHOOSE_INST_TEXT), aString);
-}
-
void
ChooserPage::OnInit ()
{
@@ -266,10 +260,11 @@ ChooserPage::OnInit ()
SendMessageW(viewlist, CB_ADDSTRING, 0, (LPARAM)mode.c_str());
}
- if (source == IDC_SOURCE_DOWNLOAD)
- setPrompt("Select packages to download ");
- else
- setPrompt("Select packages to install ");
+ /* Only show text appropriate to download/install mode */
+ ShowWindow(GetDlgItem (IDC_CHOOSE_INST_TEXT_DOWNLOAD),
+ (source == IDC_SOURCE_DOWNLOAD) ? SW_SHOW : SW_HIDE);
+ ShowWindow(GetDlgItem (IDC_CHOOSE_INST_TEXT_INSTALL),
+ (source != IDC_SOURCE_DOWNLOAD) ? SW_SHOW : SW_HIDE);
createListview ();
diff --git a/choose.h b/choose.h
index e4953b73..1b295e96 100644
--- a/choose.h
+++ b/choose.h
@@ -56,7 +56,6 @@ private:
void changeTrust(int button, bool test, bool initial);
void logOnePackageResult(packagemeta const *aPkg);
void logResults();
- void setPrompt(char const *aPrompt);
void PlaceDialog (bool);
void applyCommandLinePackageSelection();
void initialUpdateState();
diff --git a/desktop.cc b/desktop.cc
index 29dbf635..465e8f9f 100644
--- a/desktop.cc
+++ b/desktop.cc
@@ -243,8 +243,6 @@ set_status (HWND h)
}
}
-static char *header_string = NULL;
-static char *message_string = NULL;
static void
load_dialog (HWND h)
{
@@ -253,21 +251,19 @@ load_dialog (HWND h)
// Don't need the checkboxes
EnableWindow (GetDlgItem (h, IDC_ROOT_DESKTOP), FALSE);
EnableWindow (GetDlgItem (h, IDC_ROOT_MENU), FALSE);
- if (header_string == NULL)
- header_string = eget (h, IDC_STATIC_HEADER_TITLE, header_string);
- if (message_string == NULL)
- message_string = eget (h, IDC_STATIC_HEADER, message_string);
- eset (h, IDC_STATIC_HEADER_TITLE, "Installation complete");
- eset (h, IDC_STATIC_HEADER, "Shows installation status in download-only mode.");
- }
+ ShowWindow (GetDlgItem(h, IDC_DESKTOP_HEADER_DOWNLOAD), SW_SHOW);
+ ShowWindow (GetDlgItem(h, IDC_DESKTOP_HEADER_TITLE_DOWNLOAD), SW_SHOW);
+ ShowWindow (GetDlgItem(h, IDC_DESKTOP_HEADER_INSTALL), SW_HIDE);
+ ShowWindow (GetDlgItem(h, IDC_DESKTOP_HEADER_TITLE_INSTALL), SW_HIDE);
+ }
else
{
EnableWindow (GetDlgItem (h, IDC_ROOT_DESKTOP), TRUE);
EnableWindow (GetDlgItem (h, IDC_ROOT_MENU), TRUE);
- if (header_string != NULL)
- eset (h, IDC_STATIC_HEADER_TITLE, header_string);
- if (message_string != NULL)
- eset (h, IDC_STATIC_HEADER, message_string);
+ ShowWindow (GetDlgItem(h, IDC_DESKTOP_HEADER_DOWNLOAD), SW_HIDE);
+ ShowWindow (GetDlgItem(h, IDC_DESKTOP_HEADER_TITLE_DOWNLOAD), SW_HIDE);
+ ShowWindow (GetDlgItem(h, IDC_DESKTOP_HEADER_INSTALL), SW_SHOW);
+ ShowWindow (GetDlgItem(h, IDC_DESKTOP_HEADER_TITLE_INSTALL), SW_SHOW);
rbset (h, da, root_desktop);
rbset (h, ma, root_menu);
}
diff --git a/res.rc b/res.rc
index c3d075ef..7fc0ee57 100644
--- a/res.rc
+++ b/res.rc
@@ -284,9 +284,11 @@ BEGIN
CONTROL "",IDC_HEADSEPARATOR,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
SETUP_STANDARD_DIALOG_W,1
LTEXT "Tell setup if you want it to create a few icons for convenient access to the Cygwin environment.",
- IDC_STATIC_HEADER,21,9,239,16,NOT WS_GROUP
- LTEXT "Create Icons",IDC_STATIC_HEADER_TITLE,7,0,258,8,NOT
- WS_GROUP
+ IDC_DESKTOP_HEADER_INSTALL,21,9,239,16,NOT WS_GROUP
+ LTEXT "Create Icons",IDC_DESKTOP_HEADER_TITLE_INSTALL,7,0,258,8,NOT WS_GROUP
+ LTEXT "Shows installation status in download-only mode.",
+ IDC_DESKTOP_HEADER_DOWNLOAD,21,9,239,16,NOT WS_GROUP
+ LTEXT "Installation complete",IDC_DESKTOP_HEADER_TITLE_DOWNLOAD,7,0,258,8,NOT WS_GROUP
CONTROL "",IDC_DESKTOP_SEPARATOR,"Static",SS_BLACKFRAME | SS_SUNKEN,
0,135,SETUP_STANDARD_DIALOG_W,1
LTEXT "Installation Status",IDC_STATUS_HEADER,7,140,258,8,NOT WS_GROUP
@@ -365,8 +367,10 @@ BEGIN
CONTROL "&Hide obsolete packages", IDC_CHOOSE_HIDE,
"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 7, 167, 160, 14
ICON IDI_CYGWIN, IDC_HEADICON, SETUP_HEADICON_X, 0, 21, 20
- LTEXT "Select the packages you want setup to install.",
- IDC_CHOOSE_INST_TEXT, 21, 9, 239, 16, NOT WS_GROUP
+ LTEXT "Select packages to download",
+ IDC_CHOOSE_INST_TEXT_DOWNLOAD, 21, 9, 239, 16, NOT WS_GROUP
+ LTEXT "Select packages to install",
+ IDC_CHOOSE_INST_TEXT_INSTALL, 21, 9, 239, 16, NOT WS_GROUP
LTEXT "Select Packages", IDC_STATIC_HEADER_TITLE, 7, 0, 258, 8,
NOT WS_GROUP
END
diff --git a/resource.h b/resource.h
index 463cfafa..4f1c3cf8 100644
--- a/resource.h
+++ b/resource.h
@@ -160,7 +160,7 @@
#define IDC_DLS_PROGRESS_TEXT 543
#define IDC_DLS_PPROGRESS_TEXT 544
#define IDC_DLS_IPROGRESS_TEXT 545
-#define IDC_CHOOSE_INST_TEXT 546
+#define IDC_CHOOSE_INST_TEXT_DOWNLOAD 546
#define IDC_CHOOSE_VIEWCAPTION 547
#define IDC_INS_BL_PACKAGE 549
#define IDC_INS_BL_TOTAL 550
@@ -207,3 +207,8 @@
#define IDC_CHOOSE_DO_SEARCH 595
#define IDC_CHOOSE_SYNC 596
#define IDC_CONFIRM_EDIT 597
+#define IDC_CHOOSE_INST_TEXT_INSTALL 598
+#define IDC_DESKTOP_HEADER_DOWNLOAD 599
+#define IDC_DESKTOP_HEADER_TITLE_DOWNLOAD 600
+#define IDC_DESKTOP_HEADER_INSTALL 601
+#define IDC_DESKTOP_HEADER_TITLE_INSTALL 602
diff --git a/source.cc b/source.cc
index 10298db7..6aca7f5c 100644
--- a/source.cc
+++ b/source.cc
@@ -91,9 +91,9 @@ SourcePage::OnActivate ()
source = IDC_SOURCE_DOWNLOAD;
else if (LocalOption)
source = IDC_SOURCE_LOCALDIR;
- else if (!source)
- //only default to IDC_SOURCE_NETINST if
- //source not already set:
+ else if ((unattended_mode == unattended) || (!source))
+ // default to IDC_SOURCE_NETINST if unattended, or source not already set
+ // (i.e. first run)
source = IDC_SOURCE_NETINST;
load_dialog (GetHWND ());
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-11 13:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-11 13:26 [setup - the official Cygwin setup program] branch master, updated. release_2.909-19-gce21a9a9 Jon TURNEY
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).