[gnome-boxes] unattended-setup-box: Take media as constructor arg



commit d806ef517886b33124af3d97be84a2fbbc15a3ff
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Thu Feb 26 17:48:40 2015 +0000

    unattended-setup-box: Take media as constructor arg
    
    Instead of passing different parts of the InstallerMedia instance, lets
    pass the instance itself to constructor and let it take what it needs
    from it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=693391

 src/unattended-installer.vala |    2 +-
 src/unattended-setup-box.vala |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/unattended-installer.vala b/src/unattended-installer.vala
index 9a87eaa..59c9c0d 100644
--- a/src/unattended-installer.vala
+++ b/src/unattended-installer.vala
@@ -113,7 +113,7 @@ private class Boxes.UnattendedInstaller: InstallerMedia {
         kbd = lang;
         product_key_format = get_product_key_format ();
 
-        setup_box = new UnattendedSetupBox (os_media.live, product_key_format, needs_internet, label);
+        setup_box = new UnattendedSetupBox (this, product_key_format, needs_internet);
         setup_box.notify["ready-to-create"].connect (() => {
             notify_property ("ready-to-create");
         });
diff --git a/src/unattended-setup-box.vala b/src/unattended-setup-box.vala
index a402d08..8b9c62d 100644
--- a/src/unattended-setup-box.vala
+++ b/src/unattended-setup-box.vala
@@ -91,12 +91,12 @@ private class Boxes.UnattendedSetupBox : Gtk.Box {
 
     private string? product_key_format;
 
-    public UnattendedSetupBox (bool live, string? product_key_format, bool needs_internet, string os_name) {
+    public UnattendedSetupBox (InstallerMedia media, string? product_key_format, bool needs_internet) {
         this.product_key_format = product_key_format;
         username_entry.text = Environment.get_user_name ();
 
-        setup_express_toggle (live, needs_internet);
-        var msg = _("Express installation of %s requires an internet connection.").printf (os_name);
+        setup_express_toggle (media.os_media.live, needs_internet);
+        var msg = _("Express installation of %s requires an internet connection.").printf (media.label);
         needs_internet_label.label = msg;
         needs_internet_bar.visible = needs_internet;
 


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