[PATCH] Sort the contents of the file system type combo box.

Anne Mulhern amulhern at redhat.com
Wed Sep 24 12:01:24 UTC 2014





----- Original Message -----
> From: "Chris Lumens" <clumens at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Tuesday, September 23, 2014 4:53:41 PM
> Subject: [PATCH] Sort the contents of the file system type combo box.
> 
> ---
>  pyanaconda/ui/gui/spokes/custom.py | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/pyanaconda/ui/gui/spokes/custom.py
> b/pyanaconda/ui/gui/spokes/custom.py
> index c500a1a..859dcf5 100644
> --- a/pyanaconda/ui/gui/spokes/custom.py
> +++ b/pyanaconda/ui/gui/spokes/custom.py
> @@ -279,9 +279,13 @@ class CustomPartitioningSpoke(NormalSpoke,
> StorageChecker):
>                              (isinstance(obj, FS) or
>                               obj.type in ["biosboot", "prepboot", "swap"]))
>              if supported_fs:
> -                actions.add_action(self._fsCombo.append_text, obj.name)
>                  self._fs_types.append(obj.name)
>  
> +        # Display the file system types in alphabetical order.
> +        self._fs_types.sort()


You could move the definition of actions to right here,
instead of leaving it at the top of the method since it is no
longer used in the loop in between.

Make it more obvious that this is just a reduce on an empty action list.

> +        for ty in self._fs_types:
> +            actions.add_action(self._fsCombo.append_text, ty)
> +
>          actions.fire()
>  
>      @property
> --
> 1.9.3
> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 

- mulhern


More information about the anaconda-patches mailing list