On Tue, 24 May 2005, Max Bowsher wrote: > Igor Pechtchanski wrote: > > As promised earlier, here's a patch against the current CVS that adds the > > "Size" column to the setup chooser screen, showing the size of the package > > tarball(s). It seems to work well for me. Two caveats: since the size > > information is extracted from setup.ini, if a package is not in setup.ini, > > the size will be wrong or nonexistent; and this doesn't work well for > > source-only packages (mostly because currently only one version of the > > source can be selected). Please test. Comments welcome. > > It's really hard to make source packages fit well into the GUI design, isn't > it?
Yes, but that's not the problem. The source package selected is *always* the latest, independent of the binary version. This isn't done in the GUI, but rather in packageversion::sourcePackage(), IIRC. > It's a bit weird that the size is [binary package size always] plus > [source package only if selected], on the other hand I don't have a > better suggestion. Well, the following line is the culprit: + if (!picked) picked = pkg.trustp(theView.deftrust); I could just compute sz before, and then if sz is 0, get the size of the default binary package... Let me test this and hear others' input. > I've wondered sometimes if perhaps source handling should be removed > entirely from the main package picker. I like the ability to get the source. I just think the source should be the same version as the binary package picked. I know, SHTDI. > > ChangeLog below: > > ============================================================================== > > 2005-05-24 Igor Pechtchanski <[EMAIL PROTECTED]> > > > > * PickView.h (PickView::size_col): New instance variable. > > * PickView.cc (pkg_headers, cat_headers): Add size column. > > (PickView::set_headers): Initialize size_col. > > (PickView::init_headers): Include width of size column. > > * PickPackageLine.cc (PickPackageLine::paint): Handle size_col. > > > * String++.cc (format_1000s): New functions. > > * String++.h (format_1000s): Declare new functions. > > This could just use a default argument for "sep", couldn't it, rather than a > wrapper written out in full? Ah, yes, quite true -- I've been writing Java for too long. New iteration coming up. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ [EMAIL PROTECTED] ZZZzz /,`.-'`' -. ;-;;,_ [EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "The Sun will pass between the Earth and the Moon tonight for a total Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT