[PATCH 1/2] Add ability in TUI for users to select partitioning scheme.
Chris Lumens
clumens at redhat.com
Tue May 7 21:07:34 UTC 2013
> +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".
> + @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.
- Chris
More information about the anaconda-patches
mailing list