Pending setup patches (issue 2)

Robert Collins rbcollins@cygwin.com
Tue Mar 4 22:07:00 GMT 2003


On Wed, 2003-03-05 at 07:41, Max Bowsher wrote:


> >> * Patch I forwarded from Brian Keener, for adding extra views
> >> http://sources.redhat.com/ml/cygwin-apps/2003-01/msg00346.html

Ok, reviewed again to refresh my memory.

Brian, Why do you change the scroll bar behaviour? Thats orthogonal to
the presence of more views IMO.

Anyway, Max, please commit this.

Brian, if you have time, once this is in, the chooser selection logic

+  else if (chooser->get_view_mode () == PickView::views::PackageKeeps)
+    {
+      for (vector <packagemeta *>::iterator i = db.packages.begin ();
+	   i != db.packages.end (); ++i)
+	{
+	  packagemeta & pkg = **i;
+	  if (pkg.installed && pkg.desired && !pkg.desired.picked() 
+	      && !pkg.desired.sourcePackage().picked())
+	    chooser->insert_pkg (pkg);
+	}
+    }

should be refactored:
else if (choose->get_view_mode() == PickView::views::PackageKeeps)
  insertPackages(db.packages.begin(), db.packages.end(), PackageKeeps::predicateForDisplay());

As a first step.

Waay to much duplicate code there :}. Not a problem you created, just one that the extra views exacerbated.

IF, and only IF you have time, this would be really appreciated.

Rob



-- 
GPG key available at: <http://users.bigpond.net.au/robertc/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20030304/d325e023/attachment.sig>


More information about the Cygwin-apps mailing list