[gnome-documents/wip/owncloud: 5/6] documents: check the nao:identifier and instantiate a OwncloudDocument
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents/wip/owncloud: 5/6] documents: check the nao:identifier and instantiate a OwncloudDocument
- Date: Tue, 20 Aug 2013 07:26:45 +0000 (UTC)
commit 66fc3c23370dd1233d4845544c071c6162b038d5
Author: Debarshi Ray <debarshir gnome org>
Date: Mon Aug 19 09:18:26 2013 +0200
documents: check the nao:identifier and instantiate a OwncloudDocument
https://bugzilla.gnome.org/show_bug.cgi?id=686527
src/documents.js | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/documents.js b/src/documents.js
index 5e65107..0ff8adf 100644
--- a/src/documents.js
+++ b/src/documents.js
@@ -1027,6 +1027,11 @@ const DocumentManager = new Lang.Class({
(identifier.indexOf('https://docs.google.com') != -1));
},
+ _identifierIsOwncloud: function(identifier) {
+ return (identifier &&
+ (identifier.indexOf('owncloud:') != -1));
+ },
+
_identifierIsSkydrive: function(identifier) {
return (identifier &&
(identifier.indexOf('windows-live:skydrive:') != -1));
@@ -1038,6 +1043,8 @@ const DocumentManager = new Lang.Class({
if (this._identifierIsGoogle(identifier))
doc = new GoogleDocument(cursor);
+ else if (this._identifierIsOwncloud(identifier))
+ doc = new OwncloudDocument(cursor);
else if (this._identifierIsSkydrive(identifier))
doc = new SkydriveDocument(cursor);
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]