[gnome-documents/wip/skydrive] documents: check the nao:identifier and instantiate a SkydriveDocument



commit 18d02d029ba23e0e0cc7e08cbfe2fa68b930b897
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed May 30 23:49:03 2012 +0200

    documents: check the nao:identifier and instantiate a SkydriveDocument
    
    Fixes: https://bugzilla.gnome.org/666535

 src/documents.js |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/documents.js b/src/documents.js
index 2ffd987..a409b61 100644
--- a/src/documents.js
+++ b/src/documents.js
@@ -972,12 +972,19 @@ DocumentManager.prototype = {
                 (identifier.indexOf('https://docs.google.com') != -1));
     },
 
+    _identifierIsSkydrive: function(identifier) {
+        return (identifier &&
+                (identifier.indexOf('windows-live:skydrive:') != -1));
+    },
+
     createDocumentFromCursor: function(cursor) {
         let identifier = cursor.get_string(Query.QueryColumns.IDENTIFIER)[0];
         let doc;
 
         if (this._identifierIsGoogle(identifier))
             doc = new GoogleDocument(cursor);
+        else if (this._identifierIsSkydrive(identifier))
+            doc = new SkydriveDocument(cursor);
         else
             doc = new LocalDocument(cursor);
 



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