[gnome-boxes] util-app: Move copy_file() to Downlaoder



commit 057d01318f736314579699aa6c9a9bd0c45c10f5
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Thu Oct 9 12:41:53 2014 +0100

    util-app: Move copy_file() to Downlaoder
    
    This function is no longer used by any module other than Downloader so
    lets move it there as a private helper.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=738016

 src/downloader.vala |   13 +++++++++++++
 src/util-app.vala   |   13 -------------
 2 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/src/downloader.vala b/src/downloader.vala
index 614f6f9..78ddc60 100644
--- a/src/downloader.vala
+++ b/src/downloader.vala
@@ -255,4 +255,17 @@ private class Boxes.Downloader : GLib.Object {
 
         return cached_file;
     }
+
+    private async void copy_file (File             src_file,
+                                  File             dest_file,
+                                  ActivityProgress progress,
+                                  Cancellable?     cancellable = null) throws GLib.Error {
+        try {
+            debug ("Copying '%s' to '%s'..", src_file.get_path (), dest_file.get_path ());
+            yield src_file.copy_async (dest_file, 0, Priority.DEFAULT, cancellable, (current, total) => {
+                progress.progress = (double) current / total;
+            });
+            debug ("Copied '%s' to '%s'.", src_file.get_path (), dest_file.get_path ());
+        } catch (IOError.EXISTS error) {}
+    }
 }
diff --git a/src/util-app.vala b/src/util-app.vala
index 6745c65..5fff6ac 100644
--- a/src/util-app.vala
+++ b/src/util-app.vala
@@ -356,19 +356,6 @@ namespace Boxes {
          });
     }
 
-    public async void copy_file (File             src_file,
-                                 File             dest_file,
-                                 ActivityProgress progress,
-                                 Cancellable?     cancellable = null) throws GLib.Error {
-        try {
-            debug ("Copying '%s' to '%s'..", src_file.get_path (), dest_file.get_path ());
-            yield src_file.copy_async (dest_file, 0, Priority.DEFAULT, cancellable, (current, total) => {
-                progress.progress = (double) current / total;
-            });
-            debug ("Copied '%s' to '%s'.", src_file.get_path (), dest_file.get_path ());
-        } catch (IOError.EXISTS error) {}
-    }
-
     // Warning: architecture compability is not computative. e.g "i386" is compatible with "i686" but "i686" 
is
     // incompatible with "i386".
     public enum CPUArchCompatibility {


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