[gnome-documents/wip/pranavk/lokdocview: 3/5] Use a function to detect if it is open document format
- From: Pranav Kant <pranavk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents/wip/pranavk/lokdocview: 3/5] Use a function to detect if it is open document format
- Date: Sun, 16 Aug 2015 17:23:34 +0000 (UTC)
commit fcfc1e3e36aa6e3861d198025217f221596bb88b
Author: Pranav Kant <pranavk gnome org>
Date: Fri Aug 14 19:02:00 2015 +0530
Use a function to detect if it is open document format
src/documents.js | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/documents.js b/src/documents.js
index 52dba53..5ea1c00 100644
--- a/src/documents.js
+++ b/src/documents.js
@@ -668,6 +668,12 @@ const DocCommon = new Lang.Class({
retval = '{ ?urn nie:isPartOf <' + this.id + '> }';
return retval;
+ },
+
+ isOpenDocumentFormat: function() {
+ if (openDocumentFormats.indexOf(this.mimeType) != -1)
+ return true;
+ return false;
}
});
Signals.addSignalMethods(DocCommon.prototype);
@@ -744,7 +750,7 @@ const LocalDocument = new Lang.Class({
return;
}
- if (openDocumentFormats.indexOf(this.mimeType) != -1) {
+ if (this.isOpenDocumentFormat()) {
callback (this, null, null);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]