[gnome-documents/rhel-7.4: 2/16] documents: Track nfo:fileName for later use
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents/rhel-7.4: 2/16] documents: Track nfo:fileName for later use
- Date: Fri, 9 Jun 2017 14:16:22 +0000 (UTC)
commit 7597a3e77b5c0192fc848f5fc7f65bb5b662ed20
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Mar 30 16:54:15 2017 +0200
documents: Track nfo:fileName for later use
Now that we can open ODFs and OOXMLs in LOKDocView, we don't need to
convert all remote documents to PDF. For example, we can open office
documents stored from OneDrive without any format conversion. The
nfo:fileName can be used to determine the extension of the cached file.
https://bugzilla.gnome.org/show_bug.cgi?id=774937
src/documents.js | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/documents.js b/src/documents.js
index 2071882..6ecc255 100644
--- a/src/documents.js
+++ b/src/documents.js
@@ -229,6 +229,7 @@ const DocCommon = new Lang.Class({
_init: function(cursor) {
this.id = null;
this.uri = null;
+ this.filename = null;
this.name = null;
this.author = null;
this.mtime = null;
@@ -306,12 +307,12 @@ const DocCommon = new Lang.Class({
this.uri = '';
let title = cursor.get_string(Query.QueryColumns.TITLE)[0];
- let filename = cursor.get_string(Query.QueryColumns.FILENAME)[0];
+ this.filename = cursor.get_string(Query.QueryColumns.FILENAME)[0];
if (title && title != '')
this.name = title;
- else if (filename)
- this.name = GdPrivate.filename_strip_extension(filename);
+ else if (this.filename)
+ this.name = GdPrivate.filename_strip_extension(this.filename);
else
this.name = '';
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]