[gnome-boxes] wizard: Handle return value of prepare()
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] wizard: Handle return value of prepare()
- Date: Mon, 27 Oct 2014 18:52:24 +0000 (UTC)
commit a72de39a7d49c429c58ad0b0138cf728e5c56745
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 a0f77a3..949935f 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]