[PATCH 2/4] Replace the RAID level checkboxes with a single combo box.

Vratislav Podzimek vpodzime at redhat.com
Wed Jan 23 09:51:47 UTC 2013


On Tue, 2013-01-22 at 16:31 -0500, Chris Lumens wrote:
> This seems to be what more people want, and it's certainly far more simple.
> ---
>  pyanaconda/ui/gui/spokes/custom.glade | 559 ++++++----------------------------
>  pyanaconda/ui/gui/spokes/custom.py    | 208 +++----------
>  2 files changed, 146 insertions(+), 621 deletions(-)
>
> +
> +        # Set a default RAID level in the combo.
> +        i = 0
> +        for row in raid_combo.get_model():
> +            if row[0].startswith(raid_level.upper()):
> +                raid_combo.set_active(i)
> +                break
> +
> +            i += 1
You can use 'for (i, row) in enumerate(raid_combo.get_model())' here.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list