[PATCH] Use format names instead of types in the resize dialog

David Shea dshea at redhat.com
Wed Nov 27 14:54:42 UTC 2013


On 11/27/2013 09:25 AM, Vratislav Podzimek wrote:
> Format's name property may provide a more user-friendly string and if there is
> none, it falls back to type.
>
> Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
> ---
>   pyanaconda/ui/gui/spokes/lib/resize.py | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/pyanaconda/ui/gui/spokes/lib/resize.py b/pyanaconda/ui/gui/spokes/lib/resize.py
> index b97c5d8..7979c56 100644
> --- a/pyanaconda/ui/gui/spokes/lib/resize.py
> +++ b/pyanaconda/ui/gui/spokes/lib/resize.py
> @@ -129,7 +129,7 @@ class ResizeDialog(GUIObject):
>                   fstype = ""
>                   diskReclaimableSpace = 0
>               else:
> -                fstype = disk.format.type
> +                fstype = disk.format.name
>                   diskReclaimableSpace = disk.size
>   
>               itr = self._diskStore.append(None, [disk.id,
> @@ -162,7 +162,7 @@ class ResizeDialog(GUIObject):
>   
>                       self._diskStore.append(itr, [dev.id,
>                                                    self._description(dev),
> -                                                 dev.format.type,
> +                                                 dev.format.name,
>                                                    resizeString,
>                                                    _(PRESERVE),
>                                                    not dev.protected,
I like this. Besides being more readable, the column will be translated 
when strings are available, too :-)


More information about the anaconda-patches mailing list