[gnome-documents/gnome-3-16] documents: Use the trash



commit c27408623d342419296a3386b29d31ae35ef0c6c
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Apr 1 16:30:22 2015 +0200

    documents: Use the trash
    
    It's there for when the user makes a mistake, but also for when the
    software makes one.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=747183

 src/documents.js |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/documents.js b/src/documents.js
index b378f5f..bfb6825 100644
--- a/src/documents.js
+++ b/src/documents.js
@@ -756,12 +756,12 @@ const LocalDocument = new Lang.Class({
             return;
 
         let file = Gio.file_new_for_uri(this.uri);
-        file.delete_async(GLib.PRIORITY_DEFAULT, null, Lang.bind(this,
+        file.trash_async(GLib.PRIORITY_DEFAULT, null, Lang.bind(this,
             function(source, res) {
                 try {
-                    file.delete_finish(res);
+                    file.trash_finish(res);
                 } catch(e) {
-                    log('Unable to delete ' + this.uri + ': ' + e.message);
+                    log('Unable to trash ' + this.uri + ': ' + e.message);
                 }
             }));
     }


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