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

Re: [f14-branch 1/2] memory: check_memory() displays GUI dialog on livecd (#624534).



See my comments.

--
Martin Sivák
msivak redhat com
Red Hat Czech
Anaconda team / Brno, CZ


> +def gtk_warning(title, reason):
> +    import gtk
> +    dialog = gtk.MessageDialog(type = gtk.MESSAGE_ERROR,
> +                               buttons = gtk.BUTTONS_CLOSE,
> +                               message_format=reason)
> +    dialog.set_title(title)
> +    dialog.run()
> +    sys.exit(1)

You should replace sys.exit(1) with dialog.destroy() to hide the dialog and let the calling method to do the exit.


> +        if opts.liveinst:
> +            stdoutLog.warning(reason)
> +            gtk_warning(livecd_title, reason)
> +        else:
> +            reason += reboot_extra
> +            screen = SnackScreen()
> +            ButtonChoiceWindow(screen, _('Fatal Error'),
> +                               reason,
> +                               buttons = (_("OK"),))
> +            screen.finish()
> +        sys.exit(1)

Here..
  
)
> -                dialog.set_title(title)
> -                dialog.run()
> +            if opts.liveinst:
> +                reason += livecd_extra
> +                stdoutLog.warning(reason)
> +                title = livecd_title
> +                gtk_warning(title, reason)
>                  sys.exit(1)

And here..




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