This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[setup PATCH] Add Keep Button (and leave Prev button, for now)


OK, my previous Keep button patch fizzled, because I was trying to remove
the Prev button at the same time. So this adds Keep, whilst leaving Prev
alone.

OK to apply?

PS: Something else to think about: Does anyone edit the setup resources in
Visual Studio?
If no-one does, lets get rid of the unnecessary junk in res.rc/resource.h.

Max.


Index: choose.cc
===================================================================
RCS file: /home/max/cvsmirror/cygwin-apps-cvs/setup/choose.cc,v
retrieving revision 2.109
diff -u -p -r2.109 choose.cc
--- choose.cc 25 Nov 2002 13:26:05 -0000 2.109
+++ choose.cc 19 Jan 2003 17:43:38 -0000
@@ -437,7 +437,7 @@ create_listview (HWND dlg, RECT * r)
       pkg.set_requirements (chooser->deftrust);
     }
   /* FIXME: do we need to init the desired fields ? */
-  static int ta[] = { IDC_CHOOSE_PREV, IDC_CHOOSE_CURR, IDC_CHOOSE_EXP,
0 };
+  static int ta[] = { IDC_CHOOSE_KEEP, IDC_CHOOSE_PREV, IDC_CHOOSE_CURR,
IDC_CHOOSE_EXP, 0 };
   rbset (dlg, ta, IDC_CHOOSE_CURR);
 }

@@ -621,6 +621,20 @@ ChooserPage::OnMessageCmd (int id, HWND
   packagedb db;
   switch (id)
     {
+    case IDC_CHOOSE_KEEP:
+      if (IsDlgButtonChecked (GetHWND (), id))
+      {
+ for (vector <packagemeta *>::iterator i = db.packages.begin ();
+      i != db.packages.end (); ++i)
+          {
+            packagemeta & pkg = **i;
+            pkg.desired = pkg.installed;
+          }
+        set_view_mode (lv, chooser->get_view_mode ());
+        break;
+      }
+      else
+      return false;
     case IDC_CHOOSE_PREV:
       if (IsDlgButtonChecked (GetHWND (), id))
       {
Index: res.rc
===================================================================
RCS file: /home/max/cvsmirror/cygwin-apps-cvs/setup/res.rc,v
retrieving revision 2.44
diff -u -p -r2.44 res.rc
--- res.rc 25 Nov 2002 00:41:25 -0000 2.44
+++ res.rc 19 Jan 2003 17:56:49 -0000
@@ -288,12 +288,14 @@ STYLE DS_MODALFRAME | DS_3DLOOK | WS_CHI
 CAPTION "Select Packages"
 FONT 8, "MS Sans Serif"
 BEGIN
-    CONTROL         "&Prev",IDC_CHOOSE_PREV,"Button",BS_AUTORADIOBUTTON |
-                    WS_GROUP | WS_TABSTOP,150,30,27,10
-    CONTROL
"&Curr",IDC_CHOOSE_CURR,"Button",BS_AUTORADIOBUTTON,185,
-                    30,25,10
-    CONTROL
"E&xp",IDC_CHOOSE_EXP,"Button",BS_AUTORADIOBUTTON,220,30,
-                    25,10
+    CONTROL         "&Keep",IDC_CHOOSE_KEEP,"Button",BS_AUTORADIOBUTTON |
+                    WS_GROUP | WS_TABSTOP,115,30,30,10
+    CONTROL         "&Prev",IDC_CHOOSE_PREV,"Button",BS_AUTORADIOBUTTON ,
+                    150,30,27,10
+    CONTROL         "&Curr",IDC_CHOOSE_CURR,"Button",BS_AUTORADIOBUTTON ,
+                    185,30,25,10
+    CONTROL         "E&xp",IDC_CHOOSE_EXP,"Button",BS_AUTORADIOBUTTON ,
+                    220,30,25,10
     PUSHBUTTON      "&View",IDC_CHOOSE_VIEW,255,30,20,10,WS_GROUP
     CONTROL         "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
                     317,1
Index: resource.h
===================================================================
RCS file: /home/max/cvsmirror/cygwin-apps-cvs/setup/resource.h,v
retrieving revision 2.19
diff -u -p -r2.19 resource.h
--- resource.h 25 Nov 2002 00:41:25 -0000 2.19
+++ resource.h 19 Jan 2003 17:38:57 -0000
@@ -119,6 +119,7 @@
 #define IDS_INSTALL_ERROR  1066
 #define IDC_DISABLE_AV   1067
 #define IDC_LEAVE_AV   1068
+#define IDC_CHOOSE_KEEP                 1069
 #define IDC_STATIC                      -1

 // Next default values for new objects
@@ -129,7 +130,7 @@
 #define _APS_3D_CONTROLS                     1
 #define _APS_NEXT_RESOURCE_VALUE        129
 #define _APS_NEXT_COMMAND_VALUE         40003
-#define _APS_NEXT_CONTROL_VALUE         1069
+#define _APS_NEXT_CONTROL_VALUE         1070
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
 #endif

Attachment: Add-Keep-Button.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]