[gnome-boxes] wizard: Introduce prepare_cancellable
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] wizard: Introduce prepare_cancellable
- Date: Fri, 1 Aug 2014 14:09:43 +0000 (UTC)
commit 0977fb11f5037087a700a29db9371c78c35bf8c3
Author: Lasse Schuirmann <lasse schuirmann gmail com>
Date: Tue Jul 15 12:55:24 2014 +0200
wizard: Introduce prepare_cancellable
This cancellable will be used for media downloading in the following
patches. It may also be used later for cancelling other preparation
actions.
https://bugzilla.gnome.org/show_bug.cgi?id=729026
src/wizard.vala | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/wizard.vala b/src/wizard.vala
index 333f367..8531784 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -49,6 +49,7 @@ private class Boxes.Wizard: Gtk.Stack, Boxes.UI {
protected Machine? machine { get; set; }
private LibvirtMachine? libvirt_machine { get { return (machine as LibvirtMachine); } }
+ private Cancellable? prepare_cancellable;
private Cancellable? review_cancellable;
private bool skip_review_for_live;
@@ -204,6 +205,9 @@ private class Boxes.Wizard: Gtk.Stack, Boxes.UI {
}
public void cleanup () {
+ if (prepare_cancellable != null)
+ prepare_cancellable.cancel ();
+
destroy_machine ();
vm_creator = null;
source = null;
@@ -567,6 +571,9 @@ private class Boxes.Wizard: Gtk.Stack, Boxes.UI {
});
back_button = App.window.topbar.wizard_toolbar.back_btn;
back_button.clicked.connect (() => {
+ if (prepare_cancellable != null)
+ prepare_cancellable.cancel ();
+
page = page - 1;
});
continue_button = App.window.topbar.wizard_toolbar.continue_btn;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]