This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Small Patch for setup.exe
- To: <cygwin at cygwin dot com>
- Subject: Small Patch for setup.exe
- From: Franklin <joshua at barney dot iocc dot com>
- Date: Sat, 23 Jun 2001 20:09:30 -0500 (CDT)
Here is a very small patch that I find helpful and thought I'd share. It
adds a button on the package selection page that "switches" all of the
possible packages. In practice this usually means that it will change from
the current package to "Skip", but if you have a local package directory
with multiple versions of a package it will switch to a different version;
you can skip those packages manually. My original intention was to add a
"Skip All" button but it looks like this would be much harder as
setup.exe is agnostic about such things.
Joshua Daniel Franklin
P.S. If this patch is useful enough get included, do I need to send in a
rights-assignment form?
ChangeLog
Sat Jun 23 19:39:55 2001 Joshua Daniel Franklin
* choose.cc (switch_all): new function to switch selection on all
packages at once (i.e., most will become "Skip")
* choose.cc (listview_proc): add handler for SWITCHALL
* resource.h: add SWITCHALL definition
* res.rc (IDC_CHOOSE): add "Switch All" button
--- original/choose.cc-orig Wed Jun 20 21:47:48 2001
+++ choose.cc Sat Jun 23 19:13:04 2001
@@ -381,6 +381,20 @@ list_click (HWND hwnd, BOOL dblclk, int
InvalidateRect (hwnd, &rect, TRUE);
}
+//Added by Joshua Daniel Franklin 23 June 2001
+static LRESULT CALLBACK
+switch_all (HWND hwnd)
+{
+ for (Package *pkg = package; pkg->name; pkg++)
+ if (!pkg->exclude) {
+ set_action (pkg, 1);
+ }
+
+ RECT rangle;
+ GetClientRect (hwnd, &rangle);
+ InvalidateRect (hwnd, &rangle, TRUE);
+}
+
static LRESULT CALLBACK
listview_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
@@ -598,6 +612,9 @@ dialog_cmd (HWND h, int id, HWND hwndctl
{
switch (id)
{
+ case IDC_CHOOSE_SWITCHALL:
+ switch_all (lv);
+ break;
case IDC_CHOOSE_PREV:
default_trust (lv, TRUST_PREV);
set_full_list (lv, full_list);
--- original/resource.h-orig Sat Jun 23 19:35:34 2001
+++ resource.h Sat Jun 23 19:11:08 2001
@@ -100,6 +100,7 @@
#define IDC_DLS_PPROGRESS_TEXT 1048
#define IDC_DLS_IPROGRESS_TEXT 1049
#define IDC_CHOOSE_INST_TEXT 1050
+#define IDC_CHOOSE_SWITCHALL 1051
#define IDC_STATIC -1
// Next default values for new objects
--- original/res.rc-orig Wed Jun 20 21:13:36 2001
+++ res.rc Sat Jun 23 19:13:08 2001
@@ -240,6 +240,7 @@ BEGIN
CONTROL "SPIN",IDC_STATIC,"Static",SS_BITMAP,55,170,15,13
LTEXT "= click to choose action, (p) = previous version, (x) = experimental",
IDC_STATIC,65,170,220,8
+ PUSHBUTTON "Switch All",IDC_CHOOSE_SWITCHALL,150,5,40,10
PUSHBUTTON "Full/Part",IDC_CHOOSE_FULLPART,283,5,35,10
CONTROL "E&xp",IDC_CHOOSE_EXP,"Button",BS_AUTORADIOBUTTON |
WS_GROUP,248,5,25,10
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple