[gnome-documents/wip/owncloud: 6/7] 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: 6/7] documents: check the nao:identifier and instantiate a OwncloudDocument
- Date: Mon, 19 Aug 2013 10:27:08 +0000 (UTC)
commit 01b9cd4a28902a51acd7dd445357cac2532e148b
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 89040c2..7dc5692 100644
--- a/src/documents.js
+++ b/src/documents.js
@@ -1021,6 +1021,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));
@@ -1032,6 +1037,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]