[PATCH 1/2] Add ability in TUI for users to select partitioning scheme.
Samantha N. Bueno
sbueno+anaconda at redhat.com
Wed May 8 13:47:58 UTC 2013
On Tue, May 07, 2013 at 05:07:34PM -0400, Chris Lumens wrote:
> > +class PartitionSchemeSpoke(NormalTUISpoke):
> > + """ SPoke to select what partitioning scheme to use on disk(s). """
> > + title = _("Partition Scheme Options")
> > + category = "destination"
> > +
> > + _selection = None
> > +
> > + def __init__(self, app, data, storage, payload, instclass):
> > + NormalTUISpoke.__init__(self, app, data, storage, payload, instclass)
> > + self.partschemes = {"Standard Partition": AUTOPART_TYPE_PLAIN,
> > + "BTRFS": AUTOPART_TYPE_BTRFS, "LVM": AUTOPART_TYPE_LVM}
>
> I think you are going to want to translate at least "Standard
> Partition".
Good catch.
> > + @property
> > + def indirect(self):
> > + return True
> > +
> > + def refresh(self, args=None):
> > + NormalTUISpoke.refresh(self, args)
> > +
> > + schemelist = self.partschemes.keys()
> > + for scheme in schemelist:
> > + box = CheckboxWidget(title="%i) %s" %(schemelist.index(scheme) \
> > + + 1, scheme), completed=(schemelist.index(scheme) \
> > + + 1 == self._selection))
>
> I know you're going for 80 glorious columns here, but I'd find it more
> readable if each argument to CheckboxWidget were its own line, even if
> those lines were a little long.
Done. Also implemented the "install"->"installation" suggestion in the
other patch; thanks.
Samantha
More information about the anaconda-patches
mailing list