[gnome-boxes] Fix Continue not enabled when doing non-express install of XP



commit 530d26958c7fed911c7f5ee6d444de82ced3b4c4
Author: Marc-Andrà Lureau <marcandre lureau gmail com>
Date:   Wed Oct 17 21:35:41 2012 +0200

    Fix Continue not enabled when doing non-express install of XP
    
    https://bugzilla.gnome.org/show_bug.cgi?id=686328

 src/installer-media.vala      |    2 +-
 src/unattended-installer.vala |   10 ++++++----
 src/winxp-installer.vala      |    4 ++--
 src/wizard.vala               |    2 +-
 4 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/src/installer-media.vala b/src/installer-media.vala
index 32cdb97..9973753 100644
--- a/src/installer-media.vala
+++ b/src/installer-media.vala
@@ -16,7 +16,7 @@ private class Boxes.InstallerMedia : GLib.Object {
     // FIXME: Currently this information is always unknown so practically we never show any progress for installations.
     public virtual uint64 installed_size { get { return 0; } }
     public virtual bool need_user_input_for_vm_creation { get { return false; } }
-    public virtual bool user_data_for_vm_creation_available { get { return true; } }
+    public virtual bool ready_to_create { get { return true; } }
     public virtual bool supports_virtio_disk {
         get {
             return (get_os_device_by_prop (os, DEVICE_PROP_NAME, "virtio-block") != null);
diff --git a/src/unattended-installer.vala b/src/unattended-installer.vala
index 43f295b..7e8c4b3 100644
--- a/src/unattended-installer.vala
+++ b/src/unattended-installer.vala
@@ -13,9 +13,11 @@ private abstract class Boxes.UnattendedInstaller: InstallerMedia {
         }
     }
 
-    public override bool user_data_for_vm_creation_available {
+    public virtual bool ready_for_express { get { return username != ""; } }
+
+    public override bool ready_to_create {
         get {
-            return !express_toggle.active || username != "";
+            return !express_toggle.active || ready_for_express;
         }
     }
 
@@ -239,7 +241,7 @@ private abstract class Boxes.UnattendedInstaller: InstallerMedia {
         express_toggle.active = !os_media.live;
         express_toggle.halign = Gtk.Align.START;
         express_toggle.valign = Gtk.Align.CENTER;
-        express_toggle.notify["active"].connect (() => { notify_property ("user-data-for-vm-creation-available"); });
+        express_toggle.notify["active"].connect (() => { notify_property ("ready-to-create"); });
         setup_table.attach_defaults (express_toggle, 2, 3, 0, 1);
 
         // 2nd row (while user avatar spans over 2 rows)
@@ -327,7 +329,7 @@ private abstract class Boxes.UnattendedInstaller: InstallerMedia {
 
         if (mandatory)
             entry.notify["text"].connect (() => {
-                notify_property ("user-data-for-vm-creation-available");
+                notify_property ("ready-to-create");
             });
 
         return entry;
diff --git a/src/winxp-installer.vala b/src/winxp-installer.vala
index 4f74efa..c8e2ec1 100644
--- a/src/winxp-installer.vala
+++ b/src/winxp-installer.vala
@@ -13,9 +13,9 @@ private class Boxes.WinXPInstaller: WindowsInstaller {
 
     private ulong key_inserted_id; // ID of key_entry.insert_text signal handler
 
-    public override bool user_data_for_vm_creation_available {
+    public override bool ready_for_express {
         get {
-            return base.user_data_for_vm_creation_available && key_entry.text_length == 29;
+            return base.ready_for_express && key_entry.text_length == 29;
         }
     }
 
diff --git a/src/wizard.vala b/src/wizard.vala
index 2217a17..8b6885c 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -320,7 +320,7 @@ private class Boxes.Wizard: Boxes.UI {
 
         return_if_fail (vm_creator != null);
 
-        vm_creator.install_media.bind_property ("user-data-for-vm-creation-available",
+        vm_creator.install_media.bind_property ("ready-to-create",
                                                 continue_button, "sensitive",
                                                 BindingFlags.SYNC_CREATE);
         vm_creator.install_media.populate_setup_vbox (setup_vbox);



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