[PATCH] Do not accept changes if the user presses Esc on summary screen.

David Cantrell dcantrell at redhat.com
Wed Oct 2 12:45:40 UTC 2013


On Tue, Oct 01, 2013 at 11:54:59AM -0400, mulhern wrote:
> Resolves: rhel7#998384

Make sure you use rhbz#_______ for this notation in commit log messages.  We
have our own scripts that look for information in this format.

See docs/commit-log.txt for more information.

> 
> Changed summary.glade file so it returns numeric value for GTK_RESPONSE_CANCEL
> for Cancel button and numeric value for GTK_RESPONSE_ACCEPT for Accept button.
> 
> Changed custom.py so returns to custom screen unless return code from summary
> screen is GTK_RESPONSE_ACCEPT.
> 
> Signed-off-by: mulhern <amulhern at redhat.com>
> ---
>  pyanaconda/ui/gui/spokes/custom.py         | 2 +-
>  pyanaconda/ui/gui/spokes/lib/summary.glade | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
> index 8a2b9cd..64abc1d 100644
> --- a/pyanaconda/ui/gui/spokes/custom.py
> +++ b/pyanaconda/ui/gui/spokes/custom.py
> @@ -1882,7 +1882,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
>              dialog.refresh(self.__storage.devicetree.findActions())
>              rc = dialog.run()
>  
> -        if rc == 0:
> +        if rc != int(Gtk.ResponseType.ACCEPT): 
>              # Cancel.  Stay on the custom screen.
>              return
>  
> diff --git a/pyanaconda/ui/gui/spokes/lib/summary.glade b/pyanaconda/ui/gui/spokes/lib/summary.glade
> index 3d020e8..aba4914 100644
> --- a/pyanaconda/ui/gui/spokes/lib/summary.glade
> +++ b/pyanaconda/ui/gui/spokes/lib/summary.glade
> @@ -197,8 +197,8 @@
>        </object>
>      </child>
>      <action-widgets>
> -      <action-widget response="0">summaryCancelButton</action-widget>
> -      <action-widget response="1">summaryAcceptButton</action-widget>
> +      <action-widget response="-6">summaryCancelButton</action-widget>
> +      <action-widget response="-3">summaryAcceptButton</action-widget>
>      </action-widgets>
>    </object>
>  </interface>
> -- 
> 1.8.3.1
> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches

-- 
David Cantrell <dcantrell at redhat.com>
Manager, Installer Engineering Team
Red Hat, Inc. | Westford, MA | EST5EDT


More information about the anaconda-patches mailing list