[gnome-boxes/gnome-3-14] wizard: Handle return value of prepare()



commit 96b7934507497968e6b8364b93994b5857a621fb
Author: Lasse Schuirmann <lasse schuirmann gmail com>
Date:   Mon Oct 27 17:25:04 2014 +0100

    wizard: Handle return value of prepare()
    
    This way if InstallerMedia.prepare is cancelled, it returns false and
    Wizard stops continuing with rest of preparation.
    
    This fixes the issue of Wizard jumping to setup page after driver
    download is finished even if user has cancelled their request to create
    the corresponding VM.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=725386

 src/wizard.vala |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/wizard.vala b/src/wizard.vala
index 5b879cf..a452771 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -343,7 +343,8 @@ private class Boxes.Wizard: Gtk.Stack, Boxes.UI {
         else
             prepare_media_progress = progress;
         prepare_media_progress.bind_property ("info", prep_status_label, "label");
-        yield install_media.prepare (prepare_media_progress, prepare_cancellable);
+        if (!yield install_media.prepare (prepare_media_progress, prepare_cancellable))
+            return;
 
         vm_creator = install_media.get_vm_creator ();
         prep_progress.fraction = 1.0;


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