[initial-setup][PATCH] Cancel formatting of EULA when putting it into the text buffer (#1039675)

Brian C. Lane bcl at redhat.com
Wed Dec 18 02:06:45 UTC 2013


On Tue, Dec 17, 2013 at 05:16:50PM +0100, Vratislav Podzimek wrote:
> The EULA file is preformatted to be shown on console, which looks bad in a big
> GtkTextView we put it into. Formatting has to be cancelled preserving blank
> lines.
> 
> Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
> ---
>  initial_setup/gui/spokes/eula.py | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/initial_setup/gui/spokes/eula.py b/initial_setup/gui/spokes/eula.py
> index 26bc52f..f11d6ad 100644
> --- a/initial_setup/gui/spokes/eula.py
> +++ b/initial_setup/gui/spokes/eula.py
> @@ -46,7 +46,9 @@ class EULAspoke(FirstbootOnlySpokeMixIn, NormalSpoke):
>          itr = self._eula_buffer.get_iter_at_offset(0)
>          with open(license_file, "r") as fobj:
>              for line in fobj:
> -                self._eula_buffer.insert(itr, line)
> +                # EULA file is preformatted for the console, we want to let Gtk
> +                # format it (blank lines should be preserved)
> +                self._eula_buffer.insert(itr, line.strip() or "\n\n")
>  
>      def refresh(self):
>          self._agree_check_button.set_sensitive(self._have_eula)
> -- 
> 1.8.4.2

Ack

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)


More information about the anaconda-patches mailing list