[gnome-documents/wip/skydrive: 18/18] documents: implement SkydriveDocument



commit 791ce1a6cab8b6ec89faad2fbffc881bf61b6539
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed May 30 18:40:51 2012 +0200

    documents: implement SkydriveDocument
    
    Fixes: https://bugzilla.gnome.org/666535

 src/documents.js |   42 +++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 41 insertions(+), 1 deletions(-)
---
diff --git a/src/documents.js b/src/documents.js
index b12090b..0744e32 100644
--- a/src/documents.js
+++ b/src/documents.js
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011 Red Hat, Inc.
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
  *
  * Gnome Documents is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by the
@@ -808,6 +808,46 @@ GoogleDocument.prototype = {
     }
 };
 
+function SkydriveDocument(cursor) {
+    this._init(cursor);
+}
+
+SkydriveDocument.prototype = {
+    __proto__: DocCommon.prototype,
+
+    _init: function(cursor) {
+        this._triedThumbnailing = true;
+        this._failedThumbnailing = true;
+
+        DocCommon.prototype._init.call(this, cursor);
+
+        // overridden
+        this.defaultAppName = _("Skydrive");
+        this.sourceName = _("Skydrive");
+    },
+
+    updateTypeDescription: function() {
+        let description;
+
+        if (this.rdfType.indexOf('nfo#DataContainer') != -1)
+            description = _("Collection");
+        else
+            description = _("Document");
+
+        this.typeDescription = description;
+    },
+
+    load: function(cancellable, callback) {
+    },
+
+    setFavorite: function(favorite) {
+    },
+
+    canTrash: function() {
+        return false;
+    }
+}
+
 function DocumentManager() {
     this._init();
 }



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