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



commit 4b705a31b47d4030df6376ef2d94ea91ffd54e48
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 deb926f..f28121c 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]