Re: [PATCH] 469557 - the required media dialog is HUUUUUUUGE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Lumens wrote:
> If you're crazy enough to make a split media set for Everything, you end
> up with a dump truck full of CDs.  That makes the required media dialog
> rather large - so large it goes right off the screen.
> 
> Instead of doing anything clever, this patch uses the power of grammar
> to reword the dialog and fit it in less space.
> 
> - Chris
> 
> 
> diff --git a/image.py b/image.py
> index 18d9938..5b6273b 100644
> --- a/image.py
> +++ b/image.py
> @@ -235,22 +235,17 @@ def presentRequiredMediaMessage(anaconda):
>              return
>  
>      reqcds.sort()
> -    reqcdstr = ""
> -    for cdnum in reqcds:
> -        if cdnum == -99: # non-CD bits
> -            continue
> -        reqcdstr += "\t\t%s %s disc #%d\n" % (product.productName, product.productVersion, cdnum,)
> -
> -    return anaconda.intf.messageWindow( _("Required Install Media"),
> -                                        _("The software you have selected to "
> -                                          "install will require the following discs:\n\n"
> -                                          "%s\nPlease "
> -                                          "have these ready before proceeding with "
> -                                          "the installation.  If you need to abort "
> -                                          "the installation and exit please "
> -                                          "select \"Reboot\".") % (reqcdstr,),
> -                                          type="custom", custom_icon="warning",
> -                                          custom_buttons=[_("_Reboot"), _("_Back"), _("_Continue")])
> +    reqcds = map(lambda disc: "#%s" % disc, filter(lambda disc: disc != -99, reqcds))
> +    reqcdstr = ", ".join(reqcds)
> +
> +    return anaconda.intf.messageWindow(_("Required Install Media"),
> +               _("The software you have selected to install will require the "
> +                 "following %s %s discs:\n\n%s\nPlease have these ready "
> +                 "before proceeding with the installation.  If you need to "
> +                 "abort the installation and exit please select "
> +                 "\"Reboot\".") % (product.productName, product.productVersion, reqcdstr)
> +                 type="custom", custom_icon="warning",
> +                 custom_buttons=[_("_Reboot"), _("_Back"), _("_Continue")])
>  
>  # Find an attached CD/DVD drive with media in it that contains packages,
>  # and return that device name.

Looks good to me.

-- 
David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux