[gnome-boxes/gnome-3-34] vm-creator: Keep Live VMs around
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/gnome-3-34] vm-creator: Keep Live VMs around
- Date: Tue, 18 Feb 2020 10:25:10 +0000 (UTC)
commit 6ada75e6b3b5429febdb74ee471eac3af7f412b2
Author: Felipe Borges <felipeborges gnome org>
Date: Fri Feb 7 12:34:45 2020 +0100
vm-creator: Keep Live VMs around
Instead of deleting a Live session when the user decided not to
install the OS, we now will keep the Live VMs.
Fixes #227
src/vm-creator.vala | 27 ++++++---------------------
1 file changed, 6 insertions(+), 21 deletions(-)
---
diff --git a/src/vm-creator.vala b/src/vm-creator.vala
index 6eb04230..1687d04f 100644
--- a/src/vm-creator.vala
+++ b/src/vm-creator.vala
@@ -157,27 +157,12 @@ private void on_machine_state_changed (GLib.Object object, GLib.ParamSpec? pspec
machine.vm_creator = null;
machine.schedule_autosave ();
try_create_snapshot.begin (machine);
- } else {
- if (VMConfigurator.is_live_config (machine.domain_config)) {
- // No installation during live session, so lets delete the VM
- machine.disconnect (state_changed_id);
- install_media.clean_up ();
- var items = new GLib.List<CollectionItem> ();
- items.append (machine);
-
- Boxes.App.UndoNotifyCallback undo_notify_callback = () => {
- debug ("Live box deletion cancelled. Invoking post installation setup...");
- set_post_install_config (machine);
- };
-
- var msg = _("Live box ā%sā has been deleted automatically.").printf (machine.name);
- App.app.delete_machines_undoable ((owned) items, msg, (owned) undo_notify_callback);
- } else
- try {
- domain.start (0);
- } catch (GLib.Error error) {
- warning ("Failed to start domain '%s': %s", domain.get_name (), error.message);
- }
+ } else if (!VMConfigurator.is_live_config (machine.domain_config)) {
+ try {
+ domain.start (0);
+ } catch (GLib.Error error) {
+ warning ("Failed to start domain '%s': %s", domain.get_name (), error.message);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]