This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
[Patch] setup.exe - change Prev, Curr, Test Radio Buttons to a Single PushButton
- To: cygwin-patches <cygwin-patches at cygwin dot com>
- Subject: [Patch] setup.exe - change Prev, Curr, Test Radio Buttons to a Single PushButton
- From: Brian Keener <bkeener at thesoftwaresource dot com>
- Date: Thu, 08 Nov 2001 11:37:25 EST
- Reply-To: bkeener at thesoftwaresource dot com
This change replaces the radio buttons in the Package chooser to a single
Pushbutton like the current View Selection. There had been suggestions in the
past for a pushbutton that would let you change the whole list to one setting
and then go back and select just single entities. I guess this is sort of the
first step. Very minor change.
2001-11-08 Brian Keener <bkeener@thesoftwaresource.com>
* resource.h: Remove IDC_CHOOSE_PREV, IDC_CHOOSE_CURR, and
IDC_CHOOSE_EXP.
Add IDC_CHOOSE_DEFAULT and IDC_CHOOSE_SELECTCAPTION.
* res.rc (IDD_CHOOSE_DIALOG): Remove IDC_CHOOSE_PREV, IDC_CHOOSE_CURR,
and
IDC_CHOOSE_EXP RadioButtons and add IDC_CHOOSE_DEFAULT PushButton and
IDC_CHOOSE_SELECTCAPTION Text field. Added hotkey for View and
Selection buttons.
* choose.cc: Added chooser_default definition to initialization.
(create_listview): Remove default setting for RadioButtons to Current.
(dialog_cmd): Remove IDC_CHOOSE_PREV, IDC_CHOOSE_CURR, and
IDC_CHOOSE_EXP.
Add IDC_CHOOSE_DEFAULT and IDC_CHOOSE_SELECTCAPTION.
(dialog_proc): Added default display of "Current" for
IDC_CHOOSE_SELECTCAPTION.
? choose.cc.sav
Index: choose.cc
===================================================================
RCS file: /cvs/src/src/winsup/cinstall/choose.cc,v
retrieving revision 2.61
diff -p -2 -r2.61 choose.cc
*** choose.cc 2001/11/02 08:11:52 2.61
--- choose.cc 2001/11/08 05:32:01
*************** static int initialized = 0;
*** 62,66 ****
static int scroll_ulc_x, scroll_ulc_y;
! static HWND lv, nextbutton, choose_inst_text;
static TEXTMETRIC tm;
static int header_height;
--- 62,66 ----
static int scroll_ulc_x, scroll_ulc_y;
! static HWND lv, nextbutton, choose_inst_text, chooser_default;
static TEXTMETRIC tm;
static int header_height;
*************** create_listview (HWND dlg, RECT * r)
*** 1165,1170 ****
for (Package * foo = package; foo->name; foo++)
add_required (foo);
- static int ta[] = { IDC_CHOOSE_CURR, 0 };
- rbset (dlg, ta, IDC_CHOOSE_CURR);
ReleaseDC (lv, dc);
--- 1165,1168 ----
*************** dialog_cmd (HWND h, int id, HWND hwndctl
*** 1176,1197 ****
switch (id)
{
! case IDC_CHOOSE_PREV:
! default_trust (lv, TRUST_PREV);
! for (Package * foo = package; foo->name; foo++)
! add_required (foo);
! set_view_mode (lv, chooser->get_view_mode ());
! break;
! case IDC_CHOOSE_CURR:
! default_trust (lv, TRUST_CURR);
! for (Package * foo = package; foo->name; foo++)
! add_required (foo);
! set_view_mode (lv, chooser->get_view_mode ());
! break;
! case IDC_CHOOSE_EXP:
! default_trust (lv, TRUST_TEST);
for (Package * foo = package; foo->name; foo++)
add_required (foo);
set_view_mode (lv, chooser->get_view_mode ());
! break;
case IDC_CHOOSE_VIEW:
set_view_mode (lv, viewsplusplus (chooser->get_view_mode ()));
--- 1174,1198 ----
switch (id)
{
! case IDC_CHOOSE_DEFAULT:
! deftrust = (trusts) (deftrust + 1);
! if (deftrust > TRUST_TEST)
! deftrust = TRUST_PREV;
! if (deftrust == TRUST_PREV)
! {
! SetWindowText (chooser_default, "Previous");
! }
! else if (deftrust == TRUST_CURR)
! {
! SetWindowText (chooser_default, "Current");
! }
! else
! {
! SetWindowText (chooser_default, "Test");
! }
! default_trust (lv, deftrust);
for (Package * foo = package; foo->name; foo++)
add_required (foo);
set_view_mode (lv, chooser->get_view_mode ());
! break;
case IDC_CHOOSE_VIEW:
set_view_mode (lv, viewsplusplus (chooser->get_view_mode ()));
*************** dialog_proc (HWND h, UINT message, WPARA
*** 1252,1259 ****
--- 1253,1262 ----
frame = GetDlgItem (h, IDC_LISTVIEW_POS);
choose_inst_text = GetDlgItem (h, IDC_CHOOSE_INST_TEXT);
+ chooser_default = GetDlgItem(h, IDC_CHOOSE_SELECTCAPTION);
if (source == IDC_SOURCE_DOWNLOAD)
SetWindowText (choose_inst_text, "Select packages to download ");
else
SetWindowText (choose_inst_text, "Select packages to install ");
+ SetWindowText (chooser_default, "Current");
GetParentRect (h, frame, &r);
r.top += 2;
Index: res.rc
===================================================================
RCS file: /cvs/src/src/winsup/cinstall/res.rc,v
retrieving revision 2.29
diff -p -2 -r2.29 res.rc
*** res.rc 2001/11/03 01:07:03 2.29
--- res.rc 2001/11/08 05:32:04
*************** BEGIN
*** 242,253 ****
LTEXT "= click to choose action, (p) = previous version, (x) =
experimental",
IDC_STATIC,35,234,220,8
! PUSHBUTTON "View",IDC_CHOOSE_VIEW,353,5,20,10
LTEXT "",IDC_CHOOSE_VIEWCAPTION,390,5,30,10
! CONTROL "E&xp",IDC_CHOOSE_EXP,"Button",BS_AUTORADIOBUTTON |
! WS_GROUP,323,5,25,10
! CONTROL "&Prev",IDC_CHOOSE_PREV,"Button",BS_AUTORADIOBUTTON,265,
! 5,27,10
! CONTROL "&Curr",IDC_CHOOSE_CURR,"Button",BS_AUTORADIOBUTTON,297,
! 5,25,10
DEFPUSHBUTTON "&Next -->",IDOK,311,242,45,15
PUSHBUTTON "Cancel",IDCANCEL,375,242,45,15
--- 242,249 ----
LTEXT "= click to choose action, (p) = previous version, (x) =
experimental",
IDC_STATIC,35,234,220,8
! PUSHBUTTON "&View",IDC_CHOOSE_VIEW,353,5,20,10
LTEXT "",IDC_CHOOSE_VIEWCAPTION,390,5,30,10
! PUSHBUTTON "&Selection",IDC_CHOOSE_DEFAULT,250,5,60,10
! LTEXT "",IDC_CHOOSE_SELECTCAPTION,315,5,30,10
DEFPUSHBUTTON "&Next -->",IDOK,311,242,45,15
PUSHBUTTON "Cancel",IDCANCEL,375,242,45,15
Index: resource.h
===================================================================
RCS file: /cvs/src/src/winsup/cinstall/resource.h,v
retrieving revision 2.12
diff -p -2 -r2.12 resource.h
*** resource.h 2001/06/30 01:37:55 2.12
--- resource.h 2001/11/08 05:32:05
***************
*** 86,105 ****
#define IDC_LISTVIEW_POS 1034
#define IDC_CHOOSE_VIEW 1035
! #define IDC_CHOOSE_EXP 1036
! #define IDC_CHOOSE_CURR 1037
! #define IDC_CHOOSE_PREV 1038
! #define IDC_CHOOSE_LIST 1039
! #define IDC_INS_ACTION 1040
! #define IDC_ROOT_DESKTOP 1041
! #define IDC_ROOT_MENU 1042
! #define IDC_LOCAL_DIR_BROWSE 1043
! #define IDC_LOCAL_DIR 1044
! #define IDC_DLS_PPROGRESS 1045
! #define IDC_DLS_IPROGRESS 1046
! #define IDC_DLS_PROGRESS_TEXT 1047
! #define IDC_DLS_PPROGRESS_TEXT 1048
! #define IDC_DLS_IPROGRESS_TEXT 1049
! #define IDC_CHOOSE_INST_TEXT 1050
! #define IDC_CHOOSE_VIEWCAPTION 1051
#define IDC_STATIC -1
--- 86,104 ----
#define IDC_LISTVIEW_POS 1034
#define IDC_CHOOSE_VIEW 1035
! #define IDC_CHOOSE_LIST 1036
! #define IDC_INS_ACTION 1037
! #define IDC_ROOT_DESKTOP 1038
! #define IDC_ROOT_MENU 1039
! #define IDC_LOCAL_DIR_BROWSE 1040
! #define IDC_LOCAL_DIR 1041
! #define IDC_DLS_PPROGRESS 1042
! #define IDC_DLS_IPROGRESS 1043
! #define IDC_DLS_PROGRESS_TEXT 1044
! #define IDC_DLS_PPROGRESS_TEXT 1045
! #define IDC_DLS_IPROGRESS_TEXT 1046
! #define IDC_CHOOSE_INST_TEXT 1047
! #define IDC_CHOOSE_VIEWCAPTION 1048
! #define IDC_CHOOSE_DEFAULT 1049
! #define IDC_CHOOSE_SELECTCAPTION 1050
#define IDC_STATIC -1
***************
*** 112,116 ****
#define _APS_NEXT_RESOURCE_VALUE 127
#define _APS_NEXT_COMMAND_VALUE 40003
! #define _APS_NEXT_CONTROL_VALUE 1052
#define _APS_NEXT_SYMED_VALUE 101
#endif
--- 111,115 ----
#define _APS_NEXT_RESOURCE_VALUE 127
#define _APS_NEXT_COMMAND_VALUE 40003
! #define _APS_NEXT_CONTROL_VALUE 1051
#define _APS_NEXT_SYMED_VALUE 101
#endif