]> cygwin.com Git - cygwin-apps/setup.git/commitdiff
* choose.cc (build_labels): Don't skip TRUST_PREV completely; only
authorDJ Delorie <dj@redhat.com>
Sun, 22 Oct 2000 15:38:07 +0000 (15:38 +0000)
committerDJ Delorie <dj@redhat.com>
Sun, 22 Oct 2000 15:38:07 +0000 (15:38 +0000)
ignore it wrt full_list if there's already a version installed.
(do_choose): Sort the list.
(package_sort): New.

ChangeLog
choose.cc

index c3a0d3529e7662285f8a816aa488c57f2c19740e..b179a07f2f189b22e738ad3f7f21f94e2fd495f3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-10-22  DJ Delorie  <dj@redhat.com>
+
+       * choose.cc (build_labels): Don't skip TRUST_PREV completely; only
+       ignore it wrt full_list if there's already a version installed.
+       (do_choose): Sort the list.
+       (package_sort): New.
+
 2000-10-12  DJ Delorie  <dj@redhat.com>
 
        * res.rc: Add more error strings.
index d52cf0e7b1a06ba89374e37740beec65ac2277a2..a0a1bfff8ff6de569a137e09ee6c77d8a6ef7b36 100644 (file)
--- a/choose.cc
+++ b/choose.cc
@@ -412,8 +412,7 @@ build_labels ()
          c++;
        }
 
-      /* we intentionally skip TRUST_PREV */
-      for (t=TRUST_CURR; t<NTRUST; t++)
+      for (t=TRUST_PREV; t<NTRUST; t++)
        if (package[i].info[t].install)
          if (t != extra[i].which_is_installed)
            {
@@ -422,7 +421,9 @@ build_labels ()
                C.caption = "0.0";
              C.trust = t;
              c++;
-             extra[i].in_partial_list = 1;
+             /* we intentionally skip TRUST_PREV */
+             if (t != TRUST_PREV || !extra[i].installed_ver)
+               extra[i].in_partial_list = 1;
            }
 
       if (c == 0)
@@ -701,11 +702,21 @@ foo1() {
     next_dialog = IDD_S_DOWNLOAD;
 }
 
+int
+package_sort (const void *va, const void *vb)
+{
+  Package *a = (Package *)va;
+  Package *b = (Package *)vb;
+  return strcmp (a->name, b->name);
+}
+
 void
 do_choose (HINSTANCE h)
 {
   int rv, i;
 
+  qsort (package, npackages, sizeof (package[0]), package_sort);
+
   nextbutton = 0;
   bm_spin = LoadImage (h, MAKEINTRESOURCE (IDB_SPIN), IMAGE_BITMAP, 0, 0, 0);
   bm_rtarrow = LoadImage (h, MAKEINTRESOURCE (IDB_RTARROW), IMAGE_BITMAP, 0, 0, 0);
This page took 0.034612 seconds and 5 git commands to generate.