+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.
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)
{
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)
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);