[Yum-devel] [PATCH 2/2] First split any equal remaining space among overflowed columns
Tim Lauridsen
tim.lauridsen at googlemail.com
Fri Mar 5 06:11:38 UTC 2010
On Thu, Mar 4, 2010 at 8:28 PM, James Antill <james at and.org> wrote:
> ---
> output.py | 15 +++++++++++++++
> 1 files changed, 15 insertions(+), 0 deletions(-)
>
> diff --git a/output.py b/output.py
> index 27fc81c..b4513d1 100755
> --- a/output.py
> +++ b/output.py
> @@ -408,6 +408,21 @@ class YumOutput:
> total_width -= diff
> continue
>
> + overflowed_columns = 0
> + for d in xrange(0, cols):
> + if not data[d]:
> + continue
> + overflowed_columns += 1
> + if overflowed_columns:
> + # Split the remaining spaces among each overflowed column
> + # equally
> + norm = total_width / overflowed_columns
> + for d in xrange(0, cols):
> + if not data[d]:
> + continue
> + columns[d] += norm
> + total_width -= norm
> +
> # Split the remaining spaces among each column equally, except
> the
> # last one. And put the rest into the remainder column
> cols -= 1
> --
> 1.6.6
>
> _______________________________________________
> Yum-devel mailing list
> Yum-devel at lists.baseurl.org
> http://lists.baseurl.org/mailman/listinfo/yum-devel
>
ACk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.baseurl.org/pipermail/yum-devel/attachments/20100305/04307e24/attachment-0001.htm>
More information about the Yum-devel
mailing list