[gnome-boxes/wip/image-import: 12/27] InstallerMedia now creates VMCreator instance



commit 46718b49e9efd04f1054d6bfa890702a7e4aec78
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Wed Jun 5 03:57:47 2013 +0300

    InstallerMedia now creates VMCreator instance
    
    Later we utilize this to create subclasses of InstallerMedia that uses a
    a custom subclass of VMCreator rather than VMCreator itself.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=690757

 src/installer-media.vala |    4 ++++
 src/wizard.vala          |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/installer-media.vala b/src/installer-media.vala
index 4fed342..04d5ec4 100644
--- a/src/installer-media.vala
+++ b/src/installer-media.vala
@@ -106,6 +106,10 @@ private class Boxes.InstallerMedia : GLib.Object {
         return compatibility != CPUArchCompatibility.INCOMPATIBLE;
     }
 
+    public virtual VMCreator get_vm_creator () {
+        return new VMCreator (this);
+    }
+
     protected void add_cd_config (Domain         domain,
                                   DomainDiskType type,
                                   string         iso_path,
diff --git a/src/wizard.vala b/src/wizard.vala
index daa35ed..e117ad5 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -302,7 +302,7 @@ private class Boxes.Wizard: Boxes.UI {
 
         yield install_media.prepare (progress, null);
 
-        vm_creator = new VMCreator (install_media);
+        vm_creator = install_media.get_vm_creator ();
         prep_progress.fraction = 1.0;
         page = WizardPage.SETUP;
     }


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