[gnome-boxes] Rename UnattendedInstaller::copy to ::from_media



commit f1043b8f326cdc572b2b5827a00baf5a1c608142
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Thu May 24 16:05:05 2012 +0200

    Rename UnattendedInstaller::copy to ::from_media
    
    It's not a real copy constructor, and the naming is confusing
    because these classes will be copying files as well.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=677038

 src/fedora-installer.vala     |    4 ++--
 src/media-manager.vala        |    6 +++---
 src/unattended-installer.vala |    9 +++++----
 src/win7-installer.vala       |    4 ++--
 src/winxp-installer.vala      |    4 ++--
 5 files changed, 14 insertions(+), 13 deletions(-)
---
diff --git a/src/fedora-installer.vala b/src/fedora-installer.vala
index b43c51c..5eb18f0 100644
--- a/src/fedora-installer.vala
+++ b/src/fedora-installer.vala
@@ -29,10 +29,10 @@ private class Boxes.FedoraInstaller: UnattendedInstaller {
         }
     }
 
-    public FedoraInstaller.copy (InstallerMedia media) throws GLib.Error {
+    public FedoraInstaller.from_media (InstallerMedia media) throws GLib.Error {
         var source_path = get_unattended ("fedora.ks");
 
-        base.copy (media, source_path, "ks.cfg");
+        base.from_media (media, source_path, "ks.cfg");
         password_mandatory = true;
 
         kbd = fetch_console_kbd_layout ();
diff --git a/src/media-manager.vala b/src/media-manager.vala
index 9be8727..55ad1fe 100644
--- a/src/media-manager.vala
+++ b/src/media-manager.vala
@@ -108,18 +108,18 @@ private class Boxes.MediaManager : Object {
 
         switch (media.os.distro) {
         case "fedora":
-            return new FedoraInstaller.copy (media);
+            return new FedoraInstaller.from_media (media);
 
         case "win":
             switch (media.os.short_id) {
             case "win7":
             case "win2k8":
-                return new Win7Installer.copy (media);
+                return new Win7Installer.from_media (media);
 
             case "winxp":
             case "win2k":
             case "win2k3":
-                return new WinXPInstaller.copy (media);
+                return new WinXPInstaller.from_media (media);
 
             default:
                 return media;
diff --git a/src/unattended-installer.vala b/src/unattended-installer.vala
index 415e1ce..2bb0cc4 100644
--- a/src/unattended-installer.vala
+++ b/src/unattended-installer.vala
@@ -84,10 +84,11 @@ private abstract class Boxes.UnattendedInstaller: InstallerMedia {
             }
         }
     }
-    public UnattendedInstaller.copy (InstallerMedia media,
-                                     string         unattended_src_path,
-                                     string         unattended_dest_name,
-                                     AvatarFormat?  avatar_format = null) throws GLib.Error {
+
+    public UnattendedInstaller.from_media (InstallerMedia media,
+                                           string         unattended_src_path,
+                                           string         unattended_dest_name,
+                                           AvatarFormat?  avatar_format = null) throws GLib.Error {
         os = media.os;
         os_media = media.os_media;
         label = media.label;
diff --git a/src/win7-installer.vala b/src/win7-installer.vala
index 7e805e5..e5868d4 100644
--- a/src/win7-installer.vala
+++ b/src/win7-installer.vala
@@ -31,9 +31,9 @@ private class Boxes.Win7Installer: WindowsInstaller {
         }
     }
 
-    public Win7Installer.copy (InstallerMedia media) throws GLib.Error {
+    public Win7Installer.from_media (InstallerMedia media) throws GLib.Error {
         var unattended_source = get_unattended (media.os.short_id + ".xml");
-        base.copy (media, unattended_source, "Autounattend.xml");
+        base.from_media (media, unattended_source, "Autounattend.xml");
 
         newline_type = DataStreamNewlineType.CR_LF;
 
diff --git a/src/winxp-installer.vala b/src/winxp-installer.vala
index 73caf76..810eb21 100644
--- a/src/winxp-installer.vala
+++ b/src/winxp-installer.vala
@@ -21,10 +21,10 @@ private class Boxes.WinXPInstaller: WindowsInstaller {
         }
     }
 
-    public WinXPInstaller.copy (InstallerMedia media) throws GLib.Error {
+    public WinXPInstaller.from_media (InstallerMedia media) throws GLib.Error {
         var unattended_source = get_unattended (media.os.short_id + ".sif");
         var avatar_format = new AvatarFormat ("bmp", ".bmp", false, 48, 48);
-        base.copy (media, unattended_source, "Winnt.sif", avatar_format);
+        base.from_media (media, unattended_source, "Winnt.sif", avatar_format);
 
         var name = media.os.short_id + ".cmd";
         unattended_source = get_unattended (name);



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